node-wings
Version:
node-wings ==========
1 lines • 476 kB
JavaScript
"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console={log:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},error:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})}},e.window=e,e.ace=e,e.normalizeModule=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return normalizeModule(e,n[0])+"!"+normalizeModule(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&i!=t){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},e.require=function(e,t){t||(t=e,e=null);if(!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");t=normalizeModule(e,t);var n=require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;var r=t.split("/");r[0]=require.tlns[r[0]]||r[0];var i=r.join("/")+".js";return require.id=t,importScripts(i),require(e,t)},require.modules={},require.tlns={},e.define=function(e,t,n){arguments.length==2?(n=t,typeof e!="string"&&(t=e,e=require.id)):arguments.length==1&&(n=e,e=require.id);if(e.indexOf("text!")===0)return;var r=function(t,n){return require(e,t,n)};require.modules[e]={factory:function(){var e={exports:{}},t=n(r,e.exports,e);return t&&(e.exports=t),e}}},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var e=require("ace/lib/event_emitter").EventEmitter,t=require("ace/lib/oop"),n=function(){};return function(){t.implement(this,e),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(n.prototype),new n},e.main=null,e.sender=null,e.onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error("Unknown command:"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require("ace/lib/es5-shim"),sender=initSender();var n=require(t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)}})(this),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s);for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H=" \n\f\r \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),define("ace/mode/xquery_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/xquery/JSONParseTreeHandler","ace/mode/xquery/XQueryParser","ace/mode/xquery/visitors/SemanticHighlighter"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./xquery/JSONParseTreeHandler").JSONParseTreeHandler,o=e("./xquery/XQueryParser").XQueryParser,u=e("./xquery/visitors/SemanticHighlighter").SemanticHighlighter,a=t.XQueryWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(a,i),function(){this.onUpdate=function(){this.sender.emit("start");var e=this.doc.getValue(),t=new s(e),n=new o(e,t);try{n.parse_XQuery(),this.sender.emit("ok");var r=t.getParseTree(),i=new u(r,e),a=i.getTokens();this.sender.emit("highlight",{tokens:a,lines:i.lines})}catch(f){if(!(f instanceof n.ParseException))throw f;var l=e.substring(0,f.getBegin()),c=l.split("\n").length,h=f.getBegin()-l.lastIndexOf("\n"),p=n.getErrorMessage(f);this.sender.emit("error",{row:c-1,column:h,text:p,type:"error"})}}}.call(a.prototype)}),define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data),n.schedule(s.$timeout)})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){}}).call(s.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this._insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||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 i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on("change",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;t.action==="insertText"?s.row===r&&s.column<=i?s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row):s.row!==o.row&&s.row<r&&(r+=o.row-s.row):t.action==="insertLines"?s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object")return e;var t=e.constructor();for(var n in e)typeof e[n]=="object"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define("ace/mode/xquery/JSONParseTreeHandler",["require","exports","module"],function(e,t,n){var r=t.JSONParseTreeHandler=function(e){function t(e){return{name:e,children:[],getParent:null,pos:{sl:0,sc:0,el:0,ec:0}}}function n(e,n){var r=t(e);o===null?(o=r,u=r):(r.getParent=u,u.children.push(r),u=u.children[u.children.length-1])}function r(){if(u.children.length>0){var e=u.children[0],t=null;for(var n=u.children.length-1;n>=0;n--){t=u.children[n];if(t.pos.el!==0||t.pos.ec!==0)break}u.pos.sl=e.pos.sl,u.pos.sc=e.pos.sc,u.pos.el=t.pos.el,u.pos.ec=t.pos.ec}u.name==="FunctionName"&&(u.name="EQName"),u.name==="EQName"&&u.value===undefined&&(u.value=u.children[0].value,u.children.pop()),u.getParent!==null&&(u=u.getParent);if(u.children.length>0){var r=u.children[u.children.length-1];r.children.length===1&&s.indexOf(r.name)!==-1&&(u.children[u.children.length-1]=r.children[0])}}function i(e,t,n){var r=n-f;u.value=a.substring(0,r),a=a.substring(r),f=n;var i=c,s=l,o=i+u.value.split("\n").length-1,h=u.value.lastIndexOf("\n"),p=h===-1?s+u.value.length:u.value.substring(h+1).length;c=o,l=p,u.pos.sl=i,u.pos.sc=s,u.pos.el=o,u.pos.ec=p}var s=["OrExpr","AndExpr","ComparisonExpr","StringConcatExpr","RangeExpr","UnionExpr","IntersectExceptExpr","InstanceofExpr","TreatExpr","CastableExpr","CastExpr","UnaryExpr","ValueExpr","FTContainsExpr","SimpleMapExpr","PathExpr","RelativePathExpr","PostfixExpr","StepExpr"],o=null,u=null,a=e,f=0,l=0,c=0,h=0;this.closeParseTree=function(){while(u.getParent!==null)r();r()},this.peek=function(){return u},this.getParseTree=function(){return o},this.reset=function(e){},this.startNonterminal=function(e,t){n(e,t)},this.endNonterminal=function(e,t){r()},this.terminal=function(e,t,s){e=e.substring(0,1)==="'"&&e.substring(e.length-1)==="'"?"TOKEN":e,n(e,t),i(u,t,s),r()},this.whitespace=function(e,t){var s="WS";n(s,e),i(u,e,t),r()}}}),define("ace/mode/xquery/XQueryParser",["require","exports","module"],function(e,t,n){var r=t.XQueryParser=function i(e,t){function n(e,t){ql=t,Ul=e,zl=e.length,r(0,0,0)}function r(e,t,n){kl=t,Ll=t,Al=e,Ol=t,Ml=n,_l=0,Xl=n,Bl=-1,Rl={},ql.reset(Ul)}function s(){ql.startNonterminal("Module",Ll);switch(Al){case 274:El(199);break;default:Cl=Al}(Cl==64274||Cl==134930)&&o(),wl(268);switch(Al){case 182:El(194);break;default:Cl=Al}switch(Cl){case 94390:yl(),u();break;default:yl(),Ba()}ql.endNonterminal("Module",Ll)}function o(){ql.startNonterminal("VersionDecl",Ll),vl(274),wl(116);switch(Al){case 125:vl(125),wl(17),vl(11);break;default:vl(263),wl(17),vl(11),wl(109),Al==125&&(vl(125),wl(17),vl(11))}wl(28),yl(),l(),ql.endNonterminal("VersionDecl",Ll)}function u(){ql.startNonterminal("LibraryModule",Ll),a(),wl(138),yl(),f(),ql.endNonterminal("LibraryModule",Ll)}function a(){ql.startNonterminal("ModuleDecl",Ll),vl(182),wl(61),vl(184),wl(247),yl(),Pa(),wl(29),vl(60),wl(15),vl(7),wl(28),yl(),l(),ql.endNonterminal("ModuleDecl",Ll)}function f(){ql.startNonterminal("Prolog",Ll);for(;;){wl(268);switch(Al){case 108:El(213);break;case 153:El(201);break;default:Cl=Al}if(Cl!=42604&&Cl!=43628&&Cl!=50284&&Cl!=53356&&Cl!=54380&&Cl!=55916&&Cl!=72300&&Cl!=93337&&Cl!=94316&&Cl!=104044&&Cl!=113772&&Cl!=115353)break;switch(Al){case 108:El(178);break;default:Cl=Al}if(Cl==55916){Cl=pl(0,Ll);if(Cl==0){var e=kl,t=Ll,n=Al,r=Ol,i=Ml,s=_l,o=Dl,u=Pl;try{M(),Cl=-1}catch(a){Cl=-2}kl=e,Ll=t,Al=n,Al==0?Xl=t:(Ol=r,Ml=i,_l=s,_l==0?Xl=i:(Dl=o,Pl=u,Xl=u)),hl(0,Ll,Cl)}}switch(Cl){case-1:yl(),O();break;case 94316:yl(),A();break;case 153:yl(),N();break;case 72300:yl(),_();break;default:yl(),c()}wl(28),yl(),l()}for(;;){wl(268);switch(Al){case 108:El(210);break;default:Cl=Al}if(Cl!=16492&&Cl!=48748&&Cl!=51820&&Cl!=74348&&Cl!=79468&&Cl!=82540&&Cl!=101996&&Cl!=131692&&Cl!=134252)break;switch(Al){case 108:El(175);break;default:Cl=Al}switch(Cl){case 51820:yl(),q();break;case 101996:yl(),K();break;default:yl(),D()}wl(28),yl(),l()}ql.endNonterminal("Prolog",Ll)}function l(){ql.startNonterminal("Separator",Ll),vl(53),ql.endNonterminal("Separator",Ll)}function c(){ql.startNonterminal("Setter",Ll);switch(Al){case 108:El(172);break;default:Cl=Al}if(Cl==55916){Cl=pl(1,Ll);if(Cl==0){var e=kl,t=Ll,n=Al,r=Ol,i=Ml,s=_l,o=Dl,u=Pl;try{d(),Cl=-2}catch(a){try{kl=e,Ll=t,Al=n,Al==0?Xl=t:(Ol=r,Ml=i,_l=s,_l==0?Xl=i:(Dl=o,Pl=u,Xl=u)),b(),Cl=-6}catch(f){Cl=-9}}kl=e,Ll=t,Al=n,Al==0?Xl=t:(Ol=r,Ml=i,_l=s,_l==0?Xl=i:(Dl=o,Pl=u,Xl=u)),hl(1,Ll,Cl)}}switch(Cl){case 43628:h();break;case-2:p();break;case 42604:v();break;case 50284:m();break;case 104044:g();break;case-6:y();break;case 113772:To();break;case 53356:w();break;default:x()}ql.endNonterminal("Setter",Ll)}function h(){ql.startNonterminal("BoundarySpaceDecl",Ll),vl(108),wl(33),vl(85),wl(133);switch(Al){case 214:vl(214);break;default:vl(241)}ql.endNonterminal("BoundarySpaceDecl",Ll)}function p(){ql.startNonterminal("DefaultCollationDecl",Ll),vl(108),wl(46),vl(109),wl(38),vl(94),wl(15),vl(7),ql.endNonterminal("DefaultCollationDecl",Ll)}function d(){ml(108),wl(46),ml(109),wl(38),ml(94),wl(15),ml(7)}function v(){ql.startNonterminal("BaseURIDecl",Ll),vl(108),wl(32),vl(83),wl(15),vl(7),ql.endNonterminal("BaseURIDecl",Ll)}function m(){ql.startNonterminal("ConstructionDecl",Ll),vl(108),wl(41),vl(98),wl(133);switch(Al){case 241:vl(241);break;default:vl(214)}ql.endNonterminal("ConstructionDecl",Ll)}function g(){ql.startNonterminal("OrderingModeDecl",Ll),vl(108),wl(68),vl(203),wl(131);switch(Al){case 202:vl(202);break;default:vl(256)}ql.endNonterminal("OrderingModeDecl",Ll)}function y(){ql.startNonterminal("EmptyOrderDecl",Ll),vl(108),wl(46),vl(109),wl(67),vl(201),wl(49),vl(123),wl(121);switch(Al){case 147:vl(147);break;default:vl(173)}ql.endNonterminal("EmptyOrderDecl",Ll)}function b(){ml(108),wl(46),ml(109),wl(67),ml(201),wl(49),ml(123),wl(121);switch(Al){case 147:ml(147);break;default:ml(173)}}function w(){ql.startNonterminal("CopyNamespacesDecl",Ll),vl(108),wl(44),vl(104),wl(128),yl(),E(),wl(25),vl(41),wl(123),yl(),S(),ql.endNonterminal("CopyNamespacesDecl",Ll)}function E(){ql.startNonterminal("PreserveMode",Ll);switch(Al){case 214:vl(214);break;default:vl(190)}ql.endNonterminal("PreserveMode",Ll)}function S(){ql.startNonterminal("InheritMode",Ll);switch(Al){case 157:vl(157);break;default:vl(189)}ql.endNonterminal("InheritMode",Ll)}function x(){ql.startNonterminal("DecimalFormatDecl",Ll),vl(108),wl(114);switch(Al){case 106:vl(106),wl(253),yl(),Oa();break;default:vl(109),wl(45),vl(106)}for(;;){wl(180);if(Al==53)break;yl(),T(),wl(29),vl(60),wl(17),vl(11)}ql.endNonterminal("DecimalFormatDecl",Ll)}function T(){ql.startNonterminal("DFPropertyName",Ll);switch(Al){case 107:vl(107);break;case 149:vl(149);break;case 156:vl(156);break;case 179:vl(179);break;case 67:vl(67);break;case 209:vl(209);break;case 208:vl(208);break;case 275:vl(275);break;case 116:vl(116);break;default:vl(207)}ql.endNonterminal("DFPropertyName",Ll)}function N(){ql.startNonterminal("Import",Ll);switch(Al){case 153:El(126);break;default:Cl=Al}switch(Cl){case 115353:C();break;default:L()}ql.endNonterminal("Import",Ll)}function C(){ql.startNonterminal("SchemaImport",Ll),vl(153),wl(73),vl(225),wl(137),Al!=7&&(yl(),k()),wl(15),vl(7),wl(108);if(Al==81){vl(81),wl(15),vl(7);for(;;){wl(103);if(Al!=41)break;vl(41),wl(15),vl(7)}}ql.endNonterminal("SchemaImport",Ll)}function k(){ql.startNonterminal("SchemaPrefix",Ll);switch(Al){case 184:vl(184),wl(247),yl(),Pa(),wl(29),vl(60);break;default:vl(109),wl(47),vl(121),wl(61),vl(184)}ql.endNonterminal("SchemaPrefix",Ll)}function L(){ql.startNonterminal("ModuleImport",Ll),vl(153),wl(60),vl(182),wl(90),Al==184&&(vl(184),wl(247),yl(),Pa(),wl(29),vl(60)),wl(15),vl(7),wl(108);if(Al==81){vl(81),wl(15),vl(7);for(;;){wl(103);if(Al!=41)break;vl(41),wl(15),vl(7)}}ql.endNonterminal("ModuleImport",Ll)}function A(){ql.startNonterminal("NamespaceDecl",Ll),vl(108),wl(61),vl(184),wl(247),yl(),Pa(),wl(29),vl(60),wl(15),vl(7),ql.endNonterminal("NamespaceDecl",Ll)}function O(){ql.startNonterminal("DefaultNamespaceDecl",Ll),vl(108),wl(46),vl(109),wl(115);switch(Al){case 121:vl(121);break;default:vl(145)}wl(61),vl(184),wl(15),vl(7),ql.endNonterminal("DefaultNamespaceDecl",Ll)}function M(){ml(108),wl(46),ml(109),wl(115);switch(Al){case 121:ml(121);break;default:ml(145)}wl(61),ml(184),wl(15),ml(7)}function _(){ql.startNonterminal("FTOptionDecl",Ll),vl(108),wl(52),vl(141),wl(81),yl(),Du(),ql.endNonterminal("FTOptionDecl",Ll)}function D(){ql.startNonterminal("AnnotatedDecl",Ll),vl(108);for(;;){wl(170);if(Al!=32&&Al!=257)break;switch(Al){case 257:yl(),P();break;default:yl(),H()}}switch(Al){case 262:yl(),j();break;case 145:yl(),cl();break;case 95:yl(),fa();break;case 155:yl(),ya();break;default:yl(),ba()}ql.endNonterminal("AnnotatedDecl",Ll)}function P(){ql.startNonterminal("CompatibilityAnnotation",Ll),vl(257),ql.endNonterminal("CompatibilityAnnotation",Ll)}function H(){ql.startNonterminal("Annotation",Ll),vl(32),wl(253),yl(),Oa(),wl(171);if(Al==34){vl(34),wl(154),yl(),ri();for(;;){wl(101);if(Al!=41)break;vl(41),wl(154),yl(),ri()}vl(37)}ql.endNonterminal("Annotation",Ll)}function B(){ml(32),wl(253),Ma(),wl(171);if(Al==34){ml(34),wl(154),ii();for(;;){wl(101);if(Al!=41)break;ml(41),wl(154),ii()}ml(37)}}function j(){ql.startNonterminal("VarDecl",Ll),vl(262),wl(21),vl(31),wl(253),yl(),fi(),wl(147),Al==79&&(yl(),cs()),wl(106);switch(Al){case 52:vl(52),wl(267),yl(),F();break;default:vl(133),wl(104),Al==52&&(vl(52),wl(267),yl(),I())}ql.endNonterminal("VarDecl",Ll)}function F(){ql.startNonterminal("VarValue",Ll),Nf(),ql.endNonterminal("VarValue",Ll)}function I(){ql.startNonterminal("VarDefaultValue",Ll),Nf(),ql.endNonterminal("VarDefaultValue",Ll)}function q(){ql.startNonterminal("ContextItemDecl",Ll),vl(108),wl(43),vl(101),wl(55),vl(165),wl(147),Al==79&&(vl(79),wl(259),yl(),gs()),wl(106);switch(Al){case 52:vl(52),wl(267),yl(),F();break;default:vl(133),wl(104),Al==52&&(vl(52),wl(267),yl(),I())}ql.endNonterminal("ContextItemDecl",Ll)}function R(){ql.startNonterminal("ParamList",Ll),z();for(;;){wl(101);if(Al!=41)break;vl(41),wl(21),yl(),z()}ql.endNonterminal("ParamList",Ll)}function U(){W();for(;;){wl(101);if(Al!=41)break;ml(41),wl(21),W()}}function z(){ql.startNonterminal("Param",Ll),vl(31),wl(253),yl(),Oa(),wl(143),Al==79&&(yl(),cs()),ql.endNonterminal("Param",Ll)}function W(){ml(31),wl(253),Ma(),wl(143),Al==79&&hs()}function X(){ql.startNonterminal("FunctionBody",Ll),$(),ql.endNonterminal("FunctionBody",Ll)}function V(){J()}function $(){ql.startNonterminal("EnclosedExpr",Ll),vl(276),wl(267),yl(),Q(),vl(282),ql.endNonterminal("EnclosedExpr",Ll)}function J(){ml(276),wl(267),G(),ml(282)}function K(){ql.startNonterminal("OptionDecl",Ll),vl(108),wl(66),vl(199),wl(253),yl(),Oa(),wl(17),vl(11),ql.endNonterminal("OptionDecl",Ll)}function Q(){ql.startNonterminal("Expr",Ll),Nf();for(;;){if(Al!=41)break;vl(41),wl(267),yl(),Nf()}ql.endNonterminal("Expr",Ll)}function G(){Cf();for(;;){if(Al!=41)break;ml(41),wl(267),Cf()}}function Y(){ql.startNonterminal("FLWORExpr",Ll),et();for(;;){wl(173);if(Al==220)break;yl(),nt()}yl(),nn(),ql.endNonterminal("FLWORExpr",Ll)}function Z(){tt();for(;;){wl(173);if(Al==220)break;rt()}rn()}function et(){ql.startNonterminal("InitialClause",Ll);switch(Al){case 137:El(141);break;default:Cl=Al}switch(Cl){case 16009:it();break;case 174:dt();break;default:yt()}ql.endNonterminal("InitialClause",Ll)}function tt(){switch(Al){case 137:El(141);break;default:Cl=Al}switch(Cl){case 16009:st();break;case 174:vt();break;default:bt()}}function nt(){ql.startNonterminal("IntermediateClause",Ll);switch(Al){case 137:case 174:et();break;case 266:Ft();break;case 148:qt();break;case 105:Bt();break;default:Jt()}ql.endNonterminal("IntermediateClause",Ll)}function rt(){switch(Al){case 137:case 174:tt();break;case 266:It();break;case 148:Rt();break;case 105:jt();break;default:Kt()}}function it(){ql.startNonterminal("ForClause",Ll),vl(137),wl(21),yl(),ot();for(;;){if(Al!=41)break;vl(41),wl(21),yl(),ot()}ql.endNonterminal("ForClause",Ll)}function st(){ml(137),wl(21),ut();for(;;){if(Al!=41)break;ml(41),wl(21),ut()}}function ot(){ql.startNonterminal("ForBinding",Ll),vl(31),wl(253),yl(),fi(),wl(164),Al==79&&(yl(),cs()),wl(158),Al==72&&(yl(),at()),wl(150),Al==81&&(yl(),lt()),wl(122),Al==228&&(yl(),ht()),wl(53),vl(154),wl(267),yl(),Nf(),ql.endNonterminal("ForBinding",Ll)}function ut(){ml(31),wl(253),li(),wl(164),Al==79&&hs(),wl(158),Al==72&&ft(),wl(150),Al==81&&ct(),wl(122),Al==228&&pt(),wl(53),ml(154),wl(267),Cf()}function at(){ql.startNonterminal("AllowingEmpty",Ll),vl(72),wl(49),vl(123),ql.endNonterminal("AllowingEmpty",Ll)}function ft(){ml(72),wl(49),ml(123)}function lt(){ql.startNonterminal("PositionalVar",Ll),vl(81),wl(21),vl(31),wl(253),yl(),fi(),ql.endNonterminal("PositionalVar",Ll)}function ct(){ml(81),wl(21),ml(31),wl(253),li()}function ht(){ql.startNonterminal("FTScoreVar",Ll),vl(228),wl(21),vl(31),wl(253),yl(),fi(),ql.endNonterminal("FTScoreVar",Ll)}function pt(){ml(228),wl(21),ml(31),wl(253),li()}function dt(){ql.startNonterminal("LetClause",Ll),vl(174),wl(96),yl(),mt();for(;;){if(Al!=41)break;vl(41),wl(96),yl(),mt()}ql.endNonterminal("LetClause",Ll)}function vt(){ml(174),wl(96),gt();for(;;){if(Al!=41)break;ml(41),wl(96),gt()}}function mt(){ql.startNonterminal("LetBinding",Ll);switch(Al){case 31:vl(31),wl(253),yl(),fi(),wl(105),Al==79&&(yl(),cs());break;default:ht()}wl(27),vl(52),wl(267),yl(),Nf(),ql.endNonterminal("LetBinding",Ll)}function gt(){switch(Al){case 31:ml(31),wl(253),li(),wl(105),Al==79&&hs();break;default:pt()}wl(27),ml(52),wl(267),Cf()}function yt(){ql.startNonterminal("WindowClause",Ll),vl(137),wl(135);switch(Al){case 251:yl(),wt();break;default:yl(),St()}ql.endNonterminal("WindowClause",Ll)}function bt(){ml(137),wl(135);switch(Al){case 251:Et();break;default:xt()}}function wt(){ql.startNonterminal("TumblingWindowClause",Ll),vl(251),wl(85),vl(269),wl(21),vl(31),wl(253),yl(),fi(),wl(110),Al==79&&(yl(),cs()),wl(53),vl(154),wl(267),yl(),Nf(),yl(),Tt();if(Al==126||Al==198)yl(),Ct();ql.endNonterminal("TumblingWindowClause",Ll)}function Et(){ml(251),wl(85),ml(269),wl(21),ml(31),wl(253),li(),wl(110),Al==79&&hs(),wl(53),ml(154),wl(267),Cf(),Nt(),(Al==126||Al==198)&&kt()}function St(){ql.startNonterminal("SlidingWindowClause",Ll),vl(234),wl(85),vl(269),wl(21),vl(31),wl(253),yl(),fi(),wl(110),Al==79&&(yl(),cs()),wl(53),vl(154),wl(267),yl(),Nf(),yl(),Tt(),yl(),Ct(),ql.endNonterminal("SlidingWindowClause",Ll)}function xt(){ml(234),wl(85),ml(269),wl(21),ml(31),wl(253),li(),wl(110),Al==79&&hs(),wl(53),ml(154),wl(267),Cf(),Nt(),kt()}function Tt(){ql.startNonterminal("WindowStartCondition",Ll),vl(237),wl(163),yl(),Lt(),wl(83),vl(265),wl(267),yl(),Nf(),ql.endNonterminal("WindowStartCondition",Ll)}function Nt(){ml(237),wl(163),At(),wl(83),ml(265),wl(267),Cf()}function Ct(){ql.startNonterminal("WindowEndCondition",Ll),Al==198&&vl(198),wl(50),vl(126),wl(163),yl(),Lt(),wl(83),vl(265),wl(267),yl(),Nf(),ql.endNonterminal("WindowEndCondition",Ll)}function kt(){Al==198&&ml(198),wl(50),ml(126),wl(163),At(),wl(83),ml(265),wl(267),Cf()}function Lt(){ql.startNonterminal("WindowVars",Ll),Al==31&&(vl(31),wl(253),yl(),Ot()),wl(159),Al==81&&(yl(),lt()),wl(153),Al==215&&(vl(215),wl(21),vl(31),wl(253),yl(),_t()),wl(127),Al==187&&(vl(187),wl(21),vl(31),wl(253),yl(),Pt()),ql.endNonterminal("WindowVars",Ll)}function At(){Al==31&&(ml(31),wl(253),Mt()),wl(159),Al==81&&ct(),wl(153),Al==215&&(ml(215),wl(21),ml(31),wl(253),Dt()),wl(127),Al==187&&(ml(187),wl(21),ml(31),wl(253),Ht())}function Ot(){ql.startNonterminal("CurrentItem",Ll),Oa(),ql.endNonterminal("CurrentItem",Ll)}function Mt(){Ma()}function _t(){ql.startNonterminal("PreviousItem",Ll),Oa(),ql.endNonterminal("PreviousItem",Ll)}function Dt(){Ma()}function Pt(){ql.startNonterminal("NextItem",Ll),Oa(),ql.endNonterminal("NextItem",Ll)}function Ht(){Ma()}function Bt(){ql.startNonterminal("CountClause",Ll),vl(105),wl(21),vl(31),wl(253),yl(),fi(),ql.endNonterminal("CountClause",Ll)}function jt(){ml(105),wl(21),ml(31),wl(253),li()}function Ft(){ql.startNonterminal("WhereClause",Ll),vl(266),wl(267),yl(),Nf(),ql.endNonterminal("WhereClause",Ll)}function It(){ml(266),wl(267),Cf()}function qt(){ql.startNonterminal("GroupByClause",Ll),vl(148),wl(34),vl(87),wl(21),yl(),Ut(),ql.endNonterminal("GroupByClause",Ll)}function Rt(){ml(148),wl(34),ml(87),wl(21),zt()}function Ut(){ql.startNonterminal("GroupingSpecList",Ll),Wt();for(;;){wl(176);if(Al!=41)break;vl(41),wl(21),yl(),Wt()}ql.endNonterminal("GroupingSpecList",Ll)}function zt(){Xt();for(;;){wl(176);if(Al!=41)break;ml(41),wl(21),Xt()}}function Wt(){ql.startNonterminal("GroupingSpec",Ll),Vt(),wl(182);if(Al==52||Al==79)Al==79&&(yl(),cs()),wl(27),vl(52),wl(267),yl(),Nf();Al==94&&(vl(94),wl(15),vl(7)),ql.endNonterminal("GroupingSpec",Ll)}function Xt(){$t(),wl(182);if(Al==52||Al==79)Al==79&&hs(),wl(27),ml(52),wl(267),Cf();Al==94&&(ml(94),wl(15),ml(7))}function Vt(){ql.startNonterminal("GroupingVariable",Ll),vl(31),wl(253),yl(),fi(),ql.endNonterminal("GroupingVariable",Ll)}function $t(){ml(31),wl(253),li()}function Jt(){ql.startNonterminal("OrderByClause",Ll);switch(Al){case 201:vl(201),wl(34),vl(87);break;default:vl(236),wl(67),vl(201),wl(34),vl(87)}wl(267),yl(),Qt(),ql.endNonterminal("OrderByClause",Ll)}function Kt(){switch(Al){case 201:ml(201),wl(34),ml(87);break;default:ml(236),wl(67),ml(201),wl(34),ml(87)}wl(267),Gt()}function Qt(){ql.startNonterminal("OrderSpecList",Ll),Yt();for(;;){wl(176);if(Al!=41)break;vl(41),wl(267),yl(),Yt()}ql.endNonterminal("OrderSpecList",Ll)}function Gt(){Zt();for(;;){wl(176);if(Al!=41)break;ml(41),wl(267),Zt()}}function Yt(){ql.startNonterminal("OrderSpec",Ll),Nf(),yl(),en(),ql.endNonterminal("OrderSpec",Ll)}function Zt(){Cf(),tn()}function en(){ql.startNonterminal("OrderModifier",Ll);if(Al==80||Al==113)switch(Al){case 80:vl(80);break;default:vl(113)}wl(179);if(Al==123){vl(123),wl(121);switch(Al){case 147:vl(147);break;default:vl(173)}}wl(177),Al==94&&(vl(94),wl(15),vl(7)),ql.endNonterminal("OrderModifier",Ll)}function tn(){if(Al==80||Al==113)switch(Al){case 80:ml(80);break;default:ml(113)}wl(179);if(Al==123){ml(123),wl(121);switch(Al){case 147:ml(147);break;default:ml(173)}}wl(177),Al==94&&(ml(94),wl(15),ml(7))}function nn(){ql.startNonterminal("ReturnClause",Ll),vl(220),wl(267),yl(),Nf(),ql.endNonterminal("ReturnClause",Ll)}function rn(){ml(220),wl(267),Cf()}function sn(){ql.startNonterminal("QuantifiedExpr",Ll);switch(Al){case 235:vl(235);break;default:vl(129)}wl(21),vl(31),wl(253),yl(),fi(),wl(110),Al==79&&(yl(),cs()),wl(53),vl(154),wl(267),yl(),Nf();for(;;){if(Al!=41)break;vl(41),wl(21),vl(31),wl(253),yl(),fi(),wl(110),Al==79&&(yl(),cs()),wl(53),vl(154),wl(267),yl(),Nf()}vl(224),wl(267),yl(),Nf(),ql.endNonterminal("QuantifiedExpr",Ll)}function on(){switch(Al){case 235:ml(235);break;default:ml(129)}wl(21),ml(31),wl(253),li(),wl(110),Al==79&&hs(),wl(53),ml(154),wl(267),Cf();for(;;){if(Al!=41)break;ml(41),wl(21),ml(31),wl(253),li(),wl(110),Al==79&&hs(),wl(53),ml(154),wl(267),Cf()}ml(224),wl(267),Cf()}function un(){ql.startNonterminal("SwitchExpr",Ll),vl(243),wl(22),vl(34),wl(267),yl(),Q(),vl(37);for(;;){wl(35),yl(),fn();if(Al!=88)break}vl(109),wl(70),vl(220),wl(267),yl(),Nf(),ql.endNonterminal("SwitchExpr",Ll)}function an(){ml(243),wl(22),ml(34),wl(267),G(),ml(37);for(;;){wl(35),ln();if(Al!=88)break}ml(109),wl(70),ml(220),wl(267),Cf()}function fn(){ql.startNonterminal("SwitchCaseClause",Ll);for(;;){vl(88),wl(267),yl(),cn();if(Al!=88)break}vl(220),wl(267),yl(),Nf(),ql.endNonterminal("SwitchCaseClause",Ll)}function ln(){for(;;){ml(88),wl(267),hn();if(Al!=88)break}ml(220),wl(267),Cf()}function cn(){ql.startNonterminal("SwitchCaseOperand",Ll),Nf(),ql.endNonterminal("SwitchCaseOperand",Ll)}function hn(){Cf()}function pn(){ql.startNonterminal("TypeswitchExpr",Ll),vl(253),wl(22),vl(34),wl(267),yl(),Q(),vl(37);for(;;){wl(35),yl(),vn();if(Al!=88)break}vl(109),wl(95),Al==31&&(vl(31),wl(253),yl(),fi()),wl(70),vl(220),wl(267),yl(),Nf(),ql.endNonterminal("TypeswitchExpr",Ll)}function dn(){ml(253),wl(22),ml(34),wl(267),G(),ml(37);for(;;){wl(35),mn();if(Al!=88)break}ml(109),wl(95),Al==31&&(ml(31),wl(253),li()),wl(70),ml(220),wl(267),Cf()}function vn(){ql.startNonterminal("CaseClause",Ll),vl(88),wl(260),Al==31&&(vl(31),wl(253),yl(),fi(),wl(30),vl(79)),wl(259),yl(),gn(),vl(220),wl(267),yl(),Nf(),ql.endNonterminal("CaseClause",Ll)}function mn(){ml(88),wl(260),Al==31&&(ml(31),wl(253),li(),wl(30),ml(79)),wl(259),yn(),ml(220),wl(267),Cf()}function gn(){ql.startNonterminal("SequenceTypeUnion",Ll),ps();for(;;){wl(134);if(Al!=279)break;vl(279),wl(259),yl(),ps()}ql.endNonterminal("SequenceTypeUnion",Ll)}function yn(){ds();for(;;){wl(134);if(Al!=279)break;ml(279),wl(259),ds()}}function bn(){ql.startNonterminal("IfExpr",Ll),vl(152),wl(22),vl(34),wl(267),yl(),Q(),vl(37),wl(77),vl(245),wl(267),yl(),Nf(),vl(122),wl(267),yl(),Nf(),ql.endNonterminal("IfExpr",Ll)}function wn(){ml(152),wl(22),ml(34),wl(267),G(),ml(37),wl(77),ml(245),wl(267),Cf(),ml(122),wl(267),Cf()}function En(){ql.startNonterminal("TryCatchExpr",Ll),xn();for(;;){wl(36),yl(),kn(),wl(184);if(Al!=91)break}ql.endNonterminal("TryCatchExpr",Ll)}function Sn(){Tn();for(;;){wl(36),Ln(),wl(184);if(Al!=91)break}}function xn(){ql.startNonterminal("TryClause",Ll),vl(250),wl(87),vl(276),wl(267),yl(),Nn(),vl(282),ql.endNonterminal("TryClause",Ll)}function Tn(){ml(250),wl(87),ml(276),wl(267),Cn(),ml(282)}function Nn(){ql.startNonterminal("TryTargetExpr",Ll),Q(),ql.endNonterminal("TryTargetExpr",Ll)}function Cn(){G()}function kn(){ql.startNonterminal("CatchClause",Ll),vl(91),wl(255),yl(),An(),vl(276),wl(267),yl(),Q(),vl(282),ql.endNonterminal("CatchClause",Ll)}function Ln(){ml(91),wl(255),On(),ml(276),wl(267),G(),ml(282)}