UNPKG

react-ace

Version:
1 lines 441 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ReactAce=t():e.ReactAce=t()}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=9)}([function(e,t,i){e.exports=i(11)()},function(e,t,i){"use strict";e.exports=i(13)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){(function(e,i){var n="[object Arguments]",s="[object Map]",r="[object Object]",o="[object Set]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,h={};h["[object Float32Array]"]=h["[object Float64Array]"]=h["[object Int8Array]"]=h["[object Int16Array]"]=h["[object Int32Array]"]=h["[object Uint8Array]"]=h["[object Uint8ClampedArray]"]=h["[object Uint16Array]"]=h["[object Uint32Array]"]=!0,h[n]=h["[object Array]"]=h["[object ArrayBuffer]"]=h["[object Boolean]"]=h["[object DataView]"]=h["[object Date]"]=h["[object Error]"]=h["[object Function]"]=h[s]=h["[object Number]"]=h[r]=h["[object RegExp]"]=h[o]=h["[object String]"]=h["[object WeakMap]"]=!1;var c="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),f=t&&!t.nodeType&&t,g=f&&"object"==typeof i&&i&&!i.nodeType&&i,p=g&&g.exports===f,m=p&&c.process,v=function(){try{return m&&m.binding&&m.binding("util")}catch(e){}}(),w=v&&v.isTypedArray;function b(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}function y(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function $(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}var S,C,x,k=Array.prototype,A=Function.prototype,_=Object.prototype,L=d["__core-js_shared__"],R=A.toString,E=_.hasOwnProperty,M=(S=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",T=_.toString,O=RegExp("^"+R.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=p?d.Buffer:void 0,I=d.Symbol,P=d.Uint8Array,W=_.propertyIsEnumerable,D=k.splice,B=I?I.toStringTag:void 0,H=Object.getOwnPropertySymbols,N=F?F.isBuffer:void 0,z=(C=Object.keys,x=Object,function(e){return C(x(e))}),V=ve(d,"DataView"),j=ve(d,"Map"),U=ve(d,"Promise"),K=ve(d,"Set"),G=ve(d,"WeakMap"),q=ve(Object,"create"),Y=$e(V),X=$e(j),Q=$e(U),J=$e(K),Z=$e(G),ee=I?I.prototype:void 0,te=ee?ee.valueOf:void 0;function ie(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function se(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new se;++t<i;)this.add(e[t])}function oe(e){var t=this.__data__=new ne(e);this.size=t.size}function ae(e,t){var i=xe(e),n=!i&&Ce(e),s=!i&&!n&&ke(e),r=!i&&!n&&!s&&Ee(e),o=i||n||s||r,a=o?function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}(e.length,String):[],l=a.length;for(var h in e)!t&&!E.call(e,h)||o&&("length"==h||s&&("offset"==h||"parent"==h)||r&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||ye(h,l))||a.push(h);return a}function le(e,t){for(var i=e.length;i--;)if(Se(e[i][0],t))return i;return-1}function he(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?function(e){var t=E.call(e,B),i=e[B];try{e[B]=void 0;var n=!0}catch(e){}var s=T.call(e);n&&(t?e[B]=i:delete e[B]);return s}(e):function(e){return T.call(e)}(e)}function ce(e){return Re(e)&&he(e)==n}function ue(e,t,i,a,l){return e===t||(null==e||null==t||!Re(e)&&!Re(t)?e!=e&&t!=t:function(e,t,i,a,l,h){var c=xe(e),u=xe(t),d=c?"[object Array]":be(e),f=u?"[object Array]":be(t),g=(d=d==n?r:d)==r,p=(f=f==n?r:f)==r,m=d==f;if(m&&ke(e)){if(!ke(t))return!1;c=!0,g=!1}if(m&&!g)return h||(h=new oe),c||Ee(e)?ge(e,t,i,a,l,h):function(e,t,i,n,r,a,l){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new P(e),new P(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case s:var h=y;case o:var c=1&n;if(h||(h=$),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;n|=2,l.set(e,t);var d=ge(h(e),h(t),n,r,a,l);return l.delete(e),d;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,d,i,a,l,h);if(!(1&i)){var v=g&&E.call(e,"__wrapped__"),w=p&&E.call(t,"__wrapped__");if(v||w){var b=v?e.value():e,S=w?t.value():t;return h||(h=new oe),l(b,S,i,a,h)}}if(!m)return!1;return h||(h=new oe),function(e,t,i,n,s,r){var o=1&i,a=pe(e),l=a.length,h=pe(t).length;if(l!=h&&!o)return!1;var c=l;for(;c--;){var u=a[c];if(!(o?u in t:E.call(t,u)))return!1}var d=r.get(e);if(d&&r.get(t))return d==t;var f=!0;r.set(e,t),r.set(t,e);var g=o;for(;++c<l;){u=a[c];var p=e[u],m=t[u];if(n)var v=o?n(m,p,u,t,e,r):n(p,m,u,e,t,r);if(!(void 0===v?p===m||s(p,m,i,n,r):v)){f=!1;break}g||(g="constructor"==u)}if(f&&!g){var w=e.constructor,b=t.constructor;w!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b)&&(f=!1)}return r.delete(e),r.delete(t),f}(e,t,i,a,l,h)}(e,t,i,a,ue,l))}function de(e){return!(!Le(e)||function(e){return!!M&&M in e}(e))&&(Ae(e)?O:a).test($e(e))}function fe(e){if(i=(t=e)&&t.constructor,n="function"==typeof i&&i.prototype||_,t!==n)return z(e);var t,i,n,s=[];for(var r in Object(e))E.call(e,r)&&"constructor"!=r&&s.push(r);return s}function ge(e,t,i,n,s,r){var o=1&i,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var h=r.get(e);if(h&&r.get(t))return h==t;var c=-1,u=!0,d=2&i?new re:void 0;for(r.set(e,t),r.set(t,e);++c<a;){var f=e[c],g=t[c];if(n)var p=o?n(g,f,c,t,e,r):n(f,g,c,e,t,r);if(void 0!==p){if(p)continue;u=!1;break}if(d){if(!b(t,(function(e,t){if(o=t,!d.has(o)&&(f===e||s(f,e,i,n,r)))return d.push(t);var o}))){u=!1;break}}else if(f!==g&&!s(f,g,i,n,r)){u=!1;break}}return r.delete(e),r.delete(t),u}function pe(e){return function(e,t,i){var n=t(e);return xe(e)?n:function(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e}(n,i(e))}(e,Me,we)}function me(e,t){var i,n,s=e.__data__;return("string"==(n=typeof(i=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==i:null===i)?s["string"==typeof t?"string":"hash"]:s.map}function ve(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return de(i)?i:void 0}ie.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie.prototype.get=function(e){var t=this.__data__;if(q){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return E.call(t,e)?t[e]:void 0},ie.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:E.call(t,e)},ie.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=q&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,i=le(t,e);return!(i<0)&&(i==t.length-1?t.pop():D.call(t,i,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,i=le(t,e);return i<0?void 0:t[i][1]},ne.prototype.has=function(e){return le(this.__data__,e)>-1},ne.prototype.set=function(e,t){var i=this.__data__,n=le(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},se.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(j||ne),string:new ie}},se.prototype.delete=function(e){var t=me(this,e).delete(e);return this.size-=t?1:0,t},se.prototype.get=function(e){return me(this,e).get(e)},se.prototype.has=function(e){return me(this,e).has(e)},se.prototype.set=function(e,t){var i=me(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},re.prototype.add=re.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},re.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.clear=function(){this.__data__=new ne,this.size=0},oe.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},oe.prototype.get=function(e){return this.__data__.get(e)},oe.prototype.has=function(e){return this.__data__.has(e)},oe.prototype.set=function(e,t){var i=this.__data__;if(i instanceof ne){var n=i.__data__;if(!j||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new se(n)}return i.set(e,t),this.size=i.size,this};var we=H?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,n=null==e?0:e.length,s=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[s++]=o)}return r}(H(e),(function(t){return W.call(e,t)})))}:function(){return[]},be=he;function ye(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||l.test(e))&&e>-1&&e%1==0&&e<t}function $e(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(V&&"[object DataView]"!=be(new V(new ArrayBuffer(1)))||j&&be(new j)!=s||U&&"[object Promise]"!=be(U.resolve())||K&&be(new K)!=o||G&&"[object WeakMap]"!=be(new G))&&(be=function(e){var t=he(e),i=t==r?e.constructor:void 0,n=i?$e(i):"";if(n)switch(n){case Y:return"[object DataView]";case X:return s;case Q:return"[object Promise]";case J:return o;case Z:return"[object WeakMap]"}return t});var Ce=ce(function(){return arguments}())?ce:function(e){return Re(e)&&E.call(e,"callee")&&!W.call(e,"callee")},xe=Array.isArray;var ke=N||function(){return!1};function Ae(e){if(!Le(e))return!1;var t=he(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function _e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Le(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var Ee=w?function(e){return function(t){return e(t)}}(w):function(e){return Re(e)&&_e(e.length)&&!!h[he(e)]};function Me(e){return null!=(t=e)&&_e(t.length)&&!Ae(t)?ae(e):fe(e);var t}i.exports=function(e,t){return ue(e,t)}}).call(this,i(4),i(2)(e))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=i(6),e};t.debounce=function(e,t){var i=null;return function(){var n=this,s=arguments;clearTimeout(i),i=setTimeout((function(){e.apply(n,s)}),t)}}},function(e,t,i){(function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i,n,s=function(e,t,i){if("string"==typeof t){var n=a(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],o=0,l=t.length;o<l;++o){var h=a(e,t[o]);if(null==h&&r.original)return;s.push(h)}return i&&i.apply(null,s)||!0}},r=function(e,t){var i=s("",e,t);return null==i&&r.original?r.original.apply(this,arguments):i},o=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return o(e,i[0])+"!"+o(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,i){i=o(e,i);var n=t.modules[i];if(!n){if("function"==typeof(n=t.payloads[i])){var r={},a={id:i,uri:"",exports:r,packaged:!0};r=n((function(e,t){return s(i,e,t)}),r,a)||a.exports,t.modules[i]=r,delete t.payloads[i]}n=t.modules[i]=r||n}return n};n=e,(i="ace")&&(e[i]||(e[i]={}),n=e[i]),n.define&&n.define.packaged||(t.original=n.define,n.define=t,n.define.packaged=!0),n.require&&n.require.packaged||(r.original=n.require,n.require=r,n.require.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(e,t,i){"use strict";var n,s={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===s.exec.call(/()??/,"")[1],o=(n=/^/g,s.test.call(n,""),!n.lastIndex);function a(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function l(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}o&&r||(RegExp.prototype.exec=function(e){var t,i,n=s.exec.apply(this,arguments);if("string"==typeof e&&n){if(!r&&n.length>1&&l(n,"")>-1&&(i=RegExp(this.source,s.replace.call(a(this),"g","")),s.replace.call(e.slice(n.index),i,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(n[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var h=1;h<n.length;h++)(t=this._xregexp.captureNames[h-1])&&(n[t]=n[h]);!o&&this.global&&!n[0].length&&this.lastIndex>n.index&&this.lastIndex--}return n},o||(RegExp.prototype.test=function(e){var t=s.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=d.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(d.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var s,r,o,a,l,h=Function.prototype.call,c=Array.prototype,u=Object.prototype,d=c.slice,f=h.bind(u.toString),g=h.bind(u.hasOwnProperty);if((l=g(u,"__defineGetter__"))&&(s=h.bind(u.__defineGetter__),r=h.bind(u.__defineSetter__),o=h.bind(u.__lookupGetter__),a=h.bind(u.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?p.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),s=d.call(arguments,2),r=s.length;if(e===i)r&&this.push.apply(this,s);else{var o=Math.min(t,i-e),a=e+o,l=a+r-o,h=i-a,c=i-o;if(l<a)for(var u=0;u<h;++u)this[l+u]=this[a+u];else if(l>a)for(u=h;u--;)this[l+u]=this[a+u];if(r&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+r,u=0;u<r;++u)this[e+u]=s[u]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var m,v,w=Object("a"),b="a"!=w[0]||!(0 in w);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=arguments[1],s=-1,r=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++s<r;)s in i&&e.call(n,i[s],s,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=Array(n),r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)o in i&&(s[o]=e.call(r,i[o],o,t));return s}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=T(this),n=b&&"[object String]"==f(this)?this.split(""):i,s=n.length>>>0,r=[],o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<s;a++)a in n&&(t=n[a],e.call(o,t,a,i)&&r.push(t));return r}),Array.prototype.every||(Array.prototype.every=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)if(r in i&&!e.call(s,i[r],r,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)if(r in i&&e.call(s,i[r],r,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,r=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in i){s=i[r++];break}if(++r>=n)throw new TypeError("reduce of empty array with no initial value")}for(;r<n;r++)r in i&&(s=e.call(void 0,s,i[r],r,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=T(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,r=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in i){s=i[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}do{r in this&&(s=e.call(void 0,s,i[r],r,t))}while(r--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):T(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=M(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):T(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,M(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:u)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(g(e,t)){var i;if(i={enumerable:!0,configurable:!0},l){var n=e.__proto__;e.__proto__=u;var s=o(e,t),r=a(e,t);if(e.__proto__=n,s||r)return s&&(i.get=s),r&&(i.set=r),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(m=null===Object.prototype.__proto__?function(){return{__proto__:null}}: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 i;if(null===e)i=m();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function y(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var $=y({}),S="undefined"==typeof document||y(document.createElement("div"));if(!$||!S)var C=Object.defineProperty}if(!Object.defineProperty||C){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(C)try{return C.call(Object,e,t,i)}catch(e){}if(g(i,"value"))if(l&&(o(e,t)||a(e,t))){var n=e.__proto__;e.__proto__=u,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");g(i,"get")&&s(e,t,i.get),g(i,"set")&&r(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)g(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(e){Object.freeze=(v=Object.freeze,function(e){return"function"==typeof e?e:v(e)})}if(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;for(var t="";g(e,t);)t+="?";e[t]=!0;var i=g(e,t);return delete e[t],i}),!Object.keys){var x=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],A=k.length;for(var _ in{toString:null})x=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)g(e,i)&&t.push(i);if(x)for(var n=0,s=A;n<s;n++){var r=k[n];g(e,r)&&t.push(r)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var L="\t\n\v\f\r                 \u2028\u2029\ufeff";if(!String.prototype.trim){L="["+L+"]";var R=new RegExp("^"+L+L+"*"),E=new RegExp(L+L+"*$");String.prototype.trim=function(){return String(this).replace(R,"").replace(E,"")}}function M(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var T=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){"use strict";e("./regexp"),e("./es5-shim"),"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},s=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),r=n.userAgent||"",o=n.appName||"";t.isWin="win"==s,t.isMac="mac"==s,t.isLinux="linux"==s,t.isIE="Microsoft Internet Explorer"==o||o.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("./useragent");if(t.buildDom=function e(t,i,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return i&&i.appendChild(s),s}if(!Array.isArray(t))return t;if("string"!=typeof t[0]||!t[0]){for(var r=[],o=0;o<t.length;o++){var a=e(t[o],i,n);a&&r.push(a)}return r}var l=document.createElement(t[0]),h=t[1],c=1;h&&"object"==typeof h&&!Array.isArray(h)&&(c=2);for(o=c;o<t.length;o++)e(t[o],l,n);return 2==c&&Object.keys(h).forEach((function(e){var t=h[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e?l[e]=t:"ref"===e?n&&(n[t]=l):null!=t&&l.setAttribute(e,t)})),i&&i.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},t.importCssString=function(e,i,n){var s=n;n&&n.getRootNode&&(s=n.getRootNode())&&s!=n||(s=document);var r=s.ownerDocument||s;if(i&&t.hasCssString(i,s))return null;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */");var o=t.createElement("style");o.appendChild(r.createTextNode(e)),i&&(o.id=i),s==r&&(s=t.getDocumentHead(r)),s.insertBefore(o,s.firstChild)},t.importCssStylsheet=function(e,i){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(i))},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),s=n.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",n.appendChild(i);var r=e.documentElement;r.appendChild(n);var o=i.offsetWidth;s.overflow="scroll";var a=i.offsetWidth;return o==a&&(a=n.clientWidth),r.removeChild(n),o-a},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!n.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var s=document.createElement("div");t.HI_DPI&&void 0!==s.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),n.isEdge||void 0===s.style.animationName||(t.HAS_CSS_ANIMATION=!0),s=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:t.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,i){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,i){"use strict";var n=e("./oop"),s=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,s),t.keyCodeToString=function(e){var t=s[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";var n,s=e("./keys"),r=e("./useragent"),o=null,a=0;function l(){return null==n&&function(){n=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){n={passive:!1}}})}catch(e){}}(),n}t.addListener=function(e,t,i){return e.addEventListener(t,i,l())},t.removeListener=function(e,t,i){return e.removeEventListener(t,i,l())},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,s){var o,a,l,h=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,r.isIE){var u=Math.abs(e.clientX-o)>5||Math.abs(e.clientY-a)>5;l&&!u||(h=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),i[h-1]||600),1==h&&(o=e.clientX,a=e.clientY)}if(e._clicks=h,n[s]("mousedown",e),h>4)h=0;else if(h>1)return n[s](c[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",u)}))};var h=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function c(e,t,i){var n=h(t);if(!r.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),o.altGr){if(3==(3&n))return;o.altGr=0}if(18===i||17===i){var l="location"in t?t.location:t.keyLocation;if(17===i&&1===l)1==o[i]&&(a=t.timeStamp);else if(18===i&&3===n&&2===l){t.timeStamp-a<50&&(o.altGr=!0)}}}if((i in s.MODIFIER_KEYS&&(i=-1),!n&&13===i)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,n,-i),t.defaultPrevented)))return;if(r.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in s.FUNCTION_KEYS||i in s.PRINTABLE_KEYS)&&e(t,n,i)}function u(){o=Object.create(null)}if(t.getModifierString=function(e){return s.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;n(e,"keydown",(function(e){s=e.keyCode})),n(e,"keypress",(function(e){return c(i,e,s)}))}else{var a=null;n(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=c(i,e,e.keyCode);return a=e.defaultPrevented,t})),n(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)})),n(e,"keyup",(function(e){o[e.keyCode]=null})),o||(u(),n(window,"focus",u))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){var d=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+d++,s=function(r){r.data==n&&(t.stopPropagation(r),t.removeListener(i,"message",s),e())};t.addListener(i,"message",s),i.postMessage(n,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,i){return setTimeout((function i(){t.$idleBlocked?setTimeout(i,100):e()}),i)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(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 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},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){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?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:t<this.start.column?-1:t>this.end.column?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 i={row:t+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>t)var s={row:t+1,column:0};else if(this.start.row<e)s={row:e,column:0};return n.fromPoints(s||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var s={row:e,column:t};else var r={row:e,column:t};return n.fromPoints(s||this.start,r||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 n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,(function(e){i.push({offset:arguments[arguments.length-2],length:e.length})})),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},s=function(e){null==i&&(i=setTimeout(n,e||t))};return s.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},s.schedule=s,s.call=function(){this.cancel(),e()},s.cancel=function(){i&&clearTimeout(i),i=null},s.isPending=function(){return i},s}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,i){"use strict";var n;i.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),r=e("../lib/dom"),o=e("../lib/lang"),a=e("../clipboard"),l=s.isChrome<18,h=s.isIE,c=s.isChrome>63,u=e("../lib/keys"),d=u.KEY_MODS,f=s.isIOS,g=f?/\s/:/\n/;t.TextInput=function(e,t){var i=r.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var p=!1,m=!1,v=!1,w=!1,b="";s.isMobile||(i.style.fontSize="1px");var y=!1,$=!1,S="",C=0,x=0,k=0;try{var A=document.activeElement===i}catch(e){}n.addListener(i,"blur",(function(e){$||(t.onBlur(e),A=!1)})),n.addListener(i,"focus",(function(e){if(!$){if(A=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(_):_()}})),this.$focusScroll=!1,this.focus=function(){if(b||c||"browser"==this.$focusScroll)return i.focus({preventScroll:!0});var e=i.style.top;i.style.position="fixed",i.style.top="0px";try{var t=0!=i.getBoundingClientRect().top}catch(e){return}var n=[];if(t)for(var s=i.parentElement;s&&1==s.nodeType;)n.push(s),s.setAttribute("ace_nocontext",!0),s=!s.parentElement&&s.getRootNode?s.getRootNode().host:s.parentElement;i.focus({preventScroll:!0}),t&&n.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)}),0)},this.blur=function(){i.blur()},this.isFocused=function(){return A},t.on("beforeEndOperation",(function(){t.curOp&&"insertstring"==t.curOp.command.name||(v&&(S=i.value="",D()),_())}));var _=f?function(e){if(A&&(!p||e)&&!w){e||(e="");var n="\n ab"+e+"cde fg\n";n!=i.value&&(i.value=S=n);var s=4+(e.length||(t.selection.isEmpty()?0:1));4==C&&x==s||i.setSelectionRange(4,s),C=4,x=s}}:function(){if(!v&&!w&&(A||R)){v=!0;var e=t.selection,n=e.getRange(),s=e.cursor.row,r=n.start.column,o=n.end.column,a=t.session.getLine(s);if(n.start.row!=s){var l=t.session.getLine(s-1);r=n.start.row<s-1?0:r,o+=l.length+1,a=l+"\n"+a}else if(n.end.row!=s){var h=t.session.getLine(s+1);o=n.end.row>s+1?h.length:o,o+=a.length+1,a=a+"\n"+h}a.length>400&&(r<400&&o<400?a=a.slice(0,400):(a="\n",r=0,o=1));var c=a+"\n\n";if(c!=S&&(i.value=S=c,C=x=c.length),R&&(C=i.selectionStart,x=i.selectionEnd),x!=o||C!=r||i.selectionEnd!=x)try{i.setSelectionRange(r,o),C=r,x=o}catch(e){}v=!1}};A&&t.onFocus();var L=null;this.setInputHandler=function(e){L=e},this.getInputHandler=function(){return L};var R=!1,E=function(e,n){if(R&&(R=!1),m)return _(),e&&t.onPaste(e),m=!1,"";for(var s=i.selectionStart,r=i.selectionEnd,o=C,a=S.length-x,l=e,h=e.length-s,c=e.length-r,u=0;o>0&&S[u]==e[u];)u++,o--;for(l=l.slice(u),u=1;a>0&&S.length-u>C-1&&S[S.length-u]==e[e.length-u];)u++,a--;h-=u-1,c-=u-1;var d=l.length-u+1;return d<0&&(o=-d,d=0),l=l.slice(0,d),n||l||h||o||a||c?(w=!0,l&&!o&&!a&&!h&&!c||y?t.onTextInput(l):t.onTextInput(l,{extendLeft:o,extendRight:a,restoreStart:h,restoreEnd:c}),w=!1,S=e,C=s,x=r,k=c,l):""},M=function(e){if(v)return W();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var n=i.value,s=E(n,!0);(n.length>500||g.test(s))&&_()},T=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!l){var s=h||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return T(e,t,!0)}}},O=function(e,s){var r=t.getCopyText();if(!r)return n.preventDefault(e);T(e,r)?(f&&(_(r),p=r,setTimeout((function(){p=!1}),10)),s?t.onCut():t.onCopy(),n.preventDefault(e)):(p=!0,i.value=r,i.select(),setTimeout((function(){p=!1,_(),s?t.onCut():t.onCopy()})))},F=function(e){O(e,!0)},I=function(e){O(e,!1)},P=function(e){var r=T(e);a.pasteCancelled()||("string"==typeof r?(r&&t.onPaste(r,e),s.isIE&&setTimeout(_),n.preventDefault(e)):(i.value="",m=!0))};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",(function(e){v||(p?p=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=S.length&&e.value===S&&S&&e.selectionEnd!==x}(i)&&(t.selectAll(),_()))})),n.addListener(i,"input",M),n.addListener(i,"cut",F),n.addListener(i,"copy",I),n.addListener(i,"paste",P),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:I(e);break;case 86:P(e);break;case 88:F(e)}}));var W=function(){if(v&&t.onCompositionUpdate&&!t.$readOnly){if(y)return B();if(v.useTextareaForIME)t.onCompositionUpdate(i.value);else{var e=i.value;E(e),v.markerRange&&(v.context&&(v.markerRange.start.column=v.selectionStart=v.context.compositionStartOffset),v.markerRange.end.column=v.markerRange.start.column+x-v.selectionStart+k)}}},D=function(e){t.onCompositionEnd&&!t.$readOnly&&(v=!1,t.onCompositionEnd(),t.off("mousedown",B),e&&M())};function B(){$=!0,i.blur(),i.focus(),$=!1}var H,N=o.delayedCall(W,50).schedule.bind(null,null);function z(){clearTimeout(H),H=setTimeout((function(){b&&(i.style.cssText=b,b=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}n.addListener(i,"compositionstart",(function(e){if(!v&&t.onCompositionStart&&!t.$readOnly&&(v={},!y)){setTimeout(W,0),t.on("mousedown",B);var n=t.getSelectionRange();n.end.row=n.start.row,n.end.column=n.start.column,v.markerRange=n,v.selectionStart=C,t.onCompositionStart(v),v.useTextareaForIME?(i.value="",S="",C=0,x=0):(i.msGetInputContext&&(v.context=i.msGetInputContext()),i.getInputContext&&(v.context=i.getInputContext()))}})),n.addListener(i,"compositionupdate",W),n.addListener(i,"keyup",(function(e){27==e.keyCode&&i.value.length<i.selectionStart&&(v||(S=i.value),C=x=-1,_()),N()})),n.addListener(i,"keydown",N),n.addListener(i,"compositionend",D),this.getElement=function(){return i},this.setCommandMode=function(e){y=e,i.readOnly=!1},this.setReadOnly=function(e){y||(i.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){R=!0,_(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,o){b||(b=i.style.cssText),i.style.cssText=(o?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(C+x)*t.renderer.characterWidth*.5+"px;";var a=t.container.getBoundingClientRect(),l=r.computedStyle(t.container),h=a.top+(parseInt(l.borderTopWidth)||0),c=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-h-i.clientHeight-2,d=function(e){r.translate(i,e.clientX-c-2,Math.min(e.clientY-h-2,u))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(H),s.isWin&&n.capture(t.container,d,z))},this.onContextMenuClose=z;var V=function(e){t.textInput.onContextMenu(e),z()};n.addListener(i,"mouseup",V),n.addListener(i,"mousedown",(function(e){e.preventDefault(),z()})),n.addListener(t.renderer.scroller,"contextmenu",V),n.addListener(i,"contextmenu",V),f&&function(e,t,i){var n=null,s=!1;i.addEventListener("keydown",(function(e){n&&clearTimeout(n),s=!0}),!0),i.addEventListener("keyup",(function(e){n=setTimeout((function(){s=!1}),100)}),!0);var r=function(e){if(document.activeElement===i&&!(s||v||t.$mouseHandler.isMousePressed||p)){var n=i.selectionStart,r=i.selectionEnd,o=null,a=0;if(0==n?o=u.up:1==n?o=u.home:r>x&&"\n"==S[r]?o=u.end:n<C&&" "==S[n-1]?(o=u.left,a=d.option):n<C||n==C&&x!=C&&n==r?o=u.left:r>x&&S.slice(0,r).split("\n").length>2?o=u.down:r>x&&" "==S[r-1]?(o=u.right,a=d.option):(r>x||r==x&&x!=C&&n==r)&&(o=u.right),n!==r&&(a|=d.shift),o){if(!t.onCommandKey({},a,o)&&t.commands){o=u.keyCodeToString(o);var l=t.commands.findKeyCommand(a,o);l&&t.execCommand(l)}C=n,x=r,_("")}}};document.addEventListener("selectionchange",r),t.on("destroy",(function(){document.removeEventListener("selectionchange",r)}))}(0,t,i)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/useragent");function s(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function r(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.