From b8acb774475f4e2e9cbf2aa34c604fc408a218e1 Mon Sep 17 00:00:00 2001 From: thjaeckle Date: Mon, 5 Feb 2024 07:28:45 +0000 Subject: [PATCH] deploy: 4a587caede29cc6a3aa5b3650af60225ab741dbb --- dist/main.js | 87 ++++++++++++----------- modules/api.ts | 2 +- modules/connections/connections.html | 3 +- modules/connections/connectionsCRUD.ts | 2 - modules/connections/connectionsMonitor.ts | 2 + modules/things/messagesIncoming.ts | 2 +- 6 files changed, 50 insertions(+), 48 deletions(-) diff --git a/dist/main.js b/dist/main.js index 3aafa203d0..e53acea162 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,11 +1,11 @@ -(()=>{var id=Object.create;var Po=Object.defineProperty;var rd=Object.getOwnPropertyDescriptor;var od=Object.getOwnPropertyNames;var sd=Object.getPrototypeOf,ad=Object.prototype.hasOwnProperty;var No=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ld=(t,e)=>{for(var c in e)Po(t,c,{get:e[c],enumerable:!0})},cd=(t,e,c,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of od(e))!ad.call(t,p)&&p!==c&&Po(t,p,{get:()=>e[p],enumerable:!(d=rd(e,p))||d.enumerable});return t};var Fo=(t,e,c)=>(c=t!=null?id(sd(t)):{},cd(e||!t||!t.__esModule?Po(c,"default",{value:t,enumerable:!0}):c,t));var zl=No((Ts,co)=>{(function(t){"use strict";var e=t.setTimeout,c=t.clearTimeout,d=t.XMLHttpRequest,p=t.XDomainRequest,g=t.ActiveXObject,a=t.EventSource,u=t.document,o=t.Promise,r=t.fetch,n=t.Response,i=t.TextDecoder,s=t.TextEncoder,l=t.AbortController;if(typeof window<"u"&&typeof u<"u"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(B){u.readyState="complete"},!1)),d==null&&g!=null&&(d=function(){return new g("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(B){function K(){}return K.prototype=B,new K}),Date.now||(Date.now=function(){return new Date().getTime()}),l==null){var h=r;r=function(B,K){var ne=K.signal;return h(B,{headers:K.headers,credentials:K.credentials,cache:K.cache}).then(function(Q){var se=Q.body.getReader();return ne._reader=se,ne._aborted&&ne._reader.cancel(),{status:Q.status,statusText:Q.statusText,headers:Q.headers,body:{getReader:function(){return se}}}})},l=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function f(){this.bitsNeeded=0,this.codePoint=0}f.prototype.decode=function(B){function K(xe,W,G){if(G===1)return xe>=128>>W&&xe<=2048>>W&&xe<=57344>>W&&xe<=65536>>W&&xe<>6>15?3:W>31?2:1;if(xe===6*2)return W>15?3:2;if(xe===6*3)return 3;throw new Error}for(var Q=65533,se="",te=this.bitsNeeded,re=this.codePoint,Se=0;Se191||!K(re<<6|he&63,te-6,ne(te,re)))&&(te=0,re=Q,se+=String.fromCharCode(re)),te===0?(he>=0&&he<=127?(te=0,re=he):he>=192&&he<=223?(te=6*1,re=he&31):he>=224&&he<=239?(te=6*2,re=he&15):he>=240&&he<=247?(te=6*3,re=he&7):(te=0,re=Q),te!==0&&!K(re,te,ne(te,re))&&(te=0,re=Q)):(te-=6,re=re<<6|he&63),te===0&&(re<=65535?se+=String.fromCharCode(re):(se+=String.fromCharCode(55296+(re-65535-1>>10)),se+=String.fromCharCode(56320+(re-65535-1&1023))))}return this.bitsNeeded=te,this.codePoint=re,se};var b=function(){try{return new i().decode(new s().encode("test"),{stream:!0})==="test"}catch(B){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+B)}return!1};(i==null||s==null||!b())&&(i=f);var C=function(){};function w(B){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=C,this.onload=C,this.onerror=C,this.onreadystatechange=C,this._contentType="",this._xhr=B,this._sendTimeout=0,this._abort=C}w.prototype.open=function(B,K){this._abort(!0);var ne=this,Q=this._xhr,se=1,te=0;this._abort=function(G){ne._sendTimeout!==0&&(c(ne._sendTimeout),ne._sendTimeout=0),(se===1||se===2||se===3)&&(se=4,Q.onload=C,Q.onerror=C,Q.onabort=C,Q.onprogress=C,Q.onreadystatechange=C,Q.abort(),te!==0&&(c(te),te=0),G||(ne.readyState=4,ne.onabort(null),ne.onreadystatechange())),se=0};var re=function(){if(se===1){var G=0,q="",ue=void 0;if("contentType"in Q)G=200,q="OK",ue=Q.contentType;else try{G=Q.status,q=Q.statusText,ue=Q.getResponseHeader("Content-Type")}catch{G=0,q="",ue=void 0}G!==0&&(se=2,ne.readyState=2,ne.status=G,ne.statusText=q,ne._contentType=ue,ne.onreadystatechange())}},Se=function(){if(re(),se===2||se===3){se=3;var G="";try{G=Q.responseText}catch{}ne.readyState=3,ne.responseText=G,ne.onprogress()}},he=function(G,q){if((q==null||q.preventDefault==null)&&(q={preventDefault:C}),Se(),se===1||se===2||se===3){if(se=4,te!==0&&(c(te),te=0),ne.readyState=4,G==="load")ne.onload(q);else if(G==="error")ne.onerror(q);else if(G==="abort")ne.onabort(q);else throw new TypeError;ne.onreadystatechange()}},xe=function(G){Q!=null&&(Q.readyState===4?(!("onload"in Q)||!("onerror"in Q)||!("onabort"in Q))&&he(Q.responseText===""?"error":"load",G):Q.readyState===3?"onprogress"in Q||Se():Q.readyState===2&&re())},W=function(){te=e(function(){W()},500),Q.readyState===3&&Se()};"onload"in Q&&(Q.onload=function(G){he("load",G)}),"onerror"in Q&&(Q.onerror=function(G){he("error",G)}),"onabort"in Q&&(Q.onabort=function(G){he("abort",G)}),"onprogress"in Q&&(Q.onprogress=Se),"onreadystatechange"in Q&&(Q.onreadystatechange=function(G){xe(G)}),("contentType"in Q||!("ontimeout"in d.prototype))&&(K+=(K.indexOf("?")===-1?"?":"&")+"padding=true"),Q.open(B,K,!0),"readyState"in Q&&(te=e(function(){W()},0))},w.prototype.abort=function(){this._abort(!1)},w.prototype.getResponseHeader=function(B){return this._contentType},w.prototype.setRequestHeader=function(B,K){var ne=this._xhr;"setRequestHeader"in ne&&ne.setRequestHeader(B,K)},w.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},w.prototype.send=function(){if((!("ontimeout"in d.prototype)||!("sendAsBinary"in d.prototype)&&!("mozAnon"in d.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var B=this;B._sendTimeout=e(function(){B._sendTimeout=0,B.send()},4);return}var K=this._xhr;"withCredentials"in K&&(K.withCredentials=this.withCredentials);try{K.send(void 0)}catch(ne){throw ne}};function x(B){return B.replace(/[A-Z]/g,function(K){return String.fromCharCode(K.charCodeAt(0)+32)})}function A(B){for(var K=Object.create(null),ne=B.split(`\r -`),Q=0;Q"u"?typeof window<"u"?window:typeof self<"u"?self:Ts:globalThis)});var Gl=No((_s,As)=>{var Ss,uo;Ss=_s,uo=function(){"use strict";function t(_,k){var R=Object.keys(_);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(_);k&&(I=I.filter(function(D){return Object.getOwnPropertyDescriptor(_,D).enumerable})),R.push.apply(R,I)}return R}function e(_){for(var k=1;k_.length)&&(k=_.length);for(var R=0,I=new Array(k);R=j.length?{done:!0}:{done:!1,value:j[X++]}},e:function(de){throw de},f:ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Z,pe=!0,ve=!1;return{s:function(){z=z.call(j)},n:function(){var de=z.next();return pe=de.done,de},e:function(de){ve=!0,Z=de},f:function(){try{pe||z.return==null||z.return()}finally{if(ve)throw Z}}}}(R.keys);try{for(U.s();!(F=U.n()).done;)H(F.value)}catch(j){U.e(j)}finally{U.f()}}else H()}),R.filter&&(D=R.filter(D));var O=D.slice(0,k.resultsList.maxResults);k.feedback={query:_,matches:D,results:O},i("results",k)},f="aria-expanded",b="aria-activedescendant",C="aria-selected",w=function(_,k){_.feedback.selection=e({index:k},_.feedback.results[k])},x=function(_){_.isOpen||((_.wrapper||_.input).setAttribute(f,!0),_.list.removeAttribute("hidden"),_.isOpen=!0,i("open",_))},A=function(_){_.isOpen&&((_.wrapper||_.input).setAttribute(f,!1),_.input.setAttribute(b,""),_.list.setAttribute("hidden",""),_.isOpen=!1,i("close",_))},v=function(_,k){var R=k.resultItem,I=k.list.getElementsByTagName(R.tag),D=!!R.selected&&R.selected.split(" ");if(k.isOpen&&I.length){var O,N,P=k.cursor;_>=I.length&&(_=0),_<0&&(_=I.length-1),k.cursor=_,P>-1&&(I[P].removeAttribute(C),D&&(N=I[P].classList).remove.apply(N,p(D))),I[_].setAttribute(C,!0),D&&(O=I[_].classList).add.apply(O,p(D)),k.input.setAttribute(b,I[k.cursor].id),k.list.scrollTop=I[_].offsetTop-k.list.clientHeight+I[_].clientHeight+5,k.feedback.cursor=k.cursor,w(k,_),i("navigate",k)}},E=function(_){v(_.cursor+1,_)},$=function(_){v(_.cursor-1,_)},M=function(_,k,R){(R=R>=0?R:_.cursor)<0||(_.feedback.event=k,w(_,R),i("selection",_),A(_))};function S(_,k){var R=this;return new Promise(function(I,D){var O,N;return O=k||((N=_.input)instanceof HTMLInputElement||N instanceof HTMLTextAreaElement?N.value:N.innerHTML),function(H,F,U){return F?F(H):H.length>=U}(O=_.query?_.query(O):O,_.trigger,_.threshold)?l(_,O).then(function(H){try{return _.feedback instanceof Error?I():(h(O,_),_.resultsList&&function(F){var U=F.resultsList,j=F.list,J=F.resultItem,z=F.feedback,X=z.matches,ee=z.results;if(F.cursor=-1,j.innerHTML="",X.length||U.noResults){var Z=new DocumentFragment;ee.forEach(function(pe,ve){var de=o(J.tag,e({id:"".concat(J.id,"_").concat(ve),role:"option",innerHTML:pe.match,inside:Z},J.class&&{class:J.class}));J.element&&J.element(de,pe)}),j.append(Z),U.element&&U.element(j,z),x(F)}else A(F)}(_),P.call(R))}catch(F){return D(F)}},D):(A(_),P.call(R));function P(){return I()}})}var T=function(_,k){for(var R in _)for(var I in _[R])k(R,I)},y=function(_){var k,R,I,D=_.events,O=(k=function(){return S(_)},R=_.debounce,function(){clearTimeout(I),I=setTimeout(function(){return k()},R)}),N=_.events=e({input:e({},D&&D.input)},_.resultsList&&{list:D?e({},D.list):{}}),P={input:{input:function(){O()},keydown:function(H){(function(F,U){switch(F.keyCode){case 40:case 38:F.preventDefault(),F.keyCode===40?E(U):$(U);break;case 13:U.submit||F.preventDefault(),U.cursor>=0&&M(U,F);break;case 9:U.resultsList.tabSelect&&U.cursor>=0&&M(U,F);break;case 27:U.input.value="",A(U)}})(H,_)},blur:function(){A(_)}},list:{mousedown:function(H){H.preventDefault()},click:function(H){(function(F,U){var j=U.resultItem.tag.toUpperCase(),J=Array.from(U.list.querySelectorAll(j)),z=F.target.closest(j);z&&z.nodeName===j&&M(U,F,J.indexOf(z))})(H,_)}}};T(P,function(H,F){(_.resultsList||F==="input")&&(N[H][F]||(N[H][F]=P[H][F]))}),T(N,function(H,F){_[H].addEventListener(F,N[H][F])})};function m(_){var k=this;return new Promise(function(R,I){var D,O,N;if(D=_.placeHolder,N={role:"combobox","aria-owns":(O=_.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},o(_.input,e(e({"aria-controls":O.id,"aria-autocomplete":"both"},D&&{placeholder:D}),!_.wrapper&&e({},N))),_.wrapper&&(_.wrapper=o("div",e({around:_.input,class:_.name+"_wrapper"},N))),O&&(_.list=o(O.tag,e({dest:[O.destination,O.position],id:O.id,role:"listbox",hidden:"hidden"},O.class&&{class:O.class}))),y(_),_.data.cache)return l(_).then(function(H){try{return P.call(k)}catch(F){return I(F)}},I);function P(){return i("init",_),R()}return P.call(k)})}function L(_){var k=_.prototype;k.init=function(){m(this)},k.start=function(R){S(this,R)},k.unInit=function(){if(this.wrapper){var R=this.wrapper.parentNode;R.insertBefore(this.input,this.wrapper),R.removeChild(this.wrapper)}var I;T((I=this).events,function(D,O){I[D].removeEventListener(O,I.events[D][O])})},k.open=function(){x(this)},k.close=function(){A(this)},k.goTo=function(R){v(R,this)},k.next=function(){E(this)},k.previous=function(){$(this)},k.select=function(R){M(this,null,R)},k.search=function(R,I,D){return s(R,I,D)}}return function _(k){this.options=k,this.id=_.instances=(_.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(R){var I=R.name,D=R.options,O=R.resultsList,N=R.resultItem;for(var P in D)if(c(D[P])==="object")for(var H in R[P]||(R[P]={}),D[P])R[P][H]=D[P][H];else R[P]=D[P];R.selector=R.selector||"#"+I,O.destination=O.destination||R.selector,O.id=O.id||I+"_list_"+R.id,N.id=N.id||I+"_result",R.input=u(R.selector)}(this),L.call(this,_),m(this)}},typeof _s=="object"&&typeof As<"u"?As.exports=uo():typeof define=="function"&&define.amd?define(uo):(Ss=typeof globalThis<"u"?globalThis:Ss||self).autoComplete=uo()});var Yl=No((Kl,ho)=>{(function(){var t="ace",e=function(){return this}();if(!e&&typeof window<"u"&&(e=window),!t&&typeof requirejs<"u")return;var c=function(o,r,n){if(typeof o!="string"){c.original?c.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=r),c.modules[o]||(c.payloads[o]=n,c.modules[o]=null)};c.modules={},c.payloads={};var d=function(o,r,n){if(typeof r=="string"){var i=a(o,r);if(i!=null)return n&&n(),i}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var s=[],l=0,h=r.length;la.length)&&(g=a.length),g-=p.length;var u=a.indexOf(p,g);return u!==-1&&u===g}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var g="",a=this;p>0;)p&1&&(g+=a),(p>>=1)&&(a+=a);return g}),String.prototype.includes||d(String.prototype,"includes",function(p,g){return this.indexOf(p,g)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(p),a=1;a>>0,u=arguments[1],o=u>>0,r=o<0?Math.max(a+o,0):Math.min(o,a),n=arguments[2],i=n===void 0?a:n>>0,s=i<0?Math.max(a+i,0):Math.min(i,a);r0;)a&1&&(u+=g),(a>>=1)&&(g+=g);return u};var d=/^\s\s*/,p=/\s\s*$/;e.stringTrimLeft=function(g){return g.replace(d,"")},e.stringTrimRight=function(g){return g.replace(p,"")},e.copyObject=function(g){var a={};for(var u in g)a[u]=g[u];return a},e.copyArray=function(g){for(var a=[],u=0,o=g.length;u65535?2:1}});ace.define("ace/lib/useragent",["require","exports","module"],function(t,e,c){"use strict";e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),g=d.userAgent||"",a=d.appName||"";e.isWin=p=="win",e.isMac=p=="mac",e.isLinux=p=="linux",e.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((g.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((g.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=g.match(/ Gecko\/\d+/),e.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",e.isWebKit=parseFloat(g.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(g.split(" Chrome/")[1])||void 0,e.isSafari=parseFloat(g.split(" Safari/")[1])&&!e.isChrome||void 0,e.isEdge=parseFloat(g.split(" Edge/")[1])||void 0,e.isAIR=g.indexOf("AdobeAIR")>=0,e.isAndroid=g.indexOf("Android")>=0,e.isChromeOS=g.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(g)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid});ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("./useragent"),p="http://www.w3.org/1999/xhtml";e.buildDom=function n(i,s,l){if(typeof i=="string"&&i){var h=document.createTextNode(i);return s&&s.appendChild(h),h}if(!Array.isArray(i))return i&&i.appendChild&&s&&s.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var f=[],b=0;b"u")){if(a){if(s)u();else if(s===!1)return a.push([n,i])}if(!g){var l=s;!s||!s.getRootNode?l=document:(l=s.getRootNode(),(!l||l==s)&&(l=document));var h=l.ownerDocument||l;if(i&&e.hasCssString(i,l))return null;i&&(n+=` +(()=>{var id=Object.create;var Po=Object.defineProperty;var rd=Object.getOwnPropertyDescriptor;var od=Object.getOwnPropertyNames;var sd=Object.getPrototypeOf,ad=Object.prototype.hasOwnProperty;var No=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ld=(t,e)=>{for(var c in e)Po(t,c,{get:e[c],enumerable:!0})},cd=(t,e,c,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of od(e))!ad.call(t,p)&&p!==c&&Po(t,p,{get:()=>e[p],enumerable:!(d=rd(e,p))||d.enumerable});return t};var Fo=(t,e,c)=>(c=t!=null?id(sd(t)):{},cd(e||!t||!t.__esModule?Po(c,"default",{value:t,enumerable:!0}):c,t));var zl=No((Ts,lo)=>{(function(t){"use strict";var e=t.setTimeout,c=t.clearTimeout,d=t.XMLHttpRequest,p=t.XDomainRequest,g=t.ActiveXObject,a=t.EventSource,u=t.document,o=t.Promise,r=t.fetch,n=t.Response,i=t.TextDecoder,s=t.TextEncoder,l=t.AbortController;if(typeof window<"u"&&typeof u<"u"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(B){u.readyState="complete"},!1)),d==null&&g!=null&&(d=function(){return new g("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(B){function K(){}return K.prototype=B,new K}),Date.now||(Date.now=function(){return new Date().getTime()}),l==null){var h=r;r=function(B,K){var ne=K.signal;return h(B,{headers:K.headers,credentials:K.credentials,cache:K.cache}).then(function(Q){var se=Q.body.getReader();return ne._reader=se,ne._aborted&&ne._reader.cancel(),{status:Q.status,statusText:Q.statusText,headers:Q.headers,body:{getReader:function(){return se}}}})},l=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function f(){this.bitsNeeded=0,this.codePoint=0}f.prototype.decode=function(B){function K(xe,W,G){if(G===1)return xe>=128>>W&&xe<=2048>>W&&xe<=57344>>W&&xe<=65536>>W&&xe<>6>15?3:W>31?2:1;if(xe===6*2)return W>15?3:2;if(xe===6*3)return 3;throw new Error}for(var Q=65533,se="",te=this.bitsNeeded,re=this.codePoint,Se=0;Se191||!K(re<<6|he&63,te-6,ne(te,re)))&&(te=0,re=Q,se+=String.fromCharCode(re)),te===0?(he>=0&&he<=127?(te=0,re=he):he>=192&&he<=223?(te=6*1,re=he&31):he>=224&&he<=239?(te=6*2,re=he&15):he>=240&&he<=247?(te=6*3,re=he&7):(te=0,re=Q),te!==0&&!K(re,te,ne(te,re))&&(te=0,re=Q)):(te-=6,re=re<<6|he&63),te===0&&(re<=65535?se+=String.fromCharCode(re):(se+=String.fromCharCode(55296+(re-65535-1>>10)),se+=String.fromCharCode(56320+(re-65535-1&1023))))}return this.bitsNeeded=te,this.codePoint=re,se};var b=function(){try{return new i().decode(new s().encode("test"),{stream:!0})==="test"}catch(B){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+B)}return!1};(i==null||s==null||!b())&&(i=f);var C=function(){};function w(B){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=C,this.onload=C,this.onerror=C,this.onreadystatechange=C,this._contentType="",this._xhr=B,this._sendTimeout=0,this._abort=C}w.prototype.open=function(B,K){this._abort(!0);var ne=this,Q=this._xhr,se=1,te=0;this._abort=function(G){ne._sendTimeout!==0&&(c(ne._sendTimeout),ne._sendTimeout=0),(se===1||se===2||se===3)&&(se=4,Q.onload=C,Q.onerror=C,Q.onabort=C,Q.onprogress=C,Q.onreadystatechange=C,Q.abort(),te!==0&&(c(te),te=0),G||(ne.readyState=4,ne.onabort(null),ne.onreadystatechange())),se=0};var re=function(){if(se===1){var G=0,q="",ue=void 0;if("contentType"in Q)G=200,q="OK",ue=Q.contentType;else try{G=Q.status,q=Q.statusText,ue=Q.getResponseHeader("Content-Type")}catch{G=0,q="",ue=void 0}G!==0&&(se=2,ne.readyState=2,ne.status=G,ne.statusText=q,ne._contentType=ue,ne.onreadystatechange())}},Se=function(){if(re(),se===2||se===3){se=3;var G="";try{G=Q.responseText}catch{}ne.readyState=3,ne.responseText=G,ne.onprogress()}},he=function(G,q){if((q==null||q.preventDefault==null)&&(q={preventDefault:C}),Se(),se===1||se===2||se===3){if(se=4,te!==0&&(c(te),te=0),ne.readyState=4,G==="load")ne.onload(q);else if(G==="error")ne.onerror(q);else if(G==="abort")ne.onabort(q);else throw new TypeError;ne.onreadystatechange()}},xe=function(G){Q!=null&&(Q.readyState===4?(!("onload"in Q)||!("onerror"in Q)||!("onabort"in Q))&&he(Q.responseText===""?"error":"load",G):Q.readyState===3?"onprogress"in Q||Se():Q.readyState===2&&re())},W=function(){te=e(function(){W()},500),Q.readyState===3&&Se()};"onload"in Q&&(Q.onload=function(G){he("load",G)}),"onerror"in Q&&(Q.onerror=function(G){he("error",G)}),"onabort"in Q&&(Q.onabort=function(G){he("abort",G)}),"onprogress"in Q&&(Q.onprogress=Se),"onreadystatechange"in Q&&(Q.onreadystatechange=function(G){xe(G)}),("contentType"in Q||!("ontimeout"in d.prototype))&&(K+=(K.indexOf("?")===-1?"?":"&")+"padding=true"),Q.open(B,K,!0),"readyState"in Q&&(te=e(function(){W()},0))},w.prototype.abort=function(){this._abort(!1)},w.prototype.getResponseHeader=function(B){return this._contentType},w.prototype.setRequestHeader=function(B,K){var ne=this._xhr;"setRequestHeader"in ne&&ne.setRequestHeader(B,K)},w.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},w.prototype.send=function(){if((!("ontimeout"in d.prototype)||!("sendAsBinary"in d.prototype)&&!("mozAnon"in d.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var B=this;B._sendTimeout=e(function(){B._sendTimeout=0,B.send()},4);return}var K=this._xhr;"withCredentials"in K&&(K.withCredentials=this.withCredentials);try{K.send(void 0)}catch(ne){throw ne}};function x(B){return B.replace(/[A-Z]/g,function(K){return String.fromCharCode(K.charCodeAt(0)+32)})}function A(B){for(var K=Object.create(null),ne=B.split(`\r +`),Q=0;Q"u"?typeof window<"u"?window:typeof self<"u"?self:Ts:globalThis)});var Gl=No((_s,As)=>{var Ss,co;Ss=_s,co=function(){"use strict";function t(_,k){var I=Object.keys(_);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(_);k&&(R=R.filter(function(D){return Object.getOwnPropertyDescriptor(_,D).enumerable})),I.push.apply(I,R)}return I}function e(_){for(var k=1;k_.length)&&(k=_.length);for(var I=0,R=new Array(k);I=j.length?{done:!0}:{done:!1,value:j[X++]}},e:function(de){throw de},f:ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Z,pe=!0,ve=!1;return{s:function(){z=z.call(j)},n:function(){var de=z.next();return pe=de.done,de},e:function(de){ve=!0,Z=de},f:function(){try{pe||z.return==null||z.return()}finally{if(ve)throw Z}}}}(I.keys);try{for(U.s();!(F=U.n()).done;)H(F.value)}catch(j){U.e(j)}finally{U.f()}}else H()}),I.filter&&(D=I.filter(D));var O=D.slice(0,k.resultsList.maxResults);k.feedback={query:_,matches:D,results:O},i("results",k)},f="aria-expanded",b="aria-activedescendant",C="aria-selected",w=function(_,k){_.feedback.selection=e({index:k},_.feedback.results[k])},x=function(_){_.isOpen||((_.wrapper||_.input).setAttribute(f,!0),_.list.removeAttribute("hidden"),_.isOpen=!0,i("open",_))},A=function(_){_.isOpen&&((_.wrapper||_.input).setAttribute(f,!1),_.input.setAttribute(b,""),_.list.setAttribute("hidden",""),_.isOpen=!1,i("close",_))},v=function(_,k){var I=k.resultItem,R=k.list.getElementsByTagName(I.tag),D=!!I.selected&&I.selected.split(" ");if(k.isOpen&&R.length){var O,N,P=k.cursor;_>=R.length&&(_=0),_<0&&(_=R.length-1),k.cursor=_,P>-1&&(R[P].removeAttribute(C),D&&(N=R[P].classList).remove.apply(N,p(D))),R[_].setAttribute(C,!0),D&&(O=R[_].classList).add.apply(O,p(D)),k.input.setAttribute(b,R[k.cursor].id),k.list.scrollTop=R[_].offsetTop-k.list.clientHeight+R[_].clientHeight+5,k.feedback.cursor=k.cursor,w(k,_),i("navigate",k)}},E=function(_){v(_.cursor+1,_)},$=function(_){v(_.cursor-1,_)},M=function(_,k,I){(I=I>=0?I:_.cursor)<0||(_.feedback.event=k,w(_,I),i("selection",_),A(_))};function S(_,k){var I=this;return new Promise(function(R,D){var O,N;return O=k||((N=_.input)instanceof HTMLInputElement||N instanceof HTMLTextAreaElement?N.value:N.innerHTML),function(H,F,U){return F?F(H):H.length>=U}(O=_.query?_.query(O):O,_.trigger,_.threshold)?l(_,O).then(function(H){try{return _.feedback instanceof Error?R():(h(O,_),_.resultsList&&function(F){var U=F.resultsList,j=F.list,J=F.resultItem,z=F.feedback,X=z.matches,ee=z.results;if(F.cursor=-1,j.innerHTML="",X.length||U.noResults){var Z=new DocumentFragment;ee.forEach(function(pe,ve){var de=o(J.tag,e({id:"".concat(J.id,"_").concat(ve),role:"option",innerHTML:pe.match,inside:Z},J.class&&{class:J.class}));J.element&&J.element(de,pe)}),j.append(Z),U.element&&U.element(j,z),x(F)}else A(F)}(_),P.call(I))}catch(F){return D(F)}},D):(A(_),P.call(I));function P(){return R()}})}var T=function(_,k){for(var I in _)for(var R in _[I])k(I,R)},y=function(_){var k,I,R,D=_.events,O=(k=function(){return S(_)},I=_.debounce,function(){clearTimeout(R),R=setTimeout(function(){return k()},I)}),N=_.events=e({input:e({},D&&D.input)},_.resultsList&&{list:D?e({},D.list):{}}),P={input:{input:function(){O()},keydown:function(H){(function(F,U){switch(F.keyCode){case 40:case 38:F.preventDefault(),F.keyCode===40?E(U):$(U);break;case 13:U.submit||F.preventDefault(),U.cursor>=0&&M(U,F);break;case 9:U.resultsList.tabSelect&&U.cursor>=0&&M(U,F);break;case 27:U.input.value="",A(U)}})(H,_)},blur:function(){A(_)}},list:{mousedown:function(H){H.preventDefault()},click:function(H){(function(F,U){var j=U.resultItem.tag.toUpperCase(),J=Array.from(U.list.querySelectorAll(j)),z=F.target.closest(j);z&&z.nodeName===j&&M(U,F,J.indexOf(z))})(H,_)}}};T(P,function(H,F){(_.resultsList||F==="input")&&(N[H][F]||(N[H][F]=P[H][F]))}),T(N,function(H,F){_[H].addEventListener(F,N[H][F])})};function m(_){var k=this;return new Promise(function(I,R){var D,O,N;if(D=_.placeHolder,N={role:"combobox","aria-owns":(O=_.resultsList).id,"aria-haspopup":!0,"aria-expanded":!1},o(_.input,e(e({"aria-controls":O.id,"aria-autocomplete":"both"},D&&{placeholder:D}),!_.wrapper&&e({},N))),_.wrapper&&(_.wrapper=o("div",e({around:_.input,class:_.name+"_wrapper"},N))),O&&(_.list=o(O.tag,e({dest:[O.destination,O.position],id:O.id,role:"listbox",hidden:"hidden"},O.class&&{class:O.class}))),y(_),_.data.cache)return l(_).then(function(H){try{return P.call(k)}catch(F){return R(F)}},R);function P(){return i("init",_),I()}return P.call(k)})}function L(_){var k=_.prototype;k.init=function(){m(this)},k.start=function(I){S(this,I)},k.unInit=function(){if(this.wrapper){var I=this.wrapper.parentNode;I.insertBefore(this.input,this.wrapper),I.removeChild(this.wrapper)}var R;T((R=this).events,function(D,O){R[D].removeEventListener(O,R.events[D][O])})},k.open=function(){x(this)},k.close=function(){A(this)},k.goTo=function(I){v(I,this)},k.next=function(){E(this)},k.previous=function(){$(this)},k.select=function(I){M(this,null,I)},k.search=function(I,R,D){return s(I,R,D)}}return function _(k){this.options=k,this.id=_.instances=(_.instances||0)+1,this.name="autoComplete",this.wrapper=1,this.threshold=1,this.debounce=0,this.resultsList={position:"afterend",tag:"ul",maxResults:5},this.resultItem={tag:"li"},function(I){var R=I.name,D=I.options,O=I.resultsList,N=I.resultItem;for(var P in D)if(c(D[P])==="object")for(var H in I[P]||(I[P]={}),D[P])I[P][H]=D[P][H];else I[P]=D[P];I.selector=I.selector||"#"+R,O.destination=O.destination||I.selector,O.id=O.id||R+"_list_"+I.id,N.id=N.id||R+"_result",I.input=u(I.selector)}(this),L.call(this,_),m(this)}},typeof _s=="object"&&typeof As<"u"?As.exports=co():typeof define=="function"&&define.amd?define(co):(Ss=typeof globalThis<"u"?globalThis:Ss||self).autoComplete=co()});var Yl=No((Kl,uo)=>{(function(){var t="ace",e=function(){return this}();if(!e&&typeof window<"u"&&(e=window),!t&&typeof requirejs<"u")return;var c=function(o,r,n){if(typeof o!="string"){c.original?c.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=r),c.modules[o]||(c.payloads[o]=n,c.modules[o]=null)};c.modules={},c.payloads={};var d=function(o,r,n){if(typeof r=="string"){var i=a(o,r);if(i!=null)return n&&n(),i}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var s=[],l=0,h=r.length;la.length)&&(g=a.length),g-=p.length;var u=a.indexOf(p,g);return u!==-1&&u===g}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var g="",a=this;p>0;)p&1&&(g+=a),(p>>=1)&&(a+=a);return g}),String.prototype.includes||d(String.prototype,"includes",function(p,g){return this.indexOf(p,g)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(p),a=1;a>>0,u=arguments[1],o=u>>0,r=o<0?Math.max(a+o,0):Math.min(o,a),n=arguments[2],i=n===void 0?a:n>>0,s=i<0?Math.max(a+i,0):Math.min(i,a);r0;)a&1&&(u+=g),(a>>=1)&&(g+=g);return u};var d=/^\s\s*/,p=/\s\s*$/;e.stringTrimLeft=function(g){return g.replace(d,"")},e.stringTrimRight=function(g){return g.replace(p,"")},e.copyObject=function(g){var a={};for(var u in g)a[u]=g[u];return a},e.copyArray=function(g){for(var a=[],u=0,o=g.length;u65535?2:1}});ace.define("ace/lib/useragent",["require","exports","module"],function(t,e,c){"use strict";e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),g=d.userAgent||"",a=d.appName||"";e.isWin=p=="win",e.isMac=p=="mac",e.isLinux=p=="linux",e.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((g.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((g.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=g.match(/ Gecko\/\d+/),e.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",e.isWebKit=parseFloat(g.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(g.split(" Chrome/")[1])||void 0,e.isSafari=parseFloat(g.split(" Safari/")[1])&&!e.isChrome||void 0,e.isEdge=parseFloat(g.split(" Edge/")[1])||void 0,e.isAIR=g.indexOf("AdobeAIR")>=0,e.isAndroid=g.indexOf("Android")>=0,e.isChromeOS=g.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(g)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid});ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("./useragent"),p="http://www.w3.org/1999/xhtml";e.buildDom=function n(i,s,l){if(typeof i=="string"&&i){var h=document.createTextNode(i);return s&&s.appendChild(h),h}if(!Array.isArray(i))return i&&i.appendChild&&s&&s.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var f=[],b=0;b"u")){if(a){if(s)u();else if(s===!1)return a.push([n,i])}if(!g){var l=s;!s||!s.getRootNode?l=document:(l=s.getRootNode(),(!l||l==s)&&(l=document));var h=l.ownerDocument||l;if(i&&e.hasCssString(i,l))return null;i&&(n+=` /*# sourceURL=ace/css/`+i+" */");var f=e.createElement("style");f.appendChild(h.createTextNode(n)),i&&(f.id=i),l==h&&(l=e.getDocumentHead(h)),l.insertBefore(f,l.firstChild)}}}if(e.importCssString=o,e.importCssStylsheet=function(n,i){e.buildDom(["link",{rel:"stylesheet",href:n}],e.getDocumentHead(i))},e.scrollbarWidth=function(n){var i=e.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var s=e.createElement("ace_outer"),l=s.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",s.appendChild(i);var h=n&&n.documentElement||document&&document.documentElement;if(!h)return 0;h.appendChild(s);var f=i.offsetWidth;l.overflow="scroll";var b=i.offsetWidth;return f===b&&(b=s.clientWidth),h.removeChild(s),f-b},e.computedStyle=function(n,i){return window.getComputedStyle(n,"")||{}},e.setStyle=function(n,i,s){n[i]!==s&&(n[i]=s)},e.HAS_CSS_ANIMATION=!1,e.HAS_CSS_TRANSFORMS=!1,e.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(e.HI_DPI=!1),typeof document<"u"){var r=document.createElement("div");e.HI_DPI&&r.style.transform!==void 0&&(e.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof r.style.animationName<"u"&&(e.HAS_CSS_ANIMATION=!0),r=null}e.HAS_CSS_TRANSFORMS?e.translate=function(n,i,s){n.style.transform="translate("+Math.round(i)+"px, "+Math.round(s)+"px)"}:e.translate=function(n,i,s){n.style.top=Math.round(s)+"px",n.style.left=Math.round(i)+"px"}});ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,e,c){"use strict";var d=t("./dom");e.get=function(p,g){var a=new XMLHttpRequest;a.open("GET",p,!0),a.onreadystatechange=function(){a.readyState===4&&g(a.responseText)},a.send(null)},e.loadScript=function(p,g){var a=d.getDocumentHead(),u=document.createElement("script");u.src=p,a.appendChild(u),u.onload=u.onreadystatechange=function(o,r){(r||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,r||g())}},e.qualifyURL=function(p){var g=document.createElement("a");return g.href=p,g.href}});ace.define("ace/lib/oop",["require","exports","module"],function(t,e,c){"use strict";e.inherits=function(d,p){d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(d,p){for(var g in p)d[g]=p[g];return d},e.implement=function(d,p){e.mixin(d,p)}});ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,e,c){"use strict";var d={},p=function(){this.propagationStopped=!0},g=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[a]||[],r=this._defaultHandlers[a];if(!(!o.length&&!r)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=p),u.preventDefault||(u.preventDefault=g),o=o.slice();for(var n=0;n1&&(f=l[l.length-2]);var C=u[s+"Path"];return C==null?C=u.basePath:h=="/"&&(s=h=""),C&&C.slice(-1)!="/"&&(C+="/"),C+s+h+f+this.get("suffix")},e.setModuleUrl=function(i,s){return u.$moduleUrls[i]=s};var o=function(i,s){if(i==="ace/theme/textmate"||i==="./theme/textmate")return s(null,t("./theme/textmate"));if(r)return r(i,s);console.error("loader is not configured")},r;e.setLoader=function(i){r=i},e.dynamicModules=Object.create(null),e.$loading={},e.$loaded={},e.loadModule=function(i,s){var l;if(Array.isArray(i))var h=i[0],f=i[1];else if(typeof i=="string")var f=i;var b=function(C){if(C&&!e.$loading[f])return s&&s(C);if(e.$loading[f]||(e.$loading[f]=[]),e.$loading[f].push(s),!(e.$loading[f].length>1)){var w=function(){o(f,function(x,A){A&&(e.$loaded[f]=A),e._emit("load.module",{name:f,module:A});var v=e.$loading[f];e.$loading[f]=null,v.forEach(function(E){E&&E(A)})})};if(!e.get("packaged"))return w();p.loadScript(e.moduleUrl(f,h),w),n()}};if(e.dynamicModules[f])e.dynamicModules[f]().then(function(C){C.default?b(C.default):b(C)});else{try{l=this.$require(f)}catch{}b(l||e.$loaded[f])}},e.$require=function(i){if(typeof c.require=="function"){var s="require";return c[s](i)}},e.setModuleLoader=function(i,s){e.dynamicModules[i]=s};var n=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};e.version="1.32.2"});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,e,c){"use strict";t("./lib/fixoldbrowsers");var d=t("./config");d.setLoader(function(u,o){t([u],function(r){o(null,r)})});var p=function(){return this||typeof window<"u"&&window}();c.exports=function(u){d.init=g,d.$require=t,u.require=t,typeof define=="function"&&(u.define=define)},g(!0);function g(u){if(!(!p||!p.document)){d.set("packaged",u||t.packaged||c.packaged||p.define&&define.packaged);var o={},r="",n=document.currentScript||document._currentScript,i=n&&n.ownerDocument||document;n&&n.src&&(r=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=i.getElementsByTagName("script"),l=0;l ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(g,a){return this.compare(g,a)==0},p.prototype.compareRange=function(g){var a,u=g.end,o=g.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(o.row,o.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(o.row,o.column),a==-1?-1:a==1?42:0)},p.prototype.comparePoint=function(g){return this.compare(g.row,g.column)},p.prototype.containsRange=function(g){return this.comparePoint(g.start)==0&&this.comparePoint(g.end)==0},p.prototype.intersects=function(g){var a=this.compareRange(g);return a==-1||a==0||a==1},p.prototype.isEnd=function(g,a){return this.end.row==g&&this.end.column==a},p.prototype.isStart=function(g,a){return this.start.row==g&&this.start.column==a},p.prototype.setStart=function(g,a){typeof g=="object"?(this.start.column=g.column,this.start.row=g.row):(this.start.row=g,this.start.column=a)},p.prototype.setEnd=function(g,a){typeof g=="object"?(this.end.column=g.column,this.end.row=g.row):(this.end.row=g,this.end.column=a)},p.prototype.inside=function(g,a){return this.compare(g,a)==0?!(this.isEnd(g,a)||this.isStart(g,a)):!1},p.prototype.insideStart=function(g,a){return this.compare(g,a)==0?!this.isEnd(g,a):!1},p.prototype.insideEnd=function(g,a){return this.compare(g,a)==0?!this.isStart(g,a):!1},p.prototype.compare=function(g,a){return!this.isMultiLine()&&g===this.start.row?athis.end.column?1:0:gthis.end.row?1:this.start.row===g?a>=this.start.column?0:-1:this.end.row===g?a<=this.end.column?0:1:0},p.prototype.compareStart=function(g,a){return this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},p.prototype.compareEnd=function(g,a){return this.end.row==g&&this.end.column==a?1:this.compare(g,a)},p.prototype.compareInside=function(g,a){return this.end.row==g&&this.end.column==a?1:this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},p.prototype.clipRows=function(g,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.rowa)var o={row:a+1,column:0};else if(this.start.row1?(E++,E>4&&(E=1)):E=1,p.isIE){var L=Math.abs(m.clientX-$)>5||Math.abs(m.clientY-M)>5;(!S||L)&&(E=1),S&&clearTimeout(S),S=setTimeout(function(){S=null},w[E-1]||600),E==1&&($=m.clientX,M=m.clientY)}if(m._clicks=E,x[A]("mousedown",m),E>4)E=0;else if(E>1)return x[A](T[E],m)}Array.isArray(C)||(C=[C]),C.forEach(function(m){i(m,"mousedown",y,v)})};var l=function(C){return 0|(C.ctrlKey?1:0)|(C.altKey?2:0)|(C.shiftKey?4:0)|(C.metaKey?8:0)};e.getModifierString=function(C){return d.KEY_MODS[l(C)]};function h(C,w,x){var A=l(w);if(!p.isMac&&g){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(A|=8),g.altGr)if((3&A)!=3)g.altGr=0;else return;if(x===18||x===17){var v="location"in w?w.location:w.keyLocation;if(x===17&&v===1)g[x]==1&&(a=w.timeStamp);else if(x===18&&A===3&&v===2){var E=w.timeStamp-a;E<50&&(g.altGr=!0)}}}if(x in d.MODIFIER_KEYS&&(x=-1),!A&&x===13){var v="location"in w?w.location:w.keyLocation;if(v===3&&(C(w,A,-x),w.defaultPrevented))return}if(p.isChromeOS&&A&8){if(C(w,A,x),w.defaultPrevented)return;A&=-9}return!A&&!(x in d.FUNCTION_KEYS)&&!(x in d.PRINTABLE_KEYS)?!1:C(w,A,x)}e.addCommandKeyListener=function(C,w,x){var A=null;i(C,"keydown",function(v){g[v.keyCode]=(g[v.keyCode]||0)+1;var E=h(w,v,v.keyCode);return A=v.defaultPrevented,E},x),i(C,"keypress",function(v){A&&(v.ctrlKey||v.altKey||v.shiftKey||v.metaKey)&&(e.stopEvent(v),A=null)},x),i(C,"keyup",function(v){g[v.keyCode]=null},x),g||(f(),i(window,"focus",f))};function f(){g=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var b=1;e.nextTick=function(C,w){w=w||window;var x="zero-timeout-message-"+b++,A=function(v){v.data==x&&(e.stopPropagation(v),s(w,"message",A),C())};i(w,"message",A),w.postMessage(x,"*")}}e.$idleBlocked=!1,e.onIdle=function(C,w){return setTimeout(function x(){e.$idleBlocked?setTimeout(x,100):C()},w)},e.$idleBlockId=null,e.blockIdle=function(C){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout(function(){e.$idleBlocked=!1},C||100)},e.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(C){setTimeout(C,17)}});ace.define("ace/clipboard",["require","exports","module"],function(t,e,c){"use strict";var d;c.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=Date.now()}}});ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,e,c){"use strict";var d=t("../lib/event"),p=t("../config").nls,g=t("../lib/useragent"),a=t("../lib/dom"),u=t("../lib/lang"),o=t("../clipboard"),r=g.isChrome<18,n=g.isIE,i=g.isChrome>63,s=400,l=t("../lib/keys"),h=l.KEY_MODS,f=g.isIOS,b=f?/\s/:/\n/,C=g.isMobile,w;w=function(x,A){var v=a.createElement("textarea");v.className="ace_text-input",v.setAttribute("wrap","off"),v.setAttribute("autocorrect","off"),v.setAttribute("autocapitalize","off"),v.setAttribute("spellcheck","false"),v.style.opacity="0",x.insertBefore(v,x.firstChild);var E=!1,$=!1,M=!1,S=!1,T="";C||(v.style.fontSize="1px");var y=!1,m=!1,L="",_=0,k=0,R=0,I=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,O=0;try{var N=document.activeElement===v}catch{}this.setNumberOfExtraLines=function(W){if(I=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,W<0){O=0;return}O=W},this.setAriaOptions=function(W){if(W.activeDescendant?(v.setAttribute("aria-haspopup","true"),v.setAttribute("aria-autocomplete",W.inline?"both":"list"),v.setAttribute("aria-activedescendant",W.activeDescendant)):(v.setAttribute("aria-haspopup","false"),v.setAttribute("aria-autocomplete","both"),v.removeAttribute("aria-activedescendant")),W.role&&v.setAttribute("role",W.role),W.setLabel&&(v.setAttribute("aria-roledescription",p("editor")),A.session)){var G=A.session.selection.cursor.row;v.setAttribute("aria-label",p("Cursor at row $0",[G+1]))}},this.setAriaOptions({role:"textbox"}),d.addListener(v,"blur",function(W){m||(A.onBlur(W),N=!1)},A),d.addListener(v,"focus",function(W){if(!m){if(N=!0,g.isEdge)try{if(!document.hasFocus())return}catch{}A.onFocus(W),g.isEdge?setTimeout(H):H()}},A),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:A.renderer.enableKeyboardAccessibility}),T||i||this.$focusScroll=="browser")return v.focus({preventScroll:!0});var W=v.style.top;v.style.position="fixed",v.style.top="0px";try{var G=v.getBoundingClientRect().top!=0}catch{return}var q=[];if(G)for(var ue=v.parentElement;ue&&ue.nodeType==1;)q.push(ue),ue.setAttribute("ace_nocontext","true"),!ue.parentElement&&ue.getRootNode?ue=ue.getRootNode().host:ue=ue.parentElement;v.focus({preventScroll:!0}),G&&q.forEach(function(Ce){Ce.removeAttribute("ace_nocontext")}),setTimeout(function(){v.style.position="",v.style.top=="0px"&&(v.style.top=W)},0)},this.blur=function(){v.blur()},this.isFocused=function(){return N},A.on("beforeEndOperation",function(){var W=A.curOp,G=W&&W.command&&W.command.name;if(G!="insertstring"){var q=G&&(W.docChanged||W.selectionChanged);M&&q&&(L=v.value="",ne()),H()}});var P=function(W,G){for(var q=G,ue=1;ue<=W-I&&ue<2*O+1;ue++)q+=A.session.getLine(W-ue).length+1;return q},H=f?function(W){if(!(!N||E&&!W||S)){W||(W="");var G=` +`});ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,e,c){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText=t("./textmate-css"),e.$id="ace/theme/textmate";var d=t("../lib/dom");d.importCssString(e.cssText,e.cssClass,!1)});ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,e,c){"no use strict";var d=t("./lib/lang"),p=t("./lib/net"),g=t("./lib/dom"),a=t("./lib/app_config").AppConfig;c.exports=e=new a;var u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};e.get=function(i){if(!u.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return u[i]},e.set=function(i,s){if(u.hasOwnProperty(i))u[i]=s;else if(this.setDefaultValue("",i,s)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&g.useStrictCSP(s)},e.all=function(){return d.copyObject(u)},e.$modes={},e.moduleUrl=function(i,s){if(u.$moduleUrls[i])return u.$moduleUrls[i];var l=i.split("/");s=s||l[l.length-2]||"";var h=s=="snippets"?"/":"-",f=l[l.length-1];if(s=="worker"&&h=="-"){var b=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");f=f.replace(b,"")}(!f||f==s)&&l.length>1&&(f=l[l.length-2]);var C=u[s+"Path"];return C==null?C=u.basePath:h=="/"&&(s=h=""),C&&C.slice(-1)!="/"&&(C+="/"),C+s+h+f+this.get("suffix")},e.setModuleUrl=function(i,s){return u.$moduleUrls[i]=s};var o=function(i,s){if(i==="ace/theme/textmate"||i==="./theme/textmate")return s(null,t("./theme/textmate"));if(r)return r(i,s);console.error("loader is not configured")},r;e.setLoader=function(i){r=i},e.dynamicModules=Object.create(null),e.$loading={},e.$loaded={},e.loadModule=function(i,s){var l;if(Array.isArray(i))var h=i[0],f=i[1];else if(typeof i=="string")var f=i;var b=function(C){if(C&&!e.$loading[f])return s&&s(C);if(e.$loading[f]||(e.$loading[f]=[]),e.$loading[f].push(s),!(e.$loading[f].length>1)){var w=function(){o(f,function(x,A){A&&(e.$loaded[f]=A),e._emit("load.module",{name:f,module:A});var v=e.$loading[f];e.$loading[f]=null,v.forEach(function(E){E&&E(A)})})};if(!e.get("packaged"))return w();p.loadScript(e.moduleUrl(f,h),w),n()}};if(e.dynamicModules[f])e.dynamicModules[f]().then(function(C){C.default?b(C.default):b(C)});else{try{l=this.$require(f)}catch{}b(l||e.$loaded[f])}},e.$require=function(i){if(typeof c.require=="function"){var s="require";return c[s](i)}},e.setModuleLoader=function(i,s){e.dynamicModules[i]=s};var n=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};e.version="1.32.2"});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,e,c){"use strict";t("./lib/fixoldbrowsers");var d=t("./config");d.setLoader(function(u,o){t([u],function(r){o(null,r)})});var p=function(){return this||typeof window<"u"&&window}();c.exports=function(u){d.init=g,d.$require=t,u.require=t,typeof define=="function"&&(u.define=define)},g(!0);function g(u){if(!(!p||!p.document)){d.set("packaged",u||t.packaged||c.packaged||p.define&&define.packaged);var o={},r="",n=document.currentScript||document._currentScript,i=n&&n.ownerDocument||document;n&&n.src&&(r=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=i.getElementsByTagName("script"),l=0;l ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(g,a){return this.compare(g,a)==0},p.prototype.compareRange=function(g){var a,u=g.end,o=g.start;return a=this.compare(u.row,u.column),a==1?(a=this.compare(o.row,o.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(o.row,o.column),a==-1?-1:a==1?42:0)},p.prototype.comparePoint=function(g){return this.compare(g.row,g.column)},p.prototype.containsRange=function(g){return this.comparePoint(g.start)==0&&this.comparePoint(g.end)==0},p.prototype.intersects=function(g){var a=this.compareRange(g);return a==-1||a==0||a==1},p.prototype.isEnd=function(g,a){return this.end.row==g&&this.end.column==a},p.prototype.isStart=function(g,a){return this.start.row==g&&this.start.column==a},p.prototype.setStart=function(g,a){typeof g=="object"?(this.start.column=g.column,this.start.row=g.row):(this.start.row=g,this.start.column=a)},p.prototype.setEnd=function(g,a){typeof g=="object"?(this.end.column=g.column,this.end.row=g.row):(this.end.row=g,this.end.column=a)},p.prototype.inside=function(g,a){return this.compare(g,a)==0?!(this.isEnd(g,a)||this.isStart(g,a)):!1},p.prototype.insideStart=function(g,a){return this.compare(g,a)==0?!this.isEnd(g,a):!1},p.prototype.insideEnd=function(g,a){return this.compare(g,a)==0?!this.isStart(g,a):!1},p.prototype.compare=function(g,a){return!this.isMultiLine()&&g===this.start.row?athis.end.column?1:0:gthis.end.row?1:this.start.row===g?a>=this.start.column?0:-1:this.end.row===g?a<=this.end.column?0:1:0},p.prototype.compareStart=function(g,a){return this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},p.prototype.compareEnd=function(g,a){return this.end.row==g&&this.end.column==a?1:this.compare(g,a)},p.prototype.compareInside=function(g,a){return this.end.row==g&&this.end.column==a?1:this.start.row==g&&this.start.column==a?-1:this.compare(g,a)},p.prototype.clipRows=function(g,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.rowa)var o={row:a+1,column:0};else if(this.start.row1?(E++,E>4&&(E=1)):E=1,p.isIE){var L=Math.abs(m.clientX-$)>5||Math.abs(m.clientY-M)>5;(!S||L)&&(E=1),S&&clearTimeout(S),S=setTimeout(function(){S=null},w[E-1]||600),E==1&&($=m.clientX,M=m.clientY)}if(m._clicks=E,x[A]("mousedown",m),E>4)E=0;else if(E>1)return x[A](T[E],m)}Array.isArray(C)||(C=[C]),C.forEach(function(m){i(m,"mousedown",y,v)})};var l=function(C){return 0|(C.ctrlKey?1:0)|(C.altKey?2:0)|(C.shiftKey?4:0)|(C.metaKey?8:0)};e.getModifierString=function(C){return d.KEY_MODS[l(C)]};function h(C,w,x){var A=l(w);if(!p.isMac&&g){if(w.getModifierState&&(w.getModifierState("OS")||w.getModifierState("Win"))&&(A|=8),g.altGr)if((3&A)!=3)g.altGr=0;else return;if(x===18||x===17){var v="location"in w?w.location:w.keyLocation;if(x===17&&v===1)g[x]==1&&(a=w.timeStamp);else if(x===18&&A===3&&v===2){var E=w.timeStamp-a;E<50&&(g.altGr=!0)}}}if(x in d.MODIFIER_KEYS&&(x=-1),!A&&x===13){var v="location"in w?w.location:w.keyLocation;if(v===3&&(C(w,A,-x),w.defaultPrevented))return}if(p.isChromeOS&&A&8){if(C(w,A,x),w.defaultPrevented)return;A&=-9}return!A&&!(x in d.FUNCTION_KEYS)&&!(x in d.PRINTABLE_KEYS)?!1:C(w,A,x)}e.addCommandKeyListener=function(C,w,x){var A=null;i(C,"keydown",function(v){g[v.keyCode]=(g[v.keyCode]||0)+1;var E=h(w,v,v.keyCode);return A=v.defaultPrevented,E},x),i(C,"keypress",function(v){A&&(v.ctrlKey||v.altKey||v.shiftKey||v.metaKey)&&(e.stopEvent(v),A=null)},x),i(C,"keyup",function(v){g[v.keyCode]=null},x),g||(f(),i(window,"focus",f))};function f(){g=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var b=1;e.nextTick=function(C,w){w=w||window;var x="zero-timeout-message-"+b++,A=function(v){v.data==x&&(e.stopPropagation(v),s(w,"message",A),C())};i(w,"message",A),w.postMessage(x,"*")}}e.$idleBlocked=!1,e.onIdle=function(C,w){return setTimeout(function x(){e.$idleBlocked?setTimeout(x,100):C()},w)},e.$idleBlockId=null,e.blockIdle=function(C){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout(function(){e.$idleBlocked=!1},C||100)},e.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(C){setTimeout(C,17)}});ace.define("ace/clipboard",["require","exports","module"],function(t,e,c){"use strict";var d;c.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=Date.now()}}});ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,e,c){"use strict";var d=t("../lib/event"),p=t("../config").nls,g=t("../lib/useragent"),a=t("../lib/dom"),u=t("../lib/lang"),o=t("../clipboard"),r=g.isChrome<18,n=g.isIE,i=g.isChrome>63,s=400,l=t("../lib/keys"),h=l.KEY_MODS,f=g.isIOS,b=f?/\s/:/\n/,C=g.isMobile,w;w=function(x,A){var v=a.createElement("textarea");v.className="ace_text-input",v.setAttribute("wrap","off"),v.setAttribute("autocorrect","off"),v.setAttribute("autocapitalize","off"),v.setAttribute("spellcheck","false"),v.style.opacity="0",x.insertBefore(v,x.firstChild);var E=!1,$=!1,M=!1,S=!1,T="";C||(v.style.fontSize="1px");var y=!1,m=!1,L="",_=0,k=0,I=0,R=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,O=0;try{var N=document.activeElement===v}catch{}this.setNumberOfExtraLines=function(W){if(R=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,W<0){O=0;return}O=W},this.setAriaOptions=function(W){if(W.activeDescendant?(v.setAttribute("aria-haspopup","true"),v.setAttribute("aria-autocomplete",W.inline?"both":"list"),v.setAttribute("aria-activedescendant",W.activeDescendant)):(v.setAttribute("aria-haspopup","false"),v.setAttribute("aria-autocomplete","both"),v.removeAttribute("aria-activedescendant")),W.role&&v.setAttribute("role",W.role),W.setLabel&&(v.setAttribute("aria-roledescription",p("editor")),A.session)){var G=A.session.selection.cursor.row;v.setAttribute("aria-label",p("Cursor at row $0",[G+1]))}},this.setAriaOptions({role:"textbox"}),d.addListener(v,"blur",function(W){m||(A.onBlur(W),N=!1)},A),d.addListener(v,"focus",function(W){if(!m){if(N=!0,g.isEdge)try{if(!document.hasFocus())return}catch{}A.onFocus(W),g.isEdge?setTimeout(H):H()}},A),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:A.renderer.enableKeyboardAccessibility}),T||i||this.$focusScroll=="browser")return v.focus({preventScroll:!0});var W=v.style.top;v.style.position="fixed",v.style.top="0px";try{var G=v.getBoundingClientRect().top!=0}catch{return}var q=[];if(G)for(var ue=v.parentElement;ue&&ue.nodeType==1;)q.push(ue),ue.setAttribute("ace_nocontext","true"),!ue.parentElement&&ue.getRootNode?ue=ue.getRootNode().host:ue=ue.parentElement;v.focus({preventScroll:!0}),G&&q.forEach(function(Ce){Ce.removeAttribute("ace_nocontext")}),setTimeout(function(){v.style.position="",v.style.top=="0px"&&(v.style.top=W)},0)},this.blur=function(){v.blur()},this.isFocused=function(){return N},A.on("beforeEndOperation",function(){var W=A.curOp,G=W&&W.command&&W.command.name;if(G!="insertstring"){var q=G&&(W.docChanged||W.selectionChanged);M&&q&&(L=v.value="",ne()),H()}});var P=function(W,G){for(var q=G,ue=1;ue<=W-R&&ue<2*O+1;ue++)q+=A.session.getLine(W-ue).length+1;return q},H=f?function(W){if(!(!N||E&&!W||S)){W||(W="");var G=` ab`+W+`cde fg -`;G!=v.value&&(v.value=L=G);var q=4,ue=4+(W.length||(A.selection.isEmpty()?0:1));(_!=q||k!=ue)&&v.setSelectionRange(q,ue),_=q,k=ue}}:function(){if(!(M||S)&&!(!N&&!J)){M=!0;var W=0,G=0,q="";if(A.session){var ue=A.selection,Ce=ue.getRange(),_e=ue.cursor.row;_e===D+1?(I=D+1,D=I+2*O):_e===I-1?(D=I-1,I=D-2*O):(_eD+1)&&(I=_e>O?_e-O:0,D=_e>O?_e+O:2*O);for(var Ae=[],Me=I;Me<=D;Me++)Ae.push(A.session.getLine(Me));if(q=Ae.join(` -`),W=P(Ce.start.row,Ce.start.column),G=P(Ce.end.row,Ce.end.column),Ce.start.rowD+1)&&(R=_e>O?_e-O:0,D=_e>O?_e+O:2*O);for(var Ae=[],Me=R;Me<=D;Me++)Ae.push(A.session.getLine(Me));if(q=Ae.join(` +`),W=P(Ce.start.row,Ce.start.column),G=P(Ce.end.row,Ce.end.column),Ce.start.rowD){var ke=A.session.getLine(D+1);G=Ce.end.row>D+1?ke.length:Ce.end.column,G+=q.length+1,q=q+` `+ke}else C&&_e>0&&(q=` `+q,G+=1,W+=1);q.length>s&&(W=L.length&&W.value===L&&L&&W.selectionEnd!==k},U=function(W){M||(E?E=!1:F(v)?(A.selectAll(),H()):C&&v.selectionStart!=_&&H())},j=null;this.setInputHandler=function(W){j=W},this.getInputHandler=function(){return j};var J=!1,z=function(W,G){if(J&&(J=!1),$)return H(),W&&A.onPaste(W),$=!1,"";for(var q=v.selectionStart,ue=v.selectionEnd,Ce=_,_e=L.length-k,Ae=W,Me=W.length-q,Oe=W.length-ue,ke=0;Ce>0&&L[ke]==W[ke];)ke++,Ce--;for(Ae=Ae.slice(ke),ke=1;_e>0&&L.length-ke>_-1&&L[L.length-ke]==W[W.length-ke];)ke++,_e--;Me-=ke-1,Oe-=ke-1;var ze=Ae.length-ke+1;if(ze<0&&(Ce=-ze,ze=0),Ae=Ae.slice(0,ze),!G&&!Ae&&!Me&&!Ce&&!_e&&!Oe)return"";S=!0;var cn=!1;return g.isAndroid&&Ae==". "&&(Ae=" ",cn=!0),Ae&&!Ce&&!_e&&!Me&&!Oe||y?A.onTextInput(Ae):A.onTextInput(Ae,{extendLeft:Ce,extendRight:_e,restoreStart:Me,restoreEnd:Oe}),S=!1,L=W,_=q,k=ue,R=Oe,cn?` -`:Ae},X=function(W){if(M)return K();if(W&&W.inputType){if(W.inputType=="historyUndo")return A.execCommand("undo");if(W.inputType=="historyRedo")return A.execCommand("redo")}var G=v.value,q=z(G,!0);(G.length>s+100||b.test(q)||C&&_<1&&_==k)&&H()},ee=function(W,G,q){var ue=W.clipboardData||window.clipboardData;if(!(!ue||r)){var Ce=n||q?"Text":"text/plain";try{return G?ue.setData(Ce,G)!==!1:ue.getData(Ce)}catch(_e){if(!q)return ee(_e,G,!0)}}},Z=function(W,G){var q=A.getCopyText();if(!q)return d.preventDefault(W);ee(W,q)?(f&&(H(q),E=q,setTimeout(function(){E=!1},10)),G?A.onCut():A.onCopy(),d.preventDefault(W)):(E=!0,v.value=q,v.select(),setTimeout(function(){E=!1,H(),G?A.onCut():A.onCopy()}))},pe=function(W){Z(W,!0)},ve=function(W){Z(W,!1)},de=function(W){var G=ee(W);o.pasteCancelled()||(typeof G=="string"?(G&&A.onPaste(G,W),g.isIE&&setTimeout(H),d.preventDefault(W)):(v.value="",$=!0))};d.addCommandKeyListener(v,A.onCommandKey.bind(A),A),d.addListener(v,"select",U,A),d.addListener(v,"input",X,A),d.addListener(v,"cut",pe,A),d.addListener(v,"copy",ve,A),d.addListener(v,"paste",de,A),(!("oncut"in v)||!("oncopy"in v)||!("onpaste"in v))&&d.addListener(x,"keydown",function(W){if(!(g.isMac&&!W.metaKey||!W.ctrlKey))switch(W.keyCode){case 67:ve(W);break;case 86:de(W);break;case 88:pe(W);break}},A);var B=function(W){if(!(M||!A.onCompositionStart||A.$readOnly)&&(M={},!y)){W.data&&(M.useTextareaForIME=!1),setTimeout(K,0),A._signal("compositionStart"),A.on("mousedown",Q);var G=A.getSelectionRange();G.end.row=G.start.row,G.end.column=G.start.column,M.markerRange=G,M.selectionStart=_,A.onCompositionStart(M),M.useTextareaForIME?(L=v.value="",_=0,k=0):(v.msGetInputContext&&(M.context=v.msGetInputContext()),v.getInputContext&&(M.context=v.getInputContext()))}},K=function(){if(!(!M||!A.onCompositionUpdate||A.$readOnly)){if(y)return Q();if(M.useTextareaForIME)A.onCompositionUpdate(v.value);else{var W=v.value;z(W),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+k-M.selectionStart+R)}}},ne=function(W){!A.onCompositionEnd||A.$readOnly||(M=!1,A.onCompositionEnd(),A.off("mousedown",Q),W&&X())};function Q(){m=!0,v.blur(),v.focus(),m=!1}var se=u.delayedCall(K,50).schedule.bind(null,null);function te(W){W.keyCode==27&&v.value.lengthk&&L[Oe]==` +`;ze!=L&&(v.value=L=ze,_=k=ze.length)}if(J&&(_=v.selectionStart,k=v.selectionEnd),k!=G||_!=W||v.selectionEnd!=k)try{v.setSelectionRange(W,G),_=W,k=G}catch{}M=!1}};this.resetSelection=H,N&&A.onFocus();var F=function(W){return W.selectionStart===0&&W.selectionEnd>=L.length&&W.value===L&&L&&W.selectionEnd!==k},U=function(W){M||(E?E=!1:F(v)?(A.selectAll(),H()):C&&v.selectionStart!=_&&H())},j=null;this.setInputHandler=function(W){j=W},this.getInputHandler=function(){return j};var J=!1,z=function(W,G){if(J&&(J=!1),$)return H(),W&&A.onPaste(W),$=!1,"";for(var q=v.selectionStart,ue=v.selectionEnd,Ce=_,_e=L.length-k,Ae=W,Me=W.length-q,Oe=W.length-ue,ke=0;Ce>0&&L[ke]==W[ke];)ke++,Ce--;for(Ae=Ae.slice(ke),ke=1;_e>0&&L.length-ke>_-1&&L[L.length-ke]==W[W.length-ke];)ke++,_e--;Me-=ke-1,Oe-=ke-1;var ze=Ae.length-ke+1;if(ze<0&&(Ce=-ze,ze=0),Ae=Ae.slice(0,ze),!G&&!Ae&&!Me&&!Ce&&!_e&&!Oe)return"";S=!0;var cn=!1;return g.isAndroid&&Ae==". "&&(Ae=" ",cn=!0),Ae&&!Ce&&!_e&&!Me&&!Oe||y?A.onTextInput(Ae):A.onTextInput(Ae,{extendLeft:Ce,extendRight:_e,restoreStart:Me,restoreEnd:Oe}),S=!1,L=W,_=q,k=ue,I=Oe,cn?` +`:Ae},X=function(W){if(M)return K();if(W&&W.inputType){if(W.inputType=="historyUndo")return A.execCommand("undo");if(W.inputType=="historyRedo")return A.execCommand("redo")}var G=v.value,q=z(G,!0);(G.length>s+100||b.test(q)||C&&_<1&&_==k)&&H()},ee=function(W,G,q){var ue=W.clipboardData||window.clipboardData;if(!(!ue||r)){var Ce=n||q?"Text":"text/plain";try{return G?ue.setData(Ce,G)!==!1:ue.getData(Ce)}catch(_e){if(!q)return ee(_e,G,!0)}}},Z=function(W,G){var q=A.getCopyText();if(!q)return d.preventDefault(W);ee(W,q)?(f&&(H(q),E=q,setTimeout(function(){E=!1},10)),G?A.onCut():A.onCopy(),d.preventDefault(W)):(E=!0,v.value=q,v.select(),setTimeout(function(){E=!1,H(),G?A.onCut():A.onCopy()}))},pe=function(W){Z(W,!0)},ve=function(W){Z(W,!1)},de=function(W){var G=ee(W);o.pasteCancelled()||(typeof G=="string"?(G&&A.onPaste(G,W),g.isIE&&setTimeout(H),d.preventDefault(W)):(v.value="",$=!0))};d.addCommandKeyListener(v,A.onCommandKey.bind(A),A),d.addListener(v,"select",U,A),d.addListener(v,"input",X,A),d.addListener(v,"cut",pe,A),d.addListener(v,"copy",ve,A),d.addListener(v,"paste",de,A),(!("oncut"in v)||!("oncopy"in v)||!("onpaste"in v))&&d.addListener(x,"keydown",function(W){if(!(g.isMac&&!W.metaKey||!W.ctrlKey))switch(W.keyCode){case 67:ve(W);break;case 86:de(W);break;case 88:pe(W);break}},A);var B=function(W){if(!(M||!A.onCompositionStart||A.$readOnly)&&(M={},!y)){W.data&&(M.useTextareaForIME=!1),setTimeout(K,0),A._signal("compositionStart"),A.on("mousedown",Q);var G=A.getSelectionRange();G.end.row=G.start.row,G.end.column=G.start.column,M.markerRange=G,M.selectionStart=_,A.onCompositionStart(M),M.useTextareaForIME?(L=v.value="",_=0,k=0):(v.msGetInputContext&&(M.context=v.msGetInputContext()),v.getInputContext&&(M.context=v.getInputContext()))}},K=function(){if(!(!M||!A.onCompositionUpdate||A.$readOnly)){if(y)return Q();if(M.useTextareaForIME)A.onCompositionUpdate(v.value);else{var W=v.value;z(W),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+k-M.selectionStart+I)}}},ne=function(W){!A.onCompositionEnd||A.$readOnly||(M=!1,A.onCompositionEnd(),A.off("mousedown",Q),W&&X())};function Q(){m=!0,v.blur(),v.focus(),m=!1}var se=u.delayedCall(K,50).schedule.bind(null,null);function te(W){W.keyCode==27&&v.value.lengthk&&L[Oe]==` `?ke=l.end:Me<_&&L[Me-1]==" "?(ke=l.left,ze=h.option):Me<_||Me==_&&k!=_&&Me==Oe?ke=l.left:Oe>k&&L.slice(0,Oe).split(` -`).length>2?ke=l.down:Oe>k&&L[Oe-1]==" "?(ke=l.right,ze=h.option):(Oe>k||Oe==k&&k!=_&&Me==Oe)&&(ke=l.right),Me!==Oe&&(ze|=h.shift),ke){var cn=G.onCommandKey({},ze,ke);if(!cn&&G.commands){ke=l.keyCodeToString(ke);var lt=G.commands.findKeyCommand(ze,ke);lt&&G.execCommand(lt)}_=Me,k=Oe,H("")}}};document.addEventListener("selectionchange",_e),G.on("destroy",function(){document.removeEventListener("selectionchange",_e)})}this.destroy=function(){v.parentElement&&v.parentElement.removeChild(v)}},e.TextInput=w,e.$setUserAgentForTests=function(x,A){C=x,f=A}});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/useragent"),p=0,g=550,a=function(){function r(n){n.$clickSelection=null;var i=n.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(l){n[l]=this[l]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return r.prototype.onMouseDown=function(n){var i=n.inSelection(),s=n.getDocumentPosition();this.mousedownEvent=n;var l=this.editor,h=n.getButton();if(h!==0){var f=l.getSelectionRange(),b=f.isEmpty();(b||h==1)&&l.selection.moveToPosition(s),h==2&&(l.textInput.onContextMenu(n.domEvent),d.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(s,n.domEvent._clicks>1),n.preventDefault()},r.prototype.startSelect=function(n,i){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(n):i||s.selection.moveToPosition(n),i||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var n,i=this.editor,s=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s);if(l==-1)n=this.$clickSelection.end;else if(l==1)n=this.$clickSelection.start;else{var h=o(this.$clickSelection,s);s=h.cursor,n=h.anchor}i.selection.setSelectionAnchor(n.row,n.column)}i.selection.selectToPosition(s),i.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(n){var i,s=this.editor,l=s.renderer.screenToTextCoordinates(this.x,this.y),h=s.selection[n](l.row,l.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(h.start),b=this.$clickSelection.comparePoint(h.end);if(f==-1&&b<=0)i=this.$clickSelection.end,(h.end.row!=l.row||h.end.column!=l.column)&&(l=h.start);else if(b==1&&f>=0)i=this.$clickSelection.start,(h.start.row!=l.row||h.start.column!=l.column)&&(l=h.end);else if(f==-1&&b==1)l=h.end,i=h.start;else{var C=o(this.$clickSelection,l);l=C.cursor,i=C.anchor}s.selection.setSelectionAnchor(i.row,i.column)}s.selection.selectToPosition(l),s.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(n>p||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(n){var i=n.getDocumentPosition(),s=this.editor,l=s.session,h=l.getBracketRange(i);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=s.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},r.prototype.onTripleClick=function(n){var i=n.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var l=s.getSelectionRange();l.isMultiLine()&&l.contains(i.row,i.column)?(this.$clickSelection=s.selection.getLineRange(l.start.row),this.$clickSelection.end=s.selection.getLineRange(l.end.row).end):this.$clickSelection=s.selection.getLineRange(i.row),this.select()},r.prototype.onQuadClick=function(n){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,l=n.domEvent.timeStamp,h=l-s.t,f=h?n.wheelX/h:s.vx,b=h?n.wheelY/h:s.vy;h=1&&i.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(w=!0),C<=1&&i.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(w=!0),w)s.allowed=l;else if(l-s.allowedg.clientHeight;a||p.preventDefault()}});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var h=function(f,b){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,w){C.__proto__=w}||function(C,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(C[x]=w[x])},h(f,b)};return function(f,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");h(f,b);function C(){this.constructor=f}f.prototype=b===null?Object.create(b):(C.prototype=b.prototype,new C)}}(),p=this&&this.__values||function(h){var f=typeof Symbol=="function"&&Symbol.iterator,b=f&&h[f],C=0;if(b)return b.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&C>=h.length&&(h=void 0),{value:h&&h[C++],done:!h}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/dom"),a=t("./lib/event"),u=t("./range").Range,o=t("./lib/scroll").preventParentScroll,r="ace_tooltip",n=function(){function h(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return h.prototype.$init=function(){return this.$element=g.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},h.prototype.getElement=function(){return this.$element||this.$init()},h.prototype.setText=function(f){this.getElement().textContent=f},h.prototype.setHtml=function(f){this.getElement().innerHTML=f},h.prototype.setPosition=function(f,b){this.getElement().style.left=f+"px",this.getElement().style.top=b+"px"},h.prototype.setClassName=function(f){g.addCssClass(this.getElement(),f)},h.prototype.setTheme=function(f){this.$element.className=r+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},h.prototype.show=function(f,b,C){f!=null&&this.setText(f),b!=null&&C!=null&&this.setPosition(b,C),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},h.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},h.prototype.getHeight=function(){return this.getElement().offsetHeight},h.prototype.getWidth=function(){return this.getElement().offsetWidth},h.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},h}(),i=function(){function h(){this.popups=[]}return h.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},h.prototype.removePopup=function(f){var b=this.popups.indexOf(f);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},h.prototype.updatePopups=function(){var f,b,C,w;this.popups.sort(function(y,m){return m.priority-y.priority});var x=[];try{for(var A=p(this.popups),v=A.next();!v.done;v=A.next()){var E=v.value,$=!0;try{for(var M=(C=void 0,p(x)),S=M.next();!S.done;S=M.next()){var T=S.value;if(this.doPopupsOverlap(T,E)){$=!1;break}}}catch(y){C={error:y}}finally{try{S&&!S.done&&(w=M.return)&&w.call(M)}finally{if(C)throw C.error}}$?x.push(E):E.hide()}}catch(y){f={error:y}}finally{try{v&&!v.done&&(b=A.return)&&b.call(A)}finally{if(f)throw f.error}}},h.prototype.doPopupsOverlap=function(f,b){var C=f.getElement().getBoundingClientRect(),w=b.getElement().getBoundingClientRect();return C.leftw.left&&C.topw.top},h}(),s=new i;e.popupManager=s,e.Tooltip=n;var l=function(h){d(f,h);function f(b){b===void 0&&(b=document.body);var C=h.call(this,b)||this;C.timeout=void 0,C.lastT=0,C.idleTime=350,C.lastEvent=void 0,C.onMouseOut=C.onMouseOut.bind(C),C.onMouseMove=C.onMouseMove.bind(C),C.waitForHover=C.waitForHover.bind(C),C.hide=C.hide.bind(C);var w=C.getElement();return w.style.whiteSpace="pre-wrap",w.style.pointerEvents="auto",w.addEventListener("mouseout",C.onMouseOut),w.tabIndex=-1,w.addEventListener("blur",function(){w.contains(document.activeElement)||this.hide()}.bind(C)),w.addEventListener("wheel",o),C}return f.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(b,C){this.lastEvent=b,this.lastT=Date.now();var w=C.$mouseHandler.isMousePressed;if(this.isOpen){var x=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(x.row,x.column)||w||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||w||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(b){var C=b.editor,w=b.getDocumentPosition(),x=C.session.getLine(w.row);if(w.column==x.length){var A=C.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),v=C.session.documentToScreenPosition(w.row,w.column);if(v.column!=A.column||v.row!=A.row)return!0}return!1},f.prototype.setDataProvider=function(b){this.$gatherData=b},f.prototype.showForRange=function(b,C,w,x){var A=10;if(!(x&&x!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=b.renderer;this.isOpen||(s.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(C,b.session),this.range=u.fromPoints(C.start,C.end);var E=v.textToScreenCoordinates(C.start.row,C.start.column),$=v.scroller.getBoundingClientRect();E.pageX<$.left&&(E.pageX=$.left);var M=this.getElement();M.innerHTML="",M.appendChild(w),M.style.maxHeight="",M.style.display="block";var S=M.clientHeight,T=M.clientWidth,y=window.innerHeight-E.pageY-v.lineHeight,m=!0;E.pageY-S<0&&E.pageY=i.length&&(i=void 0),{value:i&&i[h++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("../lib/dom"),a=t("../lib/event"),u=t("../tooltip").Tooltip,o=t("../config").nls;function r(i){var s=i.editor,l=s.renderer.$gutterLayer,h=new n(s);i.editor.setDefaultHandler("guttermousedown",function(A){if(!(!s.isFocused()||A.getButton()!=0)){var v=l.getRegion(A);if(v!="foldWidgets"){var E=A.getDocumentPosition().row,$=s.session.selection;if(A.getShiftKey())$.selectTo(E,0);else{if(A.domEvent.detail==2)return s.selectAll(),A.preventDefault();i.$clickSelection=s.selection.getLineRange(E)}return i.setState("selectByLines"),i.captureMouse(A),A.preventDefault()}}});var f,b;function C(){var A=b.getDocumentPosition().row,v=s.session.getLength();if(A==v){var E=s.renderer.pixelToScreenCoordinates(0,b.y).row,$=b.$pos;if(E>s.session.documentToScreenRow($.row,$.column))return w()}if(h.showTooltip(A),!!h.isOpen)if(s.on("mousewheel",w),i.$tooltipFollowsMouse)x(b);else{var M=b.getGutterRow(),S=l.$lines.get(M);if(S){var T=S.element.querySelector(".ace_gutter_annotation"),y=T.getBoundingClientRect(),m=h.getElement().style;m.left=y.right+"px",m.top=y.bottom+"px"}else x(b)}}function w(){f&&(f=clearTimeout(f)),h.isOpen&&(h.hideTooltip(),s.off("mousewheel",w))}function x(A){h.setPosition(A.x,A.y)}i.editor.setDefaultHandler("guttermousemove",function(A){var v=A.domEvent.target||A.domEvent.srcElement;if(g.hasCssClass(v,"ace_fold-widget"))return w();h.isOpen&&i.$tooltipFollowsMouse&&x(A),b=A,!f&&(f=setTimeout(function(){f=null,b&&!i.isMousePressed?C():w()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(A){b=null,!(!h.isOpen||f)&&(f=setTimeout(function(){f=null,w()},50))},s),s.on("changeSession",w),s.on("input",w)}e.GutterHandler=r;var n=function(i){d(s,i);function s(l){var h=i.call(this,l.container)||this;return h.editor=l,h}return s.prototype.setPosition=function(l,h){var f=window.innerWidth||document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),w=this.getHeight();l+=15,h+=15,l+C>f&&(l-=l+C-f),h+w>b&&(h-=20+w),u.prototype.setPosition.call(this,l,h)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:o("error"),plural:o("errors")},warning:{singular:o("warning"),plural:o("warnings")},info:{singular:o("information message"),plural:o("information messages")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(l){var h=this.editor.renderer.$gutterLayer,f=h.$annotations[l],b;f?b={text:Array.from(f.text),type:Array.from(f.type)}:b={text:[],type:[]};var C=h.session.getFoldLine(l);if(C&&h.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},x,A=l+1;A<=C.end.row;A++)if(h.$annotations[A])for(var v=0;v ").concat(b.text[A]);M[b.type[A].replace("_fold","")].push(T)}var y=[].concat(M.error,M.warning,M.info).join("
");this.setHtml(y),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},s.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},s.annotationsToSummaryString=function(l){var h,f,b=[],C=["error","warning","info"];try{for(var w=p(C),x=w.next();!x.done;x=w.next()){var A=x.value;if(l[A].length){var v=l[A].length===1?s.annotationLabels[A].singular:s.annotationLabels[A].plural;b.push("".concat(l[A].length," ").concat(v))}}}catch(E){h={error:E}}finally{try{x&&!x.done&&(f=w.return)&&f.call(w)}finally{if(h)throw h.error}}return b.join(", ")},s}(u);e.GutterTooltip=n});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/event"),p=t("../lib/useragent"),g=function(){function a(u,o){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=o,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(u,0),r=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-r},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,o=u.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var r=this.getDocumentPosition();this.$inSelection=o.contains(r.row,r.column)}return this.$inSelection},a.prototype.getButton=function(){return d.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();e.MouseEvent=g});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=t("../lib/event"),g=t("../lib/useragent"),a=200,u=200,o=5;function r(i){var s=i.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent="\xA0";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(P){i[P]=this[P]},this),s.on("mousedown",this.onMouseDown.bind(i));var f=s.container,b,C,w,x,A,v,E=0,$,M,S,T,y;this.onDragStart=function(P){if(this.cancelDrag||!f.draggable){var H=this;return setTimeout(function(){H.startSelect(),H.captureMouse(P)},0),P.preventDefault()}A=s.getSelectionRange();var F=P.dataTransfer;F.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(l),F.setDragImage&&F.setDragImage(l,0,0),setTimeout(function(){s.container.removeChild(l)}),F.clearData(),F.setData("Text",s.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(P){if(f.draggable=!1,M=!1,this.setState(null),!s.getReadOnly()){var H=P.dataTransfer.dropEffect;!$&&H=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(P){if(!(s.getReadOnly()||!O(P.dataTransfer)))return C=P.clientX,w=P.clientY,b||k(),E++,P.dataTransfer.dropEffect=$=N(P),p.preventDefault(P)},this.onDragOver=function(P){if(!(s.getReadOnly()||!O(P.dataTransfer)))return C=P.clientX,w=P.clientY,b||(k(),E++),I!==null&&(I=null),P.dataTransfer.dropEffect=$=N(P),p.preventDefault(P)},this.onDragLeave=function(P){if(E--,E<=0&&b)return R(),$=null,p.preventDefault(P)},this.onDrop=function(P){if(v){var H=P.dataTransfer;if(M)switch($){case"move":A.contains(v.row,v.column)?A={start:v,end:v}:A=s.moveText(A,v);break;case"copy":A=s.moveText(A,v,!0);break}else{var F=H.getData("Text");A={start:v,end:s.session.insert(v,F)},s.focus(),$=null}return R(),p.preventDefault(P)}},p.addListener(f,"dragstart",this.onDragStart.bind(i),s),p.addListener(f,"dragend",this.onDragEnd.bind(i),s),p.addListener(f,"dragenter",this.onDragEnter.bind(i),s),p.addListener(f,"dragover",this.onDragOver.bind(i),s),p.addListener(f,"dragleave",this.onDragLeave.bind(i),s),p.addListener(f,"drop",this.onDrop.bind(i),s);function m(P,H){var F=Date.now(),U=!H||P.row!=H.row,j=!H||P.column!=H.column;if(!T||U||j)s.moveCursorToPosition(P),T=F,y={x:C,y:w};else{var J=n(y.x,y.y,C,w);J>o?T=null:F-T>=u&&(s.renderer.scrollCursorIntoView(),T=null)}}function L(P,H){var F=Date.now(),U=s.renderer.layerConfig.lineHeight,j=s.renderer.layerConfig.characterWidth,J=s.renderer.scroller.getBoundingClientRect(),z={x:{left:C-J.left,right:J.right-C},y:{top:w-J.top,bottom:J.bottom-w}},X=Math.min(z.x.left,z.x.right),ee=Math.min(z.y.top,z.y.bottom),Z={row:P.row,column:P.column};X/j<=2&&(Z.column+=z.x.left=a&&s.renderer.scrollCursorIntoView(Z):S=F:S=null}function _(){var P=v;v=s.renderer.screenToTextCoordinates(C,w),m(v,P),L(v,P)}function k(){A=s.selection.toOrientedRange(),b=s.session.addMarker(A,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),_(),x=setInterval(_,20),E=0,p.addListener(document,"mousemove",D)}function R(){clearInterval(x),s.session.removeMarker(b),b=null,s.selection.fromOrientedRange(A),s.isFocused()&&!M&&s.$resetCursorStyle(),A=null,v=null,E=0,S=null,T=null,p.removeListener(document,"mousemove",D)}var I=null;function D(){I==null&&(I=setTimeout(function(){I!=null&&b&&R()},20))}function O(P){var H=P.types;return!H||Array.prototype.some.call(H,function(F){return F=="text/plain"||F=="Text"})}function N(P){var H=["copy","copymove","all","uninitialized"],F=["move","copymove","linkmove","all","uninitialized"],U=g.isMac?P.altKey:P.ctrlKey,j="uninitialized";try{j=P.dataTransfer.effectAllowed.toLowerCase()}catch{}var J="none";return U&&H.indexOf(j)>=0?J="copy":F.indexOf(j)>=0?J="move":H.indexOf(j)>=0&&(J="copy"),J}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,s=i.container;s.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var l=g.isWin?"default":"move";i.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(i){var s=this.editor.container;if(g.isIE&&this.state=="dragReady"){var l=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&s.dragDrop()}if(this.state==="dragWait"){var l=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var s=this.editor,l=i.inSelection(),h=i.getButton(),f=i.domEvent.detail||1;if(f===1&&h===0&&l){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),s.getDragDelay()){if(g.isWebKit){this.cancelDrag=!0;var C=s.container;C.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(r.prototype);function n(i,s,l,h){return Math.sqrt(Math.pow(l-i,2)+Math.pow(h-s,2))}e.DragdropHandler=r});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,e,c){"use strict";var d=t("./mouse_event").MouseEvent,p=t("../lib/event"),g=t("../lib/dom");e.addTouchListeners=function(a,u){var o="scroll",r,n,i,s,l,h,f=0,b,C=0,w=0,x=0,A,v;function E(){var m=window.navigator&&window.navigator.clipboard,L=!1,_=function(){var R=u.getCopyText(),I=u.session.getUndoManager().hasUndo();v.replaceChild(g.buildDom(L?["span",!R&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],m&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),v.firstChild)},k=function(R){var I=R.target.getAttribute("action");if(I=="more"||!L)return L=!L,_();I=="paste"?m.readText().then(function(D){u.execCommand(I,D)}):I&&((I=="cut"||I=="copy")&&(m?m.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(I)),v.firstChild.style.display="none",L=!1,I!="openCommandPalette"&&u.focus()};v=g.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){o="menu",R.stopPropagation(),R.preventDefault(),u.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),k(R)},onclick:k},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function $(){v||E();var m=u.selection.cursor,L=u.renderer.textToScreenCoordinates(m.row,m.column),_=u.renderer.textToScreenCoordinates(0,0).pageX,k=u.renderer.scrollLeft,R=u.container.getBoundingClientRect();v.style.top=L.pageY-R.top-3+"px",L.pageX-R.left=2?u.selection.getLineRange(b.row):u.session.getBracketRange(b);m&&!m.isEmpty()?u.selection.setRange(m):u.selection.selectWord(),o="wait"}p.addListener(a,"contextmenu",function(m){if(A){var L=u.textInput.getElement();L.focus()}},u),p.addListener(a,"touchstart",function(m){var L=m.touches;if(l||L.length>1){clearTimeout(l),l=null,i=-1,o="zoom";return}A=u.$mouseHandler.isMousePressed=!0;var _=u.renderer.layerConfig.lineHeight,k=u.renderer.layerConfig.lineHeight,R=m.timeStamp;s=R;var I=L[0],D=I.clientX,O=I.clientY;Math.abs(r-D)+Math.abs(n-O)>_&&(i=-1),r=m.clientX=D,n=m.clientY=O,w=x=0;var N=new d(m,u);if(b=N.getDocumentPosition(),R-i<500&&L.length==1&&!f)C++,m.preventDefault(),m.button=0,T();else{C=0;var P=u.selection.cursor,H=u.selection.isEmpty()?P:u.selection.anchor,F=u.renderer.$cursorLayer.getPixelPosition(P,!0),U=u.renderer.$cursorLayer.getPixelPosition(H,!0),j=u.renderer.scroller.getBoundingClientRect(),J=u.renderer.layerConfig.offset,z=u.renderer.scrollLeft,X=function(pe,ve){return pe=pe/k,ve=ve/_-.75,pe*pe+ve*ve};if(m.clientXZ?"cursor":"anchor"),Z<3.5?o="anchor":ee<3.5?o="cursor":o="scroll",l=setTimeout(S,450)}i=R},u),p.addListener(a,"touchend",function(m){A=u.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),o=="zoom"?(o="",f=0):l?(u.selection.moveToPosition(b),f=0,$()):o=="scroll"?(y(),M()):$(),clearTimeout(l),l=null},u),p.addListener(a,"touchmove",function(m){l&&(clearTimeout(l),l=null);var L=m.touches;if(!(L.length>1||o=="zoom")){var _=L[0],k=r-_.clientX,R=n-_.clientY;if(o=="wait")if(k*k+R*R>4)o="cursor";else return m.preventDefault();r=_.clientX,n=_.clientY,m.clientX=_.clientX,m.clientY=_.clientY;var I=m.timeStamp,D=I-s;if(s=I,o=="scroll"){var O=new d(m,u);O.speed=1,O.wheelX=k,O.wheelY=R,10*Math.abs(k)0)if(ne==16){for(te=se;te-1){for(te=se;te=0&&Z[he]==S;he--)X[he]=g}}}function F(z,X,ee){if(!(a=z){for(ve=pe+1;ve=z;)ve++;for(de=pe,B=ve-1;de=X.length||(ve=ee[Z-1])!=x&&ve!=A||(de=X[Z+1])!=x&&de!=A?v:(u&&(de=A),de==ve?de:v);case y:return ve=Z>0?ee[Z-1]:E,ve==x&&Z+10&&ee[Z-1]==x)return x;if(u)return v;for(K=Z+1,B=X.length;K=1425&&ne<=2303||ne==64286;if(ve=X[K],Q&&(ve==w||ve==M))return w}return Z<1||(ve=X[Z-1])==E?v:ee[Z-1];case E:return u=!1,r=!0,g;case $:return n=!0,v;case _:case k:case I:case D:case R:u=!1;case O:return v}}function j(z){var X=z.charCodeAt(0),ee=X>>8;return ee==0?X>191?C:N[X]:ee==5?/[\u0591-\u05f4]/.test(z)?w:C:ee==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(z)?L:/[\u0660-\u0669\u066b-\u066c]/.test(z)?A:X==1642?m:/[\u06f0-\u06f9]/.test(z)?x:M:ee==32&&X<=8287?P[X&255]:ee==254&&X>=65136?M:v}function J(z){return z>="\u064B"&&z<="\u0655"}e.L=C,e.R=w,e.EN=x,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="\xB7",e.doBidiReorder=function(z,X,ee){if(z.length<2)return{};var Z=z.split(""),pe=new Array(Z.length),ve=new Array(Z.length),de=[];g=ee?b:f,H(Z,de,Z.length,X);for(var B=0;BM&&X[B]<_||X[B]===v||X[B]===O)?de[B]=e.ON_R:B>0&&Z[B-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(Z[B])&&(de[B-1]=de[B]=e.R_H,B++);Z[Z.length-1]===e.DOT&&(de[Z.length-1]=e.B),Z[0]==="\u202B"&&(de[0]=e.RLE);for(var B=0;B2?ke=l.down:Oe>k&&L[Oe-1]==" "?(ke=l.right,ze=h.option):(Oe>k||Oe==k&&k!=_&&Me==Oe)&&(ke=l.right),Me!==Oe&&(ze|=h.shift),ke){var cn=G.onCommandKey({},ze,ke);if(!cn&&G.commands){ke=l.keyCodeToString(ke);var lt=G.commands.findKeyCommand(ze,ke);lt&&G.execCommand(lt)}_=Me,k=Oe,H("")}}};document.addEventListener("selectionchange",_e),G.on("destroy",function(){document.removeEventListener("selectionchange",_e)})}this.destroy=function(){v.parentElement&&v.parentElement.removeChild(v)}},e.TextInput=w,e.$setUserAgentForTests=function(x,A){C=x,f=A}});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/useragent"),p=0,g=550,a=function(){function r(n){n.$clickSelection=null;var i=n.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(l){n[l]=this[l]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return r.prototype.onMouseDown=function(n){var i=n.inSelection(),s=n.getDocumentPosition();this.mousedownEvent=n;var l=this.editor,h=n.getButton();if(h!==0){var f=l.getSelectionRange(),b=f.isEmpty();(b||h==1)&&l.selection.moveToPosition(s),h==2&&(l.textInput.onContextMenu(n.domEvent),d.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(s,n.domEvent._clicks>1),n.preventDefault()},r.prototype.startSelect=function(n,i){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(n):i||s.selection.moveToPosition(n),i||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var n,i=this.editor,s=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s);if(l==-1)n=this.$clickSelection.end;else if(l==1)n=this.$clickSelection.start;else{var h=o(this.$clickSelection,s);s=h.cursor,n=h.anchor}i.selection.setSelectionAnchor(n.row,n.column)}i.selection.selectToPosition(s),i.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(n){var i,s=this.editor,l=s.renderer.screenToTextCoordinates(this.x,this.y),h=s.selection[n](l.row,l.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(h.start),b=this.$clickSelection.comparePoint(h.end);if(f==-1&&b<=0)i=this.$clickSelection.end,(h.end.row!=l.row||h.end.column!=l.column)&&(l=h.start);else if(b==1&&f>=0)i=this.$clickSelection.start,(h.start.row!=l.row||h.start.column!=l.column)&&(l=h.end);else if(f==-1&&b==1)l=h.end,i=h.start;else{var C=o(this.$clickSelection,l);l=C.cursor,i=C.anchor}s.selection.setSelectionAnchor(i.row,i.column)}s.selection.selectToPosition(l),s.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(n>p||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(n){var i=n.getDocumentPosition(),s=this.editor,l=s.session,h=l.getBracketRange(i);h?(h.isEmpty()&&(h.start.column--,h.end.column++),this.setState("select")):(h=s.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=h,this.select()},r.prototype.onTripleClick=function(n){var i=n.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var l=s.getSelectionRange();l.isMultiLine()&&l.contains(i.row,i.column)?(this.$clickSelection=s.selection.getLineRange(l.start.row),this.$clickSelection.end=s.selection.getLineRange(l.end.row).end):this.$clickSelection=s.selection.getLineRange(i.row),this.select()},r.prototype.onQuadClick=function(n){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,l=n.domEvent.timeStamp,h=l-s.t,f=h?n.wheelX/h:s.vx,b=h?n.wheelY/h:s.vy;h=1&&i.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(w=!0),C<=1&&i.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(w=!0),w)s.allowed=l;else if(l-s.allowedg.clientHeight;a||p.preventDefault()}});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var h=function(f,b){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,w){C.__proto__=w}||function(C,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(C[x]=w[x])},h(f,b)};return function(f,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");h(f,b);function C(){this.constructor=f}f.prototype=b===null?Object.create(b):(C.prototype=b.prototype,new C)}}(),p=this&&this.__values||function(h){var f=typeof Symbol=="function"&&Symbol.iterator,b=f&&h[f],C=0;if(b)return b.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&C>=h.length&&(h=void 0),{value:h&&h[C++],done:!h}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/dom"),a=t("./lib/event"),u=t("./range").Range,o=t("./lib/scroll").preventParentScroll,r="ace_tooltip",n=function(){function h(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return h.prototype.$init=function(){return this.$element=g.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},h.prototype.getElement=function(){return this.$element||this.$init()},h.prototype.setText=function(f){this.getElement().textContent=f},h.prototype.setHtml=function(f){this.getElement().innerHTML=f},h.prototype.setPosition=function(f,b){this.getElement().style.left=f+"px",this.getElement().style.top=b+"px"},h.prototype.setClassName=function(f){g.addCssClass(this.getElement(),f)},h.prototype.setTheme=function(f){this.$element.className=r+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},h.prototype.show=function(f,b,C){f!=null&&this.setText(f),b!=null&&C!=null&&this.setPosition(b,C),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},h.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},h.prototype.getHeight=function(){return this.getElement().offsetHeight},h.prototype.getWidth=function(){return this.getElement().offsetWidth},h.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},h}(),i=function(){function h(){this.popups=[]}return h.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},h.prototype.removePopup=function(f){var b=this.popups.indexOf(f);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},h.prototype.updatePopups=function(){var f,b,C,w;this.popups.sort(function(y,m){return m.priority-y.priority});var x=[];try{for(var A=p(this.popups),v=A.next();!v.done;v=A.next()){var E=v.value,$=!0;try{for(var M=(C=void 0,p(x)),S=M.next();!S.done;S=M.next()){var T=S.value;if(this.doPopupsOverlap(T,E)){$=!1;break}}}catch(y){C={error:y}}finally{try{S&&!S.done&&(w=M.return)&&w.call(M)}finally{if(C)throw C.error}}$?x.push(E):E.hide()}}catch(y){f={error:y}}finally{try{v&&!v.done&&(b=A.return)&&b.call(A)}finally{if(f)throw f.error}}},h.prototype.doPopupsOverlap=function(f,b){var C=f.getElement().getBoundingClientRect(),w=b.getElement().getBoundingClientRect();return C.leftw.left&&C.topw.top},h}(),s=new i;e.popupManager=s,e.Tooltip=n;var l=function(h){d(f,h);function f(b){b===void 0&&(b=document.body);var C=h.call(this,b)||this;C.timeout=void 0,C.lastT=0,C.idleTime=350,C.lastEvent=void 0,C.onMouseOut=C.onMouseOut.bind(C),C.onMouseMove=C.onMouseMove.bind(C),C.waitForHover=C.waitForHover.bind(C),C.hide=C.hide.bind(C);var w=C.getElement();return w.style.whiteSpace="pre-wrap",w.style.pointerEvents="auto",w.addEventListener("mouseout",C.onMouseOut),w.tabIndex=-1,w.addEventListener("blur",function(){w.contains(document.activeElement)||this.hide()}.bind(C)),w.addEventListener("wheel",o),C}return f.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(b,C){this.lastEvent=b,this.lastT=Date.now();var w=C.$mouseHandler.isMousePressed;if(this.isOpen){var x=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(x.row,x.column)||w||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||w||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(b){var C=b.editor,w=b.getDocumentPosition(),x=C.session.getLine(w.row);if(w.column==x.length){var A=C.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),v=C.session.documentToScreenPosition(w.row,w.column);if(v.column!=A.column||v.row!=A.row)return!0}return!1},f.prototype.setDataProvider=function(b){this.$gatherData=b},f.prototype.showForRange=function(b,C,w,x){var A=10;if(!(x&&x!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=b.renderer;this.isOpen||(s.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(C,b.session),this.range=u.fromPoints(C.start,C.end);var E=v.textToScreenCoordinates(C.start.row,C.start.column),$=v.scroller.getBoundingClientRect();E.pageX<$.left&&(E.pageX=$.left);var M=this.getElement();M.innerHTML="",M.appendChild(w),M.style.maxHeight="",M.style.display="block";var S=M.clientHeight,T=M.clientWidth,y=window.innerHeight-E.pageY-v.lineHeight,m=!0;E.pageY-S<0&&E.pageY=i.length&&(i=void 0),{value:i&&i[h++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("../lib/dom"),a=t("../lib/event"),u=t("../tooltip").Tooltip,o=t("../config").nls;function r(i){var s=i.editor,l=s.renderer.$gutterLayer,h=new n(s);i.editor.setDefaultHandler("guttermousedown",function(A){if(!(!s.isFocused()||A.getButton()!=0)){var v=l.getRegion(A);if(v!="foldWidgets"){var E=A.getDocumentPosition().row,$=s.session.selection;if(A.getShiftKey())$.selectTo(E,0);else{if(A.domEvent.detail==2)return s.selectAll(),A.preventDefault();i.$clickSelection=s.selection.getLineRange(E)}return i.setState("selectByLines"),i.captureMouse(A),A.preventDefault()}}});var f,b;function C(){var A=b.getDocumentPosition().row,v=s.session.getLength();if(A==v){var E=s.renderer.pixelToScreenCoordinates(0,b.y).row,$=b.$pos;if(E>s.session.documentToScreenRow($.row,$.column))return w()}if(h.showTooltip(A),!!h.isOpen)if(s.on("mousewheel",w),i.$tooltipFollowsMouse)x(b);else{var M=b.getGutterRow(),S=l.$lines.get(M);if(S){var T=S.element.querySelector(".ace_gutter_annotation"),y=T.getBoundingClientRect(),m=h.getElement().style;m.left=y.right+"px",m.top=y.bottom+"px"}else x(b)}}function w(){f&&(f=clearTimeout(f)),h.isOpen&&(h.hideTooltip(),s.off("mousewheel",w))}function x(A){h.setPosition(A.x,A.y)}i.editor.setDefaultHandler("guttermousemove",function(A){var v=A.domEvent.target||A.domEvent.srcElement;if(g.hasCssClass(v,"ace_fold-widget"))return w();h.isOpen&&i.$tooltipFollowsMouse&&x(A),b=A,!f&&(f=setTimeout(function(){f=null,b&&!i.isMousePressed?C():w()},50))}),a.addListener(s.renderer.$gutter,"mouseout",function(A){b=null,!(!h.isOpen||f)&&(f=setTimeout(function(){f=null,w()},50))},s),s.on("changeSession",w),s.on("input",w)}e.GutterHandler=r;var n=function(i){d(s,i);function s(l){var h=i.call(this,l.container)||this;return h.editor=l,h}return s.prototype.setPosition=function(l,h){var f=window.innerWidth||document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),w=this.getHeight();l+=15,h+=15,l+C>f&&(l-=l+C-f),h+w>b&&(h-=20+w),u.prototype.setPosition.call(this,l,h)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:o("error"),plural:o("errors")},warning:{singular:o("warning"),plural:o("warnings")},info:{singular:o("information message"),plural:o("information messages")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(l){var h=this.editor.renderer.$gutterLayer,f=h.$annotations[l],b;f?b={text:Array.from(f.text),type:Array.from(f.type)}:b={text:[],type:[]};var C=h.session.getFoldLine(l);if(C&&h.$showFoldedAnnotations){for(var w={error:[],warning:[],info:[]},x,A=l+1;A<=C.end.row;A++)if(h.$annotations[A])for(var v=0;v ").concat(b.text[A]);M[b.type[A].replace("_fold","")].push(T)}var y=[].concat(M.error,M.warning,M.info).join("
");this.setHtml(y),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},s.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},s.annotationsToSummaryString=function(l){var h,f,b=[],C=["error","warning","info"];try{for(var w=p(C),x=w.next();!x.done;x=w.next()){var A=x.value;if(l[A].length){var v=l[A].length===1?s.annotationLabels[A].singular:s.annotationLabels[A].plural;b.push("".concat(l[A].length," ").concat(v))}}}catch(E){h={error:E}}finally{try{x&&!x.done&&(f=w.return)&&f.call(w)}finally{if(h)throw h.error}}return b.join(", ")},s}(u);e.GutterTooltip=n});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/event"),p=t("../lib/useragent"),g=function(){function a(u,o){this.speed,this.wheelX,this.wheelY,this.domEvent=u,this.editor=o,this.x=this.clientX=u.clientX,this.y=this.clientY=u.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var u=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(u,0),r=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-r},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var u=this.editor,o=u.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var r=this.getDocumentPosition();this.$inSelection=o.contains(r.row,r.column)}return this.$inSelection},a.prototype.getButton=function(){return d.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();e.MouseEvent=g});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=t("../lib/event"),g=t("../lib/useragent"),a=200,u=200,o=5;function r(i){var s=i.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent="\xA0";var h=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];h.forEach(function(P){i[P]=this[P]},this),s.on("mousedown",this.onMouseDown.bind(i));var f=s.container,b,C,w,x,A,v,E=0,$,M,S,T,y;this.onDragStart=function(P){if(this.cancelDrag||!f.draggable){var H=this;return setTimeout(function(){H.startSelect(),H.captureMouse(P)},0),P.preventDefault()}A=s.getSelectionRange();var F=P.dataTransfer;F.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(l),F.setDragImage&&F.setDragImage(l,0,0),setTimeout(function(){s.container.removeChild(l)}),F.clearData(),F.setData("Text",s.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(P){if(f.draggable=!1,M=!1,this.setState(null),!s.getReadOnly()){var H=P.dataTransfer.dropEffect;!$&&H=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(P){if(!(s.getReadOnly()||!O(P.dataTransfer)))return C=P.clientX,w=P.clientY,b||k(),E++,P.dataTransfer.dropEffect=$=N(P),p.preventDefault(P)},this.onDragOver=function(P){if(!(s.getReadOnly()||!O(P.dataTransfer)))return C=P.clientX,w=P.clientY,b||(k(),E++),R!==null&&(R=null),P.dataTransfer.dropEffect=$=N(P),p.preventDefault(P)},this.onDragLeave=function(P){if(E--,E<=0&&b)return I(),$=null,p.preventDefault(P)},this.onDrop=function(P){if(v){var H=P.dataTransfer;if(M)switch($){case"move":A.contains(v.row,v.column)?A={start:v,end:v}:A=s.moveText(A,v);break;case"copy":A=s.moveText(A,v,!0);break}else{var F=H.getData("Text");A={start:v,end:s.session.insert(v,F)},s.focus(),$=null}return I(),p.preventDefault(P)}},p.addListener(f,"dragstart",this.onDragStart.bind(i),s),p.addListener(f,"dragend",this.onDragEnd.bind(i),s),p.addListener(f,"dragenter",this.onDragEnter.bind(i),s),p.addListener(f,"dragover",this.onDragOver.bind(i),s),p.addListener(f,"dragleave",this.onDragLeave.bind(i),s),p.addListener(f,"drop",this.onDrop.bind(i),s);function m(P,H){var F=Date.now(),U=!H||P.row!=H.row,j=!H||P.column!=H.column;if(!T||U||j)s.moveCursorToPosition(P),T=F,y={x:C,y:w};else{var J=n(y.x,y.y,C,w);J>o?T=null:F-T>=u&&(s.renderer.scrollCursorIntoView(),T=null)}}function L(P,H){var F=Date.now(),U=s.renderer.layerConfig.lineHeight,j=s.renderer.layerConfig.characterWidth,J=s.renderer.scroller.getBoundingClientRect(),z={x:{left:C-J.left,right:J.right-C},y:{top:w-J.top,bottom:J.bottom-w}},X=Math.min(z.x.left,z.x.right),ee=Math.min(z.y.top,z.y.bottom),Z={row:P.row,column:P.column};X/j<=2&&(Z.column+=z.x.left=a&&s.renderer.scrollCursorIntoView(Z):S=F:S=null}function _(){var P=v;v=s.renderer.screenToTextCoordinates(C,w),m(v,P),L(v,P)}function k(){A=s.selection.toOrientedRange(),b=s.session.addMarker(A,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),_(),x=setInterval(_,20),E=0,p.addListener(document,"mousemove",D)}function I(){clearInterval(x),s.session.removeMarker(b),b=null,s.selection.fromOrientedRange(A),s.isFocused()&&!M&&s.$resetCursorStyle(),A=null,v=null,E=0,S=null,T=null,p.removeListener(document,"mousemove",D)}var R=null;function D(){R==null&&(R=setTimeout(function(){R!=null&&b&&I()},20))}function O(P){var H=P.types;return!H||Array.prototype.some.call(H,function(F){return F=="text/plain"||F=="Text"})}function N(P){var H=["copy","copymove","all","uninitialized"],F=["move","copymove","linkmove","all","uninitialized"],U=g.isMac?P.altKey:P.ctrlKey,j="uninitialized";try{j=P.dataTransfer.effectAllowed.toLowerCase()}catch{}var J="none";return U&&H.indexOf(j)>=0?J="copy":F.indexOf(j)>=0?J="move":H.indexOf(j)>=0&&(J="copy"),J}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,s=i.container;s.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var l=g.isWin?"default":"move";i.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(i){var s=this.editor.container;if(g.isIE&&this.state=="dragReady"){var l=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&s.dragDrop()}if(this.state==="dragWait"){var l=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var s=this.editor,l=i.inSelection(),h=i.getButton(),f=i.domEvent.detail||1;if(f===1&&h===0&&l){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),s.getDragDelay()){if(g.isWebKit){this.cancelDrag=!0;var C=s.container;C.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(r.prototype);function n(i,s,l,h){return Math.sqrt(Math.pow(l-i,2)+Math.pow(h-s,2))}e.DragdropHandler=r});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,e,c){"use strict";var d=t("./mouse_event").MouseEvent,p=t("../lib/event"),g=t("../lib/dom");e.addTouchListeners=function(a,u){var o="scroll",r,n,i,s,l,h,f=0,b,C=0,w=0,x=0,A,v;function E(){var m=window.navigator&&window.navigator.clipboard,L=!1,_=function(){var I=u.getCopyText(),R=u.session.getUndoManager().hasUndo();v.replaceChild(g.buildDom(L?["span",!I&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],m&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],R&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),v.firstChild)},k=function(I){var R=I.target.getAttribute("action");if(R=="more"||!L)return L=!L,_();R=="paste"?m.readText().then(function(D){u.execCommand(R,D)}):R&&((R=="cut"||R=="copy")&&(m?m.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(R)),v.firstChild.style.display="none",L=!1,R!="openCommandPalette"&&u.focus()};v=g.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){o="menu",I.stopPropagation(),I.preventDefault(),u.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),k(I)},onclick:k},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function $(){v||E();var m=u.selection.cursor,L=u.renderer.textToScreenCoordinates(m.row,m.column),_=u.renderer.textToScreenCoordinates(0,0).pageX,k=u.renderer.scrollLeft,I=u.container.getBoundingClientRect();v.style.top=L.pageY-I.top-3+"px",L.pageX-I.left=2?u.selection.getLineRange(b.row):u.session.getBracketRange(b);m&&!m.isEmpty()?u.selection.setRange(m):u.selection.selectWord(),o="wait"}p.addListener(a,"contextmenu",function(m){if(A){var L=u.textInput.getElement();L.focus()}},u),p.addListener(a,"touchstart",function(m){var L=m.touches;if(l||L.length>1){clearTimeout(l),l=null,i=-1,o="zoom";return}A=u.$mouseHandler.isMousePressed=!0;var _=u.renderer.layerConfig.lineHeight,k=u.renderer.layerConfig.lineHeight,I=m.timeStamp;s=I;var R=L[0],D=R.clientX,O=R.clientY;Math.abs(r-D)+Math.abs(n-O)>_&&(i=-1),r=m.clientX=D,n=m.clientY=O,w=x=0;var N=new d(m,u);if(b=N.getDocumentPosition(),I-i<500&&L.length==1&&!f)C++,m.preventDefault(),m.button=0,T();else{C=0;var P=u.selection.cursor,H=u.selection.isEmpty()?P:u.selection.anchor,F=u.renderer.$cursorLayer.getPixelPosition(P,!0),U=u.renderer.$cursorLayer.getPixelPosition(H,!0),j=u.renderer.scroller.getBoundingClientRect(),J=u.renderer.layerConfig.offset,z=u.renderer.scrollLeft,X=function(pe,ve){return pe=pe/k,ve=ve/_-.75,pe*pe+ve*ve};if(m.clientXZ?"cursor":"anchor"),Z<3.5?o="anchor":ee<3.5?o="cursor":o="scroll",l=setTimeout(S,450)}i=I},u),p.addListener(a,"touchend",function(m){A=u.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),o=="zoom"?(o="",f=0):l?(u.selection.moveToPosition(b),f=0,$()):o=="scroll"?(y(),M()):$(),clearTimeout(l),l=null},u),p.addListener(a,"touchmove",function(m){l&&(clearTimeout(l),l=null);var L=m.touches;if(!(L.length>1||o=="zoom")){var _=L[0],k=r-_.clientX,I=n-_.clientY;if(o=="wait")if(k*k+I*I>4)o="cursor";else return m.preventDefault();r=_.clientX,n=_.clientY,m.clientX=_.clientX,m.clientY=_.clientY;var R=m.timeStamp,D=R-s;if(s=R,o=="scroll"){var O=new d(m,u);O.speed=1,O.wheelX=k,O.wheelY=I,10*Math.abs(k)0)if(ne==16){for(te=se;te-1){for(te=se;te=0&&Z[he]==S;he--)X[he]=g}}}function F(z,X,ee){if(!(a=z){for(ve=pe+1;ve=z;)ve++;for(de=pe,B=ve-1;de=X.length||(ve=ee[Z-1])!=x&&ve!=A||(de=X[Z+1])!=x&&de!=A?v:(u&&(de=A),de==ve?de:v);case y:return ve=Z>0?ee[Z-1]:E,ve==x&&Z+10&&ee[Z-1]==x)return x;if(u)return v;for(K=Z+1,B=X.length;K=1425&&ne<=2303||ne==64286;if(ve=X[K],Q&&(ve==w||ve==M))return w}return Z<1||(ve=X[Z-1])==E?v:ee[Z-1];case E:return u=!1,r=!0,g;case $:return n=!0,v;case _:case k:case R:case D:case I:u=!1;case O:return v}}function j(z){var X=z.charCodeAt(0),ee=X>>8;return ee==0?X>191?C:N[X]:ee==5?/[\u0591-\u05f4]/.test(z)?w:C:ee==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(z)?L:/[\u0660-\u0669\u066b-\u066c]/.test(z)?A:X==1642?m:/[\u06f0-\u06f9]/.test(z)?x:M:ee==32&&X<=8287?P[X&255]:ee==254&&X>=65136?M:v}function J(z){return z>="\u064B"&&z<="\u0655"}e.L=C,e.R=w,e.EN=x,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="\xB7",e.doBidiReorder=function(z,X,ee){if(z.length<2)return{};var Z=z.split(""),pe=new Array(Z.length),ve=new Array(Z.length),de=[];g=ee?b:f,H(Z,de,Z.length,X);for(var B=0;BM&&X[B]<_||X[B]===v||X[B]===O)?de[B]=e.ON_R:B>0&&Z[B-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(Z[B])&&(de[B-1]=de[B]=e.R_H,B++);Z[Z.length-1]===e.DOT&&(de[Z.length-1]=e.B),Z[0]==="\u202B"&&(de[0]=e.RLE);for(var B=0;B=0&&(o=this.session.$docRowCache[n])}return o},u.prototype.getSplitIndex=function(){var o=0,r=this.session.$screenRowCache;if(r.length)for(var n,i=this.session.$getRowCacheIndex(r,this.currentRow);this.currentRow-o>0&&(n=this.session.$getRowCacheIndex(r,this.currentRow-o-1),n===i);)i=n,o++;else o=this.currentRow;return o},u.prototype.updateRowLine=function(o,r){o===void 0&&(o=this.getDocumentRow());var n=o===this.session.getLength()-1,i=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[o];s&&(r===void 0&&(r=this.getSplitIndex()),r>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=rr?this.session.getOverwrite()?o:o-1:r,i=d.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&o<=r&&s[i]%2!==0&&i++;for(var h=0;hr&&s[i]%2===0&&(l+=this.charWidths[s[i]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},u.prototype.getSelections=function(o,r){var n=this.bidiMap,i=n.bidiLevels,s,l=[],h=0,f=Math.min(o,r)-this.wrapIndent,b=Math.max(o,r)-this.wrapIndent,C=!1,w=!1,x=0;this.wrapIndent&&(h+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var A,v=0;v=f&&Ai+h/2;){if(i+=h,s===l.length-1){h=0;break}h=this.charWidths[l[++s]]}return s>0&&l[s-1]%2!==0&&l[s]%2===0?(n0&&l[s-1]%2===0&&l[s]%2!==0?r=1+(n>i?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===l.length-1&&h===0&&l[s-1]%2===0||!this.isRtlDir&&s===0&&l[s]%2!==0?r=1+this.bidiMap.logicalFromVisual[s]:(s>0&&l[s-1]%2!==0&&h!==0&&s--,r=this.bidiMap.logicalFromVisual[s]),r===0&&this.isRtlDir&&r++,r+this.wrapIndent},u}();e.BidiHandler=a});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,e,c){"use strict";var d=t("./lib/oop"),p=t("./lib/lang"),g=t("./lib/event_emitter").EventEmitter,a=t("./range").Range,u=function(){function o(r){this.session=r,this.doc=r.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(i){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(r,n){this.$isEmpty=!1,this.anchor.setPosition(r,n)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var r=this.anchor,n=this.lead;return r.row>n.row||r.row==n.row&&r.column>n.column},o.prototype.getRange=function(){var r=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,r):a.fromPoints(r,n)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(r,n){var i=n?r.end:r.start,s=n?r.start:r.end;this.$setSelection(i.row,i.column,s.row,s.column)},o.prototype.$setSelection=function(r,n,i,s){if(!this.$silent){var l=this.$isEmpty,h=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(r,n),this.cursor.setPosition(i,s),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||h)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(r){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),r.call(this)},o.prototype.selectTo=function(r,n){this.$moveSelection(function(){this.moveCursorTo(r,n)})},o.prototype.selectToPosition=function(r){this.$moveSelection(function(){this.moveCursorToPosition(r)})},o.prototype.moveTo=function(r,n){this.clearSelection(),this.moveCursorTo(r,n)},o.prototype.moveToPosition=function(r){this.clearSelection(),this.moveCursorToPosition(r)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(r,n){if(typeof n>"u"){var i=r||this.lead;r=i.row,n=i.column}return this.session.getWordRange(r,n)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var r=this.getCursor(),n=this.session.getAWordRange(r.row,r.column);this.setSelectionRange(n)},o.prototype.getLineRange=function(r,n){var i=typeof r=="number"?r:this.lead.row,s,l=this.session.getFoldLine(i);return l?(i=l.start.row,s=l.end.row):s=i,n===!0?new a(i,0,s,this.session.getLine(s).length):new a(i,0,s+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(r,n,i){var s=r.column,l=r.column+n;return i<0&&(s=r.column-n,l=r.column),this.session.isTabStop(r)&&this.doc.getLine(r.row).slice(s,l).split(" ").length-1==n},o.prototype.moveCursorLeft=function(){var r=this.lead.getPosition(),n;if(n=this.session.getFoldAt(r.row,r.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(r.column===0)r.row>0&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(r,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var r=this.lead.getPosition(),n;if(n=this.session.getFoldAt(r.row,r.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(n.column=s)}}this.moveCursorTo(n.row,n.column)},o.prototype.moveCursorFileEnd=function(){var r=this.doc.getLength()-1,n=this.doc.getLine(r).length;this.moveCursorTo(r,n)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var r=this.lead.row,n=this.lead.column,i=this.doc.getLine(r),s=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(r,n,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(s)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=i.substring(n)),n>=i.length){this.moveCursorTo(r,i.length),this.moveCursorRight(),r0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,n)},o.prototype.$shortWordEndIndex=function(r){var n=0,i,s=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(r))n=this.session.tokenRe.lastIndex;else{for(;(i=r[n])&&s.test(i);)n++;if(n<1){for(l.lastIndex=0;(i=r[n])&&!l.test(i);)if(l.lastIndex=0,n++,s.test(i))if(n>2){n--;break}else{for(;(i=r[n])&&s.test(i);)n++;if(n>2)break}}}return l.lastIndex=0,n},o.prototype.moveCursorShortWordRight=function(){var r=this.lead.row,n=this.lead.column,i=this.doc.getLine(r),s=i.substring(n),l=this.session.getFoldAt(r,n,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(n==i.length){var h=this.doc.getLength();do r++,s=this.doc.getLine(r);while(r0&&/^\s*$/.test(s));n=s.length,/\s+$/.test(s)||(s="")}var l=p.stringReverse(s),h=this.$shortWordEndIndex(l);return this.moveCursorTo(r,n-h)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(r,n){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(n===0&&(r!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),r!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];r<0?r-=l.rowsAbove||0:r>0&&(r+=l.rowCount-(l.rowsAbove||0))}var h=this.session.screenToDocumentPosition(i.row+r,i.column,s);r!==0&&n===0&&h.row===this.lead.row&&(h.column,this.lead.column),this.moveCursorTo(h.row,h.column+n,n===0)},o.prototype.moveCursorToPosition=function(r){this.moveCursorTo(r.row,r.column)},o.prototype.moveCursorTo=function(r,n,i){var s=this.session.getFoldAt(r,n,1);s&&(r=s.start.row,n=s.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(r);/[\uDC00-\uDFFF]/.test(l.charAt(n))&&l.charAt(n-1)&&(this.lead.row==r&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(r,n),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(r,n,i){var s=this.session.screenToDocumentPosition(r,n);this.moveCursorTo(s.row,s.column,i)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(r){this.setSelectionRange(r,r.cursor==r.start),this.$desiredColumn=r.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(r){var n=this.getRange();return r?(r.start.column=n.start.column,r.start.row=n.start.row,r.end.column=n.end.column,r.end.row=n.end.row):r=n,r.cursor=this.isBackwards()?r.start:r.end,r.desiredColumn=this.$desiredColumn,r},o.prototype.getRangeOfMovements=function(r){var n=this.getCursor();try{r(this);var i=this.getCursor();return a.fromPoints(n,i)}catch{return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},o.prototype.toJSON=function(){if(this.rangeCount)var r=this.ranges.map(function(n){var i=n.clone();return i.isBackwards=n.cursor==n.start,i});else{var r=this.getRange();r.isBackwards=this.isBackwards()}return r},o.prototype.fromJSON=function(r){if(r.start==null)if(this.rangeList&&r.length>1){this.toSingleRange(r[0]);for(var n=r.length;n--;){var i=a.fromPoints(r[n].start,r[n].end);r[n].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else r=r[0];this.rangeList&&this.toSingleRange(r),this.setSelectionRange(r,r.isBackwards)},o.prototype.isEqual=function(r){if((r.length||this.rangeCount)&&r.length!=this.rangeCount)return!1;if(!r.length||!this.ranges)return this.getRange().isEqual(r);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(r[n]))return!1;return!0},o}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,d.implement(u.prototype,g),e.Selection=u});ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,e,c){"use strict";var d=t("./lib/report_error").reportError,p=2e3,g=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var o in this.states){for(var r=this.states[o],n=[],i=0,s=this.matchMappings[o]={defaultToken:"text"},l="g",h=[],f=0;f1?b.onMatch=this.$applyToken:b.onMatch=b.token),w>1&&(/\\\d/.test(b.regex)?C=b.regex.replace(/\\([0-9]+)/g,function(x,A){return"\\"+(parseInt(A,10)+i+1)}):(w=1,C=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&h.push(b)),s[i]=f,i+=w,n.push(C),b.onMatch||(b.onMatch=null)}}n.length||(s[0]=0,n.push("$")),h.forEach(function(x){x.splitRegex=this.createSplitterRegexp(x.regex,l)},this),this.regExps[o]=new RegExp("("+n.join(")|(")+")|($)",l)}}return a.prototype.$setMaxTokenCount=function(u){p=u|0},a.prototype.$applyToken=function(u){var o=this.splitRegex.exec(u).slice(1),r=this.token.apply(this,o);if(typeof r=="string")return[{type:r,value:u}];for(var n=[],i=0,s=r.length;ib){var $=u.substring(b,E-v.length);w.type==x?w.value+=$:(w.type&&f.push(w),w={type:x,value:$})}for(var M=0;Mp){for(C>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:u});b1&&r[0]!==n&&r.unshift("#tmp",n),{tokens:f,state:r.length?r:n}},a}();g.prototype.reportError=d,e.Tokenizer=g});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,e,c){"use strict";var d=t("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(u,o){if(!o){for(var r in u)this.$rules[r]=u[r];return}for(var r in u){for(var n=u[r],i=0;i=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentTokenRow=function(){return this.$row},g.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,o=a[u].start;if(o!==void 0)return o;for(o=0;u>0;)u-=1,o+=a[u].value.length;return o},g.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},g.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new d(this.$row,u,this.$row,u+a.value.length)},g}();e.TokenIterator=p});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,e,c){"use strict";var d=t("../../lib/oop"),p=t("../behaviour").Behaviour,g=t("../../token_iterator").TokenIterator,a=t("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],r,n={},i={'"':'"',"'":"'"},s=function(f){var b=-1;if(f.multiSelect&&(b=f.selection.index,n.rangeCount!=f.multiSelect.rangeCount&&(n={rangeCount:f.multiSelect.rangeCount})),n[b])return r=n[b];r=n[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(f,b,C,w){var x=f.end.row-f.start.row;return{text:C+b+w,selection:[0,f.start.column+1,x,f.end.column+(x?0:1)]}},h;h=function(f){f=f||{},this.add("braces","insertion",function(b,C,w,x,A){var v=w.getCursorPosition(),E=x.doc.getLine(v.row);if(A=="{"){s(w);var $=w.getSelectionRange(),M=x.doc.getTextRange($);if(M!==""&&M!=="{"&&w.getWrapBehavioursEnabled())return l($,M,"{","}");if(h.isSaneInsertion(w,x))return/[\]\}\)]/.test(E[v.column])||w.inMultiSelectMode||f.braces?(h.recordAutoInsert(w,x,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(w,x,"{"),{text:"{",selection:[1,1]})}else if(A=="}"){s(w);var S=E.substring(v.column,v.column+1);if(S=="}"){var T=x.$findOpeningBracket("}",{column:v.column+1,row:v.row});if(T!==null&&h.isAutoInsertedClosing(v,E,A))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(A==` `||A==`\r `){s(w);var y="";h.isMaybeInsertedClosing(v,E)&&(y=a.stringRepeat("}",r.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var S=E.substring(v.column,v.column+1);if(S==="}"){var m=x.findMatchingBracket({row:v.row,column:v.column+1},"}");if(!m)return null;var L=this.$getIndent(x.getLine(m.row))}else if(y)var L=this.$getIndent(E);else{h.clearMaybeInsertedClosing();return}var _=L+x.getTabString();return{text:` `+_+` -`+L+y,selection:[1,_.length,1,_.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="{"){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.end.column,A.end.column+1);if($=="}")return A.end.column++,A;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,C,w,x,A){if(A=="("){s(w);var v=w.getSelectionRange(),E=x.doc.getTextRange(v);if(E!==""&&w.getWrapBehavioursEnabled())return l(v,E,"(",")");if(h.isSaneInsertion(w,x))return h.recordAutoInsert(w,x,")"),{text:"()",selection:[1,1]}}else if(A==")"){s(w);var $=w.getCursorPosition(),M=x.doc.getLine($.row),S=M.substring($.column,$.column+1);if(S==")"){var T=x.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(T!==null&&h.isAutoInsertedClosing($,M,A))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="("){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.start.column+1,A.start.column+2);if($==")")return A.end.column++,A}}),this.add("brackets","insertion",function(b,C,w,x,A){if(A=="["){s(w);var v=w.getSelectionRange(),E=x.doc.getTextRange(v);if(E!==""&&w.getWrapBehavioursEnabled())return l(v,E,"[","]");if(h.isSaneInsertion(w,x))return h.recordAutoInsert(w,x,"]"),{text:"[]",selection:[1,1]}}else if(A=="]"){s(w);var $=w.getCursorPosition(),M=x.doc.getLine($.row),S=M.substring($.column,$.column+1);if(S=="]"){var T=x.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(T!==null&&h.isAutoInsertedClosing($,M,A))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="["){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.start.column+1,A.start.column+2);if($=="]")return A.end.column++,A}}),this.add("string_dquotes","insertion",function(b,C,w,x,A){var v=x.$mode.$quotes||i;if(A.length==1&&v[A]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(A)!=-1)return;s(w);var E=A,$=w.getSelectionRange(),M=x.doc.getTextRange($);if(M!==""&&(M.length!=1||!v[M])&&w.getWrapBehavioursEnabled())return l($,M,E,E);if(!M){var S=w.getCursorPosition(),T=x.doc.getLine(S.row),y=T.substring(S.column-1,S.column),m=T.substring(S.column,S.column+1),L=x.getTokenAt(S.row,S.column),_=x.getTokenAt(S.row,S.column+1);if(y=="\\"&&L&&/escape/.test(L.type))return null;var k=L&&/string|escape/.test(L.type),R=!_||/string|escape/.test(_.type),I;if(m==E)I=k!==R,I&&/string\.end/.test(_.type)&&(I=!1);else{if(k&&!R||k&&R)return null;var D=x.$mode.tokenRe;D.lastIndex=0;var O=D.test(y);D.lastIndex=0;var N=D.test(m),P=x.$mode.$pairQuotesAfter,H=P&&P[E]&&P[E].test(y);if(!H&&O||N||m&&!/[\s;,.})\]\\]/.test(m))return null;var F=T[S.column-2];if(y==E&&(F==E||D.test(F)))return null;I=!0}return{text:I?E+E:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,C,w,x,A){var v=x.$mode.$quotes||i,E=x.doc.getTextRange(A);if(!A.isMultiLine()&&v.hasOwnProperty(E)){s(w);var $=x.doc.getLine(A.start.row),M=$.substring(A.start.column+1,A.start.column+2);if(M==E)return A.end.column++,A}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,C,w,x,A){if(b==="doc-start"&&(A===` +`+L+y,selection:[1,_.length,1,_.length]}}else h.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="{"){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.end.column,A.end.column+1);if($=="}")return A.end.column++,A;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,C,w,x,A){if(A=="("){s(w);var v=w.getSelectionRange(),E=x.doc.getTextRange(v);if(E!==""&&w.getWrapBehavioursEnabled())return l(v,E,"(",")");if(h.isSaneInsertion(w,x))return h.recordAutoInsert(w,x,")"),{text:"()",selection:[1,1]}}else if(A==")"){s(w);var $=w.getCursorPosition(),M=x.doc.getLine($.row),S=M.substring($.column,$.column+1);if(S==")"){var T=x.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(T!==null&&h.isAutoInsertedClosing($,M,A))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="("){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.start.column+1,A.start.column+2);if($==")")return A.end.column++,A}}),this.add("brackets","insertion",function(b,C,w,x,A){if(A=="["){s(w);var v=w.getSelectionRange(),E=x.doc.getTextRange(v);if(E!==""&&w.getWrapBehavioursEnabled())return l(v,E,"[","]");if(h.isSaneInsertion(w,x))return h.recordAutoInsert(w,x,"]"),{text:"[]",selection:[1,1]}}else if(A=="]"){s(w);var $=w.getCursorPosition(),M=x.doc.getLine($.row),S=M.substring($.column,$.column+1);if(S=="]"){var T=x.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(T!==null&&h.isAutoInsertedClosing($,M,A))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,C,w,x,A){var v=x.doc.getTextRange(A);if(!A.isMultiLine()&&v=="["){s(w);var E=x.doc.getLine(A.start.row),$=E.substring(A.start.column+1,A.start.column+2);if($=="]")return A.end.column++,A}}),this.add("string_dquotes","insertion",function(b,C,w,x,A){var v=x.$mode.$quotes||i;if(A.length==1&&v[A]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(A)!=-1)return;s(w);var E=A,$=w.getSelectionRange(),M=x.doc.getTextRange($);if(M!==""&&(M.length!=1||!v[M])&&w.getWrapBehavioursEnabled())return l($,M,E,E);if(!M){var S=w.getCursorPosition(),T=x.doc.getLine(S.row),y=T.substring(S.column-1,S.column),m=T.substring(S.column,S.column+1),L=x.getTokenAt(S.row,S.column),_=x.getTokenAt(S.row,S.column+1);if(y=="\\"&&L&&/escape/.test(L.type))return null;var k=L&&/string|escape/.test(L.type),I=!_||/string|escape/.test(_.type),R;if(m==E)R=k!==I,R&&/string\.end/.test(_.type)&&(R=!1);else{if(k&&!I||k&&I)return null;var D=x.$mode.tokenRe;D.lastIndex=0;var O=D.test(y);D.lastIndex=0;var N=D.test(m),P=x.$mode.$pairQuotesAfter,H=P&&P[E]&&P[E].test(y);if(!H&&O||N||m&&!/[\s;,.})\]\\]/.test(m))return null;var F=T[S.column-2];if(y==E&&(F==E||D.test(F)))return null;R=!0}return{text:R?E+E:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,C,w,x,A){var v=x.$mode.$quotes||i,E=x.doc.getTextRange(A);if(!A.isMultiLine()&&v.hasOwnProperty(E)){s(w);var $=x.doc.getLine(A.start.row),M=$.substring(A.start.column+1,A.start.column+2);if(M==E)return A.end.column++,A}}),f.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,C,w,x,A){if(b==="doc-start"&&(A===` `||A===`\r -`)&&w.selection.isEmpty()){var v=w.getCursorPosition(),E=x.doc.getLine(v.row),$=x.doc.getLine(v.row+1),M=this.$getIndent(E);if(/\s*\*/.test($))return/^\s*\*/.test(E)?{text:A+M+"* ",selection:[1,3+M.length,1,3+M.length]}:{text:A+M+" * ",selection:[1,3+M.length,1,3+M.length]};if(/\/\*\*/.test(E.substring(0,v.column)))return{text:A+M+" * "+A+" "+M+"*/",selection:[1,4+M.length,1,4+M.length]}}})},h.isSaneInsertion=function(f,b){var C=f.getCursorPosition(),w=new g(b,C.row,C.column);if(!this.$matchTokenType(w.getCurrentToken()||"text",u)){if(/[)}\]]/.test(f.session.getLine(C.row)[C.column]))return!0;var x=new g(b,C.row,C.column+1);if(!this.$matchTokenType(x.getCurrentToken()||"text",u))return!1}return w.stepForward(),w.getCurrentTokenRow()!==C.row||this.$matchTokenType(w.getCurrentToken()||"text",o)},h.$matchTokenType=function(f,b){return b.indexOf(f.type||f)>-1},h.recordAutoInsert=function(f,b,C){var w=f.getCursorPosition(),x=b.doc.getLine(w.row);this.isAutoInsertedClosing(w,x,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=w.row,r.autoInsertedLineEnd=C+x.substr(w.column),r.autoInsertedBrackets++},h.recordMaybeInsert=function(f,b,C){var w=f.getCursorPosition(),x=b.doc.getLine(w.row);this.isMaybeInsertedClosing(w,x)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=w.row,r.maybeInsertedLineStart=x.substr(0,w.column)+C,r.maybeInsertedLineEnd=x.substr(w.column),r.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(f,b,C){return r.autoInsertedBrackets>0&&f.row===r.autoInsertedRow&&C===r.autoInsertedLineEnd[0]&&b.substr(f.column)===r.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(f,b){return r.maybeInsertedBrackets>0&&f.row===r.maybeInsertedRow&&b.substr(f.column)===r.maybeInsertedLineEnd&&b.substr(0,f.column)==r.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},d.inherits(h,p),e.CstyleBehaviour=h});ace.define("ace/unicode",["require","exports","module"],function(t,e,c){"use strict";for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],p=0,g=[],a=0;a2?F%A!=A-1:F%A==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,$=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+o.escapeRegExp(E)+")"),S=new RegExp("(?:"+o.escapeRegExp($)+")\\s*$"),T=function(I,D){m(I,D)||(!C||/\S/.test(I))&&(b.insertInLine({row:D,column:I.length},$),b.insertInLine({row:D,column:x},E))},y=function(I,D){var O;(O=I.match(S))&&b.removeInLine(D,I.length-O[0].length,I.length),(O=I.match(M))&&b.removeInLine(D,O[1].length,O[0].length)},m=function(I,D){if(M.test(I))return!0;for(var O=l.getTokens(D),N=0;NI.length&&(R=I.length)}),x==1/0&&(x=R,C=!1,w=!1),v&&x%A!=0&&(x=Math.floor(x/A)*A),k(w?y:T)},this.toggleBlockComment=function(s,l,h,f){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var C=new r(l,f.row,f.column),w=C.getCurrentToken(),x=l.selection,A=l.selection.toOrientedRange(),v,E;if(w&&/comment/.test(w.type)){for(var $,M;w&&/comment/.test(w.type);){var S=w.value.indexOf(b.start);if(S!=-1){var T=C.getCurrentTokenRow(),y=C.getCurrentTokenColumn()+S;$=new n(T,y,T,y+b.start.length);break}w=C.stepBackward()}for(var C=new r(l,f.row,f.column),w=C.getCurrentToken();w&&/comment/.test(w.type);){var S=w.value.indexOf(b.end);if(S!=-1){var T=C.getCurrentTokenRow(),y=C.getCurrentTokenColumn()+S;M=new n(T,y,T,y+b.end.length);break}w=C.stepForward()}M&&l.remove(M),$&&(l.remove($),v=$.start.row,E=-b.start.length)}else E=b.start.length,v=h.start.row,l.insert(h.end,b.end),l.insert(h.start,b.start);A.start.row==v&&(A.start.column+=E),A.end.row==v&&(A.end.column+=E),l.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(s,l,h){return this.$getIndent(l)},this.checkOutdent=function(s,l,h){return!1},this.autoOutdent=function(s,l,h){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var l in s)if(s[l]){var h=s[l],f=h.prototype.$id,b=d.$modes[f];b||(d.$modes[f]=b=new h),d.$modes[l]||(d.$modes[l]=b),this.$embeds.push(l),this.$modes[l]=b}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(A){(function(v){var E=C[A],$=v[E];v[C[A]]=function(){return this.$delegator(E,arguments,$)}})(x)},x=this,l=0;l=0&&u.row=0&&u.column<=a[u.row].length}function g(a,u){u.action!="insert"&&u.action!="remove"&&d(u,"delta.action must be 'insert' or 'remove'"),u.lines instanceof Array||d(u,"delta.lines must be an Array"),(!u.start||!u.end)&&d(u,"delta.start/end must be an present");var o=u.start;p(a,u.start)||d(u,"delta.start must be contained in document");var r=u.end;u.action=="remove"&&!p(a,r)&&d(u,"delta.end must contained in document for 'remove' actions");var n=r.row-o.row,i=r.column-(n==0?o.column:0);(n!=u.lines.length-1||u.lines[n].length!=i)&&d(u,"delta.range must match delta lines")}e.applyDelta=function(a,u,o){var r=u.start.row,n=u.start.column,i=a[r]||"";switch(u.action){case"insert":var s=u.lines;if(s.length===1)a[r]=i.substring(0,n)+u.lines[0]+i.substring(n);else{var l=[r,1].concat(u.lines);a.splice.apply(a,l),a[r]=i.substring(0,n)+a[r],a[r+u.lines.length-1]+=i.substring(n)}break;case"remove":var h=u.end.column,f=u.end.row;r===f?a[r]=i.substring(0,n)+i.substring(h):a.splice(r,f-r+1,i.substring(0,n)+a[f].substring(h));break}}});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=t("./lib/oop"),p=t("./lib/event_emitter").EventEmitter,g=function(){function o(r,n,i){this.$onChange=this.onChange.bind(this),this.attach(r),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,i)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(r){if(!(r.start.row==r.end.row&&r.start.row!=this.row)&&!(r.start.row>this.row)){var n=u(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.prototype.setPosition=function(r,n,i){var s;if(i?s={row:r,column:n}:s=this.$clipPositionToDocument(r,n),!(this.row==s.row&&this.column==s.column)){var l={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:l,value:s})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(r,n){var i={};return r>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):r<0?(i.row=0,i.column=0):(i.row=r,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,n))),n<0&&(i.column=0),i},o}();g.prototype.$insertRight=!1,d.implement(g.prototype,p);function a(o,r,n){var i=n?o.column<=r.column:o.column-1},h.recordAutoInsert=function(f,b,C){var w=f.getCursorPosition(),x=b.doc.getLine(w.row);this.isAutoInsertedClosing(w,x,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=w.row,r.autoInsertedLineEnd=C+x.substr(w.column),r.autoInsertedBrackets++},h.recordMaybeInsert=function(f,b,C){var w=f.getCursorPosition(),x=b.doc.getLine(w.row);this.isMaybeInsertedClosing(w,x)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=w.row,r.maybeInsertedLineStart=x.substr(0,w.column)+C,r.maybeInsertedLineEnd=x.substr(w.column),r.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(f,b,C){return r.autoInsertedBrackets>0&&f.row===r.autoInsertedRow&&C===r.autoInsertedLineEnd[0]&&b.substr(f.column)===r.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(f,b){return r.maybeInsertedBrackets>0&&f.row===r.maybeInsertedRow&&b.substr(f.column)===r.maybeInsertedLineEnd&&b.substr(0,f.column)==r.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},d.inherits(h,p),e.CstyleBehaviour=h});ace.define("ace/unicode",["require","exports","module"],function(t,e,c){"use strict";for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],p=0,g=[],a=0;a2?F%A!=A-1:F%A==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,$=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+o.escapeRegExp(E)+")"),S=new RegExp("(?:"+o.escapeRegExp($)+")\\s*$"),T=function(R,D){m(R,D)||(!C||/\S/.test(R))&&(b.insertInLine({row:D,column:R.length},$),b.insertInLine({row:D,column:x},E))},y=function(R,D){var O;(O=R.match(S))&&b.removeInLine(D,R.length-O[0].length,R.length),(O=R.match(M))&&b.removeInLine(D,O[1].length,O[0].length)},m=function(R,D){if(M.test(R))return!0;for(var O=l.getTokens(D),N=0;NR.length&&(I=R.length)}),x==1/0&&(x=I,C=!1,w=!1),v&&x%A!=0&&(x=Math.floor(x/A)*A),k(w?y:T)},this.toggleBlockComment=function(s,l,h,f){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var C=new r(l,f.row,f.column),w=C.getCurrentToken(),x=l.selection,A=l.selection.toOrientedRange(),v,E;if(w&&/comment/.test(w.type)){for(var $,M;w&&/comment/.test(w.type);){var S=w.value.indexOf(b.start);if(S!=-1){var T=C.getCurrentTokenRow(),y=C.getCurrentTokenColumn()+S;$=new n(T,y,T,y+b.start.length);break}w=C.stepBackward()}for(var C=new r(l,f.row,f.column),w=C.getCurrentToken();w&&/comment/.test(w.type);){var S=w.value.indexOf(b.end);if(S!=-1){var T=C.getCurrentTokenRow(),y=C.getCurrentTokenColumn()+S;M=new n(T,y,T,y+b.end.length);break}w=C.stepForward()}M&&l.remove(M),$&&(l.remove($),v=$.start.row,E=-b.start.length)}else E=b.start.length,v=h.start.row,l.insert(h.end,b.end),l.insert(h.start,b.start);A.start.row==v&&(A.start.column+=E),A.end.row==v&&(A.end.column+=E),l.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(s,l,h){return this.$getIndent(l)},this.checkOutdent=function(s,l,h){return!1},this.autoOutdent=function(s,l,h){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var l in s)if(s[l]){var h=s[l],f=h.prototype.$id,b=d.$modes[f];b||(d.$modes[f]=b=new h),d.$modes[l]||(d.$modes[l]=b),this.$embeds.push(l),this.$modes[l]=b}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],w=function(A){(function(v){var E=C[A],$=v[E];v[C[A]]=function(){return this.$delegator(E,arguments,$)}})(x)},x=this,l=0;l=0&&u.row=0&&u.column<=a[u.row].length}function g(a,u){u.action!="insert"&&u.action!="remove"&&d(u,"delta.action must be 'insert' or 'remove'"),u.lines instanceof Array||d(u,"delta.lines must be an Array"),(!u.start||!u.end)&&d(u,"delta.start/end must be an present");var o=u.start;p(a,u.start)||d(u,"delta.start must be contained in document");var r=u.end;u.action=="remove"&&!p(a,r)&&d(u,"delta.end must contained in document for 'remove' actions");var n=r.row-o.row,i=r.column-(n==0?o.column:0);(n!=u.lines.length-1||u.lines[n].length!=i)&&d(u,"delta.range must match delta lines")}e.applyDelta=function(a,u,o){var r=u.start.row,n=u.start.column,i=a[r]||"";switch(u.action){case"insert":var s=u.lines;if(s.length===1)a[r]=i.substring(0,n)+u.lines[0]+i.substring(n);else{var l=[r,1].concat(u.lines);a.splice.apply(a,l),a[r]=i.substring(0,n)+a[r],a[r+u.lines.length-1]+=i.substring(n)}break;case"remove":var h=u.end.column,f=u.end.row;r===f?a[r]=i.substring(0,n)+i.substring(h):a.splice(r,f-r+1,i.substring(0,n)+a[f].substring(h));break}}});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=t("./lib/oop"),p=t("./lib/event_emitter").EventEmitter,g=function(){function o(r,n,i){this.$onChange=this.onChange.bind(this),this.attach(r),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,i)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(r){if(!(r.start.row==r.end.row&&r.start.row!=this.row)&&!(r.start.row>this.row)){var n=u(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.prototype.setPosition=function(r,n,i){var s;if(i?s={row:r,column:n}:s=this.$clipPositionToDocument(r,n),!(this.row==s.row&&this.column==s.column)){var l={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:l,value:s})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(r,n){var i={};return r>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):r<0?(i.row=0,i.column=0):(i.row=r,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,n))),n<0&&(i.column=0),i},o}();g.prototype.$insertRight=!1,d.implement(g.prototype,p);function a(o,r,n){var i=n?o.column<=r.column:o.column"+v.end.row+":"+v.end.column}function l(v,E){var $=v.action=="insert",M=E.action=="insert";if($&&M)if(a(E.start,v.end)>=0)b(E,v,-1);else if(a(E.start,v.start)<=0)b(v,E,1);else return null;else if($&&!M)if(a(E.start,v.end)>=0)b(E,v,-1);else if(a(E.end,v.start)<=0)b(v,E,-1);else return null;else if(!$&&M)if(a(E.start,v.start)>=0)b(E,v,1);else if(a(E.start,v.start)<=0)b(v,E,1);else return null;else if(!$&&!M)if(a(E.start,v.start)>=0)b(E,v,1);else if(a(E.end,v.start)<=0)b(v,E,-1);else return null;return[E,v]}function h(v,E){for(var $=v.length;$--;)for(var M=0;M=0?b(v,E,-1):(a(v.start,E.start)<=0||b(v,g.fromPoints(E.start,v.start),-1),b(E,v,1));else if(!$&&M)a(E.start,v.end)>=0?b(E,v,-1):(a(E.start,v.start)<=0||b(E,g.fromPoints(v.start,E.start),-1),b(v,E,1));else if(!$&&!M)if(a(E.start,v.end)>=0)b(E,v,-1);else if(a(E.end,v.start)<=0)b(v,E,-1);else{var S,T;return a(v.start,E.start)<0&&(S=v,v=w(v,E.start)),a(v.end,E.end)>0&&(T=w(v,E.end)),C(E.end,v.start,v.end,-1),T&&!S&&(v.lines=T.lines,v.start=T.start,v.end=T.end,T=v),[E,S,T].filter(Boolean)}return[E,v]}function b(v,E,$){C(v.start,E.start,E.end,$),C(v.end,E.start,E.end,$)}function C(v,E,$,M){v.row==(M==1?E:$).row&&(v.column+=M*($.column-E.column)),v.row+=M*($.row-E.row)}function w(v,E){var $=v.lines,M=v.end;v.end=r(E);var S=v.end.row-v.start.row,T=$.splice(S,$.length),y=S?E.column:E.column-v.start.column;$.push(T[0].substring(0,y)),T[0]=T[0].substr(y);var m={start:r(E),end:M,lines:T,action:v.action};return m}function x(v,E){E=n(E);for(var $=v.length;$--;){for(var M=v[$],S=0;Sthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(u,o){return-u.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},g.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},g.prototype.walk=function(a,u,o){var r=0,n=this.folds,i,s,l,h=!0;u==null&&(u=this.end.row,o=this.end.column);for(var f=0;f0)){var h=p(u,s.start);return l===0?o&&h!==0?-i-2:i:h>0||h===0&&!o?i:-i-1}}return-i-1},a.prototype.add=function(u){var o=!u.isEmpty(),r=this.pointIndex(u.start,o);r<0&&(r=-r-1);var n=this.pointIndex(u.end,o,r);return n<0?n=-n-1:n++,this.ranges.splice(r,n-r,u)},a.prototype.addList=function(u){for(var o=[],r=u.length;r--;)o.push.apply(o,this.add(u[r]));return o},a.prototype.substractPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges.splice(o,1)},a.prototype.merge=function(){var u=[],o=this.ranges;o=o.sort(function(l,h){return p(l.start,h.start)});for(var r=o[0],n,i=1;i=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var o=this.pointIndex(u);if(o>=0)return this.ranges[o]},a.prototype.clipRows=function(u,o){var r=this.ranges;if(r[0].start.row>o||r[r.length-1].start.row=n)break}if(u.action=="insert")for(var b=i-n,C=-o.column+r.column;ln)break;if(f.start.row==n&&f.start.column>=o.column&&(f.start.column==o.column&&this.$bias<=0||(f.start.column+=C,f.start.row+=b)),f.end.row==n&&f.end.column>=o.column){if(f.end.column==o.column&&this.$bias<0)continue;f.end.column==o.column&&C>0&&lf.start.column&&f.end.column==s[l+1].start.column&&(f.end.column-=C),f.end.column+=C,f.end.row+=b}}else for(var b=n-i,C=o.column-r.column;li)break;f.end.rowo.column)&&(f.end.column=o.column,f.end.row=o.row):(f.end.column+=C,f.end.row+=b):f.end.row>i&&(f.end.row+=b),f.start.rowo.column)&&(f.start.column=o.column,f.start.row=o.row):(f.start.column+=C,f.start.row+=b):f.start.row>i&&(f.start.row+=b)}if(b!=0&&l=r)return l;if(l.end.row>r)return null}return null},this.getNextFoldLine=function(r,n){var i=this.$foldData,s=0;for(n&&(s=i.indexOf(n)),s==-1&&(s=0),s;s=r)return l}return null},this.getFoldedRowCount=function(r,n){for(var i=this.$foldData,s=n-r+1,l=0;l=n){b=r?s-=n-b:s=0);break}else f>=r&&(b>=r?s-=f-b:s-=f-r+1)}return s},this.$addFoldLine=function(r){return this.$foldData.push(r),this.$foldData.sort(function(n,i){return n.start.row-i.start.row}),r},this.addFold=function(r,n){var i=this.$foldData,s=!1,l;r instanceof g?l=r:(l=new g(n,r),l.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(l.range);var h=l.start.row,f=l.start.column,b=l.end.row,C=l.end.column,w=this.getFoldAt(h,f,1),x=this.getFoldAt(b,C,-1);if(w&&x==w)return w.addSubFold(l);w&&!w.range.isStart(h,f)&&this.removeFold(w),x&&!x.range.isEnd(b,C)&&this.removeFold(x);var A=this.getFoldsInRange(l.range);A.length>0&&(this.removeFolds(A),l.collapseChildren||A.forEach(function(M){l.addSubFold(M)}));for(var v=0;v0&&this.foldAll(r.start.row+1,r.end.row,r.collapseChildren-1),r.subFolds=[]},this.expandFolds=function(r){r.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(r,n){var i,s;if(r==null)i=new d(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof r=="number")i=new d(r,0,r,this.getLine(r).length);else if("row"in r)i=d.fromPoints(r,r);else{if(Array.isArray(r))return s=[],r.forEach(function(h){s=s.concat(this.unfold(h))},this),s;i=r}s=this.getFoldsInRangeList(i);for(var l=s;s.length==1&&d.comparePoints(s[0].start,i.start)<0&&d.comparePoints(s[0].end,i.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(i);if(n!=!1?this.removeFolds(s):this.expandFolds(s),l.length)return l},this.isRowFolded=function(r,n){return!!this.getFoldLine(r,n)},this.getRowFoldEnd=function(r,n){var i=this.getFoldLine(r,n);return i?i.end.row:r},this.getRowFoldStart=function(r,n){var i=this.getFoldLine(r,n);return i?i.start.row:r},this.getFoldDisplayLine=function(r,n,i,s,l){s==null&&(s=r.start.row),l==null&&(l=0),n==null&&(n=r.end.row),i==null&&(i=this.getLine(n).length);var h=this.doc,f="";return r.walk(function(b,C,w,x){if(!(CC)break;while(l&&f.test(l.type)&&!/^comment.start/.test(l.type));l=s.stepBackward()}else l=s.getCurrentToken();return b.end.row=s.getCurrentTokenRow(),b.end.column=s.getCurrentTokenColumn(),/^comment.end/.test(l.type)||(b.end.column+=l.value.length-2),b}},this.foldAll=function(r,n,i,s){i==null&&(i=1e5);var l=this.foldWidgets;if(l){n=n||this.getLength(),r=r||0;for(var h=r;h=r&&(h=f.end.row,f.collapseChildren=i,this.addFold("...",f))}}},this.foldToLevel=function(r){for(this.foldAll();r-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(n){for(var i=r.getTokens(n),s=0;s=0;){var h=i[s];if(h==null&&(h=i[s]=this.getFoldWidget(s)),h=="start"){var f=this.getFoldWidgetRange(s);if(l||(l=f),f&&f.end.row>=r)break}s--}return{range:s!==-1&&f,firstRange:l}},this.onFoldWidgetClick=function(r,n){n instanceof u&&(n=n.domEvent);var i={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},s=this.$toggleFoldWidget(r,i);if(!s){var l=n.target||n.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(r,n){if(this.getFoldWidget){var i=this.getFoldWidget(r),s=this.getLine(r),l=i==="end"?-1:1,h=this.getFoldAt(r,l===-1?0:s.length,l);if(h)return n.children||n.all?this.removeFold(h):this.expandFold(h),h;var f=this.getFoldWidgetRange(r,!0);if(f&&!f.isMultiLine()&&(h=this.getFoldAt(f.start.row,f.start.column,1),h&&f.isEqual(h.range)))return this.removeFold(h),h;if(n.siblings){var b=this.getParentFoldRangeData(r);if(b.range)var C=b.range.start.row+1,w=b.range.end.row;this.foldAll(C,w,n.all?1e4:0)}else n.children?(w=f?f.end.row:this.getLength(),this.foldAll(r+1,w,n.all?1e4:0)):f&&(n.all&&(f.collapseChildren=1e4),this.addFold("...",f));return f}},this.toggleFoldWidget=function(r){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var i=this.$toggleFoldWidget(n,{});if(!i){var s=this.getParentFoldRangeData(n,!0);if(i=s.range||s.firstRange,i){n=i.start.row;var l=this.getFoldAt(n,this.getLine(n).length,1);l?this.removeFold(l):this.addFold("...",i)}}},this.updateFoldWidgets=function(r){var n=r.start.row,i=r.end.row-n;if(i===0)this.foldWidgets[n]=null;else if(r.action=="remove")this.foldWidgets.splice(n,i+1,null);else{var s=Array(i+1);s.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(r){var n=r.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}e.Folding=o});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,e,c){"use strict";var d=t("../token_iterator").TokenIterator,p=t("../range").Range;function g(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var o=u||this.getLine(a.row).charAt(a.column-1);if(o=="")return null;var r=o.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],a):this.$findOpeningBracket(r[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),o=!0,r,n=u.charAt(a.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=u.charAt(a.column),a={row:a.row,column:a.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/),o=!1),!i)return null;if(i[1]){var s=this.$findClosingBracket(i[1],a);if(!s)return null;r=p.fromPoints(a,s),o||(r.end.column++,r.start.column--),r.cursor=r.end}else{var s=this.$findOpeningBracket(i[2],a);if(!s)return null;r=p.fromPoints(s,a),o||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(a,u){var o=this.getLine(a.row),r=/([\(\[\{])|([\)\]\}])/,n=!u&&o.charAt(a.column-1),i=n&&n.match(r);if(i||(n=(u===void 0||u)&&o.charAt(a.column),a={row:a.row,column:a.column+1},i=n&&n.match(r)),!i)return null;var s=new p(a.row,a.column-1,a.row,a.column),l=i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a);if(!l)return[s];var h=new p(l.row,l.column,l.row,l.column+1);return[s,h]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,u,o){var r=this.$brackets[a],n=1,i=new d(this,u.row,u.column),s=i.getCurrentToken();if(s||(s=i.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=u.column-i.getCurrentTokenColumn()-2,h=s.value;;){for(;l>=0;){var f=h.charAt(l);if(f==r){if(n-=1,n==0)return{row:i.getCurrentTokenRow(),column:l+i.getCurrentTokenColumn()}}else f==a&&(n+=1);l-=1}do s=i.stepBackward();while(s&&!o.test(s.type));if(s==null)break;h=s.value,l=h.length-1}return null}},this.$findClosingBracket=function(a,u,o){var r=this.$brackets[a],n=1,i=new d(this,u.row,u.column),s=i.getCurrentToken();if(s||(s=i.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=u.column-i.getCurrentTokenColumn();;){for(var h=s.value,f=h.length;l"?r=!0:u.type.indexOf("tag-name")!==-1&&(o=!0));while(u&&!o);return u},this.$findClosingTag=function(a,u){var o,r=u.value,n=u.value,i=0,s=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var l=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),h=!1;do if(o=u,u=a.stepForward(),u){if(u.value===">"&&!h){var f=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);h=!0}if(u.type.indexOf("tag-name")!==-1){if(r=u.value,n===r){if(o.value==="<")i++;else if(o.value==="")var w=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===r&&u.value==="/>"&&(i--,i<0))var b=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),C=b,w=C,f=new p(l.end.row,l.end.column,l.end.row,l.end.column+1)}while(u&&i>=0);if(s&&f&&b&&w&&l&&C)return{openTag:new p(s.start.row,s.start.column,f.end.row,f.end.column),closeTag:new p(b.start.row,b.start.column,w.end.row,w.end.column),openTagName:l,closeTagName:C}},this.$findOpeningTag=function(a,u){var o=a.getCurrentToken(),r=u.value,n=0,i=a.getCurrentTokenRow(),s=a.getCurrentTokenColumn(),l=s+2,h=new p(i,s,i,l);a.stepForward();var f=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u=a.stepForward(),!(!u||u.value!==">")){var b=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=o,i=a.getCurrentTokenRow(),s=a.getCurrentTokenColumn(),l=s+u.value.length,o=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(r===u.value)if(o.value==="<"){if(n++,n>0){var C=new p(i,s,i,l),w=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var x=new p(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else o.value===""){for(var A=0,v=o;v;){if(v.type.indexOf("tag-name")!==-1&&v.value===r){n--;break}else if(v.value==="<")break;v=a.stepBackward(),A++}for(var E=0;Em&&(this.$docRowCache.splice(m,y),this.$screenRowCache.splice(m,y))},S.prototype.$getRowCacheIndex=function(T,y){for(var m=0,L=T.length-1;m<=L;){var _=m+L>>1,k=T[_];if(y>k)m=_+1;else if(y=y));k++);return L=m[k],L?(L.index=k,L.start=_-L.value.length,L):null},S.prototype.setUndoManager=function(T){if(this.$undoManager=T,this.$informUndoManager&&this.$informUndoManager.cancel(),T){var y=this;T.addSession(this),this.$syncInformUndoManager=function(){y.$informUndoManager.cancel(),y.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},S.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},S.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},S.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},S.prototype.setUseSoftTabs=function(T){this.setOption("useSoftTabs",T)},S.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},S.prototype.setTabSize=function(T){this.setOption("tabSize",T)},S.prototype.getTabSize=function(){return this.$tabSize},S.prototype.isTabStop=function(T){return this.$useSoftTabs&&T.column%this.$tabSize===0},S.prototype.setNavigateWithinSoftTabs=function(T){this.setOption("navigateWithinSoftTabs",T)},S.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},S.prototype.setOverwrite=function(T){this.setOption("overwrite",T)},S.prototype.getOverwrite=function(){return this.$overwrite},S.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},S.prototype.addGutterDecoration=function(T,y){this.$decorations[T]||(this.$decorations[T]=""),this.$decorations[T]+=" "+y,this._signal("changeBreakpoint",{})},S.prototype.removeGutterDecoration=function(T,y){this.$decorations[T]=(this.$decorations[T]||"").replace(" "+y,""),this._signal("changeBreakpoint",{})},S.prototype.getBreakpoints=function(){return this.$breakpoints},S.prototype.setBreakpoints=function(T){this.$breakpoints=[];for(var y=0;y0&&(L=!!m.charAt(y-1).match(this.tokenRe)),L||(L=!!m.charAt(y).match(this.tokenRe)),L)var _=this.tokenRe;else if(/^\s+$/.test(m.slice(y-1,y+1)))var _=/\s/;else var _=this.nonTokenRe;var k=y;if(k>0){do k--;while(k>=0&&m.charAt(k).match(_));k++}for(var R=y;RT&&(T=y.screenWidth)}),this.lineWidgetWidth=T},S.prototype.$computeWidth=function(T){if(this.$modified||T){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var y=this.doc.getAllLines(),m=this.$rowLengthCache,L=0,_=0,k=this.$foldData[_],R=k?k.start.row:1/0,I=y.length,D=0;DR){if(D=k.end.row+1,D>=I)break;k=this.$foldData[_++],R=k?k.start.row:1/0}m[D]==null&&(m[D]=this.$getStringScreenWidth(y[D])[0]),m[D]>L&&(L=m[D])}this.screenWidth=L}},S.prototype.getLine=function(T){return this.doc.getLine(T)},S.prototype.getLines=function(T,y){return this.doc.getLines(T,y)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function(T){return this.doc.getTextRange(T||this.selection.getRange())},S.prototype.insert=function(T,y){return this.doc.insert(T,y)},S.prototype.remove=function(T){return this.doc.remove(T)},S.prototype.removeFullLines=function(T,y){return this.doc.removeFullLines(T,y)},S.prototype.undoChanges=function(T,y){if(T.length){this.$fromUndo=!0;for(var m=T.length-1;m!=-1;m--){var L=T[m];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!y&&this.$undoSelect&&(T.selectionBefore?this.selection.fromJSON(T.selectionBefore):this.selection.setRange(this.$getUndoSelection(T,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function(T,y){if(T.length){this.$fromUndo=!0;for(var m=0;mT.end.column&&(k.start.column+=I),k.end.row==T.end.row&&k.end.column>T.end.column&&(k.end.column+=I)),R&&k.start.row>=T.end.row&&(k.start.row+=R,k.end.row+=R)}if(k.end=this.insert(k.start,L),_.length){var D=T.start,O=k.start,R=O.row-D.row,I=O.column-D.column;this.addFolds(_.map(function(H){return H=H.clone(),H.start.row==D.row&&(H.start.column+=I),H.end.row==D.row&&(H.end.column+=I),H.start.row+=R,H.end.row+=R,H}))}return k},S.prototype.indentRows=function(T,y,m){m=m.replace(/\t/g,this.getTabString());for(var L=T;L<=y;L++)this.doc.insertInLine({row:L,column:0},m)},S.prototype.outdentRows=function(T){for(var y=T.collapseRows(),m=new n(0,0,0,0),L=this.getTabSize(),_=y.start.row;_<=y.end.row;++_){var k=this.getLine(_);m.start.row=_,m.end.row=_;for(var R=0;R0){var L=this.getRowFoldEnd(y+m);if(L>this.doc.getLength()-1)return 0;var _=L-y}else{T=this.$clipRowToDocument(T),y=this.$clipRowToDocument(y);var _=y-T+1}var k=new n(T,0,y,Number.MAX_VALUE),R=this.getFoldsInRange(k).map(function(D){return D=D.clone(),D.start.row+=_,D.end.row+=_,D}),I=m==0?this.doc.getLines(T,y):this.doc.removeFullLines(T,y);return this.doc.insertFullLines(T+_,I),R.length&&this.addFolds(R),_},S.prototype.moveLinesUp=function(T,y){return this.$moveLines(T,y,-1)},S.prototype.moveLinesDown=function(T,y){return this.$moveLines(T,y,1)},S.prototype.duplicateLines=function(T,y){return this.$moveLines(T,y,0)},S.prototype.$clipRowToDocument=function(T){return Math.max(0,Math.min(T,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function(T,y){return y<0?0:Math.min(this.doc.getLine(T).length,y)},S.prototype.$clipPositionToDocument=function(T,y){if(y=Math.max(0,y),T<0)T=0,y=0;else{var m=this.doc.getLength();T>=m?(T=m-1,y=this.doc.getLine(m-1).length):y=Math.min(this.doc.getLine(T).length,y)}return{row:T,column:y}},S.prototype.$clipRangeToDocument=function(T){T.start.row<0?(T.start.row=0,T.start.column=0):T.start.column=this.$clipColumnToRow(T.start.row,T.start.column);var y=this.doc.getLength()-1;return T.end.row>y?(T.end.row=y,T.end.column=this.doc.getLine(y).length):T.end.column=this.$clipColumnToRow(T.end.row,T.end.column),T},S.prototype.setUseWrapMode=function(T){if(T!=this.$useWrapMode){if(this.$useWrapMode=T,this.$modified=!0,this.$resetRowCache(0),T){var y=this.getLength();this.$wrapData=Array(y),this.$updateWrapData(0,y-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function(T,y){(this.$wrapLimitRange.min!==T||this.$wrapLimitRange.max!==y)&&(this.$wrapLimitRange={min:T,max:y},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function(T,y){var m=this.$wrapLimitRange;m.max<0&&(m={min:y,max:y});var L=this.$constrainWrapLimit(T,m.min,m.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function(T,y,m){return y&&(T=Math.max(y,T)),m&&(T=Math.min(m,T)),T},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function(T){this.setWrapLimitRange(T,T)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function(T){var y=this.$useWrapMode,m=T.action,L=T.start,_=T.end,k=L.row,R=_.row,I=R-k,D=null;if(this.$updating=!0,I!=0)if(m==="remove"){this[y?"$wrapData":"$rowLengthCache"].splice(k,I);var O=this.$foldData;D=this.getFoldsInRange(T),this.removeFolds(D);var N=this.getFoldLine(_.row),P=0;if(N){N.addRemoveChars(_.row,_.column,L.column-_.column),N.shiftRow(-I);var H=this.getFoldLine(k);H&&H!==N&&(H.merge(N),N=H),P=O.indexOf(N)+1}for(P;P=_.row&&N.shiftRow(-I)}R=k}else{var F=Array(I);F.unshift(k,0);var U=y?this.$wrapData:this.$rowLengthCache;U.splice.apply(U,F);var O=this.$foldData,N=this.getFoldLine(k),P=0;if(N){var j=N.range.compareInside(L.row,L.column);j==0?(N=N.split(L.row,L.column),N&&(N.shiftRow(I),N.addRemoveChars(R,0,_.column-L.column))):j==-1&&(N.addRemoveChars(k,0,_.column-L.column),N.shiftRow(I)),P=O.indexOf(N)+1}for(P;P=k&&N.shiftRow(I)}}else{I=Math.abs(T.start.column-T.end.column),m==="remove"&&(D=this.getFoldsInRange(T),this.removeFolds(D),I=-I);var N=this.getFoldLine(k);N&&N.addRemoveChars(k,L.column,I)}return y&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,y?this.$updateWrapData(k,R):this.$updateRowLengthCache(k,R),D},S.prototype.$updateRowLengthCache=function(T,y){this.$rowLengthCache[T]=null,this.$rowLengthCache[y]=null},S.prototype.$updateWrapData=function(T,y){var m=this.doc.getAllLines(),L=this.getTabSize(),_=this.$wrapData,k=this.$wrapLimit,R,I,D=T;for(y=Math.min(y,m.length-1);D<=y;)I=this.getFoldLine(D,I),I?(R=[],I.walk(function(O,N,P,H){var F;if(O!=null){F=this.$getDisplayTokens(O,R.length),F[0]=w;for(var U=1;Uy-H;){var F=k+y-H;if(T[F-1]>=v&&T[F]>=v){P(F);continue}if(T[F]==w||T[F]==x){for(F;F!=k-1&&T[F]!=w;F--);if(F>k){P(F);continue}for(F=k+y,F;F>2)),k-1);F>U&&T[F]U&&T[F]U&&T[F]==A;)F--}else for(;F>U&&T[F]U){P(++F);continue}F=k+y,T[F]==C&&F--,P(F-H)}return L},S.prototype.$getDisplayTokens=function(T,y){var m=[],L;y=y||0;for(var _=0;_39&&k<48||k>57&&k<64?m.push(A):k>=4352&&M(k)?m.push(b,C):m.push(b)}return m},S.prototype.$getStringScreenWidth=function(T,y,m){if(y==0)return[0,0];y==null&&(y=1/0),m=m||0;var L,_;for(_=0;_=4352&&M(L)?m+=2:m+=1,!(m>y));_++);return[m,_]},S.prototype.getRowLength=function(T){var y=1;return this.lineWidgets&&(y+=this.lineWidgets[T]&&this.lineWidgets[T].rowCount||0),!this.$useWrapMode||!this.$wrapData[T]?y:this.$wrapData[T].length+y},S.prototype.getRowLineCount=function(T){return!this.$useWrapMode||!this.$wrapData[T]?1:this.$wrapData[T].length+1},S.prototype.getRowWrapIndent=function(T){if(this.$useWrapMode){var y=this.screenToDocumentPosition(T,Number.MAX_VALUE),m=this.$wrapData[y.row];return m.length&&m[0]=0)var I=O[N],_=this.$docRowCache[N],H=T>O[P-1];else var H=!P;for(var F=this.getLength()-1,U=this.getNextFoldLine(_),j=U?U.start.row:1/0;I<=T&&(D=this.getRowLength(_),!(I+D>T||_>=F));)I+=D,_++,_>j&&(_=U.end.row+1,U=this.getNextFoldLine(_,U),j=U?U.start.row:1/0),H&&(this.$docRowCache.push(_),this.$screenRowCache.push(I));if(U&&U.start.row<=_)L=this.getFoldDisplayLine(U),_=U.start.row;else{if(I+D<=T||_>F)return{row:F,column:this.getLine(F).length};L=this.getLine(_),U=null}var J=0,z=Math.floor(T-I);if(this.$useWrapMode){var X=this.$wrapData[_];X&&(R=X[z],z>0&&X.length&&(J=X.indent,k=X[z-1]||X[X.length-1],L=L.substring(k)))}return m!==void 0&&this.$bidiHandler.isBidiRow(I+z,_,z)&&(y=this.$bidiHandler.offsetToCol(m)),k+=this.$getStringScreenWidth(L,y-J)[1],this.$useWrapMode&&k>=R&&(k=R-1),U?U.idxToPosition(k):{row:_,column:k}},S.prototype.documentToScreenPosition=function(T,y){if(typeof y>"u")var m=this.$clipPositionToDocument(T.row,T.column);else m=this.$clipPositionToDocument(T,y);T=m.row,y=m.column;var L=0,_=null,k=null;k=this.getFoldAt(T,y,1),k&&(T=k.start.row,y=k.start.column);var R,I=0,D=this.$docRowCache,O=this.$getRowCacheIndex(D,T),N=D.length;if(N&&O>=0)var I=D[O],L=this.$screenRowCache[O],P=T>D[N-1];else var P=!N;for(var H=this.getNextFoldLine(I),F=H?H.start.row:1/0;I=F){if(R=H.end.row+1,R>T)break;H=this.getNextFoldLine(R,H),F=H?H.start.row:1/0}else R=I+1;L+=this.getRowLength(I),I=R,P&&(this.$docRowCache.push(I),this.$screenRowCache.push(L))}var U="";H&&I>=F?(U=this.getFoldDisplayLine(H,T,y),_=H.start.row):(U=this.getLine(T).substring(0,y),_=T);var j=0;if(this.$useWrapMode){var J=this.$wrapData[_];if(J){for(var z=0;U.length>=J[z];)L++,z++;U=U.substring(J[z-1]||0,U.length),j=z>0?J.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(L+=this.lineWidgets[I].rowsAbove),{row:L,column:j+this.$getStringScreenWidth(U)[0]}},S.prototype.documentToScreenColumn=function(T,y){return this.documentToScreenPosition(T,y).column},S.prototype.documentToScreenRow=function(T,y){return this.documentToScreenPosition(T,y).row},S.prototype.getScreenLength=function(){var T=0,y=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,k=0,L=0,y=this.$foldData[L++],R=y?y.start.row:1/0;k<_;){var I=this.$wrapData[k];T+=I?I.length+1:1,k++,k>R&&(k=y.end.row+1,y=this.$foldData[L++],R=y?y.start.row:1/0)}else{T=this.getLength();for(var m=this.$foldData,L=0;Lm));k++);return[L,k]})},S.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},S}();f.$uid=0,f.prototype.$modes=a.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=M,d.implement(f.prototype,u);var b=1,C=2,w=3,x=4,A=9,v=10,E=11,$=12;function M(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}t("./edit_session/folding").Folding.call(f.prototype),t("./edit_session/bracket_match").BracketMatch.call(f.prototype),a.defineOptions(f.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var T=typeof S=="number"?S:null;this.setWrapLimitRange(T,T),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=f});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,c){"use strict";var d=t("./lib/lang"),p=t("./lib/oop"),g=t("./range").Range,a=function(){function o(){this.$options={}}return o.prototype.set=function(r){return p.mixin(this.$options,r),this},o.prototype.getOptions=function(){return d.copyObject(this.$options)},o.prototype.setOptions=function(r){this.$options=r},o.prototype.find=function(r){var n=this.$options,i=this.$matchIterator(r,n);if(!i)return!1;var s=null;return i.forEach(function(l,h,f,b){return s=new g(l,h,f,b),h==b&&n.start&&n.start.start&&n.skipCurrent!=!1&&s.isEqual(n.start)?(s=null,!1):!0}),s},o.prototype.findAll=function(r){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,s=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),l=[],h=n.re;if(n.$isMultiLine){var f=h.length,b=s.length-f,C;e:for(var w=h.offset||0;w<=b;w++){for(var x=0;xE||(l.push(C=new g(w,E,w+f-1,$)),f>2&&(w=w+f-2))}}else for(var M=0;Mm&&l[x].end.row==L;)x--;for(l=l.slice(M,x+1),M=0,x=l.length;M0&&(L=!!m.charAt(y-1).match(this.tokenRe)),L||(L=!!m.charAt(y).match(this.tokenRe)),L)var _=this.tokenRe;else if(/^\s+$/.test(m.slice(y-1,y+1)))var _=/\s/;else var _=this.nonTokenRe;var k=y;if(k>0){do k--;while(k>=0&&m.charAt(k).match(_));k++}for(var I=y;IT&&(T=y.screenWidth)}),this.lineWidgetWidth=T},S.prototype.$computeWidth=function(T){if(this.$modified||T){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var y=this.doc.getAllLines(),m=this.$rowLengthCache,L=0,_=0,k=this.$foldData[_],I=k?k.start.row:1/0,R=y.length,D=0;DI){if(D=k.end.row+1,D>=R)break;k=this.$foldData[_++],I=k?k.start.row:1/0}m[D]==null&&(m[D]=this.$getStringScreenWidth(y[D])[0]),m[D]>L&&(L=m[D])}this.screenWidth=L}},S.prototype.getLine=function(T){return this.doc.getLine(T)},S.prototype.getLines=function(T,y){return this.doc.getLines(T,y)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function(T){return this.doc.getTextRange(T||this.selection.getRange())},S.prototype.insert=function(T,y){return this.doc.insert(T,y)},S.prototype.remove=function(T){return this.doc.remove(T)},S.prototype.removeFullLines=function(T,y){return this.doc.removeFullLines(T,y)},S.prototype.undoChanges=function(T,y){if(T.length){this.$fromUndo=!0;for(var m=T.length-1;m!=-1;m--){var L=T[m];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!y&&this.$undoSelect&&(T.selectionBefore?this.selection.fromJSON(T.selectionBefore):this.selection.setRange(this.$getUndoSelection(T,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function(T,y){if(T.length){this.$fromUndo=!0;for(var m=0;mT.end.column&&(k.start.column+=R),k.end.row==T.end.row&&k.end.column>T.end.column&&(k.end.column+=R)),I&&k.start.row>=T.end.row&&(k.start.row+=I,k.end.row+=I)}if(k.end=this.insert(k.start,L),_.length){var D=T.start,O=k.start,I=O.row-D.row,R=O.column-D.column;this.addFolds(_.map(function(H){return H=H.clone(),H.start.row==D.row&&(H.start.column+=R),H.end.row==D.row&&(H.end.column+=R),H.start.row+=I,H.end.row+=I,H}))}return k},S.prototype.indentRows=function(T,y,m){m=m.replace(/\t/g,this.getTabString());for(var L=T;L<=y;L++)this.doc.insertInLine({row:L,column:0},m)},S.prototype.outdentRows=function(T){for(var y=T.collapseRows(),m=new n(0,0,0,0),L=this.getTabSize(),_=y.start.row;_<=y.end.row;++_){var k=this.getLine(_);m.start.row=_,m.end.row=_;for(var I=0;I0){var L=this.getRowFoldEnd(y+m);if(L>this.doc.getLength()-1)return 0;var _=L-y}else{T=this.$clipRowToDocument(T),y=this.$clipRowToDocument(y);var _=y-T+1}var k=new n(T,0,y,Number.MAX_VALUE),I=this.getFoldsInRange(k).map(function(D){return D=D.clone(),D.start.row+=_,D.end.row+=_,D}),R=m==0?this.doc.getLines(T,y):this.doc.removeFullLines(T,y);return this.doc.insertFullLines(T+_,R),I.length&&this.addFolds(I),_},S.prototype.moveLinesUp=function(T,y){return this.$moveLines(T,y,-1)},S.prototype.moveLinesDown=function(T,y){return this.$moveLines(T,y,1)},S.prototype.duplicateLines=function(T,y){return this.$moveLines(T,y,0)},S.prototype.$clipRowToDocument=function(T){return Math.max(0,Math.min(T,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function(T,y){return y<0?0:Math.min(this.doc.getLine(T).length,y)},S.prototype.$clipPositionToDocument=function(T,y){if(y=Math.max(0,y),T<0)T=0,y=0;else{var m=this.doc.getLength();T>=m?(T=m-1,y=this.doc.getLine(m-1).length):y=Math.min(this.doc.getLine(T).length,y)}return{row:T,column:y}},S.prototype.$clipRangeToDocument=function(T){T.start.row<0?(T.start.row=0,T.start.column=0):T.start.column=this.$clipColumnToRow(T.start.row,T.start.column);var y=this.doc.getLength()-1;return T.end.row>y?(T.end.row=y,T.end.column=this.doc.getLine(y).length):T.end.column=this.$clipColumnToRow(T.end.row,T.end.column),T},S.prototype.setUseWrapMode=function(T){if(T!=this.$useWrapMode){if(this.$useWrapMode=T,this.$modified=!0,this.$resetRowCache(0),T){var y=this.getLength();this.$wrapData=Array(y),this.$updateWrapData(0,y-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function(T,y){(this.$wrapLimitRange.min!==T||this.$wrapLimitRange.max!==y)&&(this.$wrapLimitRange={min:T,max:y},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function(T,y){var m=this.$wrapLimitRange;m.max<0&&(m={min:y,max:y});var L=this.$constrainWrapLimit(T,m.min,m.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function(T,y,m){return y&&(T=Math.max(y,T)),m&&(T=Math.min(m,T)),T},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function(T){this.setWrapLimitRange(T,T)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function(T){var y=this.$useWrapMode,m=T.action,L=T.start,_=T.end,k=L.row,I=_.row,R=I-k,D=null;if(this.$updating=!0,R!=0)if(m==="remove"){this[y?"$wrapData":"$rowLengthCache"].splice(k,R);var O=this.$foldData;D=this.getFoldsInRange(T),this.removeFolds(D);var N=this.getFoldLine(_.row),P=0;if(N){N.addRemoveChars(_.row,_.column,L.column-_.column),N.shiftRow(-R);var H=this.getFoldLine(k);H&&H!==N&&(H.merge(N),N=H),P=O.indexOf(N)+1}for(P;P=_.row&&N.shiftRow(-R)}I=k}else{var F=Array(R);F.unshift(k,0);var U=y?this.$wrapData:this.$rowLengthCache;U.splice.apply(U,F);var O=this.$foldData,N=this.getFoldLine(k),P=0;if(N){var j=N.range.compareInside(L.row,L.column);j==0?(N=N.split(L.row,L.column),N&&(N.shiftRow(R),N.addRemoveChars(I,0,_.column-L.column))):j==-1&&(N.addRemoveChars(k,0,_.column-L.column),N.shiftRow(R)),P=O.indexOf(N)+1}for(P;P=k&&N.shiftRow(R)}}else{R=Math.abs(T.start.column-T.end.column),m==="remove"&&(D=this.getFoldsInRange(T),this.removeFolds(D),R=-R);var N=this.getFoldLine(k);N&&N.addRemoveChars(k,L.column,R)}return y&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,y?this.$updateWrapData(k,I):this.$updateRowLengthCache(k,I),D},S.prototype.$updateRowLengthCache=function(T,y){this.$rowLengthCache[T]=null,this.$rowLengthCache[y]=null},S.prototype.$updateWrapData=function(T,y){var m=this.doc.getAllLines(),L=this.getTabSize(),_=this.$wrapData,k=this.$wrapLimit,I,R,D=T;for(y=Math.min(y,m.length-1);D<=y;)R=this.getFoldLine(D,R),R?(I=[],R.walk(function(O,N,P,H){var F;if(O!=null){F=this.$getDisplayTokens(O,I.length),F[0]=w;for(var U=1;Uy-H;){var F=k+y-H;if(T[F-1]>=v&&T[F]>=v){P(F);continue}if(T[F]==w||T[F]==x){for(F;F!=k-1&&T[F]!=w;F--);if(F>k){P(F);continue}for(F=k+y,F;F>2)),k-1);F>U&&T[F]U&&T[F]U&&T[F]==A;)F--}else for(;F>U&&T[F]U){P(++F);continue}F=k+y,T[F]==C&&F--,P(F-H)}return L},S.prototype.$getDisplayTokens=function(T,y){var m=[],L;y=y||0;for(var _=0;_39&&k<48||k>57&&k<64?m.push(A):k>=4352&&M(k)?m.push(b,C):m.push(b)}return m},S.prototype.$getStringScreenWidth=function(T,y,m){if(y==0)return[0,0];y==null&&(y=1/0),m=m||0;var L,_;for(_=0;_=4352&&M(L)?m+=2:m+=1,!(m>y));_++);return[m,_]},S.prototype.getRowLength=function(T){var y=1;return this.lineWidgets&&(y+=this.lineWidgets[T]&&this.lineWidgets[T].rowCount||0),!this.$useWrapMode||!this.$wrapData[T]?y:this.$wrapData[T].length+y},S.prototype.getRowLineCount=function(T){return!this.$useWrapMode||!this.$wrapData[T]?1:this.$wrapData[T].length+1},S.prototype.getRowWrapIndent=function(T){if(this.$useWrapMode){var y=this.screenToDocumentPosition(T,Number.MAX_VALUE),m=this.$wrapData[y.row];return m.length&&m[0]=0)var R=O[N],_=this.$docRowCache[N],H=T>O[P-1];else var H=!P;for(var F=this.getLength()-1,U=this.getNextFoldLine(_),j=U?U.start.row:1/0;R<=T&&(D=this.getRowLength(_),!(R+D>T||_>=F));)R+=D,_++,_>j&&(_=U.end.row+1,U=this.getNextFoldLine(_,U),j=U?U.start.row:1/0),H&&(this.$docRowCache.push(_),this.$screenRowCache.push(R));if(U&&U.start.row<=_)L=this.getFoldDisplayLine(U),_=U.start.row;else{if(R+D<=T||_>F)return{row:F,column:this.getLine(F).length};L=this.getLine(_),U=null}var J=0,z=Math.floor(T-R);if(this.$useWrapMode){var X=this.$wrapData[_];X&&(I=X[z],z>0&&X.length&&(J=X.indent,k=X[z-1]||X[X.length-1],L=L.substring(k)))}return m!==void 0&&this.$bidiHandler.isBidiRow(R+z,_,z)&&(y=this.$bidiHandler.offsetToCol(m)),k+=this.$getStringScreenWidth(L,y-J)[1],this.$useWrapMode&&k>=I&&(k=I-1),U?U.idxToPosition(k):{row:_,column:k}},S.prototype.documentToScreenPosition=function(T,y){if(typeof y>"u")var m=this.$clipPositionToDocument(T.row,T.column);else m=this.$clipPositionToDocument(T,y);T=m.row,y=m.column;var L=0,_=null,k=null;k=this.getFoldAt(T,y,1),k&&(T=k.start.row,y=k.start.column);var I,R=0,D=this.$docRowCache,O=this.$getRowCacheIndex(D,T),N=D.length;if(N&&O>=0)var R=D[O],L=this.$screenRowCache[O],P=T>D[N-1];else var P=!N;for(var H=this.getNextFoldLine(R),F=H?H.start.row:1/0;R=F){if(I=H.end.row+1,I>T)break;H=this.getNextFoldLine(I,H),F=H?H.start.row:1/0}else I=R+1;L+=this.getRowLength(R),R=I,P&&(this.$docRowCache.push(R),this.$screenRowCache.push(L))}var U="";H&&R>=F?(U=this.getFoldDisplayLine(H,T,y),_=H.start.row):(U=this.getLine(T).substring(0,y),_=T);var j=0;if(this.$useWrapMode){var J=this.$wrapData[_];if(J){for(var z=0;U.length>=J[z];)L++,z++;U=U.substring(J[z-1]||0,U.length),j=z>0?J.indent:0}}return this.lineWidgets&&this.lineWidgets[R]&&this.lineWidgets[R].rowsAbove&&(L+=this.lineWidgets[R].rowsAbove),{row:L,column:j+this.$getStringScreenWidth(U)[0]}},S.prototype.documentToScreenColumn=function(T,y){return this.documentToScreenPosition(T,y).column},S.prototype.documentToScreenRow=function(T,y){return this.documentToScreenPosition(T,y).row},S.prototype.getScreenLength=function(){var T=0,y=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,k=0,L=0,y=this.$foldData[L++],I=y?y.start.row:1/0;k<_;){var R=this.$wrapData[k];T+=R?R.length+1:1,k++,k>I&&(k=y.end.row+1,y=this.$foldData[L++],I=y?y.start.row:1/0)}else{T=this.getLength();for(var m=this.$foldData,L=0;Lm));k++);return[L,k]})},S.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},S}();f.$uid=0,f.prototype.$modes=a.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=M,d.implement(f.prototype,u);var b=1,C=2,w=3,x=4,A=9,v=10,E=11,$=12;function M(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}t("./edit_session/folding").Folding.call(f.prototype),t("./edit_session/bracket_match").BracketMatch.call(f.prototype),a.defineOptions(f.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var T=typeof S=="number"?S:null;this.setWrapLimitRange(T,T),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=f});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,c){"use strict";var d=t("./lib/lang"),p=t("./lib/oop"),g=t("./range").Range,a=function(){function o(){this.$options={}}return o.prototype.set=function(r){return p.mixin(this.$options,r),this},o.prototype.getOptions=function(){return d.copyObject(this.$options)},o.prototype.setOptions=function(r){this.$options=r},o.prototype.find=function(r){var n=this.$options,i=this.$matchIterator(r,n);if(!i)return!1;var s=null;return i.forEach(function(l,h,f,b){return s=new g(l,h,f,b),h==b&&n.start&&n.start.start&&n.skipCurrent!=!1&&s.isEqual(n.start)?(s=null,!1):!0}),s},o.prototype.findAll=function(r){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var i=n.range,s=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),l=[],h=n.re;if(n.$isMultiLine){var f=h.length,b=s.length-f,C;e:for(var w=h.offset||0;w<=b;w++){for(var x=0;xE||(l.push(C=new g(w,E,w+f-1,$)),f>2&&(w=w+f-2))}}else for(var M=0;Mm&&l[x].end.row==L;)x--;for(l=l.slice(M,x+1),M=0,x=l.length;M=C;$--)if(v($,Number.MAX_VALUE,E))return;if(n.wrap!=!1){for($=w,C=b.row;$>=C;$--)if(v($,Number.MAX_VALUE,E))return}}};else var x=function($){var M=b.row;if(!v(M,b.column,$)){for(M=M+1;M<=w;M++)if(v(M,0,$))return;if(n.wrap!=!1){for(M=C,w=b.row;M<=w;M++)if(v(M,0,$))return}}};if(n.$isMultiLine)var A=i.length,v=function(E,$,M){var S=s?E-A+1:E;if(!(S<0||S+A>r.getLength())){var T=r.getLine(S),y=T.search(i[0]);if(!(!s&&y<$||y===-1)){for(var m=1;m$)&&M(S,y,S+A-1,L))return!0}}};else if(s)var v=function($,M,S){var T=r.getLine($),y=[],m,L=0;for(i.lastIndex=0;m=i.exec(T);){var _=m[0].length;if(L=m.index,!_){if(L>=T.length)break;i.lastIndex=L+=d.skipEmptyMatch(T,L,h)}if(m.index+_>M)break;y.push(m.index,_)}for(var k=y.length-1;k>=0;k-=2){var R=y[k-1],_=y[k];if(S($,R,$,R+_))return!0}};else var v=function($,M,S){var T=r.getLine($),y,m;for(i.lastIndex=M;m=i.exec(T);){var L=m[0].length;if(y=m.index,S($,y,$,y+L))return!0;if(!L&&(i.lastIndex=y+=d.skipEmptyMatch(T,y,h),y>=T.length))return!1}};return{forEach:x}},o}();function u(o,r){var n=d.supportsLookbehind();function i(f,b){b===void 0&&(b=!0);var C=n&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(f)||r.regExp?n&&r.$supportsUnicodeFlag?b?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(o),l=s[0],h=s[s.length-1];return i(l)+o+i(h,!1)}e.Search=a});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var n=function(i,s){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(l[f]=h[f])},n(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");n(i,s);function l(){this.constructor=i}i.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),p=t("../lib/keys"),g=t("../lib/useragent"),a=p.KEY_MODS,u=function(){function n(i,s){this.$init(i,s,!1)}return n.prototype.$init=function(i,s,l){this.platform=s||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=l},n.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},n.prototype.removeCommand=function(i,s){var l=i&&(typeof i=="string"?i:i.name);i=this.commands[l],s||delete this.commands[l];var h=this.commandKeyBinding;for(var f in h){var b=h[f];if(b==i)delete h[f];else if(Array.isArray(b)){var C=b.indexOf(i);C!=-1&&(b.splice(C,1),b.length==1&&(h[f]=b[0]))}}},n.prototype.bindKey=function(i,s,l){if(typeof i=="object"&&i&&(l==null&&(l=i.position),i=i[this.platform]),!!i){if(typeof s=="function")return this.addCommand({exec:s,bindKey:i,name:s.name||i});i.split("|").forEach(function(h){var f="";if(h.indexOf(" ")!=-1){var b=h.split(/\s+/);h=b.pop(),b.forEach(function(x){var A=this.parseKeys(x),v=a[A.hashId]+A.key;f+=(f?" ":"")+v,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var C=this.parseKeys(h),w=a[C.hashId]+C.key;this._addCommandToBinding(f+w,s,l)},this)}},n.prototype._addCommandToBinding=function(i,s,l){var h=this.commandKeyBinding,f;if(!s)delete h[i];else if(!h[i]||this.$singleCommand)h[i]=s;else{Array.isArray(h[i])?(f=h[i].indexOf(s))!=-1&&h[i].splice(f,1):h[i]=[h[i]],typeof l!="number"&&(l=o(s));var b=h[i];for(f=0;fl)break}b.splice(f,0,s)}},n.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(s){var l=i[s];if(l){if(typeof l=="string")return this.bindKey(l,s);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=s),this.addCommand(l))}},this)},n.prototype.removeCommands=function(i){Object.keys(i).forEach(function(s){this.removeCommand(i[s])},this)},n.prototype.bindKeys=function(i){Object.keys(i).forEach(function(s){this.bindKey(s,i[s])},this)},n.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},n.prototype.parseKeys=function(i){var s=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),l=s.pop(),h=p[l];if(p.FUNCTION_KEYS[h])l=p.FUNCTION_KEYS[h].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var f=0,b=s.length;b--;){var C=p.KEY_MODS[s[b]];if(C==null)return typeof console<"u"&&console.error("invalid modifier "+s[b]+" in "+i),!1;f|=C}return{key:l,hashId:f}},n.prototype.findKeyCommand=function(i,s){var l=a[i]+s;return this.commandKeyBinding[l]},n.prototype.handleKeyboard=function(i,s,l,h){if(!(h<0)){var f=a[s]+l,b=this.commandKeyBinding[f];return i.$keyChain&&(i.$keyChain+=" "+f,b=this.commandKeyBinding[i.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||f,{command:"null"}):(i.$keyChain&&((!s||s==4)&&l.length==1?i.$keyChain=i.$keyChain.slice(0,-f.length-1):(s==-1||h>0)&&(i.$keyChain="")),{command:b})}},n.prototype.getStatusText=function(i,s){return s.$keyChain||""},n}();function o(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var r=function(n){d(i,n);function i(s,l){var h=n.call(this,s,l)||this;return h.$singleCommand=!0,h}return i}(u);r.call=function(n,i,s){u.prototype.$init.call(n,i,s,!0)},u.call=function(n,i,s){u.prototype.$init.call(n,i,s,!1)},e.HashHandler=r,e.MultiHashHandler=u});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var o=function(r,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=s[l])},o(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=t("../lib/oop"),g=t("../keyboard/hash_handler").MultiHashHandler,a=t("../lib/event_emitter").EventEmitter,u=function(o){d(r,o);function r(n,i){var s=o.call(this,i,n)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),s}return r.prototype.exec=function(n,i,s){if(Array.isArray(n)){for(var l=n.length;l--;)if(this.exec(n[l],i,s))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!n||i&&i.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(i))return!1;var h={editor:i,command:n,args:s};return h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1},r.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(i){this.macro.push([i.command,i.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},r.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,n):this.exec(i[0],n,i[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(n){return n.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},r}(g);p.implement(u.prototype,a),e.CommandManager=u});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,e,c){"use strict";var d=t("../lib/lang"),p=t("../config"),g=t("../range").Range;function a(o,r){return{win:o,mac:r}}e.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(o){p.loadModule("ace/ext/settings_menu",function(r){r.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(o){p.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(o){p.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(o,r){typeof r=="number"&&!isNaN(r)&&o.gotoLine(r),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(o){p.loadModule("ace/ext/searchbox",function(r){r.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(o,r){o.navigateUp(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(o,r){o.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(o,r){o.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(o,r){o.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var r=o.$copyWithEmptySelection&&o.selection.isEmpty(),n=r?o.selection.getLineRange():o.selection.getRange();o._emit("cut",n),n.isEmpty()||o.session.remove(n),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,r){o.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(o){p.loadModule("ace/ext/searchbox",function(r){r.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(o){var r=o.selection.getRange();r.start.column=0,o.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(o){var r=o.selection.getRange();r.end.column=Number.MAX_VALUE,o.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,r){o.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,r){o.insert(d.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(o){o.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var r=o.selection.getRange();r.start.column=r.end.column=0,r.end.row++,o.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(o){for(var r=o.selection.isBackwards(),n=r?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),i=r?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),s=o.session.doc.getLine(n.row).length,l=o.session.doc.getTextRange(o.selection.getRange()),h=l.replace(/\n\s*/," ").length,f=o.session.doc.getLine(n.row),b=n.row+1;b<=i.row+1;b++){var C=d.stringTrimLeft(d.stringTrimRight(o.session.doc.getLine(b)));C.length!==0&&(C=" "+C),f+=C}i.row+10?(o.selection.moveCursorTo(n.row,n.column),o.selection.selectTo(n.row,n.column+h)):(s=o.session.doc.getLine(n.row).length>s?s+1:s,o.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(o){var r=o.session.doc.getLength()-1,n=o.session.doc.getLine(r).length,i=o.selection.rangeList.ranges,s=[];i.length<1&&(i=[o.selection.getRange()]);for(var l=0;l=C;$--)if(v($,Number.MAX_VALUE,E))return;if(n.wrap!=!1){for($=w,C=b.row;$>=C;$--)if(v($,Number.MAX_VALUE,E))return}}};else var x=function($){var M=b.row;if(!v(M,b.column,$)){for(M=M+1;M<=w;M++)if(v(M,0,$))return;if(n.wrap!=!1){for(M=C,w=b.row;M<=w;M++)if(v(M,0,$))return}}};if(n.$isMultiLine)var A=i.length,v=function(E,$,M){var S=s?E-A+1:E;if(!(S<0||S+A>r.getLength())){var T=r.getLine(S),y=T.search(i[0]);if(!(!s&&y<$||y===-1)){for(var m=1;m$)&&M(S,y,S+A-1,L))return!0}}};else if(s)var v=function($,M,S){var T=r.getLine($),y=[],m,L=0;for(i.lastIndex=0;m=i.exec(T);){var _=m[0].length;if(L=m.index,!_){if(L>=T.length)break;i.lastIndex=L+=d.skipEmptyMatch(T,L,h)}if(m.index+_>M)break;y.push(m.index,_)}for(var k=y.length-1;k>=0;k-=2){var I=y[k-1],_=y[k];if(S($,I,$,I+_))return!0}};else var v=function($,M,S){var T=r.getLine($),y,m;for(i.lastIndex=M;m=i.exec(T);){var L=m[0].length;if(y=m.index,S($,y,$,y+L))return!0;if(!L&&(i.lastIndex=y+=d.skipEmptyMatch(T,y,h),y>=T.length))return!1}};return{forEach:x}},o}();function u(o,r){var n=d.supportsLookbehind();function i(f,b){b===void 0&&(b=!0);var C=n&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test(f)||r.regExp?n&&r.$supportsUnicodeFlag?b?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(o),l=s[0],h=s[s.length-1];return i(l)+o+i(h,!1)}e.Search=a});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var n=function(i,s){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(l[f]=h[f])},n(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");n(i,s);function l(){this.constructor=i}i.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),p=t("../lib/keys"),g=t("../lib/useragent"),a=p.KEY_MODS,u=function(){function n(i,s){this.$init(i,s,!1)}return n.prototype.$init=function(i,s,l){this.platform=s||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=l},n.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},n.prototype.removeCommand=function(i,s){var l=i&&(typeof i=="string"?i:i.name);i=this.commands[l],s||delete this.commands[l];var h=this.commandKeyBinding;for(var f in h){var b=h[f];if(b==i)delete h[f];else if(Array.isArray(b)){var C=b.indexOf(i);C!=-1&&(b.splice(C,1),b.length==1&&(h[f]=b[0]))}}},n.prototype.bindKey=function(i,s,l){if(typeof i=="object"&&i&&(l==null&&(l=i.position),i=i[this.platform]),!!i){if(typeof s=="function")return this.addCommand({exec:s,bindKey:i,name:s.name||i});i.split("|").forEach(function(h){var f="";if(h.indexOf(" ")!=-1){var b=h.split(/\s+/);h=b.pop(),b.forEach(function(x){var A=this.parseKeys(x),v=a[A.hashId]+A.key;f+=(f?" ":"")+v,this._addCommandToBinding(f,"chainKeys")},this),f+=" "}var C=this.parseKeys(h),w=a[C.hashId]+C.key;this._addCommandToBinding(f+w,s,l)},this)}},n.prototype._addCommandToBinding=function(i,s,l){var h=this.commandKeyBinding,f;if(!s)delete h[i];else if(!h[i]||this.$singleCommand)h[i]=s;else{Array.isArray(h[i])?(f=h[i].indexOf(s))!=-1&&h[i].splice(f,1):h[i]=[h[i]],typeof l!="number"&&(l=o(s));var b=h[i];for(f=0;fl)break}b.splice(f,0,s)}},n.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(s){var l=i[s];if(l){if(typeof l=="string")return this.bindKey(l,s);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=s),this.addCommand(l))}},this)},n.prototype.removeCommands=function(i){Object.keys(i).forEach(function(s){this.removeCommand(i[s])},this)},n.prototype.bindKeys=function(i){Object.keys(i).forEach(function(s){this.bindKey(s,i[s])},this)},n.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},n.prototype.parseKeys=function(i){var s=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),l=s.pop(),h=p[l];if(p.FUNCTION_KEYS[h])l=p.FUNCTION_KEYS[h].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var f=0,b=s.length;b--;){var C=p.KEY_MODS[s[b]];if(C==null)return typeof console<"u"&&console.error("invalid modifier "+s[b]+" in "+i),!1;f|=C}return{key:l,hashId:f}},n.prototype.findKeyCommand=function(i,s){var l=a[i]+s;return this.commandKeyBinding[l]},n.prototype.handleKeyboard=function(i,s,l,h){if(!(h<0)){var f=a[s]+l,b=this.commandKeyBinding[f];return i.$keyChain&&(i.$keyChain+=" "+f,b=this.commandKeyBinding[i.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||f,{command:"null"}):(i.$keyChain&&((!s||s==4)&&l.length==1?i.$keyChain=i.$keyChain.slice(0,-f.length-1):(s==-1||h>0)&&(i.$keyChain="")),{command:b})}},n.prototype.getStatusText=function(i,s){return s.$keyChain||""},n}();function o(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var r=function(n){d(i,n);function i(s,l){var h=n.call(this,s,l)||this;return h.$singleCommand=!0,h}return i}(u);r.call=function(n,i,s){u.prototype.$init.call(n,i,s,!0)},u.call=function(n,i,s){u.prototype.$init.call(n,i,s,!1)},e.HashHandler=r,e.MultiHashHandler=u});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var o=function(r,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(i[l]=s[l])},o(r,n)};return function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=t("../lib/oop"),g=t("../keyboard/hash_handler").MultiHashHandler,a=t("../lib/event_emitter").EventEmitter,u=function(o){d(r,o);function r(n,i){var s=o.call(this,i,n)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),s}return r.prototype.exec=function(n,i,s){if(Array.isArray(n)){for(var l=n.length;l--;)if(this.exec(n[l],i,s))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!n||i&&i.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(i))return!1;var h={editor:i,command:n,args:s};return h.returnValue=this._emit("exec",h),this._signal("afterExec",h),h.returnValue!==!1},r.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(i){this.macro.push([i.command,i.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},r.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,n):this.exec(i[0],n,i[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(n){return n.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},r}(g);p.implement(u.prototype,a),e.CommandManager=u});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,e,c){"use strict";var d=t("../lib/lang"),p=t("../config"),g=t("../range").Range;function a(o,r){return{win:o,mac:r}}e.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(o){p.loadModule("ace/ext/settings_menu",function(r){r.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(o){p.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(o){p.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(o,r){typeof r=="number"&&!isNaN(r)&&o.gotoLine(r),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(o){p.loadModule("ace/ext/searchbox",function(r){r.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(o,r){o.navigateUp(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(o,r){o.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(o,r){o.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(o,r){o.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var r=o.$copyWithEmptySelection&&o.selection.isEmpty(),n=r?o.selection.getLineRange():o.selection.getRange();o._emit("cut",n),n.isEmpty()||o.session.remove(n),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,r){o.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(o){p.loadModule("ace/ext/searchbox",function(r){r.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(o){var r=o.selection.getRange();r.start.column=0,o.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(o){var r=o.selection.getRange();r.end.column=Number.MAX_VALUE,o.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,r){o.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,r){o.insert(d.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(o){o.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var r=o.selection.getRange();r.start.column=r.end.column=0,r.end.row++,o.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(o){for(var r=o.selection.isBackwards(),n=r?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),i=r?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),s=o.session.doc.getLine(n.row).length,l=o.session.doc.getTextRange(o.selection.getRange()),h=l.replace(/\n\s*/," ").length,f=o.session.doc.getLine(n.row),b=n.row+1;b<=i.row+1;b++){var C=d.stringTrimLeft(d.stringTrimRight(o.session.doc.getLine(b)));C.length!==0&&(C=" "+C),f+=C}i.row+10?(o.selection.moveCursorTo(n.row,n.column),o.selection.selectTo(n.row,n.column+h)):(s=o.session.doc.getLine(n.row).length>s?s+1:s,o.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(o){var r=o.session.doc.getLength()-1,n=o.session.doc.getLine(r).length,i=o.selection.rangeList.ranges,s=[];i.length<1&&(i=[o.selection.getRange()]);for(var l=0;lu[o].column&&o++,i.unshift(o,0),u.splice.apply(u,i),this.$updateRows()}}},g.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(o,r){if(o)for(u=!1,o.row=r;o.$oldWidget;)o.$oldWidget.row=r,o=o.$oldWidget}),u&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},g.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=d.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=d.createElement("div"),a.el.textContent=a.text),a.el&&(d.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&d.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var o=this.session.getFoldAt(a.row,0);if(a.$fold=o,o){var r=this.session.lineWidgets;a.row==o.end.row&&!r[o.start.row]?r[o.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},g.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,o=u&&u[a],r=[];o;)r.push(o),o=o.$oldWidget;return r},g.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(a,u){var o=this.session._changedWidgets,r=u.layerConfig;if(!(!o||!o.length)){for(var n=1/0,i=0;i0&&!r[n];)n--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,u.$cursorLayer.config=o;for(var s=n;s<=i;s++){var l=r[s];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,u.container.appendChild(l.el));var h=u.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;l.coverLine||(h+=o.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=h-o.offset+"px";var f=l.coverGutter?0:u.gutterWidth;l.fixedWidth||(f-=u.scrollLeft),l.el.style.left=f+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=o.width+2*o.padding+"px"),l.fixedWidth?l.el.style.right=u.scrollBar.getWidth()+"px":l.el.style.right=""}}}},g}();e.LineWidgets=p});ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(t,e,c){"use strict";var d=t("../lib/keys"),p=t("../mouse/default_gutter_handler").GutterTooltip,g=function(){function u(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new p(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===d.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=d.enter)return;o.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldWidget(n),s=this.$findNearestAnnotation(n);if(!(i===null&&s===null)){if(i===null&&s!==null){this.activeRowIndex=s,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(i!==null&&s===null){this.activeRowIndex=i,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(s-n)0||o+r=0&&this.$isFoldWidgetVisible(o-r))return o-r;if(o+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+r))return o+r}return null},u.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var r=0;o-r>0||o+r=0&&this.$isAnnotationVisible(o-r))return o-r;if(o+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+r))return o+r}return null},u.prototype.$focusFoldWidget=function(o){if(o!=null){var r=this.$getFoldWidget(o);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},u.prototype.$focusAnnotation=function(o){if(o!=null){var r=this.$getAnnotation(o);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},u.prototype.$blurFoldWidget=function(o){var r=this.$getFoldWidget(o);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},u.prototype.$blurAnnotation=function(o){var r=this.$getAnnotation(o);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o=y.length&&(y=void 0),{value:y&&y[_++],done:!y}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},p=t("./lib/oop"),g=t("./lib/dom"),a=t("./lib/lang"),u=t("./lib/useragent"),o=t("./keyboard/textinput").TextInput,r=t("./mouse/mouse_handler").MouseHandler,n=t("./mouse/fold_handler").FoldHandler,i=t("./keyboard/keybinding").KeyBinding,s=t("./edit_session").EditSession,l=t("./search").Search,h=t("./range").Range,f=t("./lib/event_emitter").EventEmitter,b=t("./commands/command_manager").CommandManager,C=t("./commands/default_commands").commands,w=t("./config"),x=t("./token_iterator").TokenIterator,A=t("./line_widgets").LineWidgets,v=t("./keyboard/gutter_handler").GutterKeyboardHandler,E=t("./config").nls,$=t("./clipboard"),M=t("./lib/keys"),S=function(){function y(m,L,_){this.session,this.$toDestroy=[];var k=m.getContainerElement();this.container=k,this.renderer=m,this.id="editor"+ ++y.$uid,this.commands=new b(u.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new o(m.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new n(this)),this.keyBinding=new i(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(R,I){I._$emitInputEvent.schedule(31)}),this.setSession(L||_&&_.session||new s("")),w.resetOptions(this),_&&this.setOptions(_),w._signal("editor",this)}return y.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},y.prototype.startOperation=function(m){if(this.curOp){if(!m||this.curOp.command)return;this.prevOp=this.curOp}m||(this.previousCommand=null,m={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:m.command||{},args:m.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},y.prototype.endOperation=function(m){if(this.curOp&&this.session){if(m&&m.returnValue===!1||!this.session)return this.curOp=null;if(m==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var L=this.curOp.command,_=L&&L.scrollIntoView;if(_){switch(_){case"center-animate":_="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var k=this.selection.getRange(),R=this.renderer.layerConfig;(k.start.row>=R.lastRow||k.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}_=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var I=this.selection.toJSON();this.curOp.selectionAfter=I,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(I),this.prevOp=this.curOp,this.curOp=null}},y.prototype.$historyTracker=function(m){if(this.$mergeUndoDeltas){var L=this.prevOp,_=this.$mergeableCommands,k=L.command&&m.command.name==L.command.name;if(m.command.name=="insertstring"){var R=m.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),k=k&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(L.args)),this.mergeNextCommand=!0}else k=k&&_.indexOf(m.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(k=!1),k?this.session.mergeUndoDeltas=!0:_.indexOf(m.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},y.prototype.setKeyboardHandler=function(m,L){if(m&&typeof m=="string"&&m!="ace"){this.$keybindingId=m;var _=this;w.loadModule(["keybinding",m],function(k){_.$keybindingId==m&&_.keyBinding.setKeyboardHandler(k&&k.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(m),L&&L()},y.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},y.prototype.setSession=function(m){if(this.session!=m){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var _=this.session.getSelection();_.off("changeCursor",this.$onCursorChange),_.off("changeSelection",this.$onSelectionChange)}this.session=m,m?(this.$onDocumentChange=this.onDocumentChange.bind(this),m.on("change",this.$onDocumentChange),this.renderer.setSession(m),this.$onChangeMode=this.onChangeMode.bind(this),m.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),m.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),m.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),m.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),m.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),m.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=m.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(m)),this._signal("changeSession",{session:m,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),m&&m._signal("changeEditor",{editor:this}),m&&!m.destroyed&&m.bgTokenizer.scheduleStart()}},y.prototype.getSession=function(){return this.session},y.prototype.setValue=function(m,L){return this.session.doc.setValue(m),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),m},y.prototype.getValue=function(){return this.session.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.resize=function(m){this.renderer.onResize(m)},y.prototype.setTheme=function(m,L){this.renderer.setTheme(m,L)},y.prototype.getTheme=function(){return this.renderer.getTheme()},y.prototype.setStyle=function(m){this.renderer.setStyle(m)},y.prototype.unsetStyle=function(m){this.renderer.unsetStyle(m)},y.prototype.getFontSize=function(){return this.getOption("fontSize")||g.computedStyle(this.container).fontSize},y.prototype.setFontSize=function(m){this.setOption("fontSize",m)},y.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var m=this;this.$highlightPending=!0,setTimeout(function(){m.$highlightPending=!1;var L=m.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(H){L.removeMarker(H)}),L.$bracketHighlight=null);var _=m.getCursorPosition(),k=m.getKeyboardHandler(),R=k&&k.$getDirectionForHighlight&&k.$getDirectionForHighlight(m),I=L.getMatchingBracketRanges(_,R);if(!I){var D=new x(L,_.row,_.column),O=D.getCurrentToken();if(O&&/\b(?:tag-open|tag-name)/.test(O.type)){var N=L.getMatchingTags(_);N&&(I=[N.openTagName,N.closeTagName])}}if(!I&&L.$mode.getMatching&&(I=L.$mode.getMatching(m.session)),!I){m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide();return}var P="ace_bracket";Array.isArray(I)?I.length==1&&(P="ace_error_bracket"):I=[I],I.length==2&&(h.comparePoints(I[0].end,I[1].start)==0?I=[h.fromPoints(I[0].start,I[1].end)]:h.comparePoints(I[0].start,I[1].end)==0&&(I=[h.fromPoints(I[1].start,I[0].end)])),L.$bracketHighlight={ranges:I,markerIds:I.map(function(H){return L.addMarker(H,P,"text")})},m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide()}},50)}},y.prototype.focus=function(){this.textInput.focus()},y.prototype.isFocused=function(){return this.textInput.isFocused()},y.prototype.blur=function(){this.textInput.blur()},y.prototype.onFocus=function(m){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",m))},y.prototype.onBlur=function(m){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",m))},y.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},y.prototype.onDocumentChange=function(m){var L=this.session.$useWrapMode,_=m.start.row==m.end.row?m.end.row:1/0;this.renderer.updateLines(m.start.row,_,L),this._signal("change",m),this.$cursorChange()},y.prototype.onTokenizerUpdate=function(m){var L=m.data;this.renderer.updateLines(L.first,L.last)},y.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},y.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},y.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},y.prototype.$updateHighlightActiveLine=function(){var m=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),m.$highlightLineMarker&&!L)m.removeMarker(m.$highlightLineMarker.id),m.$highlightLineMarker=null;else if(!m.$highlightLineMarker&&L){var _=new h(L.row,L.column,L.row,1/0);_.id=m.addMarker(_,"ace_active-line","screenLine"),m.$highlightLineMarker=_}else L&&(m.$highlightLineMarker.start.row=L.row,m.$highlightLineMarker.end.row=L.row,m.$highlightLineMarker.start.column=L.column,m._signal("changeBackMarker"))},y.prototype.onSelectionChange=function(m){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var _=this.selection.getRange(),k=this.getSelectionStyle();L.$selectionMarker=L.addMarker(_,"ace_selection",k)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},y.prototype.$getSelectionHighLightRegexp=function(){var m=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var _=L.start.column,k=L.end.column,R=m.getLine(L.start.row),I=R.substring(_,k);if(!(I.length>5e3||!/[\w\d]/.test(I))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),O=R.substring(_-1,k+1);if(D.test(O))return D}}},y.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},y.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},y.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},y.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},y.prototype.onChangeMode=function(m){this.renderer.updateText(),this._emit("changeMode",m)},y.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},y.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},y.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},y.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},y.prototype.getCopyText=function(){var m=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),_=!1;if(!m&&this.$copyWithEmptySelection){_=!0;for(var k=this.selection.getAllRanges(),R=0;Ru[o].column&&o++,i.unshift(o,0),u.splice.apply(u,i),this.$updateRows()}}},g.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(o,r){if(o)for(u=!1,o.row=r;o.$oldWidget;)o.$oldWidget.row=r,o=o.$oldWidget}),u&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},g.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=d.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=d.createElement("div"),a.el.textContent=a.text),a.el&&(d.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&d.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/u.layerConfig.lineHeight);var o=this.session.getFoldAt(a.row,0);if(a.$fold=o,o){var r=this.session.lineWidgets;a.row==o.end.row&&!r[o.start.row]?r[o.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},g.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,o=u&&u[a],r=[];o;)r.push(o),o=o.$oldWidget;return r},g.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(a,u){var o=this.session._changedWidgets,r=u.layerConfig;if(!(!o||!o.length)){for(var n=1/0,i=0;i0&&!r[n];)n--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,u.$cursorLayer.config=o;for(var s=n;s<=i;s++){var l=r[s];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,u.container.appendChild(l.el));var h=u.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;l.coverLine||(h+=o.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=h-o.offset+"px";var f=l.coverGutter?0:u.gutterWidth;l.fixedWidth||(f-=u.scrollLeft),l.el.style.left=f+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=o.width+2*o.padding+"px"),l.fixedWidth?l.el.style.right=u.scrollBar.getWidth()+"px":l.el.style.right=""}}}},g}();e.LineWidgets=p});ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(t,e,c){"use strict";var d=t("../lib/keys"),p=t("../mouse/default_gutter_handler").GutterTooltip,g=function(){function u(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new p(this.editor)}return u.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},u.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},u.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===d.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=d.enter)return;o.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldWidget(n),s=this.$findNearestAnnotation(n);if(!(i===null&&s===null)){if(i===null&&s!==null){this.activeRowIndex=s,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(i!==null&&s===null){this.activeRowIndex=i,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(s-n)0||o+r=0&&this.$isFoldWidgetVisible(o-r))return o-r;if(o+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+r))return o+r}return null},u.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var r=0;o-r>0||o+r=0&&this.$isAnnotationVisible(o-r))return o-r;if(o+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+r))return o+r}return null},u.prototype.$focusFoldWidget=function(o){if(o!=null){var r=this.$getFoldWidget(o);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},u.prototype.$focusAnnotation=function(o){if(o!=null){var r=this.$getAnnotation(o);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},u.prototype.$blurFoldWidget=function(o){var r=this.$getFoldWidget(o);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},u.prototype.$blurAnnotation=function(o){var r=this.$getAnnotation(o);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},u.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},u.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o=y.length&&(y=void 0),{value:y&&y[_++],done:!y}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},p=t("./lib/oop"),g=t("./lib/dom"),a=t("./lib/lang"),u=t("./lib/useragent"),o=t("./keyboard/textinput").TextInput,r=t("./mouse/mouse_handler").MouseHandler,n=t("./mouse/fold_handler").FoldHandler,i=t("./keyboard/keybinding").KeyBinding,s=t("./edit_session").EditSession,l=t("./search").Search,h=t("./range").Range,f=t("./lib/event_emitter").EventEmitter,b=t("./commands/command_manager").CommandManager,C=t("./commands/default_commands").commands,w=t("./config"),x=t("./token_iterator").TokenIterator,A=t("./line_widgets").LineWidgets,v=t("./keyboard/gutter_handler").GutterKeyboardHandler,E=t("./config").nls,$=t("./clipboard"),M=t("./lib/keys"),S=function(){function y(m,L,_){this.session,this.$toDestroy=[];var k=m.getContainerElement();this.container=k,this.renderer=m,this.id="editor"+ ++y.$uid,this.commands=new b(u.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new o(m.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new n(this)),this.keyBinding=new i(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(I,R){R._$emitInputEvent.schedule(31)}),this.setSession(L||_&&_.session||new s("")),w.resetOptions(this),_&&this.setOptions(_),w._signal("editor",this)}return y.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},y.prototype.startOperation=function(m){if(this.curOp){if(!m||this.curOp.command)return;this.prevOp=this.curOp}m||(this.previousCommand=null,m={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:m.command||{},args:m.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},y.prototype.endOperation=function(m){if(this.curOp&&this.session){if(m&&m.returnValue===!1||!this.session)return this.curOp=null;if(m==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var L=this.curOp.command,_=L&&L.scrollIntoView;if(_){switch(_){case"center-animate":_="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var k=this.selection.getRange(),I=this.renderer.layerConfig;(k.start.row>=I.lastRow||k.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}_=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var R=this.selection.toJSON();this.curOp.selectionAfter=R,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(R),this.prevOp=this.curOp,this.curOp=null}},y.prototype.$historyTracker=function(m){if(this.$mergeUndoDeltas){var L=this.prevOp,_=this.$mergeableCommands,k=L.command&&m.command.name==L.command.name;if(m.command.name=="insertstring"){var I=m.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),k=k&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(L.args)),this.mergeNextCommand=!0}else k=k&&_.indexOf(m.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(k=!1),k?this.session.mergeUndoDeltas=!0:_.indexOf(m.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},y.prototype.setKeyboardHandler=function(m,L){if(m&&typeof m=="string"&&m!="ace"){this.$keybindingId=m;var _=this;w.loadModule(["keybinding",m],function(k){_.$keybindingId==m&&_.keyBinding.setKeyboardHandler(k&&k.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(m),L&&L()},y.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},y.prototype.setSession=function(m){if(this.session!=m){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var _=this.session.getSelection();_.off("changeCursor",this.$onCursorChange),_.off("changeSelection",this.$onSelectionChange)}this.session=m,m?(this.$onDocumentChange=this.onDocumentChange.bind(this),m.on("change",this.$onDocumentChange),this.renderer.setSession(m),this.$onChangeMode=this.onChangeMode.bind(this),m.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),m.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),m.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),m.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),m.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),m.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=m.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(m)),this._signal("changeSession",{session:m,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),m&&m._signal("changeEditor",{editor:this}),m&&!m.destroyed&&m.bgTokenizer.scheduleStart()}},y.prototype.getSession=function(){return this.session},y.prototype.setValue=function(m,L){return this.session.doc.setValue(m),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),m},y.prototype.getValue=function(){return this.session.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.resize=function(m){this.renderer.onResize(m)},y.prototype.setTheme=function(m,L){this.renderer.setTheme(m,L)},y.prototype.getTheme=function(){return this.renderer.getTheme()},y.prototype.setStyle=function(m){this.renderer.setStyle(m)},y.prototype.unsetStyle=function(m){this.renderer.unsetStyle(m)},y.prototype.getFontSize=function(){return this.getOption("fontSize")||g.computedStyle(this.container).fontSize},y.prototype.setFontSize=function(m){this.setOption("fontSize",m)},y.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var m=this;this.$highlightPending=!0,setTimeout(function(){m.$highlightPending=!1;var L=m.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(H){L.removeMarker(H)}),L.$bracketHighlight=null);var _=m.getCursorPosition(),k=m.getKeyboardHandler(),I=k&&k.$getDirectionForHighlight&&k.$getDirectionForHighlight(m),R=L.getMatchingBracketRanges(_,I);if(!R){var D=new x(L,_.row,_.column),O=D.getCurrentToken();if(O&&/\b(?:tag-open|tag-name)/.test(O.type)){var N=L.getMatchingTags(_);N&&(R=[N.openTagName,N.closeTagName])}}if(!R&&L.$mode.getMatching&&(R=L.$mode.getMatching(m.session)),!R){m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide();return}var P="ace_bracket";Array.isArray(R)?R.length==1&&(P="ace_error_bracket"):R=[R],R.length==2&&(h.comparePoints(R[0].end,R[1].start)==0?R=[h.fromPoints(R[0].start,R[1].end)]:h.comparePoints(R[0].start,R[1].end)==0&&(R=[h.fromPoints(R[1].start,R[0].end)])),L.$bracketHighlight={ranges:R,markerIds:R.map(function(H){return L.addMarker(H,P,"text")})},m.getHighlightIndentGuides()&&m.renderer.$textLayer.$highlightIndentGuide()}},50)}},y.prototype.focus=function(){this.textInput.focus()},y.prototype.isFocused=function(){return this.textInput.isFocused()},y.prototype.blur=function(){this.textInput.blur()},y.prototype.onFocus=function(m){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",m))},y.prototype.onBlur=function(m){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",m))},y.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},y.prototype.onDocumentChange=function(m){var L=this.session.$useWrapMode,_=m.start.row==m.end.row?m.end.row:1/0;this.renderer.updateLines(m.start.row,_,L),this._signal("change",m),this.$cursorChange()},y.prototype.onTokenizerUpdate=function(m){var L=m.data;this.renderer.updateLines(L.first,L.last)},y.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},y.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},y.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},y.prototype.$updateHighlightActiveLine=function(){var m=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),m.$highlightLineMarker&&!L)m.removeMarker(m.$highlightLineMarker.id),m.$highlightLineMarker=null;else if(!m.$highlightLineMarker&&L){var _=new h(L.row,L.column,L.row,1/0);_.id=m.addMarker(_,"ace_active-line","screenLine"),m.$highlightLineMarker=_}else L&&(m.$highlightLineMarker.start.row=L.row,m.$highlightLineMarker.end.row=L.row,m.$highlightLineMarker.start.column=L.column,m._signal("changeBackMarker"))},y.prototype.onSelectionChange=function(m){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var _=this.selection.getRange(),k=this.getSelectionStyle();L.$selectionMarker=L.addMarker(_,"ace_selection",k)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},y.prototype.$getSelectionHighLightRegexp=function(){var m=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var _=L.start.column,k=L.end.column,I=m.getLine(L.start.row),R=I.substring(_,k);if(!(R.length>5e3||!/[\w\d]/.test(R))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:R}),O=I.substring(_-1,k+1);if(D.test(O))return D}}},y.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},y.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},y.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},y.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},y.prototype.onChangeMode=function(m){this.renderer.updateText(),this._emit("changeMode",m)},y.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},y.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},y.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},y.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},y.prototype.getCopyText=function(){var m=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),_=!1;if(!m&&this.$copyWithEmptySelection){_=!0;for(var k=this.selection.getAllRanges(),I=0;IH.search(/\S|$/)){var O=H.substr(R.column).search(/\S|$/);_.doc.removeInLine(R.row,R.column,R.column+O)}}this.clearSelection();var N=R.column,P=_.getState(R.row),H=_.getLine(R.row),F=k.checkOutdent(P,H,m);if(_.insert(R,m),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new h(R.row,N+I.selection[0],R.row,N+I.selection[1])):this.selection.setSelectionRange(new h(R.row+I.selection[0],I.selection[1],R.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(_.getDocument().isNewLine(m)){var U=k.getNextLineIndent(P,H.slice(0,R.column),_.getTabString());_.insert({row:R.row+1,column:0},U)}F&&k.autoOutdent(P,_,R.row)}},y.prototype.autoIndent=function(){var m=this.session,L=m.getMode(),_,k;if(this.selection.isEmpty())_=0,k=m.doc.getLength()-1;else{var R=this.getSelectionRange();_=R.start.row,k=R.end.row}for(var I="",D="",O="",N,P,H,F=m.getTabString(),U=_;U<=k;U++)U>0&&(I=m.getState(U-1),D=m.getLine(U-1),O=L.getNextLineIndent(I,D,F)),N=m.getLine(U),P=L.$getIndent(N),O!==P&&(P.length>0&&(H=new h(U,0,U,P.length),m.remove(H)),O.length>0&&m.insert({row:U,column:0},O)),L.autoOutdent(I,m,U)},y.prototype.onTextInput=function(m,L){if(!L)return this.keyBinding.onTextInput(m);this.startOperation({command:{name:"insertstring"}});var _=this.applyComposition.bind(this,m,L);this.selection.rangeCount?this.forEachSelection(_):_(),this.endOperation()},y.prototype.applyComposition=function(m,L){if(L.extendLeft||L.extendRight){var _=this.selection.getRange();_.start.column-=L.extendLeft,_.end.column+=L.extendRight,_.start.column<0&&(_.start.row--,_.start.column+=this.session.getLine(_.start.row).length+1),this.selection.setRange(_),!m&&!_.isEmpty()&&this.remove()}if((m||!this.selection.isEmpty())&&this.insert(m,!0),L.restoreStart||L.restoreEnd){var _=this.selection.getRange();_.start.column-=L.restoreStart,_.end.column-=L.restoreEnd,this.selection.setRange(_)}},y.prototype.onCommandKey=function(m,L,_){return this.keyBinding.onCommandKey(m,L,_)},y.prototype.setOverwrite=function(m){this.session.setOverwrite(m)},y.prototype.getOverwrite=function(){return this.session.getOverwrite()},y.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},y.prototype.setScrollSpeed=function(m){this.setOption("scrollSpeed",m)},y.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},y.prototype.setDragDelay=function(m){this.setOption("dragDelay",m)},y.prototype.getDragDelay=function(){return this.getOption("dragDelay")},y.prototype.setSelectionStyle=function(m){this.setOption("selectionStyle",m)},y.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},y.prototype.setHighlightActiveLine=function(m){this.setOption("highlightActiveLine",m)},y.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},y.prototype.setHighlightGutterLine=function(m){this.setOption("highlightGutterLine",m)},y.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},y.prototype.setHighlightSelectedWord=function(m){this.setOption("highlightSelectedWord",m)},y.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},y.prototype.setAnimatedScroll=function(m){this.renderer.setAnimatedScroll(m)},y.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},y.prototype.setShowInvisibles=function(m){this.renderer.setShowInvisibles(m)},y.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},y.prototype.setDisplayIndentGuides=function(m){this.renderer.setDisplayIndentGuides(m)},y.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},y.prototype.setHighlightIndentGuides=function(m){this.renderer.setHighlightIndentGuides(m)},y.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},y.prototype.setShowPrintMargin=function(m){this.renderer.setShowPrintMargin(m)},y.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},y.prototype.setPrintMarginColumn=function(m){this.renderer.setPrintMarginColumn(m)},y.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},y.prototype.setReadOnly=function(m){this.setOption("readOnly",m)},y.prototype.getReadOnly=function(){return this.getOption("readOnly")},y.prototype.setBehavioursEnabled=function(m){this.setOption("behavioursEnabled",m)},y.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},y.prototype.setWrapBehavioursEnabled=function(m){this.setOption("wrapBehavioursEnabled",m)},y.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},y.prototype.setShowFoldWidgets=function(m){this.setOption("showFoldWidgets",m)},y.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},y.prototype.setFadeFoldWidgets=function(m){this.setOption("fadeFoldWidgets",m)},y.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},y.prototype.remove=function(m){this.selection.isEmpty()&&(m=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var _=this.session,k=_.getState(L.start.row),R=_.getMode().transformAction(k,"deletion",this,_,L);if(L.end.column===0){var I=_.getTextRange(L);if(I[I.length-1]==` -`){var D=_.getLine(L.end.row);/^\s+$/.test(D)&&(L.end.column=D.length)}}R&&(L=R)}this.session.remove(L),this.clearSelection()},y.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var m=this.getSelectionRange();m.start.column==m.end.column&&m.start.row==m.end.row&&(m.end.column=0,m.end.row++),this.session.remove(m),this.clearSelection()},y.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var m=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(m)},y.prototype.setGhostText=function(m,L){this.session.widgetManager||(this.session.widgetManager=new A(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(m,L)},y.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},y.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var m=this.getCursorPosition(),L=m.column;if(L!==0){var _=this.session.getLine(m.row),k,R;L<_.length?(k=_.charAt(L)+_.charAt(L-1),R=new h(m.row,L-1,m.row,L+1)):(k=_.charAt(L-1)+_.charAt(L-2),R=new h(m.row,L-2,m.row,L)),this.session.replace(R,k),this.session.selection.moveToPosition(R.end)}}},y.prototype.toLowerCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),_=this.session.getTextRange(L);this.session.replace(L,_.toLowerCase()),this.selection.setSelectionRange(m)},y.prototype.toUpperCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),_=this.session.getTextRange(L);this.session.replace(L,_.toUpperCase()),this.selection.setSelectionRange(m)},y.prototype.indent=function(){var m=this.session,L=this.getSelectionRange();if(L.start.rowO.toLowerCase()?1:0});for(var R=new h(0,0,0,0),k=m.first;k<=m.last;k++){var I=L.getLine(k);R.start.row=k,R.end.row=k,R.end.column=I.length,L.replace(R,_[k-m.first])}},y.prototype.toggleCommentLines=function(){var m=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(m,this.session,L.first,L.last)},y.prototype.toggleBlockComment=function(){var m=this.getCursorPosition(),L=this.session.getState(m.row),_=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,_,m)},y.prototype.getNumberAt=function(m,L){var _=/[\-]?[0-9]+(?:\.[0-9]+)?/g;_.lastIndex=0;for(var k=this.session.getLine(m);_.lastIndex=L){var I={value:R[0],start:R.index,end:R.index+R[0].length};return I}}return null},y.prototype.modifyNumber=function(m){var L=this.selection.getCursor().row,_=this.selection.getCursor().column,k=new h(L,_-1,L,_),R=this.session.getTextRange(k);if(!isNaN(parseFloat(R))&&isFinite(R)){var I=this.getNumberAt(L,_);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,O=I.start+I.value.length-D,N=parseFloat(I.value);N*=Math.pow(10,O),D!==I.end&&_=D&&I<=O&&(_=ee,N.selection.clearSelection(),N.moveCursorTo(m,D+k),N.selection.selectTo(m,O+k)),D=O});for(var P=this.$toggleWordPairs,H,F=0;F=O&&D<=N&&U.match(/((?:https?|ftp):\/\/[\S]+)/)){P=U.replace(/[\s:.,'";}\]]+$/,"");break}O=N}}catch(j){_={error:j}}finally{try{F&&!F.done&&(k=H.return)&&k.call(H)}finally{if(_)throw _.error}}return P},y.prototype.openLink=function(){var m=this.selection.getCursor(),L=this.findLinkAt(m.row,m.column);return L&&window.open(L,"_blank"),L!=null},y.prototype.removeLines=function(){var m=this.$getSelectedRows();this.session.removeFullLines(m.first,m.last),this.clearSelection()},y.prototype.duplicateSelection=function(){var m=this.selection,L=this.session,_=m.getRange(),k=m.isBackwards();if(_.isEmpty()){var R=_.start.row;L.duplicateLines(R,R)}else{var I=k?_.start:_.end,D=L.insert(I,L.getTextRange(_));_.start=I,_.end=D,m.setSelectionRange(_,k)}},y.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},y.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},y.prototype.moveText=function(m,L,_){return this.session.moveText(m,L,_)},y.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},y.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},y.prototype.$moveLines=function(m,L){var _,k,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var I=R.toOrientedRange();_=this.$getSelectedRows(I),k=this.session.$moveLines(_.first,_.last,L?0:m),L&&m==-1&&(k=0),I.moveBy(k,0),R.fromOrientedRange(I)}else{var D=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var O=0,N=0,P=D.length,H=0;Hj+1)break;j=J.last}for(H--,O=this.session.$moveLines(U,j,L?0:m),L&&m==-1&&(F=H+1);F<=H;)D[F].moveBy(O,0),F++;L||(O=0),N+=O}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},y.prototype.$getSelectedRows=function(m){return m=(m||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(m.start.row),last:this.session.getRowFoldEnd(m.end.row)}},y.prototype.onCompositionStart=function(m){this.renderer.showComposition(m)},y.prototype.onCompositionUpdate=function(m){this.renderer.setCompositionText(m)},y.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},y.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},y.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},y.prototype.isRowVisible=function(m){return m>=this.getFirstVisibleRow()&&m<=this.getLastVisibleRow()},y.prototype.isRowFullyVisible=function(m){return m>=this.renderer.getFirstFullyVisibleRow()&&m<=this.renderer.getLastFullyVisibleRow()},y.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},y.prototype.$moveByPage=function(m,L){var _=this.renderer,k=this.renderer.layerConfig,R=m*Math.floor(k.height/k.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):L===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var I=_.scrollTop;_.scrollBy(0,R*k.lineHeight),L!=null&&_.scrollCursorIntoView(null,.5),_.animateScrolling(I)},y.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},y.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},y.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},y.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},y.prototype.scrollPageDown=function(){this.$moveByPage(1)},y.prototype.scrollPageUp=function(){this.$moveByPage(-1)},y.prototype.scrollToRow=function(m){this.renderer.scrollToRow(m)},y.prototype.scrollToLine=function(m,L,_,k){this.renderer.scrollToLine(m,L,_,k)},y.prototype.centerSelection=function(){var m=this.getSelectionRange(),L={row:Math.floor(m.start.row+(m.end.row-m.start.row)/2),column:Math.floor(m.start.column+(m.end.column-m.start.column)/2)};this.renderer.alignCursor(L,.5)},y.prototype.getCursorPosition=function(){return this.selection.getCursor()},y.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},y.prototype.getSelectionRange=function(){return this.selection.getRange()},y.prototype.selectAll=function(){this.selection.selectAll()},y.prototype.clearSelection=function(){this.selection.clearSelection()},y.prototype.moveCursorTo=function(m,L){this.selection.moveCursorTo(m,L)},y.prototype.moveCursorToPosition=function(m){this.selection.moveCursorToPosition(m)},y.prototype.jumpToMatching=function(m,L){var _=this.getCursorPosition(),k=new x(this.session,_.row,_.column),R=k.getCurrentToken(),I=0;R&&R.type.indexOf("tag-name")!==-1&&(R=k.stepBackward());var D=R||k.stepForward();if(D){var O,N=!1,P={},H=_.column-D.start,F,U={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;H1?P[D.value]++:R.value==="=0;--I)this.$tryReplace(_[I],m)&&k++;return this.selection.setSelectionRange(R),k},y.prototype.$tryReplace=function(m,L){var _=this.session.getTextRange(m);return L=this.$search.replace(_,L),L!==null?(m.end=this.session.replace(m,L),m):null},y.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},y.prototype.find=function(m,L,_){L||(L={}),typeof m=="string"||m instanceof RegExp?L.needle=m:typeof m=="object"&&p.mixin(L,m);var k=this.selection.getRange();L.needle==null&&(m=this.session.getTextRange(k)||this.$search.$options.needle,m||(k=this.session.getWordRange(k.start.row,k.start.column),m=this.session.getTextRange(k)),this.$search.set({needle:m})),this.$search.set(L),L.start||this.$search.set({start:k});var R=this.$search.find(this.session);if(L.preventScroll)return R;if(R)return this.revealRange(R,_),R;L.backwards?k.start=k.end:k.end=k.start,this.selection.setRange(k)},y.prototype.findNext=function(m,L){this.find({skipCurrent:!0,backwards:!1},m,L)},y.prototype.findPrevious=function(m,L){this.find(m,{skipCurrent:!0,backwards:!0},L)},y.prototype.revealRange=function(m,L){this.session.unfold(m),this.selection.setSelectionRange(m);var _=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(m.start,m.end,.5),L!==!1&&this.renderer.animateScrolling(_)},y.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(m){m.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},y.prototype.setAutoScrollEditorIntoView=function(m){if(m){var L,_=this,k=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var I=this.on("changeSelection",function(){k=!0}),D=this.renderer.on("beforeRender",function(){k&&(L=_.renderer.container.getBoundingClientRect())}),O=this.renderer.on("afterRender",function(){if(k&&L&&(_.isFocused()||_.searchBox&&_.searchBox.isFocused())){var N=_.renderer,P=N.$cursorLayer.$pixelPos,H=N.layerConfig,F=P.top-H.offset;P.top>=0&&F+L.top<0?k=!0:P.topwindow.innerHeight?k=!1:k=null,k!=null&&(R.style.top=F+"px",R.style.left=P.left+"px",R.style.height=H.lineHeight+"px",R.scrollIntoView(k)),k=L=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",O),this.renderer.off("beforeRender",D))}}},y.prototype.$resetCursorStyle=function(){var m=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(m)),L.isBlinking=!this.$readOnly&&m!="wide",g.setCssClass(L.element,"ace_slim-cursors",/slim/.test(m)))},y.prototype.prompt=function(m,L,_){var k=this;w.loadModule("ace/ext/prompt",function(R){R.prompt(k,m,L,_)})},y}();S.$uid=0,S.prototype.curOp=null,S.prototype.prevOp={},S.prototype.$mergeableCommands=["backspace","del","insertstring"],S.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],p.implement(S.prototype,f),w.defineOptions(S.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){this.textInput.setReadOnly(y),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?T.attach(this):T.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?T.attach(this):T.detach(this)}},placeholder:{set:function(y){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var m=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(m&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),g.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!m&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),g.addCssClass(this.container,"ace_hasPlaceholder");var L=g.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!m&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(y){var m={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(k){k.blur(),k.renderer.scroller.focus()},readOnly:!0},L=function(k){if(k.target==this.renderer.scroller&&k.keyCode===M.enter){k.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},_;y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(m),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor")),this.renderer.$gutter.setAttribute("aria-label",E("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),_||(_=new v(this)),_.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(m),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),_&&_.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var T={getText:function(y,m){return(Math.abs(y.selection.lead.row-m)||m+1+(m<9?"\xB7":""))+""},getWidth:function(y,m,L){return Math.max(m.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(y,m){m.renderer.$loop.schedule(m.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};e.Editor=S});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=function(){function g(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(a){d.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(a,u,o){var r=u.firstRowScreen*u.lineHeight,n=Math.floor(r/this.canvasHeight),i=o.documentToScreenRow(a,0)*u.lineHeight;return i-n*this.canvasHeight},g.prototype.computeLineHeight=function(a,u,o){return u.lineHeight*o.getRowLineCount(a)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(a){return this.cells[a]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=d.createFragment(this.element),o=0;oC&&(A=b.end.row+1,b=l.getNextFoldLine(A,b),C=b?b.start.row:1/0),A>f){for(;this.$lines.getLength()>x+1;)this.$lines.pop();break}w=this.$lines.get(++x),w?w.row=A:(w=this.$lines.createCell(A,s,this.session,n),this.$lines.push(w)),this.$renderCell(w,s,b,A),A++}this._signal("afterRender"),this.$updateGutterWidth(s)},i.prototype.$updateGutterWidth=function(s){var l=this.session,h=l.gutterRenderer||this.$renderer,f=l.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(b=l.getLength()+f-1);var C=h?h.getWidth(l,b,s):b.toString().length*s.characterWidth,w=this.$padding||this.$computePadding();C+=w.left+w.right,C!==this.gutterWidth&&!isNaN(C)&&(this.gutterWidth=C,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",C))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var h=0;h=this.$cursorRow){if(f.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(h>0&&b&&b.start.row==l[h-1].row)f=l[h-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},i.prototype.scrollLines=function(s){var l=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(l,s))return this.update(s);this.$lines.moveContainer(s);var h=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=h,!l||f0;b--)this.$lines.shift();if(f>h)for(var b=this.session.getFoldedRowCount(h+1,f);b>0;b--)this.$lines.pop();s.firstRowf&&this.$lines.push(this.$renderLines(s,f+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},i.prototype.$renderLines=function(s,l,h){for(var f=[],b=l,C=this.session.getNextFoldLine(b),w=C?C.start.row:1/0;b>w&&(b=C.end.row+1,C=this.session.getNextFoldLine(b,C),w=C?C.start.row:1/0),!(b>h);){var x=this.$lines.createCell(b,s,this.session,n);this.$renderCell(x,s,C,b),f.push(x),b++}return f},i.prototype.$renderCell=function(s,l,h,f){var b=s.element,C=this.session,w=b.childNodes[0],x=b.childNodes[1],A=b.childNodes[2],v=A.firstChild,E=C.$firstLineNumber,$=C.$breakpoints,M=C.$decorations,S=C.gutterRenderer||this.$renderer,T=this.$showFoldWidgets&&C.foldWidgets,y=h?h.start.row:Number.MAX_VALUE,m=l.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",_=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(S?S.getText(C,f):f+E).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||h&&f=y&&this.$cursorRow<=h.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),$[f]&&(L+=$[f]),M[f]&&(L+=M[f]),this.$annotations[f]&&f!==y&&(L+=this.$annotations[f].className),T){var R=T[f];R==null&&(R=T[f]=C.getFoldWidget(f))}if(R){var I="ace_fold-widget ace_"+R,D=R=="start"&&f==y&&fh.right-l.right)return"foldWidgets"},i}();r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,p.implement(r.prototype,a);function n(i){var s=document.createTextNode("");i.appendChild(s);var l=d.createElement("span");i.appendChild(l);var h=d.createElement("span");i.appendChild(h);var f=d.createElement("span");return h.appendChild(f),i}e.Gutter=r});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,e,c){"use strict";var d=t("../range").Range,p=t("../lib/dom"),g=function(){function u(o){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return u.prototype.setPadding=function(o){this.$padding=o},u.prototype.setSession=function(o){this.session=o},u.prototype.setMarkers=function(o){this.markers=o},u.prototype.elt=function(o,r){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=r,n.className=o},u.prototype.update=function(o){if(o){this.config=o,this.i=0;var r;for(var n in this.markers){var i=this.markers[n];if(!i.range){i.update(r,this,this.session,o);continue}var s=i.range.clipRows(o.firstRow,o.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),i.renderer){var l=this.$getTop(s.start.row,o),h=this.$padding+s.start.column*o.characterWidth;i.renderer(r,s,h,l,o)}else i.type=="fullLine"?this.drawFullLineMarker(r,s,i.clazz,o):i.type=="screenLine"?this.drawScreenLineMarker(r,s,i.clazz,o):s.isMultiLine()?i.type=="text"?this.drawTextMarker(r,s,i.clazz,o):this.drawMultiLineMarker(r,s,i.clazz,o):this.drawSingleLineMarker(r,s,i.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.ix,b==f),i,b==f?0:1,s)},u.prototype.drawMultiLineMarker=function(o,r,n,i,s){var l=this.$padding,h=i.lineHeight,f=this.$getTop(r.start.row,i),b=l+r.start.column*i.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(r.start.row)){var C=r.clone();C.end.row=C.start.row,C.end.column=this.session.getLine(C.start.row).length,this.drawBidiSingleLineMarker(o,C,n+" ace_br1 ace_start",i,null,s)}else this.elt(n+" ace_br1 ace_start","height:"+h+"px;right:0;top:"+f+"px;left:"+b+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(r.end.row)){var C=r.clone();C.start.row=C.end.row,C.start.column=0,this.drawBidiSingleLineMarker(o,C,n+" ace_br12",i,null,s)}else{f=this.$getTop(r.end.row,i);var w=r.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+h+"px;width:"+w+"px;top:"+f+"px;left:"+l+"px;"+(s||""))}if(h=(r.end.row-r.start.row-1)*i.lineHeight,!(h<=0)){f=this.$getTop(r.start.row+1,i);var x=(r.start.column?1:0)|(r.end.column?0:8);this.elt(n+(x?" ace_br"+x:""),"height:"+h+"px;right:0;top:"+f+"px;left:"+l+"px;"+(s||""))}},u.prototype.drawSingleLineMarker=function(o,r,n,i,s,l){if(this.session.$bidiHandler.isBidiRow(r.start.row))return this.drawBidiSingleLineMarker(o,r,n,i,s,l);var h=i.lineHeight,f=(r.end.column+(s||0)-r.start.column)*i.characterWidth,b=this.$getTop(r.start.row,i),C=this.$padding+r.start.column*i.characterWidth;this.elt(n,"height:"+h+"px;width:"+f+"px;top:"+b+"px;left:"+C+"px;"+(l||""))},u.prototype.drawBidiSingleLineMarker=function(o,r,n,i,s,l){var h=i.lineHeight,f=this.$getTop(r.start.row,i),b=this.$padding,C=this.session.$bidiHandler.getSelections(r.start.column,r.end.column);C.forEach(function(w){this.elt(n,"height:"+h+"px;width:"+(w.width+(s||0))+"px;top:"+f+"px;left:"+(b+w.left)+"px;"+(l||""))},this)},u.prototype.drawFullLineMarker=function(o,r,n,i,s){var l=this.$getTop(r.start.row,i),h=i.lineHeight;r.start.row!=r.end.row&&(h+=this.$getTop(r.end.row,i)-l),this.elt(n,"height:"+h+"px;top:"+l+"px;left:0;right:0;"+(s||""))},u.prototype.drawScreenLineMarker=function(o,r,n,i,s){var l=this.$getTop(r.start.row,i),h=i.lineHeight;this.elt(n,"height:"+h+"px;top:"+l+"px;left:0;right:0;"+(s||""))},u}();g.prototype.$padding=0;function a(u,o,r,n){return(u?1:0)|(o?2:0)|(r?4:0)|(n?8:0)}e.Marker=g});ace.define("ace/layer/text_util",["require","exports","module"],function(t,e,c){var d=new Set(["text","rparen","lparen"]);e.isTextToken=function(p){return d.has(p)}});ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,e,c){"use strict";var d=t("../lib/oop"),p=t("../lib/dom"),g=t("../lib/lang"),a=t("./lines").Lines,u=t("../lib/event_emitter").EventEmitter,o=t("../config").nls,r=t("./text_util").isTextToken,n=function(){function i(s){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return i.prototype.$updateEolChar=function(){var s=this.session.doc,l=s.getNewLineCharacter()==` +`){var H=_.getLine(I.row);if(I.column>H.search(/\S|$/)){var O=H.substr(I.column).search(/\S|$/);_.doc.removeInLine(I.row,I.column,I.column+O)}}this.clearSelection();var N=I.column,P=_.getState(I.row),H=_.getLine(I.row),F=k.checkOutdent(P,H,m);if(_.insert(I,m),R&&R.selection&&(R.selection.length==2?this.selection.setSelectionRange(new h(I.row,N+R.selection[0],I.row,N+R.selection[1])):this.selection.setSelectionRange(new h(I.row+R.selection[0],R.selection[1],I.row+R.selection[2],R.selection[3]))),this.$enableAutoIndent){if(_.getDocument().isNewLine(m)){var U=k.getNextLineIndent(P,H.slice(0,I.column),_.getTabString());_.insert({row:I.row+1,column:0},U)}F&&k.autoOutdent(P,_,I.row)}},y.prototype.autoIndent=function(){var m=this.session,L=m.getMode(),_,k;if(this.selection.isEmpty())_=0,k=m.doc.getLength()-1;else{var I=this.getSelectionRange();_=I.start.row,k=I.end.row}for(var R="",D="",O="",N,P,H,F=m.getTabString(),U=_;U<=k;U++)U>0&&(R=m.getState(U-1),D=m.getLine(U-1),O=L.getNextLineIndent(R,D,F)),N=m.getLine(U),P=L.$getIndent(N),O!==P&&(P.length>0&&(H=new h(U,0,U,P.length),m.remove(H)),O.length>0&&m.insert({row:U,column:0},O)),L.autoOutdent(R,m,U)},y.prototype.onTextInput=function(m,L){if(!L)return this.keyBinding.onTextInput(m);this.startOperation({command:{name:"insertstring"}});var _=this.applyComposition.bind(this,m,L);this.selection.rangeCount?this.forEachSelection(_):_(),this.endOperation()},y.prototype.applyComposition=function(m,L){if(L.extendLeft||L.extendRight){var _=this.selection.getRange();_.start.column-=L.extendLeft,_.end.column+=L.extendRight,_.start.column<0&&(_.start.row--,_.start.column+=this.session.getLine(_.start.row).length+1),this.selection.setRange(_),!m&&!_.isEmpty()&&this.remove()}if((m||!this.selection.isEmpty())&&this.insert(m,!0),L.restoreStart||L.restoreEnd){var _=this.selection.getRange();_.start.column-=L.restoreStart,_.end.column-=L.restoreEnd,this.selection.setRange(_)}},y.prototype.onCommandKey=function(m,L,_){return this.keyBinding.onCommandKey(m,L,_)},y.prototype.setOverwrite=function(m){this.session.setOverwrite(m)},y.prototype.getOverwrite=function(){return this.session.getOverwrite()},y.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},y.prototype.setScrollSpeed=function(m){this.setOption("scrollSpeed",m)},y.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},y.prototype.setDragDelay=function(m){this.setOption("dragDelay",m)},y.prototype.getDragDelay=function(){return this.getOption("dragDelay")},y.prototype.setSelectionStyle=function(m){this.setOption("selectionStyle",m)},y.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},y.prototype.setHighlightActiveLine=function(m){this.setOption("highlightActiveLine",m)},y.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},y.prototype.setHighlightGutterLine=function(m){this.setOption("highlightGutterLine",m)},y.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},y.prototype.setHighlightSelectedWord=function(m){this.setOption("highlightSelectedWord",m)},y.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},y.prototype.setAnimatedScroll=function(m){this.renderer.setAnimatedScroll(m)},y.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},y.prototype.setShowInvisibles=function(m){this.renderer.setShowInvisibles(m)},y.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},y.prototype.setDisplayIndentGuides=function(m){this.renderer.setDisplayIndentGuides(m)},y.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},y.prototype.setHighlightIndentGuides=function(m){this.renderer.setHighlightIndentGuides(m)},y.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},y.prototype.setShowPrintMargin=function(m){this.renderer.setShowPrintMargin(m)},y.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},y.prototype.setPrintMarginColumn=function(m){this.renderer.setPrintMarginColumn(m)},y.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},y.prototype.setReadOnly=function(m){this.setOption("readOnly",m)},y.prototype.getReadOnly=function(){return this.getOption("readOnly")},y.prototype.setBehavioursEnabled=function(m){this.setOption("behavioursEnabled",m)},y.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},y.prototype.setWrapBehavioursEnabled=function(m){this.setOption("wrapBehavioursEnabled",m)},y.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},y.prototype.setShowFoldWidgets=function(m){this.setOption("showFoldWidgets",m)},y.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},y.prototype.setFadeFoldWidgets=function(m){this.setOption("fadeFoldWidgets",m)},y.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},y.prototype.remove=function(m){this.selection.isEmpty()&&(m=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var _=this.session,k=_.getState(L.start.row),I=_.getMode().transformAction(k,"deletion",this,_,L);if(L.end.column===0){var R=_.getTextRange(L);if(R[R.length-1]==` +`){var D=_.getLine(L.end.row);/^\s+$/.test(D)&&(L.end.column=D.length)}}I&&(L=I)}this.session.remove(L),this.clearSelection()},y.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},y.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var m=this.getSelectionRange();m.start.column==m.end.column&&m.start.row==m.end.row&&(m.end.column=0,m.end.row++),this.session.remove(m),this.clearSelection()},y.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var m=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(m)},y.prototype.setGhostText=function(m,L){this.session.widgetManager||(this.session.widgetManager=new A(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(m,L)},y.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},y.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var m=this.getCursorPosition(),L=m.column;if(L!==0){var _=this.session.getLine(m.row),k,I;L<_.length?(k=_.charAt(L)+_.charAt(L-1),I=new h(m.row,L-1,m.row,L+1)):(k=_.charAt(L-1)+_.charAt(L-2),I=new h(m.row,L-2,m.row,L)),this.session.replace(I,k),this.session.selection.moveToPosition(I.end)}}},y.prototype.toLowerCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),_=this.session.getTextRange(L);this.session.replace(L,_.toLowerCase()),this.selection.setSelectionRange(m)},y.prototype.toUpperCase=function(){var m=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),_=this.session.getTextRange(L);this.session.replace(L,_.toUpperCase()),this.selection.setSelectionRange(m)},y.prototype.indent=function(){var m=this.session,L=this.getSelectionRange();if(L.start.rowO.toLowerCase()?1:0});for(var I=new h(0,0,0,0),k=m.first;k<=m.last;k++){var R=L.getLine(k);I.start.row=k,I.end.row=k,I.end.column=R.length,L.replace(I,_[k-m.first])}},y.prototype.toggleCommentLines=function(){var m=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(m,this.session,L.first,L.last)},y.prototype.toggleBlockComment=function(){var m=this.getCursorPosition(),L=this.session.getState(m.row),_=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,_,m)},y.prototype.getNumberAt=function(m,L){var _=/[\-]?[0-9]+(?:\.[0-9]+)?/g;_.lastIndex=0;for(var k=this.session.getLine(m);_.lastIndex=L){var R={value:I[0],start:I.index,end:I.index+I[0].length};return R}}return null},y.prototype.modifyNumber=function(m){var L=this.selection.getCursor().row,_=this.selection.getCursor().column,k=new h(L,_-1,L,_),I=this.session.getTextRange(k);if(!isNaN(parseFloat(I))&&isFinite(I)){var R=this.getNumberAt(L,_);if(R){var D=R.value.indexOf(".")>=0?R.start+R.value.indexOf(".")+1:R.end,O=R.start+R.value.length-D,N=parseFloat(R.value);N*=Math.pow(10,O),D!==R.end&&_=D&&R<=O&&(_=ee,N.selection.clearSelection(),N.moveCursorTo(m,D+k),N.selection.selectTo(m,O+k)),D=O});for(var P=this.$toggleWordPairs,H,F=0;F=O&&D<=N&&U.match(/((?:https?|ftp):\/\/[\S]+)/)){P=U.replace(/[\s:.,'";}\]]+$/,"");break}O=N}}catch(j){_={error:j}}finally{try{F&&!F.done&&(k=H.return)&&k.call(H)}finally{if(_)throw _.error}}return P},y.prototype.openLink=function(){var m=this.selection.getCursor(),L=this.findLinkAt(m.row,m.column);return L&&window.open(L,"_blank"),L!=null},y.prototype.removeLines=function(){var m=this.$getSelectedRows();this.session.removeFullLines(m.first,m.last),this.clearSelection()},y.prototype.duplicateSelection=function(){var m=this.selection,L=this.session,_=m.getRange(),k=m.isBackwards();if(_.isEmpty()){var I=_.start.row;L.duplicateLines(I,I)}else{var R=k?_.start:_.end,D=L.insert(R,L.getTextRange(_));_.start=R,_.end=D,m.setSelectionRange(_,k)}},y.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},y.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},y.prototype.moveText=function(m,L,_){return this.session.moveText(m,L,_)},y.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},y.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},y.prototype.$moveLines=function(m,L){var _,k,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var R=I.toOrientedRange();_=this.$getSelectedRows(R),k=this.session.$moveLines(_.first,_.last,L?0:m),L&&m==-1&&(k=0),R.moveBy(k,0),I.fromOrientedRange(R)}else{var D=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var O=0,N=0,P=D.length,H=0;Hj+1)break;j=J.last}for(H--,O=this.session.$moveLines(U,j,L?0:m),L&&m==-1&&(F=H+1);F<=H;)D[F].moveBy(O,0),F++;L||(O=0),N+=O}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},y.prototype.$getSelectedRows=function(m){return m=(m||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(m.start.row),last:this.session.getRowFoldEnd(m.end.row)}},y.prototype.onCompositionStart=function(m){this.renderer.showComposition(m)},y.prototype.onCompositionUpdate=function(m){this.renderer.setCompositionText(m)},y.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},y.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},y.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},y.prototype.isRowVisible=function(m){return m>=this.getFirstVisibleRow()&&m<=this.getLastVisibleRow()},y.prototype.isRowFullyVisible=function(m){return m>=this.renderer.getFirstFullyVisibleRow()&&m<=this.renderer.getLastFullyVisibleRow()},y.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},y.prototype.$moveByPage=function(m,L){var _=this.renderer,k=this.renderer.layerConfig,I=m*Math.floor(k.height/k.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):L===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var R=_.scrollTop;_.scrollBy(0,I*k.lineHeight),L!=null&&_.scrollCursorIntoView(null,.5),_.animateScrolling(R)},y.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},y.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},y.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},y.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},y.prototype.scrollPageDown=function(){this.$moveByPage(1)},y.prototype.scrollPageUp=function(){this.$moveByPage(-1)},y.prototype.scrollToRow=function(m){this.renderer.scrollToRow(m)},y.prototype.scrollToLine=function(m,L,_,k){this.renderer.scrollToLine(m,L,_,k)},y.prototype.centerSelection=function(){var m=this.getSelectionRange(),L={row:Math.floor(m.start.row+(m.end.row-m.start.row)/2),column:Math.floor(m.start.column+(m.end.column-m.start.column)/2)};this.renderer.alignCursor(L,.5)},y.prototype.getCursorPosition=function(){return this.selection.getCursor()},y.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},y.prototype.getSelectionRange=function(){return this.selection.getRange()},y.prototype.selectAll=function(){this.selection.selectAll()},y.prototype.clearSelection=function(){this.selection.clearSelection()},y.prototype.moveCursorTo=function(m,L){this.selection.moveCursorTo(m,L)},y.prototype.moveCursorToPosition=function(m){this.selection.moveCursorToPosition(m)},y.prototype.jumpToMatching=function(m,L){var _=this.getCursorPosition(),k=new x(this.session,_.row,_.column),I=k.getCurrentToken(),R=0;I&&I.type.indexOf("tag-name")!==-1&&(I=k.stepBackward());var D=I||k.stepForward();if(D){var O,N=!1,P={},H=_.column-D.start,F,U={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;H1?P[D.value]++:I.value==="=0;--R)this.$tryReplace(_[R],m)&&k++;return this.selection.setSelectionRange(I),k},y.prototype.$tryReplace=function(m,L){var _=this.session.getTextRange(m);return L=this.$search.replace(_,L),L!==null?(m.end=this.session.replace(m,L),m):null},y.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},y.prototype.find=function(m,L,_){L||(L={}),typeof m=="string"||m instanceof RegExp?L.needle=m:typeof m=="object"&&p.mixin(L,m);var k=this.selection.getRange();L.needle==null&&(m=this.session.getTextRange(k)||this.$search.$options.needle,m||(k=this.session.getWordRange(k.start.row,k.start.column),m=this.session.getTextRange(k)),this.$search.set({needle:m})),this.$search.set(L),L.start||this.$search.set({start:k});var I=this.$search.find(this.session);if(L.preventScroll)return I;if(I)return this.revealRange(I,_),I;L.backwards?k.start=k.end:k.end=k.start,this.selection.setRange(k)},y.prototype.findNext=function(m,L){this.find({skipCurrent:!0,backwards:!1},m,L)},y.prototype.findPrevious=function(m,L){this.find(m,{skipCurrent:!0,backwards:!0},L)},y.prototype.revealRange=function(m,L){this.session.unfold(m),this.selection.setSelectionRange(m);var _=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(m.start,m.end,.5),L!==!1&&this.renderer.animateScrolling(_)},y.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},y.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(m){m.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},y.prototype.setAutoScrollEditorIntoView=function(m){if(m){var L,_=this,k=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var R=this.on("changeSelection",function(){k=!0}),D=this.renderer.on("beforeRender",function(){k&&(L=_.renderer.container.getBoundingClientRect())}),O=this.renderer.on("afterRender",function(){if(k&&L&&(_.isFocused()||_.searchBox&&_.searchBox.isFocused())){var N=_.renderer,P=N.$cursorLayer.$pixelPos,H=N.layerConfig,F=P.top-H.offset;P.top>=0&&F+L.top<0?k=!0:P.topwindow.innerHeight?k=!1:k=null,k!=null&&(I.style.top=F+"px",I.style.left=P.left+"px",I.style.height=H.lineHeight+"px",I.scrollIntoView(k)),k=L=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",R),this.renderer.off("afterRender",O),this.renderer.off("beforeRender",D))}}},y.prototype.$resetCursorStyle=function(){var m=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(m)),L.isBlinking=!this.$readOnly&&m!="wide",g.setCssClass(L.element,"ace_slim-cursors",/slim/.test(m)))},y.prototype.prompt=function(m,L,_){var k=this;w.loadModule("ace/ext/prompt",function(I){I.prompt(k,m,L,_)})},y}();S.$uid=0,S.prototype.curOp=null,S.prototype.prevOp={},S.prototype.$mergeableCommands=["backspace","del","insertstring"],S.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],p.implement(S.prototype,f),w.defineOptions(S.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){this.textInput.setReadOnly(y),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?T.attach(this):T.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?T.attach(this):T.detach(this)}},placeholder:{set:function(y){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var m=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(m&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),g.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!m&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),g.addCssClass(this.container,"ace_hasPlaceholder");var L=g.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!m&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(y){var m={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(k){k.blur(),k.renderer.scroller.focus()},readOnly:!0},L=function(k){if(k.target==this.renderer.scroller&&k.keyCode===M.enter){k.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},_;y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(m),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor")),this.renderer.$gutter.setAttribute("aria-label",E("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),_||(_=new v(this)),_.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(m),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),_&&_.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var T={getText:function(y,m){return(Math.abs(y.selection.lead.row-m)||m+1+(m<9?"\xB7":""))+""},getWidth:function(y,m,L){return Math.max(m.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(y,m){m.renderer.$loop.schedule(m.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};e.Editor=S});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=function(){function g(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(a){d.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(a,u,o){var r=u.firstRowScreen*u.lineHeight,n=Math.floor(r/this.canvasHeight),i=o.documentToScreenRow(a,0)*u.lineHeight;return i-n*this.canvasHeight},g.prototype.computeLineHeight=function(a,u,o){return u.lineHeight*o.getRowLineCount(a)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(a){return this.cells[a]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=d.createFragment(this.element),o=0;oC&&(A=b.end.row+1,b=l.getNextFoldLine(A,b),C=b?b.start.row:1/0),A>f){for(;this.$lines.getLength()>x+1;)this.$lines.pop();break}w=this.$lines.get(++x),w?w.row=A:(w=this.$lines.createCell(A,s,this.session,n),this.$lines.push(w)),this.$renderCell(w,s,b,A),A++}this._signal("afterRender"),this.$updateGutterWidth(s)},i.prototype.$updateGutterWidth=function(s){var l=this.session,h=l.gutterRenderer||this.$renderer,f=l.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(b=l.getLength()+f-1);var C=h?h.getWidth(l,b,s):b.toString().length*s.characterWidth,w=this.$padding||this.$computePadding();C+=w.left+w.right,C!==this.gutterWidth&&!isNaN(C)&&(this.gutterWidth=C,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",C))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var h=0;h=this.$cursorRow){if(f.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(h>0&&b&&b.start.row==l[h-1].row)f=l[h-1];else break}f.element.className="ace_gutter-active-line "+f.element.className,this.$cursorCell=f;break}}}}},i.prototype.scrollLines=function(s){var l=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(l,s))return this.update(s);this.$lines.moveContainer(s);var h=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),f=this.oldLastRow;if(this.oldLastRow=h,!l||f0;b--)this.$lines.shift();if(f>h)for(var b=this.session.getFoldedRowCount(h+1,f);b>0;b--)this.$lines.pop();s.firstRowf&&this.$lines.push(this.$renderLines(s,f+1,h)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},i.prototype.$renderLines=function(s,l,h){for(var f=[],b=l,C=this.session.getNextFoldLine(b),w=C?C.start.row:1/0;b>w&&(b=C.end.row+1,C=this.session.getNextFoldLine(b,C),w=C?C.start.row:1/0),!(b>h);){var x=this.$lines.createCell(b,s,this.session,n);this.$renderCell(x,s,C,b),f.push(x),b++}return f},i.prototype.$renderCell=function(s,l,h,f){var b=s.element,C=this.session,w=b.childNodes[0],x=b.childNodes[1],A=b.childNodes[2],v=A.firstChild,E=C.$firstLineNumber,$=C.$breakpoints,M=C.$decorations,S=C.gutterRenderer||this.$renderer,T=this.$showFoldWidgets&&C.foldWidgets,y=h?h.start.row:Number.MAX_VALUE,m=l.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",_=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(S?S.getText(C,f):f+E).toString();if(this.$highlightGutterLine&&(f==this.$cursorRow||h&&f=y&&this.$cursorRow<=h.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),$[f]&&(L+=$[f]),M[f]&&(L+=M[f]),this.$annotations[f]&&f!==y&&(L+=this.$annotations[f].className),T){var I=T[f];I==null&&(I=T[f]=C.getFoldWidget(f))}if(I){var R="ace_fold-widget ace_"+I,D=I=="start"&&f==y&&fh.right-l.right)return"foldWidgets"},i}();r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,p.implement(r.prototype,a);function n(i){var s=document.createTextNode("");i.appendChild(s);var l=d.createElement("span");i.appendChild(l);var h=d.createElement("span");i.appendChild(h);var f=d.createElement("span");return h.appendChild(f),i}e.Gutter=r});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,e,c){"use strict";var d=t("../range").Range,p=t("../lib/dom"),g=function(){function u(o){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return u.prototype.setPadding=function(o){this.$padding=o},u.prototype.setSession=function(o){this.session=o},u.prototype.setMarkers=function(o){this.markers=o},u.prototype.elt=function(o,r){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=r,n.className=o},u.prototype.update=function(o){if(o){this.config=o,this.i=0;var r;for(var n in this.markers){var i=this.markers[n];if(!i.range){i.update(r,this,this.session,o);continue}var s=i.range.clipRows(o.firstRow,o.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),i.renderer){var l=this.$getTop(s.start.row,o),h=this.$padding+s.start.column*o.characterWidth;i.renderer(r,s,h,l,o)}else i.type=="fullLine"?this.drawFullLineMarker(r,s,i.clazz,o):i.type=="screenLine"?this.drawScreenLineMarker(r,s,i.clazz,o):s.isMultiLine()?i.type=="text"?this.drawTextMarker(r,s,i.clazz,o):this.drawMultiLineMarker(r,s,i.clazz,o):this.drawSingleLineMarker(r,s,i.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.ix,b==f),i,b==f?0:1,s)},u.prototype.drawMultiLineMarker=function(o,r,n,i,s){var l=this.$padding,h=i.lineHeight,f=this.$getTop(r.start.row,i),b=l+r.start.column*i.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(r.start.row)){var C=r.clone();C.end.row=C.start.row,C.end.column=this.session.getLine(C.start.row).length,this.drawBidiSingleLineMarker(o,C,n+" ace_br1 ace_start",i,null,s)}else this.elt(n+" ace_br1 ace_start","height:"+h+"px;right:0;top:"+f+"px;left:"+b+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(r.end.row)){var C=r.clone();C.start.row=C.end.row,C.start.column=0,this.drawBidiSingleLineMarker(o,C,n+" ace_br12",i,null,s)}else{f=this.$getTop(r.end.row,i);var w=r.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+h+"px;width:"+w+"px;top:"+f+"px;left:"+l+"px;"+(s||""))}if(h=(r.end.row-r.start.row-1)*i.lineHeight,!(h<=0)){f=this.$getTop(r.start.row+1,i);var x=(r.start.column?1:0)|(r.end.column?0:8);this.elt(n+(x?" ace_br"+x:""),"height:"+h+"px;right:0;top:"+f+"px;left:"+l+"px;"+(s||""))}},u.prototype.drawSingleLineMarker=function(o,r,n,i,s,l){if(this.session.$bidiHandler.isBidiRow(r.start.row))return this.drawBidiSingleLineMarker(o,r,n,i,s,l);var h=i.lineHeight,f=(r.end.column+(s||0)-r.start.column)*i.characterWidth,b=this.$getTop(r.start.row,i),C=this.$padding+r.start.column*i.characterWidth;this.elt(n,"height:"+h+"px;width:"+f+"px;top:"+b+"px;left:"+C+"px;"+(l||""))},u.prototype.drawBidiSingleLineMarker=function(o,r,n,i,s,l){var h=i.lineHeight,f=this.$getTop(r.start.row,i),b=this.$padding,C=this.session.$bidiHandler.getSelections(r.start.column,r.end.column);C.forEach(function(w){this.elt(n,"height:"+h+"px;width:"+(w.width+(s||0))+"px;top:"+f+"px;left:"+(b+w.left)+"px;"+(l||""))},this)},u.prototype.drawFullLineMarker=function(o,r,n,i,s){var l=this.$getTop(r.start.row,i),h=i.lineHeight;r.start.row!=r.end.row&&(h+=this.$getTop(r.end.row,i)-l),this.elt(n,"height:"+h+"px;top:"+l+"px;left:0;right:0;"+(s||""))},u.prototype.drawScreenLineMarker=function(o,r,n,i,s){var l=this.$getTop(r.start.row,i),h=i.lineHeight;this.elt(n,"height:"+h+"px;top:"+l+"px;left:0;right:0;"+(s||""))},u}();g.prototype.$padding=0;function a(u,o,r,n){return(u?1:0)|(o?2:0)|(r?4:0)|(n?8:0)}e.Marker=g});ace.define("ace/layer/text_util",["require","exports","module"],function(t,e,c){var d=new Set(["text","rparen","lparen"]);e.isTextToken=function(p){return d.has(p)}});ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,e,c){"use strict";var d=t("../lib/oop"),p=t("../lib/dom"),g=t("../lib/lang"),a=t("./lines").Lines,u=t("../lib/event_emitter").EventEmitter,o=t("../config").nls,r=t("./text_util").isTextToken,n=function(){function i(s){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return i.prototype.$updateEolChar=function(){var s=this.session.doc,l=s.getNewLineCharacter()==` `&&s.getNewLineMode()!="windows",h=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=h)return this.EOL_CHAR=h,!0},i.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",function(l){this._signal("changeCharacterSize",l)}.bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},i.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},i.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var l=this.$tabStrings=[0],h=1;hE&&(A=v.end.row+1,v=this.session.getNextFoldLine(A,v),E=v?v.start.row:1/0),!(A>b);){var $=C[w++];if($){this.dom.removeChildren($),this.$renderLine($,A,A==E?v:!1),x&&($.style.top=this.$lines.computeLineTop(A,s,this.session)+"px");var M=s.lineHeight*this.session.getRowLength(A)+"px";$.style.height!=M&&(x=!0,$.style.height=M)}A++}if(x)for(;w0;b--)this.$lines.shift();if(l.lastRow>s.lastRow)for(var b=this.session.getFoldedRowCount(s.lastRow+1,l.lastRow);b>0;b--)this.$lines.pop();s.firstRowl.lastRow&&this.$lines.push(this.$renderLinesFragment(s,l.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(s,l,h){for(var f=[],b=l,C=this.session.getNextFoldLine(b),w=C?C.start.row:1/0;b>w&&(b=C.end.row+1,C=this.session.getNextFoldLine(b,C),w=C?C.start.row:1/0),!(b>h);){var x=this.$lines.createCell(b,s,this.session),A=x.element;this.dom.removeChildren(A),p.setStyle(A.style,"height",this.$lines.computeLineHeight(b,s,this.session)+"px"),p.setStyle(A.style,"top",this.$lines.computeLineTop(b,s,this.session)+"px"),this.$renderLine(A,b,b==w?C:!1),this.$useLineGroups()?A.className="ace_line_group":A.className="ace_line",f.push(x),b++}return f},i.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var l=s.firstRow,h=s.lastRow,f=this.$lines;f.getLength();)f.pop();f.push(this.$renderLinesFragment(s,l,h))},i.prototype.$renderToken=function(s,l,h,f){for(var b=this,C=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,w=this.dom.createFragment(this.element),x,A=0;x=C.exec(f);){var v=x[1],E=x[2],$=x[3],M=x[4],S=x[5];if(!(!b.showSpaces&&E)){var T=A!=x.index?f.slice(A,x.index):"";if(A=x.index+x[0].length,T&&w.appendChild(this.dom.createTextNode(T,this.element)),v){var y=b.session.getScreenTabSize(l+x.index);w.appendChild(b.$tabStrings[y].cloneNode(!0)),l+=y-1}else if(E)if(b.showSpaces){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_space",m.textContent=g.stringRepeat(b.SPACE_CHAR,E.length),w.appendChild(m)}else w.appendChild(this.dom.createTextNode(E,this.element));else if($){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_space ace_invalid",m.textContent=g.stringRepeat(b.SPACE_CHAR,$.length),w.appendChild(m)}else if(M){l+=1;var m=this.dom.createElement("span");m.style.width=b.config.characterWidth*2+"px",m.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",m.textContent=b.showSpaces?b.SPACE_CHAR:M,w.appendChild(m)}else if(S){l+=1;var m=this.dom.createElement("span");m.style.width=b.config.characterWidth*2+"px",m.className="ace_cjk",m.textContent=S,w.appendChild(m)}}}if(w.appendChild(this.dom.createTextNode(A?f.slice(A):f,this.element)),r(h.type))s.appendChild(w);else{var L="ace_"+h.type.replace(/\./g," ace_"),m=this.dom.createElement("span");h.type=="fold"&&(m.style.width=h.value.length*this.config.characterWidth+"px",m.setAttribute("title",o("Unfold code"))),m.className=L,m.appendChild(w),s.appendChild(m)}return l+f.length},i.prototype.renderIndentGuide=function(s,l,h){var f=l.search(this.$indentGuideRe);if(f<=0||f>=h)return l;if(l[0]==" "){f-=f%this.tabSize;for(var b=f/this.tabSize,C=0;CC[w].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[l.row]!==""&&l.column===s[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var w=l.row+1;w0){for(var b=0;b=this.$highlightIndentGuideMarker.start+1){if(f.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(f,l)}}else for(var h=s.length-1;h>=0;h--){var f=s[h];if(this.$highlightIndentGuideMarker.end&&f.row=C;)w=this.$renderToken(x,w,v,E.substring(0,C-f)),E=E.substring(C-f),f=C,x=this.$createLineElement(),s.appendChild(x),x.appendChild(this.dom.createTextNode(g.stringRepeat("\xA0",h.indent),this.element)),b++,w=0,C=h[b]||Number.MAX_VALUE;E.length!=0&&(f+=E.length,w=this.$renderToken(x,w,v,E))}}h[h.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(x,w,null,"",!0)},i.prototype.$renderSimpleLine=function(s,l){for(var h=0,f=0;fthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,h,b,C);h=this.$renderToken(s,h,b,C)}}},i.prototype.$renderOverflowMessage=function(s,l,h,f,b){h&&this.$renderToken(s,l,h,f.slice(0,this.MAX_LINE_LENGTH-l));var C=this.dom.createElement("span");C.className="ace_inline_button ace_keyword ace_toggle_wrap",C.textContent=b?"":"",s.appendChild(C)},i.prototype.$renderLine=function(s,l,h){if(!h&&h!=!1&&(h=this.session.getFoldLine(l)),h)var f=this.$getFoldLineTokens(l,h);else var f=this.session.getTokens(l);var b=s;if(f.length){var C=this.session.getRowSplitData(l);if(C&&C.length){this.$renderWrappedLine(s,f,C);var b=s.lastChild}else{var b=s;this.$useLineGroups()&&(b=this.$createLineElement(),s.appendChild(b)),this.$renderSimpleLine(b,f)}}else this.$useLineGroups()&&(b=this.$createLineElement(),s.appendChild(b));if(this.showEOL&&b){h&&(l=h.end.row);var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_eol",w.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(w)}},i.prototype.$getFoldLineTokens=function(s,l){var h=this.session,f=[];function b(w,x,A){for(var v=0,E=0;E+w[v].value.lengthA-x&&($=$.substring(0,A-x)),f.push({type:w[v].type,value:$}),E=x+$.length,v+=1}for(;EA?f.push({type:w[v].type,value:$.substring(0,A-E)}):f.push(w[v]),E+=$.length,v+=1}}var C=h.getTokens(s);return l.walk(function(w,x,A,v,E){w!=null?f.push({type:"fold",value:w}):(E&&(C=h.getTokens(x)),C.length&&b(C,v,A))},l.end.row,this.session.getLine(l.end.row).length),f},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();n.prototype.EOF_CHAR="\xB6",n.prototype.EOL_CHAR_LF="\xAC",n.prototype.EOL_CHAR_CRLF="\xA4",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="\u2014",n.prototype.SPACE_CHAR="\xB7",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,d.implement(n.prototype,u),e.Text=n});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=function(){function g(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return g.prototype.$updateOpacity=function(a){for(var u=this.cursors,o=u.length;o--;)d.setStyle(u[o].style,"opacity",a?"":"0")},g.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},g.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},g.prototype.setPadding=function(a){this.$padding=a},g.prototype.setSession=function(a){this.session=a},g.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},g.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},g.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,d.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},g.prototype.addCursor=function(){var a=d.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},g.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},g.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},g.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(a),r=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,a.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),n=(o.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:n}},g.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||i.top<0)&&o>1)){var s=this.cursors[r++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,i,a,u[o],this.session):this.isCursorInView(i,a)?(d.setStyle(l,"display","block"),d.translate(s,i.left,i.top),d.setStyle(l,"width",Math.round(a.characterWidth)+"px"),d.setStyle(l,"height",a.lineHeight+"px")):d.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=i,this.restartTimer()},g.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},g.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},g}();p.prototype.$padding=0,p.prototype.drawCursor=null,e.Cursor=p});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var s=function(l,h){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,b){f.__proto__=b}||function(f,b){for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(f[C]=b[C])},s(l,h)};return function(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");s(l,h);function f(){this.constructor=l}l.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),p=t("./lib/oop"),g=t("./lib/dom"),a=t("./lib/event"),u=t("./lib/event_emitter").EventEmitter,o=32768,r=function(){function s(l,h){this.element=g.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+h,this.inner=g.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return s.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},s}();p.implement(r.prototype,u);var n=function(s){d(l,s);function l(h,f){var b=s.call(this,h,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,f.$scrollbarWidth=b.width=g.scrollbarWidth(h.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var h=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-h)/(this.coeff-h)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(h){this.element.style.height=h+"px"},l.prototype.setScrollHeight=function(h){this.scrollHeight=h,h>o?(this.coeff=o/h,h=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=h+"px"},l.prototype.setScrollTop=function(h){this.scrollTop!=h&&(this.skipEvent=!0,this.scrollTop=h,this.element.scrollTop=h*this.coeff)},l}(r);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(s){d(l,s);function l(h,f){var b=s.call(this,h,"-h")||this;return b.scrollLeft=0,b.height=f.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(h){this.element.style.width=h+"px"},l.prototype.setInnerWidth=function(h){this.inner.style.width=h+"px"},l.prototype.setScrollWidth=function(h){this.inner.style.width=h+"px"},l.prototype.setScrollLeft=function(h){this.scrollLeft!=h&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=h)},l}(r);e.ScrollBar=n,e.ScrollBarV=n,e.ScrollBarH=i,e.VScrollBar=n,e.HScrollBar=i});ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=this&&this.__extends||function(){var i=function(s,l){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(h[b]=f[b])},i(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");i(s,l);function h(){this.constructor=s}s.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}(),p=t("./lib/oop"),g=t("./lib/dom"),a=t("./lib/event"),u=t("./lib/event_emitter").EventEmitter;g.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); @@ -244,7 +244,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var o=function(){function i(s,l){this.element=g.createElement("div"),this.element.className="ace_sb"+l,this.inner=g.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},i}();p.implement(o.prototype,u);var r=function(i){d(s,i);function s(l,h){var f=i.call(this,l,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=l,f.width=f.VScrollWidth,f.renderer=h,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return s.prototype.onMouseDown=function(l,h){if(l==="mousedown"&&!(a.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var f=this,b=h.clientY,C=function(M){b=M.clientY},w=function(){clearInterval(E)},x=h.clientY,A=this.thumbTop,v=function(){if(b!==void 0){var M=f.scrollTopFromThumbTop(A+b-x);M!==f.scrollTop&&f._emit("scroll",{data:M})}};a.capture(this.inner,C,w);var E=setInterval(v,20);return a.preventDefault(h)}var $=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),a.preventDefault(h)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(l){var h=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(l,h){this.pageHeight===l&&!h||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var n=function(i){d(s,i);function s(l,h){var f=i.call(this,l,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=h,f}return s.prototype.onMouseDown=function(l,h){if(l==="mousedown"&&!(a.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var f=this,b=h.clientX,C=function(M){b=M.clientX},w=function(){clearInterval(E)},x=h.clientX,A=this.thumbLeft,v=function(){if(b!==void 0){var M=f.scrollLeftFromThumbLeft(A+b-x);M!==f.scrollLeft&&f._emit("scroll",{data:M})}};a.capture(this.inner,C,w);var E=setInterval(v,20);return a.preventDefault(h)}var $=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),a.preventDefault(h)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(l){var h=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},s.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(l,h){this.pageWidth===l&&!h||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(o);n.prototype.setInnerWidth=n.prototype.setScrollWidth,e.ScrollBar=r,e.ScrollBarV=r,e.ScrollBarH=n,e.VScrollBar=r,e.HScrollBar=n});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,e,c){"use strict";var d=t("./lib/event"),p=function(){function g(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var o=this;this._flush=function(r){o.pending=!1;var n=o.changes;if(n&&(d.blockIdle(100),o.changes=0,o.onRender(n)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return g.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},g.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},g}();e.RenderLoop=p});ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,e,c){var d=t("../lib/oop"),p=t("../lib/dom"),g=t("../lib/lang"),a=t("../lib/event"),u=t("../lib/useragent"),o=t("../lib/event_emitter").EventEmitter,r=512,n=typeof ResizeObserver=="function",i=200,s=function(){function l(h){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=g.stringRepeat("X",r),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(h,f){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",u.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=f?"hidden":"visible"},l.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===h.width&&f.height===h.height,this._emit("changeCharacterSize",{data:h})}},l.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(f){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=a.onIdle(function f(){h.checkForSizeChanges(),a.onIdle(f,500)},500)},l.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(h){var f={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/r};return f.width===0||f.height===0?null:f},l.prototype.$measureCharWidth=function(h){this.$main.textContent=g.stringRepeat(h,r);var f=this.$main.getBoundingClientRect();return f.width/r},l.prototype.getCharacterWidth=function(h){var f=this.charSizes[h];return f===void 0&&(f=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),f},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(window.getComputedStyle(h).zoom||1)*this.$getZoom(h.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var h=function(f,b){return["div",{style:"position: absolute;top:"+f+"px;left:"+b+"px;"}]};this.els=p.buildDom([h(0,0),h(i,0),h(0,i),h(i,i)],this.el)},l.prototype.transformCoordinates=function(h,f){if(h){var b=this.$getZoom(this.el);h=A(1/b,h)}function C(D,O,N){var P=D[1]*O[0]-D[0]*O[1];return[(-O[1]*N[0]+O[0]*N[1])/P,(+D[1]*N[0]-D[0]*N[1])/P]}function w(D,O){return[D[0]-O[0],D[1]-O[1]]}function x(D,O){return[D[0]+O[0],D[1]+O[1]]}function A(D,O){return[D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function v(D){var O=D.getBoundingClientRect();return[O.left,O.top]}var E=v(this.els[0]),$=v(this.els[1]),M=v(this.els[2]),S=v(this.els[3]),T=C(w(S,$),w(S,M),w(x($,M),x(S,E))),y=A(1+T[0],w($,E)),m=A(1+T[1],w(M,E));if(f){var L=f,_=T[0]*L[0]/i+T[1]*L[1]/i+1,k=x(A(L[0],y),A(L[1],m));return x(A(1/_/i,k),E)}var R=w(h,E),I=C(w(y,A(T[0],R)),w(m,A(T[1],R)),R);return A(i,I)},l}();s.prototype.$characterSize={width:0,height:0},d.implement(s.prototype,o),e.FontMetrics=s});ace.define("ace/css/editor-css",["require","exports","module"],function(t,e,c){c.exports=` +}`,"ace_scrollbar.css",!1);var o=function(){function i(s,l){this.element=g.createElement("div"),this.element.className="ace_sb"+l,this.inner=g.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},i}();p.implement(o.prototype,u);var r=function(i){d(s,i);function s(l,h){var f=i.call(this,l,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,f.parent=l,f.width=f.VScrollWidth,f.renderer=h,f.inner.style.width=f.element.style.width=(f.width||15)+"px",f.$minWidth=0,f}return s.prototype.onMouseDown=function(l,h){if(l==="mousedown"&&!(a.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var f=this,b=h.clientY,C=function(M){b=M.clientY},w=function(){clearInterval(E)},x=h.clientY,A=this.thumbTop,v=function(){if(b!==void 0){var M=f.scrollTopFromThumbTop(A+b-x);M!==f.scrollTop&&f._emit("scroll",{data:M})}};a.capture(this.inner,C,w);var E=setInterval(v,20);return a.preventDefault(h)}var $=h.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),a.preventDefault(h)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(l){var h=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return h=h>>0,h<0?h=0:h>this.pageHeight-this.viewHeight&&(h=this.pageHeight-this.viewHeight),h},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(l,h){this.pageHeight===l&&!h||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(o);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var n=function(i){d(s,i);function s(l,h){var f=i.call(this,l,"-h")||this;return f.scrollLeft=0,f.scrollWidth=0,f.height=f.HScrollHeight,f.inner.style.height=f.element.style.height=(f.height||12)+"px",f.renderer=h,f}return s.prototype.onMouseDown=function(l,h){if(l==="mousedown"&&!(a.getButton(h)!==0||h.detail===2)){if(h.target===this.inner){var f=this,b=h.clientX,C=function(M){b=M.clientX},w=function(){clearInterval(E)},x=h.clientX,A=this.thumbLeft,v=function(){if(b!==void 0){var M=f.scrollLeftFromThumbLeft(A+b-x);M!==f.scrollLeft&&f._emit("scroll",{data:M})}};a.capture(this.inner,C,w);var E=setInterval(v,20);return a.preventDefault(h)}var $=h.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),a.preventDefault(h)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(l){var h=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return h=h>>0,h<0?h=0:h>this.pageWidth-this.viewWidth&&(h=this.pageWidth-this.viewWidth),h},s.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(l,h){this.pageWidth===l&&!h||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(o);n.prototype.setInnerWidth=n.prototype.setScrollWidth,e.ScrollBar=r,e.ScrollBarV=r,e.ScrollBarH=n,e.VScrollBar=r,e.HScrollBar=n});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,e,c){"use strict";var d=t("./lib/event"),p=function(){function g(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var o=this;this._flush=function(r){o.pending=!1;var n=o.changes;if(n&&(d.blockIdle(100),o.changes=0,o.onRender(n)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return g.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},g.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},g}();e.RenderLoop=p});ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,e,c){var d=t("../lib/oop"),p=t("../lib/dom"),g=t("../lib/lang"),a=t("../lib/event"),u=t("../lib/useragent"),o=t("../lib/event_emitter").EventEmitter,r=512,n=typeof ResizeObserver=="function",i=200,s=function(){function l(h){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),h.appendChild(this.el),this.$measureNode.textContent=g.stringRepeat("X",r),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(h,f){h.width=h.height="auto",h.left=h.top="0px",h.visibility="hidden",h.position="absolute",h.whiteSpace="pre",u.isIE<8?h["font-family"]="inherit":h.font="inherit",h.overflow=f?"hidden":"visible"},l.prototype.checkForSizeChanges=function(h){if(h===void 0&&(h=this.$measureSizes()),h&&(this.$characterSize.width!==h.width||this.$characterSize.height!==h.height)){this.$measureNode.style.fontWeight="bold";var f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=h,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===h.width&&f.height===h.height,this._emit("changeCharacterSize",{data:h})}},l.prototype.$addObserver=function(){var h=this;this.$observer=new window.ResizeObserver(function(f){h.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var h=this;return this.$pollSizeChangesTimer=a.onIdle(function f(){h.checkForSizeChanges(),a.onIdle(f,500)},500)},l.prototype.setPolling=function(h){h?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(h){var f={height:(h||this.$measureNode).clientHeight,width:(h||this.$measureNode).clientWidth/r};return f.width===0||f.height===0?null:f},l.prototype.$measureCharWidth=function(h){this.$main.textContent=g.stringRepeat(h,r);var f=this.$main.getBoundingClientRect();return f.width/r},l.prototype.getCharacterWidth=function(h){var f=this.charSizes[h];return f===void 0&&(f=this.charSizes[h]=this.$measureCharWidth(h)/this.$characterSize.width),f},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(h){return!h||!h.parentElement?1:(window.getComputedStyle(h).zoom||1)*this.$getZoom(h.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var h=function(f,b){return["div",{style:"position: absolute;top:"+f+"px;left:"+b+"px;"}]};this.els=p.buildDom([h(0,0),h(i,0),h(0,i),h(i,i)],this.el)},l.prototype.transformCoordinates=function(h,f){if(h){var b=this.$getZoom(this.el);h=A(1/b,h)}function C(D,O,N){var P=D[1]*O[0]-D[0]*O[1];return[(-O[1]*N[0]+O[0]*N[1])/P,(+D[1]*N[0]-D[0]*N[1])/P]}function w(D,O){return[D[0]-O[0],D[1]-O[1]]}function x(D,O){return[D[0]+O[0],D[1]+O[1]]}function A(D,O){return[D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function v(D){var O=D.getBoundingClientRect();return[O.left,O.top]}var E=v(this.els[0]),$=v(this.els[1]),M=v(this.els[2]),S=v(this.els[3]),T=C(w(S,$),w(S,M),w(x($,M),x(S,E))),y=A(1+T[0],w($,E)),m=A(1+T[1],w(M,E));if(f){var L=f,_=T[0]*L[0]/i+T[1]*L[1]/i+1,k=x(A(L[0],y),A(L[1],m));return x(A(1/_/i,k),E)}var I=w(h,E),R=C(w(y,A(T[0],I)),w(m,A(T[1],I)),I);return A(i,R)},l}();s.prototype.$characterSize={width:0,height:0},d.implement(s.prototype,o),e.FontMetrics=s});ace.define("ace/css/editor-css",["require","exports","module"],function(t,e,c){c.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -901,11 +901,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width:1px; height:1px; overflow:hidden; -}`});ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=t("../lib/oop"),g=t("../lib/event_emitter").EventEmitter,a=function(){function u(o,r){this.canvas=d.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(o){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var n=(o.lastRow+1)*this.lineHeight;nT.priority?1:0}var l=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),l){var h={info:1,warning:2,error:3};l.forEach(function(S){S.priority=h[S.type]||null}),l=l.sort(s);for(var f=this.renderer.session.$foldData,b=0;bthis.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),A=Math.round($-this.halfMinDecorationHeight),v=Math.round($+this.halfMinDecorationHeight)}i.fillStyle=r[l[b].type]||null,i.fillRect(0,x,this.canvasWidth,v-A)}}var M=this.renderer.session.selection.getCursor();if(M){var w=this.compensateFoldRows(M.row,f),x=Math.round((M.row-w)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,x,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(o,r){var n=0;if(r&&r.length>0)for(var i=0;ir[i].start.row&&o=r[i].end.row&&(n+=r[i].end.row-r[i].start.row);return n},u}();p.implement(a.prototype,g),e.Decorator=a});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("./lib/oop"),p=t("./lib/dom"),g=t("./lib/lang"),a=t("./config"),u=t("./layer/gutter").Gutter,o=t("./layer/marker").Marker,r=t("./layer/text").Text,n=t("./layer/cursor").Cursor,i=t("./scrollbar").HScrollBar,s=t("./scrollbar").VScrollBar,l=t("./scrollbar_custom").HScrollBar,h=t("./scrollbar_custom").VScrollBar,f=t("./renderloop").RenderLoop,b=t("./layer/font_metrics").FontMetrics,C=t("./lib/event_emitter").EventEmitter,w=t("./css/editor-css"),x=t("./layer/decorators").Decorator,A=t("./lib/useragent");p.importCssString(w,"ace_editor.css",!1);var v=function(){function E($,M){var S=this;this.container=$||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(M),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var T=this.$textLayer=new r(this.content);this.canvas=T.element,this.$markerFront=new o(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(y){S.$scrollAnimation||S.session.setScrollTop(y.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function(y){S.$scrollAnimation||S.session.setScrollLeft(y.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(y){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",y)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!A.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function($,M,S){if(M===void 0&&(M=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function($,M,S,T){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var y=this.container;T||(T=y.clientHeight||y.scrollHeight),S||(S=y.clientWidth||y.scrollWidth);var m=this.$updateCachedSize($,M,S,T);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!T)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(m|this.$changes,!0):this.$loop.schedule(m|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function($,M,S,T){T-=this.$extraHeight||0;var y=0,m=this.$size,L={width:m.width,height:m.height,scrollerHeight:m.scrollerHeight,scrollerWidth:m.scrollerWidth};if(T&&($||m.height!=T)&&(m.height=T,y|=this.CHANGE_SIZE,m.scrollerHeight=m.height,this.$horizScroll&&(m.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(m.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",y=y|this.CHANGE_SCROLL),S&&($||m.width!=S)){y|=this.CHANGE_SIZE,m.width=S,M==null&&(M=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=M,p.setStyle(this.scrollBarH.element.style,"left",M+"px"),p.setStyle(this.scroller.style,"left",M+this.margin.left+"px"),m.scrollerWidth=Math.max(0,S-M-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var _=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",_),p.setStyle(this.scroller.style,"right",_),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(m.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(y|=this.CHANGE_FULL)}return m.$dirty=!S||!T,y&&this._signal("resize",L),y},E.prototype.onGutterResize=function($){var M=this.$showGutter?$:0;M!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,M,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},E.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,M=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(M,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},E.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},E.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=p.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var M=this.$printMarginEl.style;M.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",M.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,M=this.$composition;if(!this.$keepTextAreaAtCursor&&!M){p.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){M&&M.markerRange&&(S=this.$cursorLayer.getPixelPosition(M.markerRange.start,!0));var T=this.layerConfig,y=S.top,m=S.left;y-=T.offset;var L=M&&M.useTextareaForIME||A.isMobile?this.lineHeight:1;if(y<0||y>T.height-L){p.translate(this.textarea,0,0);return}var _=1,k=this.$size.height-L;if(!M)y+=this.lineHeight;else if(M.useTextareaForIME){var R=this.textarea.value;_=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else y+=this.lineHeight+2;m-=this.scrollLeft,m>this.$size.scrollerWidth-_&&(m=this.$size.scrollerWidth-_),m+=this.gutterWidth+this.margin.left,p.setStyle($,"height",L+"px"),p.setStyle($,"width",_+"px"),p.translate(this.textarea,Math.min(m,this.$size.scrollerWidth-_),Math.min(y,k))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,M=$.lastRow,S=this.session.documentToScreenRow(M,0)*$.lineHeight;return S-this.session.getScrollTop()>$.height-$.lineHeight?M-1:M},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function($,M,S,T){var y=this.scrollMargin;y.top=$|0,y.bottom=M|0,y.right=T|0,y.left=S|0,y.v=y.top+y.bottom,y.h=y.left+y.right,y.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-y.top),this.updateFull()},E.prototype.setMargin=function($,M,S,T){var y=this.margin;y.top=$|0,y.bottom=M|0,y.right=T|0,y.left=S|0,y.v=y.top+y.bottom,y.h=y.left+y.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},E.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,M=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(M-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-M&&($=this.scrollTop+M,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function($,M){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!M){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var T=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;T>0&&(this.scrollTop=T,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-S.offset);var y=S.width+2*this.$padding+"px",m=S.minHeight+"px";p.setStyle(this.content.style,"width",y),p.setStyle(this.content.style,"height",m)}if($&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",$)},E.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,M=this.$maxLines*this.lineHeight,S=Math.min(M,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var T=S<=2*this.lineHeight,y=!T&&$>M;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||y!=this.$vScroll){y!=this.$vScroll&&(this.$vScroll=y,this.scrollBarV.setVisible(y));var m=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,m,S),this.desiredHeight=S,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var $=this.session,M=this.$size,S=M.height<=2*this.lineHeight,T=this.session.getScreenLength(),y=T*this.lineHeight,m=this.$getLongestLine(),L=!S&&(this.$hScrollBarAlwaysVisible||M.scrollerWidth-m-2*this.$padding<0),_=this.$horizScroll!==L;_&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var k=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var R=M.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(M.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;y+=I;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,y-M.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,m+2*this.$padding-M.scrollerWidth+D.right)));var O=!S&&(this.$vScrollBarAlwaysVisible||M.scrollerHeight-y+I<0||this.scrollTop>D.top),N=k!==O;N&&(this.$vScroll=O,this.scrollBarV.setVisible(O));var P=this.scrollTop%this.lineHeight,H=Math.ceil(R/this.lineHeight)-1,F=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),U=F+H,j,J,z=this.lineHeight;F=$.screenToDocumentRow(F,0);var X=$.getFoldLine(F);X&&(F=X.start.row),j=$.documentToScreenRow(F,0),J=$.getRowLength(F)*z,U=Math.min($.screenToDocumentRow(U,0),$.getLength()-1),R=M.scrollerHeight+$.getRowLength(U)*z+J,P=this.scrollTop-j*z;var ee=0;return(this.layerConfig.width!=m||_)&&(ee=this.CHANGE_H_SCROLL),(_||N)&&(ee|=this.$updateCachedSize(!0,this.gutterWidth,M.width,M.height),this._signal("scrollbarVisibilityChanged"),N&&(m=this.$getLongestLine())),this.layerConfig={width:m,padding:this.$padding,firstRow:F,firstRowScreen:j,lastRow:U,lineHeight:z,characterWidth:this.characterWidth,minHeight:R,maxHeight:y,offset:P,gutterOffset:z?Math.max(0,Math.ceil((P+M.height-M.scrollerHeight)/z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(m-this.$padding),ee},E.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,M=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!($>S.lastRow+1)&&!(Mthis.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function($,M){this.$gutterLayer.addGutterDecoration($,M)},E.prototype.removeGutterDecoration=function($,M){this.$gutterLayer.removeGutterDecoration($,M)},E.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function($,M,S){this.scrollCursorIntoView($,S),this.scrollCursorIntoView(M,S)},E.prototype.scrollCursorIntoView=function($,M,S){if(this.$size.scrollerHeight!==0){var T=this.$cursorLayer.getPixelPosition($),y=T.left,m=T.top,L=S&&S.top||0,_=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var k=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;k+L>m?(M&&k+L>m+this.lineHeight&&(m-=M*this.$size.scrollerHeight),m===0&&(m=-this.scrollMargin.top),this.session.setScrollTop(m)):k+this.$size.scrollerHeight-_=1-this.scrollMargin.top||M>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function($,M){var S;if(this.$hasCssTransforms){S={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([$,M]);$=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else S=this.scroller.getBoundingClientRect();var y=$+this.scrollLeft-S.left-this.$padding,m=y/this.characterWidth,L=Math.floor((M+this.scrollTop-S.top)/this.lineHeight),_=this.$blockCursor?Math.floor(m):Math.round(m);return{row:L,column:_,side:m-_>0?1:-1,offsetX:y}},E.prototype.screenToTextCoordinates=function($,M){var S;if(this.$hasCssTransforms){S={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([$,M]);$=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else S=this.scroller.getBoundingClientRect();var y=$+this.scrollLeft-S.left-this.$padding,m=y/this.characterWidth,L=this.$blockCursor?Math.floor(m):Math.round(m),_=Math.floor((M+this.scrollTop-S.top)/this.lineHeight);return this.session.screenToDocumentPosition(_,Math.max(L,0),y)},E.prototype.textToScreenCoordinates=function($,M){var S=this.scroller.getBoundingClientRect(),T=this.session.documentToScreenPosition($,M),y=this.$padding+(this.session.$bidiHandler.isBidiRow(T.row,$)?this.session.$bidiHandler.getPosLeft(T.column):Math.round(T.column*this.characterWidth)),m=T.row*this.lineHeight;return{pageX:S.left+y-this.scrollLeft,pageY:S.top+m-this.scrollTop}},E.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function($){var M=this.session.selection.cursor;this.addToken($,"composition_placeholder",M.row,M.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function($,M){var S=this.session.selection.cursor,T=M||{row:S.row,column:S.column};this.removeGhostText();var y=$.split(` +}`});ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,e,c){"use strict";var d=t("../lib/dom"),p=t("../lib/oop"),g=t("../lib/event_emitter").EventEmitter,a=function(){function u(o,r){this.canvas=d.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return u.prototype.$updateDecorators=function(o){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var n=(o.lastRow+1)*this.lineHeight;nT.priority?1:0}var l=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),l){var h={info:1,warning:2,error:3};l.forEach(function(S){S.priority=h[S.type]||null}),l=l.sort(s);for(var f=this.renderer.session.$foldData,b=0;bthis.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),A=Math.round($-this.halfMinDecorationHeight),v=Math.round($+this.halfMinDecorationHeight)}i.fillStyle=r[l[b].type]||null,i.fillRect(0,x,this.canvasWidth,v-A)}}var M=this.renderer.session.selection.getCursor();if(M){var w=this.compensateFoldRows(M.row,f),x=Math.round((M.row-w)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,x,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(o,r){var n=0;if(r&&r.length>0)for(var i=0;ir[i].start.row&&o=r[i].end.row&&(n+=r[i].end.row-r[i].start.row);return n},u}();p.implement(a.prototype,g),e.Decorator=a});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(t,e,c){"use strict";var d=t("./lib/oop"),p=t("./lib/dom"),g=t("./lib/lang"),a=t("./config"),u=t("./layer/gutter").Gutter,o=t("./layer/marker").Marker,r=t("./layer/text").Text,n=t("./layer/cursor").Cursor,i=t("./scrollbar").HScrollBar,s=t("./scrollbar").VScrollBar,l=t("./scrollbar_custom").HScrollBar,h=t("./scrollbar_custom").VScrollBar,f=t("./renderloop").RenderLoop,b=t("./layer/font_metrics").FontMetrics,C=t("./lib/event_emitter").EventEmitter,w=t("./css/editor-css"),x=t("./layer/decorators").Decorator,A=t("./lib/useragent");p.importCssString(w,"ace_editor.css",!1);var v=function(){function E($,M){var S=this;this.container=$||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(M),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var T=this.$textLayer=new r(this.content);this.canvas=T.element,this.$markerFront=new o(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(y){S.$scrollAnimation||S.session.setScrollTop(y.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function(y){S.$scrollAnimation||S.session.setScrollLeft(y.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(y){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",y)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!A.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function($,M,S){if(M===void 0&&(M=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function($,M,S,T){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var y=this.container;T||(T=y.clientHeight||y.scrollHeight),S||(S=y.clientWidth||y.scrollWidth);var m=this.$updateCachedSize($,M,S,T);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!T)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(m|this.$changes,!0):this.$loop.schedule(m|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function($,M,S,T){T-=this.$extraHeight||0;var y=0,m=this.$size,L={width:m.width,height:m.height,scrollerHeight:m.scrollerHeight,scrollerWidth:m.scrollerWidth};if(T&&($||m.height!=T)&&(m.height=T,y|=this.CHANGE_SIZE,m.scrollerHeight=m.height,this.$horizScroll&&(m.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(m.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",y=y|this.CHANGE_SCROLL),S&&($||m.width!=S)){y|=this.CHANGE_SIZE,m.width=S,M==null&&(M=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=M,p.setStyle(this.scrollBarH.element.style,"left",M+"px"),p.setStyle(this.scroller.style,"left",M+this.margin.left+"px"),m.scrollerWidth=Math.max(0,S-M-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var _=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",_),p.setStyle(this.scroller.style,"right",_),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(m.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(y|=this.CHANGE_FULL)}return m.$dirty=!S||!T,y&&this._signal("resize",L),y},E.prototype.onGutterResize=function($){var M=this.$showGutter?$:0;M!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,M,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},E.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,M=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(M,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},E.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},E.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=p.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var M=this.$printMarginEl.style;M.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",M.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,M=this.$composition;if(!this.$keepTextAreaAtCursor&&!M){p.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){M&&M.markerRange&&(S=this.$cursorLayer.getPixelPosition(M.markerRange.start,!0));var T=this.layerConfig,y=S.top,m=S.left;y-=T.offset;var L=M&&M.useTextareaForIME||A.isMobile?this.lineHeight:1;if(y<0||y>T.height-L){p.translate(this.textarea,0,0);return}var _=1,k=this.$size.height-L;if(!M)y+=this.lineHeight;else if(M.useTextareaForIME){var I=this.textarea.value;_=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else y+=this.lineHeight+2;m-=this.scrollLeft,m>this.$size.scrollerWidth-_&&(m=this.$size.scrollerWidth-_),m+=this.gutterWidth+this.margin.left,p.setStyle($,"height",L+"px"),p.setStyle($,"width",_+"px"),p.translate(this.textarea,Math.min(m,this.$size.scrollerWidth-_),Math.min(y,k))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,M=$.lastRow,S=this.session.documentToScreenRow(M,0)*$.lineHeight;return S-this.session.getScrollTop()>$.height-$.lineHeight?M-1:M},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function($,M,S,T){var y=this.scrollMargin;y.top=$|0,y.bottom=M|0,y.right=T|0,y.left=S|0,y.v=y.top+y.bottom,y.h=y.left+y.right,y.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-y.top),this.updateFull()},E.prototype.setMargin=function($,M,S,T){var y=this.margin;y.top=$|0,y.bottom=M|0,y.right=T|0,y.left=S|0,y.v=y.top+y.bottom,y.h=y.left+y.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},E.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,M=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(M-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-M&&($=this.scrollTop+M,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function($,M){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!M){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var T=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;T>0&&(this.scrollTop=T,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-S.offset);var y=S.width+2*this.$padding+"px",m=S.minHeight+"px";p.setStyle(this.content.style,"width",y),p.setStyle(this.content.style,"height",m)}if($&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",$)},E.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,M=this.$maxLines*this.lineHeight,S=Math.min(M,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var T=S<=2*this.lineHeight,y=!T&&$>M;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||y!=this.$vScroll){y!=this.$vScroll&&(this.$vScroll=y,this.scrollBarV.setVisible(y));var m=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,m,S),this.desiredHeight=S,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var $=this.session,M=this.$size,S=M.height<=2*this.lineHeight,T=this.session.getScreenLength(),y=T*this.lineHeight,m=this.$getLongestLine(),L=!S&&(this.$hScrollBarAlwaysVisible||M.scrollerWidth-m-2*this.$padding<0),_=this.$horizScroll!==L;_&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var k=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=M.scrollerHeight+this.lineHeight,R=!this.$maxLines&&this.$scrollPastEnd?(M.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;y+=R;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,y-M.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,m+2*this.$padding-M.scrollerWidth+D.right)));var O=!S&&(this.$vScrollBarAlwaysVisible||M.scrollerHeight-y+R<0||this.scrollTop>D.top),N=k!==O;N&&(this.$vScroll=O,this.scrollBarV.setVisible(O));var P=this.scrollTop%this.lineHeight,H=Math.ceil(I/this.lineHeight)-1,F=Math.max(0,Math.round((this.scrollTop-P)/this.lineHeight)),U=F+H,j,J,z=this.lineHeight;F=$.screenToDocumentRow(F,0);var X=$.getFoldLine(F);X&&(F=X.start.row),j=$.documentToScreenRow(F,0),J=$.getRowLength(F)*z,U=Math.min($.screenToDocumentRow(U,0),$.getLength()-1),I=M.scrollerHeight+$.getRowLength(U)*z+J,P=this.scrollTop-j*z;var ee=0;return(this.layerConfig.width!=m||_)&&(ee=this.CHANGE_H_SCROLL),(_||N)&&(ee|=this.$updateCachedSize(!0,this.gutterWidth,M.width,M.height),this._signal("scrollbarVisibilityChanged"),N&&(m=this.$getLongestLine())),this.layerConfig={width:m,padding:this.$padding,firstRow:F,firstRowScreen:j,lastRow:U,lineHeight:z,characterWidth:this.characterWidth,minHeight:I,maxHeight:y,offset:P,gutterOffset:z?Math.max(0,Math.ceil((P+M.height-M.scrollerHeight)/z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(m-this.$padding),ee},E.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,M=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!($>S.lastRow+1)&&!(Mthis.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function($,M){this.$gutterLayer.addGutterDecoration($,M)},E.prototype.removeGutterDecoration=function($,M){this.$gutterLayer.removeGutterDecoration($,M)},E.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function($,M,S){this.scrollCursorIntoView($,S),this.scrollCursorIntoView(M,S)},E.prototype.scrollCursorIntoView=function($,M,S){if(this.$size.scrollerHeight!==0){var T=this.$cursorLayer.getPixelPosition($),y=T.left,m=T.top,L=S&&S.top||0,_=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var k=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;k+L>m?(M&&k+L>m+this.lineHeight&&(m-=M*this.$size.scrollerHeight),m===0&&(m=-this.scrollMargin.top),this.session.setScrollTop(m)):k+this.$size.scrollerHeight-_=1-this.scrollMargin.top||M>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function($,M){var S;if(this.$hasCssTransforms){S={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([$,M]);$=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else S=this.scroller.getBoundingClientRect();var y=$+this.scrollLeft-S.left-this.$padding,m=y/this.characterWidth,L=Math.floor((M+this.scrollTop-S.top)/this.lineHeight),_=this.$blockCursor?Math.floor(m):Math.round(m);return{row:L,column:_,side:m-_>0?1:-1,offsetX:y}},E.prototype.screenToTextCoordinates=function($,M){var S;if(this.$hasCssTransforms){S={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([$,M]);$=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else S=this.scroller.getBoundingClientRect();var y=$+this.scrollLeft-S.left-this.$padding,m=y/this.characterWidth,L=this.$blockCursor?Math.floor(m):Math.round(m),_=Math.floor((M+this.scrollTop-S.top)/this.lineHeight);return this.session.screenToDocumentPosition(_,Math.max(L,0),y)},E.prototype.textToScreenCoordinates=function($,M){var S=this.scroller.getBoundingClientRect(),T=this.session.documentToScreenPosition($,M),y=this.$padding+(this.session.$bidiHandler.isBidiRow(T.row,$)?this.session.$bidiHandler.getPosLeft(T.column):Math.round(T.column*this.characterWidth)),m=T.row*this.lineHeight;return{pageX:S.left+y-this.scrollLeft,pageY:S.top+m-this.scrollTop}},E.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function($){var M=this.session.selection.cursor;this.addToken($,"composition_placeholder",M.row,M.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function($,M){var S=this.session.selection.cursor,T=M||{row:S.row,column:S.column};this.removeGhostText();var y=$.split(` `);if(this.addToken(y[0],"ghost_text",T.row,T.column),this.$ghostText={text:$,position:{row:T.row,column:T.column}},y.length>1){this.$ghostTextWidget={text:y.slice(1).join(` -`),row:T.row,column:T.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var m=this.$cursorLayer.getPixelPosition(T,!0),L=this.container,_=L.getBoundingClientRect().height,k=y.length*this.lineHeight,R=k<_-m.top;if(R)return;k<_?this.scrollBy(0,(y.length-1)*this.lineHeight):this.scrollBy(0,m.top)}},E.prototype.removeGhostText=function(){if(this.$ghostText){var $=this.$ghostText.position;this.removeExtraToken($.row,$.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function($,M,S,T){var y=this.session;y.bgTokenizer.lines[S]=null;var m={type:M,value:$},L=y.getTokens(S);if(T==null||!L.length)L.push(m);else for(var _=0,k=0;k1||Math.abs($.$size.height-T)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E}();v.prototype.CHANGE_CURSOR=1,v.prototype.CHANGE_MARKER=2,v.prototype.CHANGE_GUTTER=4,v.prototype.CHANGE_SCROLL=8,v.prototype.CHANGE_LINES=16,v.prototype.CHANGE_TEXT=32,v.prototype.CHANGE_SIZE=64,v.prototype.CHANGE_MARKER_BACK=128,v.prototype.CHANGE_MARKER_FRONT=256,v.prototype.CHANGE_FULL=512,v.prototype.CHANGE_H_SCROLL=1024,v.prototype.$changes=0,v.prototype.$padding=null,v.prototype.$frozen=!1,v.prototype.STEPS=8,d.implement(v.prototype,C),a.defineOptions(v.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!A.isMobile&&!A.isIE}}),e.VirtualRenderer=v});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,e,c){"use strict";var d=t("../lib/oop"),p=t("../lib/net"),g=t("../lib/event_emitter").EventEmitter,a=t("../config");function u(i){var s="importScripts('"+p.qualifyURL(i)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new l;return h.append(s),h.getBlob("application/javascript")}}function o(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var s=u(i),l=window.URL||window.webkitURL,h=l.createObjectURL(s);return new Worker(h)}return new Worker(i)}var r=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){d.implement(this,g),this.$createWorkerFromOldConfig=function(i,s,l,h,f){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),a.get("packaged")||!t.toUrl)h=h||a.moduleUrl(s,"worker");else{var b=this.$normalizePath;h=h||b(t.toUrl("ace/worker/worker.js",null,"_"));var C={};i.forEach(function(w){C[w]=b(t.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(h),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:C,module:s,classname:l}),this.$worker},this.onMessage=function(i){var s=i.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var l=this.callbacks[s.id];l&&(l(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return p.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,s){this.$worker.postMessage({command:i,args:s})},this.call=function(i,s,l){if(l){var h=this.callbackId++;this.callbacks[h]=l,s.push(h)}this.send(i,s)},this.emit=function(i,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:s.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(r.prototype);var n=function(i,s,l){var h=null,f=!1,b=Object.create(g),C=[],w=new r({messageBuffer:C,terminate:function(){},postMessage:function(A){C.push(A),h&&(f?setTimeout(x):x())}});w.setEmitSync=function(A){f=A};var x=function(){var A=C.shift();A.command?h[A.command].apply(h,A.args):A.event&&b._signal(A.event,A.data)};return b.postMessage=function(A){w.onMessage({data:A})},b.callback=function(A,v){this.postMessage({type:"call",id:v,data:A})},b.emit=function(A,v){this.postMessage({type:"event",name:A,data:v})},a.loadModule(["worker",s],function(A){for(h=new A[l](b);C.length;)x()}),w};e.UIWorkerClient=n,e.WorkerClient=r,e.createWorker=o});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,e,c){"use strict";var d=t("./range").Range,p=t("./lib/event_emitter").EventEmitter,g=t("./lib/oop"),a=function(){function u(o,r,n,i,s,l){var h=this;this.length=r,this.session=o,this.doc=o.getDocument(),this.mainClass=s,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=n;var f=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var o=this,r=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new d(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var l=r.createAnchor(s.row,s.column);l.$insertRight=!0,l.detach(),o.others.push(l)}),n.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,r=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=o.addMarker(new d(n.row,n.column,n.row,n.column+r.length),r.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o=this.pos.column&&r.start.column<=this.pos.column+this.length+1,s=r.start.column-this.pos.column;if(this.updateAnchors(o),i&&(this.length+=n),i&&!this.session.$fromUndo){if(o.action==="insert")for(var l=this.others.length-1;l>=0;l--){var h=this.others[l],f={row:h.row,column:h.column+s};this.doc.insertMergedLines(f,o.lines)}else if(o.action==="remove")for(var l=this.others.length-1;l>=0;l--){var h=this.others[l],f={row:h.row,column:h.column+s};this.doc.remove(new d(f.row,f.column,f.row,f.column-n))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var r=this.others.length;r--;)this.others[r].onChange(o);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var o=this,r=this.session,n=function(s,l){r.removeMarker(s.markerId),s.markerId=r.addMarker(new d(s.row,s.column,s.row,s.column+o.length),l,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},u.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var r=this.session.selection.getCursor();r.row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),r=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,n=0;n1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var d=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new d(e.multiSelectCommands)});ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,e,c){var d=t("./range_list").RangeList,p=t("./range").Range,g=t("./selection").Selection,a=t("./mouse/multi_select_handler").onMouseDown,u=t("./lib/event"),o=t("./lib/lang"),r=t("./commands/multi_select_commands");e.commands=r.defaultCommands.concat(r.multiSelectCommands);var n=t("./search").Search,i=new n;function s(w,x,A){return i.$options.wrap=!0,i.$options.needle=x,i.$options.backwards=A==-1,i.find(w)}var l=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,x){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var A=this.toOrientedRange();if(this.rangeList.add(A),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),x||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(A),this.$onAddRange(A)}w.cursor||(w.cursor=w.end);var v=this.rangeList.add(w);return this.$onAddRange(w),v.length&&this.$onRemoveRange(v),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),x||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var x=this.rangeList.removeAll();x.length&&this.$onRemoveRange(x),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var x=this.rangeList.substractPoint(w);if(x)return this.$onRemoveRange(x),x[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var x=this.rangeList.ranges.pop();w.push(x),this.rangeCount=0}for(var A=w.length;A--;){var v=this.ranges.indexOf(w[A]);this.ranges.splice(v,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),x=x||this.ranges[0],x&&!x.isEqual(this.getRange())&&this.fromOrientedRange(x)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],x=[],A=0;A1){var w=this.rangeList.ranges,x=w[w.length-1],A=p.fromPoints(w[0].start,x.end);this.toSingleRange(),this.setSelectionRange(A,x.cursor==x.start)}else{var v=this.session.documentToScreenPosition(this.cursor),E=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(v,E);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,x,A){var v=[],E=w.column0;)I--;if(I>0)for(var D=0;v[D].isEmpty();)D++;for(var O=I;O>=D;O--)v[O].isEmpty()&&v.splice(O,1)}return v}}.call(g.prototype);var h=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var x=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",x),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var x=this.session.$selectionMarkers.indexOf(w);x!=-1&&this.session.$selectionMarkers.splice(x,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var x=this.session.$selectionMarkers,A=w.length;A--;){var v=w[A];if(v.marker){this.session.removeMarker(v.marker);var E=x.indexOf(v);E!=-1&&x.splice(E,1)}}this.session.selectionMarkerCount=x.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var x=w.command,A=w.editor;if(A.multiSelect){if(x.multiSelectAction)x.multiSelectAction=="forEach"?v=A.forEachSelection(x,w.args):x.multiSelectAction=="forEachLine"?v=A.forEachSelection(x,w.args,!0):x.multiSelectAction=="single"?(A.exitMultiSelectMode(),v=x.exec(A,w.args||{})):v=x.multiSelectAction(A,w.args||{});else{var v=x.exec(A,w.args||{});A.multiSelect.addRange(A.multiSelect.toOrientedRange()),A.multiSelect.mergeOverlappingRanges()}return v}},this.forEachSelection=function(w,x,A){if(!this.inVirtualSelectionMode){var v=A&&A.keepOrder,E=A==!0||A&&A.$byLines,$=this.session,M=this.selection,S=M.rangeList,T=(v?M:S).ranges,y;if(!T.length)return w.exec?w.exec(this,x||{}):w(this,x||{});var m=M._eventRegistry;M._eventRegistry={};var L=new g($);this.inVirtualSelectionMode=!0;for(var _=T.length;_--;){if(E)for(;_>0&&T[_].start.row==T[_-1].end.row;)_--;L.fromOrientedRange(T[_]),L.index=_,this.selection=$.selection=L;var k=w.exec?w.exec(this,x||{}):w(this,x||{});!y&&k!==void 0&&(y=k),L.toOrientedRange(T[_])}L.detach(),this.selection=$.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=m,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),y}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var x=this.multiSelect.rangeList.ranges,A=[],v=0;v0);M<0&&(M=0),S>=y&&(S=y-1)}var L=this.session.removeFullLines(M,S);L=this.$reAlignText(L,T),this.session.insert({row:M,column:0},L.join(` +`),row:T.row,column:T.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var m=this.$cursorLayer.getPixelPosition(T,!0),L=this.container,_=L.getBoundingClientRect().height,k=y.length*this.lineHeight,I=k<_-m.top;if(I)return;k<_?this.scrollBy(0,(y.length-1)*this.lineHeight):this.scrollBy(0,m.top)}},E.prototype.removeGhostText=function(){if(this.$ghostText){var $=this.$ghostText.position;this.removeExtraToken($.row,$.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function($,M,S,T){var y=this.session;y.bgTokenizer.lines[S]=null;var m={type:M,value:$},L=y.getTokens(S);if(T==null||!L.length)L.push(m);else for(var _=0,k=0;k1||Math.abs($.$size.height-T)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E}();v.prototype.CHANGE_CURSOR=1,v.prototype.CHANGE_MARKER=2,v.prototype.CHANGE_GUTTER=4,v.prototype.CHANGE_SCROLL=8,v.prototype.CHANGE_LINES=16,v.prototype.CHANGE_TEXT=32,v.prototype.CHANGE_SIZE=64,v.prototype.CHANGE_MARKER_BACK=128,v.prototype.CHANGE_MARKER_FRONT=256,v.prototype.CHANGE_FULL=512,v.prototype.CHANGE_H_SCROLL=1024,v.prototype.$changes=0,v.prototype.$padding=null,v.prototype.$frozen=!1,v.prototype.STEPS=8,d.implement(v.prototype,C),a.defineOptions(v.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!A.isMobile&&!A.isIE}}),e.VirtualRenderer=v});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,e,c){"use strict";var d=t("../lib/oop"),p=t("../lib/net"),g=t("../lib/event_emitter").EventEmitter,a=t("../config");function u(i){var s="importScripts('"+p.qualifyURL(i)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,h=new l;return h.append(s),h.getBlob("application/javascript")}}function o(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var s=u(i),l=window.URL||window.webkitURL,h=l.createObjectURL(s);return new Worker(h)}return new Worker(i)}var r=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){d.implement(this,g),this.$createWorkerFromOldConfig=function(i,s,l,h,f){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),a.get("packaged")||!t.toUrl)h=h||a.moduleUrl(s,"worker");else{var b=this.$normalizePath;h=h||b(t.toUrl("ace/worker/worker.js",null,"_"));var C={};i.forEach(function(w){C[w]=b(t.toUrl(w,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(h),f&&this.send("importScripts",f),this.$worker.postMessage({init:!0,tlns:C,module:s,classname:l}),this.$worker},this.onMessage=function(i){var s=i.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var l=this.callbacks[s.id];l&&(l(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return p.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,s){this.$worker.postMessage({command:i,args:s})},this.call=function(i,s,l){if(l){var h=this.callbackId++;this.callbacks[h]=l,s.push(h)}this.send(i,s)},this.emit=function(i,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:s.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(r.prototype);var n=function(i,s,l){var h=null,f=!1,b=Object.create(g),C=[],w=new r({messageBuffer:C,terminate:function(){},postMessage:function(A){C.push(A),h&&(f?setTimeout(x):x())}});w.setEmitSync=function(A){f=A};var x=function(){var A=C.shift();A.command?h[A.command].apply(h,A.args):A.event&&b._signal(A.event,A.data)};return b.postMessage=function(A){w.onMessage({data:A})},b.callback=function(A,v){this.postMessage({type:"call",id:v,data:A})},b.emit=function(A,v){this.postMessage({type:"event",name:A,data:v})},a.loadModule(["worker",s],function(A){for(h=new A[l](b);C.length;)x()}),w};e.UIWorkerClient=n,e.WorkerClient=r,e.createWorker=o});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,e,c){"use strict";var d=t("./range").Range,p=t("./lib/event_emitter").EventEmitter,g=t("./lib/oop"),a=function(){function u(o,r,n,i,s,l){var h=this;this.length=r,this.session=o,this.doc=o.getDocument(),this.mainClass=s,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){h.onCursorChange()})},this.$pos=n;var f=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=f.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var o=this,r=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new d(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var l=r.createAnchor(s.row,s.column);l.$insertRight=!0,l.detach(),o.others.push(l)}),n.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,r=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=o.addMarker(new d(n.row,n.column,n.row,n.column+r.length),r.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o=this.pos.column&&r.start.column<=this.pos.column+this.length+1,s=r.start.column-this.pos.column;if(this.updateAnchors(o),i&&(this.length+=n),i&&!this.session.$fromUndo){if(o.action==="insert")for(var l=this.others.length-1;l>=0;l--){var h=this.others[l],f={row:h.row,column:h.column+s};this.doc.insertMergedLines(f,o.lines)}else if(o.action==="remove")for(var l=this.others.length-1;l>=0;l--){var h=this.others[l],f={row:h.row,column:h.column+s};this.doc.remove(new d(f.row,f.column,f.row,f.column-n))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var r=this.others.length;r--;)this.others[r].onChange(o);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var o=this,r=this.session,n=function(s,l){r.removeMarker(s.markerId),s.markerId=r.addMarker(new d(s.row,s.column,s.row,s.column+o.length),l,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},u.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var r=this.session.selection.getCursor();r.row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},u.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),r=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,n=0;n1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var d=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new d(e.multiSelectCommands)});ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,e,c){var d=t("./range_list").RangeList,p=t("./range").Range,g=t("./selection").Selection,a=t("./mouse/multi_select_handler").onMouseDown,u=t("./lib/event"),o=t("./lib/lang"),r=t("./commands/multi_select_commands");e.commands=r.defaultCommands.concat(r.multiSelectCommands);var n=t("./search").Search,i=new n;function s(w,x,A){return i.$options.wrap=!0,i.$options.needle=x,i.$options.backwards=A==-1,i.find(w)}var l=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(w,x){if(w){if(!this.inMultiSelectMode&&this.rangeCount===0){var A=this.toOrientedRange();if(this.rangeList.add(A),this.rangeList.add(w),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),x||this.fromOrientedRange(w);this.rangeList.removeAll(),this.rangeList.add(A),this.$onAddRange(A)}w.cursor||(w.cursor=w.end);var v=this.rangeList.add(w);return this.$onAddRange(w),v.length&&this.$onRemoveRange(v),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),x||this.fromOrientedRange(w)}},this.toSingleRange=function(w){w=w||this.ranges[0];var x=this.rangeList.removeAll();x.length&&this.$onRemoveRange(x),w&&this.fromOrientedRange(w)},this.substractPoint=function(w){var x=this.rangeList.substractPoint(w);if(x)return this.$onRemoveRange(x),x[0]},this.mergeOverlappingRanges=function(){var w=this.rangeList.merge();w.length&&this.$onRemoveRange(w)},this.$onAddRange=function(w){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(w),this._signal("addRange",{range:w})},this.$onRemoveRange=function(w){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var x=this.rangeList.ranges.pop();w.push(x),this.rangeCount=0}for(var A=w.length;A--;){var v=this.ranges.indexOf(w[A]);this.ranges.splice(v,1)}this._signal("removeRange",{ranges:w}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),x=x||this.ranges[0],x&&!x.isEqual(this.getRange())&&this.fromOrientedRange(x)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var w=this.ranges.length?this.ranges:[this.getRange()],x=[],A=0;A1){var w=this.rangeList.ranges,x=w[w.length-1],A=p.fromPoints(w[0].start,x.end);this.toSingleRange(),this.setSelectionRange(A,x.cursor==x.start)}else{var v=this.session.documentToScreenPosition(this.cursor),E=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(v,E);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(w,x,A){var v=[],E=w.column0;)R--;if(R>0)for(var D=0;v[D].isEmpty();)D++;for(var O=R;O>=D;O--)v[O].isEmpty()&&v.splice(O,1)}return v}}.call(g.prototype);var h=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(w){w.cursor||(w.cursor=w.end);var x=this.getSelectionStyle();return w.marker=this.session.addMarker(w,"ace_selection",x),this.session.$selectionMarkers.push(w),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,w},this.removeSelectionMarker=function(w){if(w.marker){this.session.removeMarker(w.marker);var x=this.session.$selectionMarkers.indexOf(w);x!=-1&&this.session.$selectionMarkers.splice(x,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(w){for(var x=this.session.$selectionMarkers,A=w.length;A--;){var v=w[A];if(v.marker){this.session.removeMarker(v.marker);var E=x.indexOf(v);E!=-1&&x.splice(E,1)}}this.session.selectionMarkerCount=x.length},this.$onAddRange=function(w){this.addSelectionMarker(w.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(w){this.removeSelectionMarkers(w.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(w){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(w){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(w){var x=w.command,A=w.editor;if(A.multiSelect){if(x.multiSelectAction)x.multiSelectAction=="forEach"?v=A.forEachSelection(x,w.args):x.multiSelectAction=="forEachLine"?v=A.forEachSelection(x,w.args,!0):x.multiSelectAction=="single"?(A.exitMultiSelectMode(),v=x.exec(A,w.args||{})):v=x.multiSelectAction(A,w.args||{});else{var v=x.exec(A,w.args||{});A.multiSelect.addRange(A.multiSelect.toOrientedRange()),A.multiSelect.mergeOverlappingRanges()}return v}},this.forEachSelection=function(w,x,A){if(!this.inVirtualSelectionMode){var v=A&&A.keepOrder,E=A==!0||A&&A.$byLines,$=this.session,M=this.selection,S=M.rangeList,T=(v?M:S).ranges,y;if(!T.length)return w.exec?w.exec(this,x||{}):w(this,x||{});var m=M._eventRegistry;M._eventRegistry={};var L=new g($);this.inVirtualSelectionMode=!0;for(var _=T.length;_--;){if(E)for(;_>0&&T[_].start.row==T[_-1].end.row;)_--;L.fromOrientedRange(T[_]),L.index=_,this.selection=$.selection=L;var k=w.exec?w.exec(this,x||{}):w(this,x||{});!y&&k!==void 0&&(y=k),L.toOrientedRange(T[_])}L.detach(),this.selection=$.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=m,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var I=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),y}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var w="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var x=this.multiSelect.rangeList.ranges,A=[],v=0;v0);M<0&&(M=0),S>=y&&(S=y-1)}var L=this.session.removeFullLines(M,S);L=this.$reAlignText(L,T),this.session.insert({row:M,column:0},L.join(` `)+` -`),T||($.start.column=0,$.end.column=L[L.length-1].length),this.selection.setRange($)}else{E.forEach(function(I){x.substractPoint(I.cursor)});var _=0,k=1/0,R=A.map(function(I){var D=I.cursor,O=w.getLine(D.row),N=O.substr(D.column).search(/\S/g);return N==-1&&(N=0),D.column>_&&(_=D.column),NP?w.insert(O,o.stringRepeat(" ",N-P)):w.remove(new p(O.row,O.column,O.row,O.column-N+P)),I.start.column=I.end.column=_,I.start.row=I.end.row=O.row,I.cursor=I.end}),x.fromOrientedRange(A[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,x){var A=!0,v=!0,E,$,M;return w.map(function(L){var _=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?E==null?(E=_[1].length,$=_[2].length,M=_[3].length,_):(E+$+M!=_[1].length+_[2].length+_[3].length&&(v=!1),E!=_[1].length&&(A=!1),E>_[1].length&&(E=_[1].length),$<_[2].length&&($=_[2].length),M>_[3].length&&(M=_[3].length),_):[L]}).map(x?T:A?v?y:T:m);function S(L){return o.stringRepeat(" ",L)}function T(L){return L[2]?S(E)+L[2]+S($-L[2].length+M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function y(L){return L[2]?S(E+$-L[2].length)+L[2]+S(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function m(L){return L[2]?S(E)+L[2]+S(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(h.prototype);function f(w,x){return w.row==x.row&&w.column==x.column}e.onSessionChange=function(w){var x=w.session;x&&!x.multiSelect&&(x.$selectionMarkers=[],x.selection.$initRangeList(),x.multiSelect=x.selection),this.multiSelect=x&&x.multiSelect;var A=w.oldSession;A&&(A.multiSelect.off("addRange",this.$onAddRange),A.multiSelect.off("removeRange",this.$onRemoveRange),A.multiSelect.off("multiSelect",this.$onMultiSelect),A.multiSelect.off("singleSelect",this.$onSingleSelect),A.multiSelect.lead.off("change",this.$checkMultiselectChange),A.multiSelect.anchor.off("change",this.$checkMultiselectChange)),x&&(x.multiSelect.on("addRange",this.$onAddRange),x.multiSelect.on("removeRange",this.$onRemoveRange),x.multiSelect.on("multiSelect",this.$onMultiSelect),x.multiSelect.on("singleSelect",this.$onSingleSelect),x.multiSelect.lead.on("change",this.$checkMultiselectChange),x.multiSelect.anchor.on("change",this.$checkMultiselectChange)),x&&this.inMultiSelectMode!=x.selection.inMultiSelectMode&&(x.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=e.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(r.defaultCommands),C(w))}function C(w){if(!w.textInput)return;var x=w.textInput.getElement(),A=!1;u.addListener(x,"keydown",function(E){var $=E.keyCode==18&&!(E.ctrlKey||E.shiftKey||E.metaKey);w.$blockSelectEnabled&&$?A||(w.renderer.setMouseCursor("crosshair"),A=!0):A&&v()},w),u.addListener(x,"keyup",v,w),u.addListener(x,"blur",v,w);function v(E){A&&(w.renderer.setMouseCursor(""),A=!1)}}e.MultiSelect=b,t("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(w){b(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,e,c){"use strict";var d=t("../../range").Range,p=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(g,a,u){var o=g.getLine(u);return this.foldingStartMarker.test(o)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(g,a,u){return null},this.indentationBlock=function(g,a,u){var o=/\S/,r=g.getLine(a),n=r.search(o);if(n!=-1){for(var i=u||r.length,s=g.getLength(),l=a,h=a;++al){var C=g.getLine(h).length;return new d(l,i,h,C)}}},this.openingBracketBlock=function(g,a,u,o,r){var n={row:u,column:o+1},i=g.$findClosingBracket(a,n,r);if(i){var s=g.foldWidgets[i.row];return s==null&&(s=g.getFoldWidget(i.row)),s=="start"&&i.row>n.row&&(i.row--,i.column=g.getLine(i.row).length),d.fromPoints(n,i)}},this.closingBracketBlock=function(g,a,u,o,r){var n={row:u,column:o},i=g.$findOpeningBracket(a,n);if(i)return i.column++,n.column--,d.fromPoints(i,n)}}).call(p.prototype)});ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(t,e,c){"use strict";var d=t("../line_widgets").LineWidgets,p=t("../lib/dom"),g=t("../range").Range,a=t("../config").nls;function u(r,n,i){for(var s=0,l=r.length-1;s<=l;){var h=s+l>>1,f=i(n,r[h]);if(f>0)s=h+1;else if(f<0)l=h-1;else return h}return-(s+1)}function o(r,n,i){var s=r.getAnnotations().sort(g.comparePoints);if(s.length){var l=u(s,{row:n,column:-1},g.comparePoints);l<0&&(l=-l-1),l>=s.length?l=i>0?0:s.length-1:l===0&&i<0&&(l=s.length-1);var h=s[l];if(!(!h||!i)){if(h.row===n){do h=s[l+=i];while(h&&h.row===n);if(!h)return s.slice()}var f=[];n=h.row;do f[i<0?"unshift":"push"](h),h=s[l+=i];while(h&&h.row==n);return f.length&&f}}}e.showErrorMarker=function(r,n){var i=r.session;i.widgetManager||(i.widgetManager=new d(i),i.widgetManager.attach(r));var s=r.getCursorPosition(),l=s.row,h=i.widgetManager.getWidgetsAtRow(l).filter(function($){return $.type=="errorMarker"})[0];h?h.destroy():l-=n;var f=o(i,l,n),b;if(f){var C=f[0];s.column=(C.pos&&typeof C.column!="number"?C.pos.sc:C.column)||0,s.row=C.row,b=r.renderer.$gutterLayer.$annotations[s.row]}else{if(h)return;b={text:[a("Looks good!")],className:"ace_ok"}}r.session.unfold(s.row),r.selection.moveToPosition(s);var w={row:s.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},x=w.el.appendChild(p.createElement("div")),A=w.el.appendChild(p.createElement("div"));A.className="error_widget_arrow "+b.className;var v=r.renderer.$cursorLayer.getPixelPosition(s).left;A.style.left=v+r.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",x.className="error_widget "+b.className,x.innerHTML=b.text.join("
"),x.appendChild(p.createElement("div"));var E=function($,M,S){if(M===0&&(S==="esc"||S==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(E),i.widgetManager.removeLineWidget(w),r.off("changeSelection",w.destroy),r.off("changeSession",w.destroy),r.off("mouseup",w.destroy),r.off("change",w.destroy))},r.keyBinding.addKeyboardHandler(E),r.on("changeSelection",w.destroy),r.on("changeSession",w.destroy),r.on("mouseup",w.destroy),r.on("change",w.destroy),r.session.widgetManager.addLineWidget(w),w.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},p.importCssString(` +`),T||($.start.column=0,$.end.column=L[L.length-1].length),this.selection.setRange($)}else{E.forEach(function(R){x.substractPoint(R.cursor)});var _=0,k=1/0,I=A.map(function(R){var D=R.cursor,O=w.getLine(D.row),N=O.substr(D.column).search(/\S/g);return N==-1&&(N=0),D.column>_&&(_=D.column),NP?w.insert(O,o.stringRepeat(" ",N-P)):w.remove(new p(O.row,O.column,O.row,O.column-N+P)),R.start.column=R.end.column=_,R.start.row=R.end.row=O.row,R.cursor=R.end}),x.fromOrientedRange(A[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(w,x){var A=!0,v=!0,E,$,M;return w.map(function(L){var _=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return _?E==null?(E=_[1].length,$=_[2].length,M=_[3].length,_):(E+$+M!=_[1].length+_[2].length+_[3].length&&(v=!1),E!=_[1].length&&(A=!1),E>_[1].length&&(E=_[1].length),$<_[2].length&&($=_[2].length),M>_[3].length&&(M=_[3].length),_):[L]}).map(x?T:A?v?y:T:m);function S(L){return o.stringRepeat(" ",L)}function T(L){return L[2]?S(E)+L[2]+S($-L[2].length+M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function y(L){return L[2]?S(E+$-L[2].length)+L[2]+S(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function m(L){return L[2]?S(E)+L[2]+S(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(h.prototype);function f(w,x){return w.row==x.row&&w.column==x.column}e.onSessionChange=function(w){var x=w.session;x&&!x.multiSelect&&(x.$selectionMarkers=[],x.selection.$initRangeList(),x.multiSelect=x.selection),this.multiSelect=x&&x.multiSelect;var A=w.oldSession;A&&(A.multiSelect.off("addRange",this.$onAddRange),A.multiSelect.off("removeRange",this.$onRemoveRange),A.multiSelect.off("multiSelect",this.$onMultiSelect),A.multiSelect.off("singleSelect",this.$onSingleSelect),A.multiSelect.lead.off("change",this.$checkMultiselectChange),A.multiSelect.anchor.off("change",this.$checkMultiselectChange)),x&&(x.multiSelect.on("addRange",this.$onAddRange),x.multiSelect.on("removeRange",this.$onRemoveRange),x.multiSelect.on("multiSelect",this.$onMultiSelect),x.multiSelect.on("singleSelect",this.$onSingleSelect),x.multiSelect.lead.on("change",this.$checkMultiselectChange),x.multiSelect.anchor.on("change",this.$checkMultiselectChange)),x&&this.inMultiSelectMode!=x.selection.inMultiSelectMode&&(x.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(w){w.$multiselectOnSessionChange||(w.$onAddRange=w.$onAddRange.bind(w),w.$onRemoveRange=w.$onRemoveRange.bind(w),w.$onMultiSelect=w.$onMultiSelect.bind(w),w.$onSingleSelect=w.$onSingleSelect.bind(w),w.$multiselectOnSessionChange=e.onSessionChange.bind(w),w.$checkMultiselectChange=w.$checkMultiselectChange.bind(w),w.$multiselectOnSessionChange(w),w.on("changeSession",w.$multiselectOnSessionChange),w.on("mousedown",a),w.commands.addCommands(r.defaultCommands),C(w))}function C(w){if(!w.textInput)return;var x=w.textInput.getElement(),A=!1;u.addListener(x,"keydown",function(E){var $=E.keyCode==18&&!(E.ctrlKey||E.shiftKey||E.metaKey);w.$blockSelectEnabled&&$?A||(w.renderer.setMouseCursor("crosshair"),A=!0):A&&v()},w),u.addListener(x,"keyup",v,w),u.addListener(x,"blur",v,w);function v(E){A&&(w.renderer.setMouseCursor(""),A=!1)}}e.MultiSelect=b,t("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(w){b(this),w?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(w){this.$blockSelectEnabled=w},value:!0}})});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,e,c){"use strict";var d=t("../../range").Range,p=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(g,a,u){var o=g.getLine(u);return this.foldingStartMarker.test(o)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(g,a,u){return null},this.indentationBlock=function(g,a,u){var o=/\S/,r=g.getLine(a),n=r.search(o);if(n!=-1){for(var i=u||r.length,s=g.getLength(),l=a,h=a;++al){var C=g.getLine(h).length;return new d(l,i,h,C)}}},this.openingBracketBlock=function(g,a,u,o,r){var n={row:u,column:o+1},i=g.$findClosingBracket(a,n,r);if(i){var s=g.foldWidgets[i.row];return s==null&&(s=g.getFoldWidget(i.row)),s=="start"&&i.row>n.row&&(i.row--,i.column=g.getLine(i.row).length),d.fromPoints(n,i)}},this.closingBracketBlock=function(g,a,u,o,r){var n={row:u,column:o},i=g.$findOpeningBracket(a,n);if(i)return i.column++,n.column--,d.fromPoints(i,n)}}).call(p.prototype)});ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(t,e,c){"use strict";var d=t("../line_widgets").LineWidgets,p=t("../lib/dom"),g=t("../range").Range,a=t("../config").nls;function u(r,n,i){for(var s=0,l=r.length-1;s<=l;){var h=s+l>>1,f=i(n,r[h]);if(f>0)s=h+1;else if(f<0)l=h-1;else return h}return-(s+1)}function o(r,n,i){var s=r.getAnnotations().sort(g.comparePoints);if(s.length){var l=u(s,{row:n,column:-1},g.comparePoints);l<0&&(l=-l-1),l>=s.length?l=i>0?0:s.length-1:l===0&&i<0&&(l=s.length-1);var h=s[l];if(!(!h||!i)){if(h.row===n){do h=s[l+=i];while(h&&h.row===n);if(!h)return s.slice()}var f=[];n=h.row;do f[i<0?"unshift":"push"](h),h=s[l+=i];while(h&&h.row==n);return f.length&&f}}}e.showErrorMarker=function(r,n){var i=r.session;i.widgetManager||(i.widgetManager=new d(i),i.widgetManager.attach(r));var s=r.getCursorPosition(),l=s.row,h=i.widgetManager.getWidgetsAtRow(l).filter(function($){return $.type=="errorMarker"})[0];h?h.destroy():l-=n;var f=o(i,l,n),b;if(f){var C=f[0];s.column=(C.pos&&typeof C.column!="number"?C.pos.sc:C.column)||0,s.row=C.row,b=r.renderer.$gutterLayer.$annotations[s.row]}else{if(h)return;b={text:[a("Looks good!")],className:"ace_ok"}}r.session.unfold(s.row),r.selection.moveToPosition(s);var w={row:s.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},x=w.el.appendChild(p.createElement("div")),A=w.el.appendChild(p.createElement("div"));A.className="error_widget_arrow "+b.className;var v=r.renderer.$cursorLayer.getPixelPosition(s).left;A.style.left=v+r.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",x.className="error_widget "+b.className,x.innerHTML=b.text.join("
"),x.appendChild(p.createElement("div"));var E=function($,M,S){if(M===0&&(S==="esc"||S==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(E),i.widgetManager.removeLineWidget(w),r.off("changeSelection",w.destroy),r.off("changeSession",w.destroy),r.off("mouseup",w.destroy),r.off("change",w.destroy))},r.keyBinding.addKeyboardHandler(E),r.on("changeSelection",w.destroy),r.on("changeSession",w.destroy),r.on("mouseup",w.destroy),r.on("change",w.destroy),r.session.widgetManager.addLineWidget(w),w.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},p.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; @@ -938,15 +938,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho border-left-color: transparent!important; top: -5px; } -`,"error_marker.css",!1)});ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,e,c){"use strict";t("./loader_build")(e);var d=t("./lib/dom"),p=t("./range").Range,g=t("./editor").Editor,a=t("./edit_session").EditSession,u=t("./undomanager").UndoManager,o=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.edit=function(r,n){if(typeof r=="string"){var i=r;if(r=document.getElementById(i),!r)throw new Error("ace.edit can't find div #"+i)}if(r&&r.env&&r.env.editor instanceof g)return r.env.editor;var s="";if(r&&/input|textarea/i.test(r.tagName)){var l=r;s=l.value,r=d.createElement("pre"),l.parentNode.replaceChild(r,l)}else r&&(s=r.textContent,r.innerHTML="");var h=e.createEditSession(s),f=new g(new o(r),h,n),b={document:h,editor:f,onResize:f.resize.bind(f,null)};return l&&(b.textarea=l),f.on("destroy",function(){b.editor.container.env=null}),f.container.env=f.env=b,f},e.createEditSession=function(r,n){var i=new a(r,n);return i.setUndoManager(new u),i},e.Range=p,e.Editor=g,e.EditSession=a,e.UndoManager=u,e.VirtualRenderer=o,e.version=e.config.version});(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var e=function(){return this}();!e&&typeof window<"u"&&(e=window),!e&&typeof self<"u"&&(e=self),e.ace||(e.ace=t);for(var c in t)t.hasOwnProperty(c)&&(e.ace[c]=t[c]);e.ace.default=e.ace,typeof ho=="object"&&typeof Kl=="object"&&ho&&(ho.exports=e.ace)})})()});var Jr={};ld(Jr,{afterMain:()=>Ma,afterRead:()=>$a,afterWrite:()=>Ia,applyStyles:()=>$i,arrow:()=>Wr,auto:()=>ir,basePlacements:()=>En,beforeMain:()=>La,beforeRead:()=>_a,beforeWrite:()=>ka,bottom:()=>it,clippingParents:()=>Ho,computeStyles:()=>xi,createPopper:()=>hr,createPopperBase:()=>Ua,createPopperLite:()=>Va,detectOverflow:()=>Tt,end:()=>Dn,eventListeners:()=>Mi,flip:()=>zr,hide:()=>Gr,left:()=>Xe,main:()=>xa,modifierPhases:()=>Wo,offset:()=>Kr,placements:()=>or,popper:()=>ei,popperGenerator:()=>li,popperOffsets:()=>Ii,preventOverflow:()=>Yr,read:()=>Aa,reference:()=>Bo,right:()=>Qe,start:()=>un,top:()=>Je,variationPlacements:()=>Br,viewport:()=>rr,write:()=>Ra});var Je="top",it="bottom",Qe="right",Xe="left",ir="auto",En=[Je,it,Qe,Xe],un="start",Dn="end",Ho="clippingParents",rr="viewport",ei="popper",Bo="reference",Br=En.reduce(function(t,e){return t.concat([e+"-"+un,e+"-"+Dn])},[]),or=[].concat(En,[ir]).reduce(function(t,e){return t.concat([e,e+"-"+un,e+"-"+Dn])},[]),_a="beforeRead",Aa="read",$a="afterRead",La="beforeMain",xa="main",Ma="afterMain",ka="beforeWrite",Ra="write",Ia="afterWrite",Wo=[_a,Aa,$a,La,xa,Ma,ka,Ra,Ia];function ut(t){return t?(t.nodeName||"").toLowerCase():null}function Ge(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ht(t){var e=Ge(t).Element;return t instanceof e||t instanceof Element}function at(t){var e=Ge(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ai(t){if(typeof ShadowRoot>"u")return!1;var e=Ge(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function ud(t){var e=t.state;Object.keys(e.elements).forEach(function(c){var d=e.styles[c]||{},p=e.attributes[c]||{},g=e.elements[c];!at(g)||!ut(g)||(Object.assign(g.style,d),Object.keys(p).forEach(function(a){var u=p[a];u===!1?g.removeAttribute(a):g.setAttribute(a,u===!0?"":u)}))})}function dd(t){var e=t.state,c={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,c.popper),e.styles=c,e.elements.arrow&&Object.assign(e.elements.arrow.style,c.arrow),function(){Object.keys(e.elements).forEach(function(d){var p=e.elements[d],g=e.attributes[d]||{},a=Object.keys(e.styles.hasOwnProperty(d)?e.styles[d]:c[d]),u=a.reduce(function(o,r){return o[r]="",o},{});!at(p)||!ut(p)||(Object.assign(p.style,u),Object.keys(g).forEach(function(o){p.removeAttribute(o)}))})}}var $i={name:"applyStyles",enabled:!0,phase:"write",fn:ud,effect:dd,requires:["computeStyles"]};function dt(t){return t.split("-")[0]}var Qt=Math.max,ti=Math.min,Cn=Math.round;function Li(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function sr(){return!/^((?!chrome|android).)*safari/i.test(Li())}function Bt(t,e,c){e===void 0&&(e=!1),c===void 0&&(c=!1);var d=t.getBoundingClientRect(),p=1,g=1;e&&at(t)&&(p=t.offsetWidth>0&&Cn(d.width)/t.offsetWidth||1,g=t.offsetHeight>0&&Cn(d.height)/t.offsetHeight||1);var a=Ht(t)?Ge(t):window,u=a.visualViewport,o=!sr()&&c,r=(d.left+(o&&u?u.offsetLeft:0))/p,n=(d.top+(o&&u?u.offsetTop:0))/g,i=d.width/p,s=d.height/g;return{width:i,height:s,top:n,right:r+i,bottom:n+s,left:r,x:r,y:n}}function ni(t){var e=Bt(t),c=t.offsetWidth,d=t.offsetHeight;return Math.abs(e.width-c)<=1&&(c=e.width),Math.abs(e.height-d)<=1&&(d=e.height),{x:t.offsetLeft,y:t.offsetTop,width:c,height:d}}function ar(t,e){var c=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(c&&Ai(c)){var d=e;do{if(d&&t.isSameNode(d))return!0;d=d.parentNode||d.host}while(d)}return!1}function Ct(t){return Ge(t).getComputedStyle(t)}function Uo(t){return["table","td","th"].indexOf(ut(t))>=0}function mt(t){return((Ht(t)?t.ownerDocument:t.document)||window.document).documentElement}function Tn(t){return ut(t)==="html"?t:t.assignedSlot||t.parentNode||(Ai(t)?t.host:null)||mt(t)}function Oa(t){return!at(t)||Ct(t).position==="fixed"?null:t.offsetParent}function hd(t){var e=/firefox/i.test(Li()),c=/Trident/i.test(Li());if(c&&at(t)){var d=Ct(t);if(d.position==="fixed")return null}var p=Tn(t);for(Ai(p)&&(p=p.host);at(p)&&["html","body"].indexOf(ut(p))<0;){var g=Ct(p);if(g.transform!=="none"||g.perspective!=="none"||g.contain==="paint"||["transform","perspective"].indexOf(g.willChange)!==-1||e&&g.willChange==="filter"||e&&g.filter&&g.filter!=="none")return p;p=p.parentNode}return null}function Zt(t){for(var e=Ge(t),c=Oa(t);c&&Uo(c)&&Ct(c).position==="static";)c=Oa(c);return c&&(ut(c)==="html"||ut(c)==="body"&&Ct(c).position==="static")?e:c||hd(t)||e}function ii(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ri(t,e,c){return Qt(t,ti(e,c))}function Da(t,e,c){var d=ri(t,e,c);return d>c?c:d}function lr(){return{top:0,right:0,bottom:0,left:0}}function cr(t){return Object.assign({},lr(),t)}function ur(t,e){return e.reduce(function(c,d){return c[d]=t,c},{})}var fd=function(e,c){return e=typeof e=="function"?e(Object.assign({},c.rects,{placement:c.placement})):e,cr(typeof e!="number"?e:ur(e,En))};function pd(t){var e,c=t.state,d=t.name,p=t.options,g=c.elements.arrow,a=c.modifiersData.popperOffsets,u=dt(c.placement),o=ii(u),r=[Xe,Qe].indexOf(u)>=0,n=r?"height":"width";if(!(!g||!a)){var i=fd(p.padding,c),s=ni(g),l=o==="y"?Je:Xe,h=o==="y"?it:Qe,f=c.rects.reference[n]+c.rects.reference[o]-a[o]-c.rects.popper[n],b=a[o]-c.rects.reference[o],C=Zt(g),w=C?o==="y"?C.clientHeight||0:C.clientWidth||0:0,x=f/2-b/2,A=i[l],v=w-s[n]-i[h],E=w/2-s[n]/2+x,$=ri(A,E,v),M=o;c.modifiersData[d]=(e={},e[M]=$,e.centerOffset=$-E,e)}}function gd(t){var e=t.state,c=t.options,d=c.element,p=d===void 0?"[data-popper-arrow]":d;p!=null&&(typeof p=="string"&&(p=e.elements.popper.querySelector(p),!p)||ar(e.elements.popper,p)&&(e.elements.arrow=p))}var Wr={name:"arrow",enabled:!0,phase:"main",fn:pd,effect:gd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wt(t){return t.split("-")[1]}var md={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vd(t,e){var c=t.x,d=t.y,p=e.devicePixelRatio||1;return{x:Cn(c*p)/p||0,y:Cn(d*p)/p||0}}function Pa(t){var e,c=t.popper,d=t.popperRect,p=t.placement,g=t.variation,a=t.offsets,u=t.position,o=t.gpuAcceleration,r=t.adaptive,n=t.roundOffsets,i=t.isFixed,s=a.x,l=s===void 0?0:s,h=a.y,f=h===void 0?0:h,b=typeof n=="function"?n({x:l,y:f}):{x:l,y:f};l=b.x,f=b.y;var C=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),x=Xe,A=Je,v=window;if(r){var E=Zt(c),$="clientHeight",M="clientWidth";if(E===Ge(c)&&(E=mt(c),Ct(E).position!=="static"&&u==="absolute"&&($="scrollHeight",M="scrollWidth")),E=E,p===Je||(p===Xe||p===Qe)&&g===Dn){A=it;var S=i&&E===v&&v.visualViewport?v.visualViewport.height:E[$];f-=S-d.height,f*=o?1:-1}if(p===Xe||(p===Je||p===it)&&g===Dn){x=Qe;var T=i&&E===v&&v.visualViewport?v.visualViewport.width:E[M];l-=T-d.width,l*=o?1:-1}}var y=Object.assign({position:u},r&&md),m=n===!0?vd({x:l,y:f},Ge(c)):{x:l,y:f};if(l=m.x,f=m.y,o){var L;return Object.assign({},y,(L={},L[A]=w?"0":"",L[x]=C?"0":"",L.transform=(v.devicePixelRatio||1)<=1?"translate("+l+"px, "+f+"px)":"translate3d("+l+"px, "+f+"px, 0)",L))}return Object.assign({},y,(e={},e[A]=w?f+"px":"",e[x]=C?l+"px":"",e.transform="",e))}function bd(t){var e=t.state,c=t.options,d=c.gpuAcceleration,p=d===void 0?!0:d,g=c.adaptive,a=g===void 0?!0:g,u=c.roundOffsets,o=u===void 0?!0:u,r={placement:dt(e.placement),variation:Wt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:p,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Pa(Object.assign({},r,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:o})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Pa(Object.assign({},r,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var xi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bd,data:{}};var Ur={passive:!0};function yd(t){var e=t.state,c=t.instance,d=t.options,p=d.scroll,g=p===void 0?!0:p,a=d.resize,u=a===void 0?!0:a,o=Ge(e.elements.popper),r=[].concat(e.scrollParents.reference,e.scrollParents.popper);return g&&r.forEach(function(n){n.addEventListener("scroll",c.update,Ur)}),u&&o.addEventListener("resize",c.update,Ur),function(){g&&r.forEach(function(n){n.removeEventListener("scroll",c.update,Ur)}),u&&o.removeEventListener("resize",c.update,Ur)}}var Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yd,data:{}};var wd={left:"right",right:"left",bottom:"top",top:"bottom"};function ki(t){return t.replace(/left|right|bottom|top/g,function(e){return wd[e]})}var Ed={start:"end",end:"start"};function Vr(t){return t.replace(/start|end/g,function(e){return Ed[e]})}function oi(t){var e=Ge(t),c=e.pageXOffset,d=e.pageYOffset;return{scrollLeft:c,scrollTop:d}}function si(t){return Bt(mt(t)).left+oi(t).scrollLeft}function Vo(t,e){var c=Ge(t),d=mt(t),p=c.visualViewport,g=d.clientWidth,a=d.clientHeight,u=0,o=0;if(p){g=p.width,a=p.height;var r=sr();(r||!r&&e==="fixed")&&(u=p.offsetLeft,o=p.offsetTop)}return{width:g,height:a,x:u+si(t),y:o}}function jo(t){var e,c=mt(t),d=oi(t),p=(e=t.ownerDocument)==null?void 0:e.body,g=Qt(c.scrollWidth,c.clientWidth,p?p.scrollWidth:0,p?p.clientWidth:0),a=Qt(c.scrollHeight,c.clientHeight,p?p.scrollHeight:0,p?p.clientHeight:0),u=-d.scrollLeft+si(t),o=-d.scrollTop;return Ct(p||c).direction==="rtl"&&(u+=Qt(c.clientWidth,p?p.clientWidth:0)-g),{width:g,height:a,x:u,y:o}}function ai(t){var e=Ct(t),c=e.overflow,d=e.overflowX,p=e.overflowY;return/auto|scroll|overlay|hidden/.test(c+p+d)}function jr(t){return["html","body","#document"].indexOf(ut(t))>=0?t.ownerDocument.body:at(t)&&ai(t)?t:jr(Tn(t))}function Pn(t,e){var c;e===void 0&&(e=[]);var d=jr(t),p=d===((c=t.ownerDocument)==null?void 0:c.body),g=Ge(d),a=p?[g].concat(g.visualViewport||[],ai(d)?d:[]):d,u=e.concat(a);return p?u:u.concat(Pn(Tn(a)))}function Ri(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Cd(t,e){var c=Bt(t,!1,e==="fixed");return c.top=c.top+t.clientTop,c.left=c.left+t.clientLeft,c.bottom=c.top+t.clientHeight,c.right=c.left+t.clientWidth,c.width=t.clientWidth,c.height=t.clientHeight,c.x=c.left,c.y=c.top,c}function Na(t,e,c){return e===rr?Ri(Vo(t,c)):Ht(e)?Cd(e,c):Ri(jo(mt(t)))}function Td(t){var e=Pn(Tn(t)),c=["absolute","fixed"].indexOf(Ct(t).position)>=0,d=c&&at(t)?Zt(t):t;return Ht(d)?e.filter(function(p){return Ht(p)&&ar(p,d)&&ut(p)!=="body"}):[]}function zo(t,e,c,d){var p=e==="clippingParents"?Td(t):[].concat(e),g=[].concat(p,[c]),a=g[0],u=g.reduce(function(o,r){var n=Na(t,r,d);return o.top=Qt(n.top,o.top),o.right=ti(n.right,o.right),o.bottom=ti(n.bottom,o.bottom),o.left=Qt(n.left,o.left),o},Na(t,a,d));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function dr(t){var e=t.reference,c=t.element,d=t.placement,p=d?dt(d):null,g=d?Wt(d):null,a=e.x+e.width/2-c.width/2,u=e.y+e.height/2-c.height/2,o;switch(p){case Je:o={x:a,y:e.y-c.height};break;case it:o={x:a,y:e.y+e.height};break;case Qe:o={x:e.x+e.width,y:u};break;case Xe:o={x:e.x-c.width,y:u};break;default:o={x:e.x,y:e.y}}var r=p?ii(p):null;if(r!=null){var n=r==="y"?"height":"width";switch(g){case un:o[r]=o[r]-(e[n]/2-c[n]/2);break;case Dn:o[r]=o[r]+(e[n]/2-c[n]/2);break;default:}}return o}function Tt(t,e){e===void 0&&(e={});var c=e,d=c.placement,p=d===void 0?t.placement:d,g=c.strategy,a=g===void 0?t.strategy:g,u=c.boundary,o=u===void 0?Ho:u,r=c.rootBoundary,n=r===void 0?rr:r,i=c.elementContext,s=i===void 0?ei:i,l=c.altBoundary,h=l===void 0?!1:l,f=c.padding,b=f===void 0?0:f,C=cr(typeof b!="number"?b:ur(b,En)),w=s===ei?Bo:ei,x=t.rects.popper,A=t.elements[h?w:s],v=zo(Ht(A)?A:A.contextElement||mt(t.elements.popper),o,n,a),E=Bt(t.elements.reference),$=dr({reference:E,element:x,strategy:"absolute",placement:p}),M=Ri(Object.assign({},x,$)),S=s===ei?M:E,T={top:v.top-S.top+C.top,bottom:S.bottom-v.bottom+C.bottom,left:v.left-S.left+C.left,right:S.right-v.right+C.right},y=t.modifiersData.offset;if(s===ei&&y){var m=y[p];Object.keys(T).forEach(function(L){var _=[Qe,it].indexOf(L)>=0?1:-1,k=[Je,it].indexOf(L)>=0?"y":"x";T[L]+=m[k]*_})}return T}function Go(t,e){e===void 0&&(e={});var c=e,d=c.placement,p=c.boundary,g=c.rootBoundary,a=c.padding,u=c.flipVariations,o=c.allowedAutoPlacements,r=o===void 0?or:o,n=Wt(d),i=n?u?Br:Br.filter(function(h){return Wt(h)===n}):En,s=i.filter(function(h){return r.indexOf(h)>=0});s.length===0&&(s=i);var l=s.reduce(function(h,f){return h[f]=Tt(t,{placement:f,boundary:p,rootBoundary:g,padding:a})[dt(f)],h},{});return Object.keys(l).sort(function(h,f){return l[h]-l[f]})}function Sd(t){if(dt(t)===ir)return[];var e=ki(t);return[Vr(t),e,Vr(e)]}function _d(t){var e=t.state,c=t.options,d=t.name;if(!e.modifiersData[d]._skip){for(var p=c.mainAxis,g=p===void 0?!0:p,a=c.altAxis,u=a===void 0?!0:a,o=c.fallbackPlacements,r=c.padding,n=c.boundary,i=c.rootBoundary,s=c.altBoundary,l=c.flipVariations,h=l===void 0?!0:l,f=c.allowedAutoPlacements,b=e.options.placement,C=dt(b),w=C===b,x=o||(w||!h?[ki(b)]:Sd(b)),A=[b].concat(x).reduce(function(U,j){return U.concat(dt(j)===ir?Go(e,{placement:j,boundary:n,rootBoundary:i,padding:r,flipVariations:h,allowedAutoPlacements:f}):j)},[]),v=e.rects.reference,E=e.rects.popper,$=new Map,M=!0,S=A[0],T=0;T=0,k=_?"width":"height",R=Tt(e,{placement:y,boundary:n,rootBoundary:i,altBoundary:s,padding:r}),I=_?L?Qe:Xe:L?it:Je;v[k]>E[k]&&(I=ki(I));var D=ki(I),O=[];if(g&&O.push(R[m]<=0),u&&O.push(R[I]<=0,R[D]<=0),O.every(function(U){return U})){S=y,M=!1;break}$.set(y,O)}if(M)for(var N=h?3:1,P=function(j){var J=A.find(function(z){var X=$.get(z);if(X)return X.slice(0,j).every(function(ee){return ee})});if(J)return S=J,"break"},H=N;H>0;H--){var F=P(H);if(F==="break")break}e.placement!==S&&(e.modifiersData[d]._skip=!0,e.placement=S,e.reset=!0)}}var zr={name:"flip",enabled:!0,phase:"main",fn:_d,requiresIfExists:["offset"],data:{_skip:!1}};function Fa(t,e,c){return c===void 0&&(c={x:0,y:0}),{top:t.top-e.height-c.y,right:t.right-e.width+c.x,bottom:t.bottom-e.height+c.y,left:t.left-e.width-c.x}}function Ha(t){return[Je,Qe,it,Xe].some(function(e){return t[e]>=0})}function Ad(t){var e=t.state,c=t.name,d=e.rects.reference,p=e.rects.popper,g=e.modifiersData.preventOverflow,a=Tt(e,{elementContext:"reference"}),u=Tt(e,{altBoundary:!0}),o=Fa(a,d),r=Fa(u,p,g),n=Ha(o),i=Ha(r);e.modifiersData[c]={referenceClippingOffsets:o,popperEscapeOffsets:r,isReferenceHidden:n,hasPopperEscaped:i},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":n,"data-popper-escaped":i})}var Gr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ad};function $d(t,e,c){var d=dt(t),p=[Xe,Je].indexOf(d)>=0?-1:1,g=typeof c=="function"?c(Object.assign({},e,{placement:t})):c,a=g[0],u=g[1];return a=a||0,u=(u||0)*p,[Xe,Qe].indexOf(d)>=0?{x:u,y:a}:{x:a,y:u}}function Ld(t){var e=t.state,c=t.options,d=t.name,p=c.offset,g=p===void 0?[0,0]:p,a=or.reduce(function(n,i){return n[i]=$d(i,e.rects,g),n},{}),u=a[e.placement],o=u.x,r=u.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=o,e.modifiersData.popperOffsets.y+=r),e.modifiersData[d]=a}var Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ld};function xd(t){var e=t.state,c=t.name;e.modifiersData[c]=dr({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Ii={name:"popperOffsets",enabled:!0,phase:"read",fn:xd,data:{}};function Ko(t){return t==="x"?"y":"x"}function Md(t){var e=t.state,c=t.options,d=t.name,p=c.mainAxis,g=p===void 0?!0:p,a=c.altAxis,u=a===void 0?!1:a,o=c.boundary,r=c.rootBoundary,n=c.altBoundary,i=c.padding,s=c.tether,l=s===void 0?!0:s,h=c.tetherOffset,f=h===void 0?0:h,b=Tt(e,{boundary:o,rootBoundary:r,padding:i,altBoundary:n}),C=dt(e.placement),w=Wt(e.placement),x=!w,A=ii(C),v=Ko(A),E=e.modifiersData.popperOffsets,$=e.rects.reference,M=e.rects.popper,S=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,T=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),y=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,m={x:0,y:0};if(E){if(g){var L,_=A==="y"?Je:Xe,k=A==="y"?it:Qe,R=A==="y"?"height":"width",I=E[A],D=I+b[_],O=I-b[k],N=l?-M[R]/2:0,P=w===un?$[R]:M[R],H=w===un?-M[R]:-$[R],F=e.elements.arrow,U=l&&F?ni(F):{width:0,height:0},j=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:lr(),J=j[_],z=j[k],X=ri(0,$[R],U[R]),ee=x?$[R]/2-N-X-J-T.mainAxis:P-X-J-T.mainAxis,Z=x?-$[R]/2+N+X+z+T.mainAxis:H+X+z+T.mainAxis,pe=e.elements.arrow&&Zt(e.elements.arrow),ve=pe?A==="y"?pe.clientTop||0:pe.clientLeft||0:0,de=(L=y?.[A])!=null?L:0,B=I+ee-de-ve,K=I+Z-de,ne=ri(l?ti(D,B):D,I,l?Qt(O,K):O);E[A]=ne,m[A]=ne-I}if(u){var Q,se=A==="x"?Je:Xe,te=A==="x"?it:Qe,re=E[v],Se=v==="y"?"height":"width",he=re+b[se],xe=re-b[te],W=[Je,Xe].indexOf(C)!==-1,G=(Q=y?.[v])!=null?Q:0,q=W?he:re-$[Se]-M[Se]-G+T.altAxis,ue=W?re+$[Se]+M[Se]-G-T.altAxis:xe,Ce=l&&W?Da(q,re,ue):ri(l?q:he,re,l?ue:xe);E[v]=Ce,m[v]=Ce-re}e.modifiersData[d]=m}}var Yr={name:"preventOverflow",enabled:!0,phase:"main",fn:Md,requiresIfExists:["offset"]};function Yo(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Jo(t){return t===Ge(t)||!at(t)?oi(t):Yo(t)}function kd(t){var e=t.getBoundingClientRect(),c=Cn(e.width)/t.offsetWidth||1,d=Cn(e.height)/t.offsetHeight||1;return c!==1||d!==1}function Xo(t,e,c){c===void 0&&(c=!1);var d=at(e),p=at(e)&&kd(e),g=mt(e),a=Bt(t,p,c),u={scrollLeft:0,scrollTop:0},o={x:0,y:0};return(d||!d&&!c)&&((ut(e)!=="body"||ai(g))&&(u=Jo(e)),at(e)?(o=Bt(e,!0),o.x+=e.clientLeft,o.y+=e.clientTop):g&&(o.x=si(g))),{x:a.left+u.scrollLeft-o.x,y:a.top+u.scrollTop-o.y,width:a.width,height:a.height}}function Rd(t){var e=new Map,c=new Set,d=[];t.forEach(function(g){e.set(g.name,g)});function p(g){c.add(g.name);var a=[].concat(g.requires||[],g.requiresIfExists||[]);a.forEach(function(u){if(!c.has(u)){var o=e.get(u);o&&p(o)}}),d.push(g)}return t.forEach(function(g){c.has(g.name)||p(g)}),d}function Qo(t){var e=Rd(t);return Wo.reduce(function(c,d){return c.concat(e.filter(function(p){return p.phase===d}))},[])}function Zo(t){var e;return function(){return e||(e=new Promise(function(c){Promise.resolve().then(function(){e=void 0,c(t())})})),e}}function qo(t){var e=t.reduce(function(c,d){var p=c[d.name];return c[d.name]=p?Object.assign({},p,d,{options:Object.assign({},p.options,d.options),data:Object.assign({},p.data,d.data)}):d,c},{});return Object.keys(e).map(function(c){return e[c]})}var Ba={placement:"bottom",modifiers:[],strategy:"absolute"};function Wa(){for(var t=arguments.length,e=new Array(t),c=0;c(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,c)=>`#${CSS.escape(c)}`)),t),Nd=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Fd=t=>{do t+=Math.floor(Math.random()*Dd);while(document.getElementById(t));return t},Hd=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:c}=window.getComputedStyle(t),d=Number.parseFloat(e),p=Number.parseFloat(c);return!d&&!p?0:(e=e.split(",")[0],c=c.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(c))*Pd)},yl=t=>{t.dispatchEvent(new Event(gs))},Sn=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),Fn=t=>Sn(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(bl(t)):null,Vi=t=>{if(!Sn(t)||t.getClientRects().length===0)return!1;let e=getComputedStyle(t).getPropertyValue("visibility")==="visible",c=t.closest("details:not([open])");if(!c)return e;if(c!==t){let d=t.closest("summary");if(d&&d.parentNode!==c||d===null)return!1}return e},Hn=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",wl=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){let e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?wl(t.parentNode):null},ro=()=>{},vr=t=>{t.offsetHeight},El=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ts=[],Bd=t=>{document.readyState==="loading"?(ts.length||document.addEventListener("DOMContentLoaded",()=>{for(let e of ts)e()}),ts.push(t)):t()},Ut=()=>document.documentElement.dir==="rtl",zt=t=>{Bd(()=>{let e=El();if(e){let c=t.NAME,d=e.fn[c];e.fn[c]=t.jQueryInterface,e.fn[c].Constructor=t,e.fn[c].noConflict=()=>(e.fn[c]=d,t.jQueryInterface)}})},_t=(t,e=[],c=t)=>typeof t=="function"?t(...e):c,Cl=(t,e,c=!0)=>{if(!c){_t(t);return}let d=5,p=Hd(e)+d,g=!1,a=({target:u})=>{u===e&&(g=!0,e.removeEventListener(gs,a),_t(t))};e.addEventListener(gs,a),setTimeout(()=>{g||yl(e)},p)},ys=(t,e,c,d)=>{let p=t.length,g=t.indexOf(e);return g===-1?!c&&d?t[p-1]:t[0]:(g+=c?1:-1,d&&(g=(g+p)%p),t[Math.max(0,Math.min(g,p-1))])},Wd=/[^.]*(?=\..*)\.|.*/,Ud=/\..*/,Vd=/::\d+$/,ns={},ja=1,Tl={mouseenter:"mouseover",mouseleave:"mouseout"},jd=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Sl(t,e){return e&&`${e}::${ja++}`||t.uidEvent||ja++}function _l(t){let e=Sl(t);return t.uidEvent=e,ns[e]=ns[e]||{},ns[e]}function zd(t,e){return function c(d){return ws(d,{delegateTarget:t}),c.oneOff&&Y.off(t,d.type,e),e.apply(t,[d])}}function Gd(t,e,c){return function d(p){let g=t.querySelectorAll(e);for(let{target:a}=p;a&&a!==this;a=a.parentNode)for(let u of g)if(u===a)return ws(p,{delegateTarget:a}),d.oneOff&&Y.off(t,p.type,e,c),c.apply(a,[p])}}function Al(t,e,c=null){return Object.values(t).find(d=>d.callable===e&&d.delegationSelector===c)}function $l(t,e,c){let d=typeof e=="string",p=d?c:e||c,g=Ll(t);return jd.has(g)||(g=t),[d,p,g]}function za(t,e,c,d,p){if(typeof e!="string"||!t)return;let[g,a,u]=$l(e,c,d);e in Tl&&(a=(h=>function(f){if(!f.relatedTarget||f.relatedTarget!==f.delegateTarget&&!f.delegateTarget.contains(f.relatedTarget))return h.call(this,f)})(a));let o=_l(t),r=o[u]||(o[u]={}),n=Al(r,a,g?c:null);if(n){n.oneOff=n.oneOff&&p;return}let i=Sl(a,e.replace(Wd,"")),s=g?Gd(t,c,a):zd(t,a);s.delegationSelector=g?c:null,s.callable=a,s.oneOff=p,s.uidEvent=i,r[i]=s,t.addEventListener(u,s,g)}function ms(t,e,c,d,p){let g=Al(e[c],d,p);g&&(t.removeEventListener(c,g,!!p),delete e[c][g.uidEvent])}function Kd(t,e,c,d){let p=e[c]||{};for(let[g,a]of Object.entries(p))g.includes(d)&&ms(t,e,c,a.callable,a.delegationSelector)}function Ll(t){return t=t.replace(Ud,""),Tl[t]||t}var Y={on(t,e,c,d){za(t,e,c,d,!1)},one(t,e,c,d){za(t,e,c,d,!0)},off(t,e,c,d){if(typeof e!="string"||!t)return;let[p,g,a]=$l(e,c,d),u=a!==e,o=_l(t),r=o[a]||{},n=e.startsWith(".");if(typeof g<"u"){if(!Object.keys(r).length)return;ms(t,o,a,g,p?c:null);return}if(n)for(let i of Object.keys(o))Kd(t,o,i,e.slice(1));for(let[i,s]of Object.entries(r)){let l=i.replace(Vd,"");(!u||e.includes(l))&&ms(t,o,a,s.callable,s.delegationSelector)}},trigger(t,e,c){if(typeof e!="string"||!t)return null;let d=El(),p=Ll(e),g=e!==p,a=null,u=!0,o=!0,r=!1;g&&d&&(a=d.Event(e,c),d(t).trigger(a),u=!a.isPropagationStopped(),o=!a.isImmediatePropagationStopped(),r=a.isDefaultPrevented());let n=ws(new Event(e,{bubbles:u,cancelable:!0}),c);return r&&n.preventDefault(),o&&t.dispatchEvent(n),n.defaultPrevented&&a&&a.preventDefault(),n}};function ws(t,e={}){for(let[c,d]of Object.entries(e))try{t[c]=d}catch{Object.defineProperty(t,c,{configurable:!0,get(){return d}})}return t}function Ga(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function is(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var _n={setDataAttribute(t,e,c){t.setAttribute(`data-bs-${is(e)}`,c)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${is(e)}`)},getDataAttributes(t){if(!t)return{};let e={},c=Object.keys(t.dataset).filter(d=>d.startsWith("bs")&&!d.startsWith("bsConfig"));for(let d of c){let p=d.replace(/^bs/,"");p=p.charAt(0).toLowerCase()+p.slice(1,p.length),e[p]=Ga(t.dataset[d])}return e},getDataAttribute(t,e){return Ga(t.getAttribute(`data-bs-${is(e)}`))}},di=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,c){let d=Sn(c)?_n.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof d=="object"?d:{},...Sn(c)?_n.getDataAttributes(c):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,c=this.constructor.DefaultType){for(let[d,p]of Object.entries(c)){let g=e[d],a=Sn(g)?"element":Nd(g);if(!new RegExp(p).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${d}" provided type "${a}" but expected type "${p}".`)}}},Yd="5.3.2",Ot=class extends di{constructor(e,c){super(),e=Fn(e),e&&(this._element=e,this._config=this._getConfig(c),es.set(this._element,this.constructor.DATA_KEY,this))}dispose(){es.remove(this._element,this.constructor.DATA_KEY),Y.off(this._element,this.constructor.EVENT_KEY);for(let e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,c,d=!0){Cl(e,c,d)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return es.get(Fn(e),this.DATA_KEY)}static getOrCreateInstance(e,c={}){return this.getInstance(e)||new this(e,typeof c=="object"?c:null)}static get VERSION(){return Yd}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},rs=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let c=t.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),e=c&&c!=="#"?bl(c.trim()):null}return e},le={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(c=>c.matches(e))},parents(t,e){let c=[],d=t.parentNode.closest(e);for(;d;)c.push(d),d=d.parentNode.closest(e);return c},prev(t,e){let c=t.previousElementSibling;for(;c;){if(c.matches(e))return[c];c=c.previousElementSibling}return[]},next(t,e){let c=t.nextElementSibling;for(;c;){if(c.matches(e))return[c];c=c.nextElementSibling}return[]},focusableChildren(t){let e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(c=>!Hn(c)&&Vi(c))},getSelectorFromElement(t){let e=rs(t);return e&&le.findOne(e)?e:null},getElementFromSelector(t){let e=rs(t);return e?le.findOne(e):null},getMultipleElementsFromSelector(t){let e=rs(t);return e?le.find(e):[]}},lo=(t,e="hide")=>{let c=`click.dismiss${t.EVENT_KEY}`,d=t.NAME;Y.on(document,c,`[data-bs-dismiss="${d}"]`,function(p){if(["A","AREA"].includes(this.tagName)&&p.preventDefault(),Hn(this))return;let g=le.getElementFromSelector(this)||this.closest(`.${d}`);t.getOrCreateInstance(g)[e]()})},Jd="alert",Xd="bs.alert",xl=`.${Xd}`,Qd=`close${xl}`,Zd=`closed${xl}`,qd="fade",eh="show",Hi=class extends Ot{static get NAME(){return Jd}close(){if(Y.trigger(this._element,Qd).defaultPrevented)return;this._element.classList.remove(eh);let c=this._element.classList.contains(qd);this._queueCallback(()=>this._destroyElement(),this._element,c)}_destroyElement(){this._element.remove(),Y.trigger(this._element,Zd),this.dispose()}static jQueryInterface(e){return this.each(function(){let c=Hi.getOrCreateInstance(this);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};lo(Hi,"close");zt(Hi);var th="button",nh="bs.button",ih=`.${nh}`,rh=".data-api",oh="active",Ka='[data-bs-toggle="button"]',sh=`click${ih}${rh}`,Bi=class extends Ot{static get NAME(){return th}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(oh))}static jQueryInterface(e){return this.each(function(){let c=Bi.getOrCreateInstance(this);e==="toggle"&&c[e]()})}};Y.on(document,sh,Ka,t=>{t.preventDefault();let e=t.target.closest(Ka);Bi.getOrCreateInstance(e).toggle()});zt(Bi);var ah="swipe",ji=".bs.swipe",lh=`touchstart${ji}`,ch=`touchmove${ji}`,uh=`touchend${ji}`,dh=`pointerdown${ji}`,hh=`pointerup${ji}`,fh="touch",ph="pen",gh="pointer-event",mh=40,vh={endCallback:null,leftCallback:null,rightCallback:null},bh={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},Wi=class extends di{constructor(e,c){super(),this._element=e,!(!e||!Wi.isSupported())&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return vh}static get DefaultType(){return bh}static get NAME(){return ah}dispose(){Y.off(this._element,ji)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),_t(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){let e=Math.abs(this._deltaX);if(e<=mh)return;let c=e/this._deltaX;this._deltaX=0,c&&_t(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(Y.on(this._element,dh,e=>this._start(e)),Y.on(this._element,hh,e=>this._end(e)),this._element.classList.add(gh)):(Y.on(this._element,lh,e=>this._start(e)),Y.on(this._element,ch,e=>this._move(e)),Y.on(this._element,uh,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===ph||e.pointerType===fh)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},yh="carousel",wh="bs.carousel",Vn=`.${wh}`,Ml=".data-api",Eh="ArrowLeft",Ch="ArrowRight",Th=500,fr="next",Oi="prev",Pi="left",no="right",Sh=`slide${Vn}`,os=`slid${Vn}`,_h=`keydown${Vn}`,Ah=`mouseenter${Vn}`,$h=`mouseleave${Vn}`,Lh=`dragstart${Vn}`,xh=`load${Vn}${Ml}`,Mh=`click${Vn}${Ml}`,kl="carousel",Xr="active",kh="slide",Rh="carousel-item-end",Ih="carousel-item-start",Oh="carousel-item-next",Dh="carousel-item-prev",Rl=".active",Il=".carousel-item",Ph=Rl+Il,Nh=".carousel-item img",Fh=".carousel-indicators",Hh="[data-bs-slide], [data-bs-slide-to]",Bh='[data-bs-ride="carousel"]',Wh={[Eh]:no,[Ch]:Pi},Uh={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Vh={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},hi=class extends Ot{constructor(e,c){super(e,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=le.findOne(Fh,this._element),this._addEventListeners(),this._config.ride===kl&&this.cycle()}static get Default(){return Uh}static get DefaultType(){return Vh}static get NAME(){return yh}next(){this._slide(fr)}nextWhenVisible(){!document.hidden&&Vi(this._element)&&this.next()}prev(){this._slide(Oi)}pause(){this._isSliding&&yl(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){Y.one(this._element,os,()=>this.cycle());return}this.cycle()}}to(e){let c=this._getItems();if(e>c.length-1||e<0)return;if(this._isSliding){Y.one(this._element,os,()=>this.to(e));return}let d=this._getItemIndex(this._getActive());if(d===e)return;let p=e>d?fr:Oi;this._slide(p,c[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&Y.on(this._element,_h,e=>this._keydown(e)),this._config.pause==="hover"&&(Y.on(this._element,Ah,()=>this.pause()),Y.on(this._element,$h,()=>this._maybeEnableCycle())),this._config.touch&&Wi.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let d of le.find(Nh,this._element))Y.on(d,Lh,p=>p.preventDefault());let c={leftCallback:()=>this._slide(this._directionToOrder(Pi)),rightCallback:()=>this._slide(this._directionToOrder(no)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Th+this._config.interval))}};this._swipeHelper=new Wi(this._element,c)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let c=Wh[e.key];c&&(e.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;let c=le.findOne(Rl,this._indicatorsElement);c.classList.remove(Xr),c.removeAttribute("aria-current");let d=le.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);d&&(d.classList.add(Xr),d.setAttribute("aria-current","true"))}_updateInterval(){let e=this._activeElement||this._getActive();if(!e)return;let c=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(e,c=null){if(this._isSliding)return;let d=this._getActive(),p=e===fr,g=c||ys(this._getItems(),d,p,this._config.wrap);if(g===d)return;let a=this._getItemIndex(g),u=l=>Y.trigger(this._element,l,{relatedTarget:g,direction:this._orderToDirection(e),from:this._getItemIndex(d),to:a});if(u(Sh).defaultPrevented||!d||!g)return;let r=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=g;let n=p?Ih:Rh,i=p?Oh:Dh;g.classList.add(i),vr(g),d.classList.add(n),g.classList.add(n);let s=()=>{g.classList.remove(n,i),g.classList.add(Xr),d.classList.remove(Xr,i,n),this._isSliding=!1,u(os)};this._queueCallback(s,d,this._isAnimated()),r&&this.cycle()}_isAnimated(){return this._element.classList.contains(kh)}_getActive(){return le.findOne(Ph,this._element)}_getItems(){return le.find(Il,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ut()?e===Pi?Oi:fr:e===Pi?fr:Oi}_orderToDirection(e){return Ut()?e===Oi?Pi:no:e===Oi?no:Pi}static jQueryInterface(e){return this.each(function(){let c=hi.getOrCreateInstance(this,e);if(typeof e=="number"){c.to(e);return}if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(document,Mh,Hh,function(t){let e=le.getElementFromSelector(this);if(!e||!e.classList.contains(kl))return;t.preventDefault();let c=hi.getOrCreateInstance(e),d=this.getAttribute("data-bs-slide-to");if(d){c.to(d),c._maybeEnableCycle();return}if(_n.getDataAttribute(this,"slide")==="next"){c.next(),c._maybeEnableCycle();return}c.prev(),c._maybeEnableCycle()});Y.on(window,xh,()=>{let t=le.find(Bh);for(let e of t)hi.getOrCreateInstance(e)});zt(hi);var jh="collapse",zh="bs.collapse",br=`.${zh}`,Gh=".data-api",Kh=`show${br}`,Yh=`shown${br}`,Jh=`hide${br}`,Xh=`hidden${br}`,Qh=`click${br}${Gh}`,ss="show",Fi="collapse",Qr="collapsing",Zh="collapsed",qh=`:scope .${Fi} .${Fi}`,ef="collapse-horizontal",tf="width",nf="height",rf=".collapse.show, .collapse.collapsing",vs='[data-bs-toggle="collapse"]',of={parent:null,toggle:!0},sf={parent:"(null|element)",toggle:"boolean"},fi=class extends Ot{constructor(e,c){super(e,c),this._isTransitioning=!1,this._triggerArray=[];let d=le.find(vs);for(let p of d){let g=le.getSelectorFromElement(p),a=le.find(g).filter(u=>u===this._element);g!==null&&a.length&&this._triggerArray.push(p)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return of}static get DefaultType(){return sf}static get NAME(){return jh}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(rf).filter(u=>u!==this._element).map(u=>fi.getOrCreateInstance(u,{toggle:!1}))),e.length&&e[0]._isTransitioning||Y.trigger(this._element,Kh).defaultPrevented)return;for(let u of e)u.hide();let d=this._getDimension();this._element.classList.remove(Fi),this._element.classList.add(Qr),this._element.style[d]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let p=()=>{this._isTransitioning=!1,this._element.classList.remove(Qr),this._element.classList.add(Fi,ss),this._element.style[d]="",Y.trigger(this._element,Yh)},a=`scroll${d[0].toUpperCase()+d.slice(1)}`;this._queueCallback(p,this._element,!0),this._element.style[d]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown()||Y.trigger(this._element,Jh).defaultPrevented)return;let c=this._getDimension();this._element.style[c]=`${this._element.getBoundingClientRect()[c]}px`,vr(this._element),this._element.classList.add(Qr),this._element.classList.remove(Fi,ss);for(let p of this._triggerArray){let g=le.getElementFromSelector(p);g&&!this._isShown(g)&&this._addAriaAndCollapsedClass([p],!1)}this._isTransitioning=!0;let d=()=>{this._isTransitioning=!1,this._element.classList.remove(Qr),this._element.classList.add(Fi),Y.trigger(this._element,Xh)};this._element.style[c]="",this._queueCallback(d,this._element,!0)}_isShown(e=this._element){return e.classList.contains(ss)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Fn(e.parent),e}_getDimension(){return this._element.classList.contains(ef)?tf:nf}_initializeChildren(){if(!this._config.parent)return;let e=this._getFirstLevelChildren(vs);for(let c of e){let d=le.getElementFromSelector(c);d&&this._addAriaAndCollapsedClass([c],this._isShown(d))}}_getFirstLevelChildren(e){let c=le.find(qh,this._config.parent);return le.find(e,this._config.parent).filter(d=>!c.includes(d))}_addAriaAndCollapsedClass(e,c){if(e.length)for(let d of e)d.classList.toggle(Zh,!c),d.setAttribute("aria-expanded",c)}static jQueryInterface(e){let c={};return typeof e=="string"&&/show|hide/.test(e)&&(c.toggle=!1),this.each(function(){let d=fi.getOrCreateInstance(this,c);if(typeof e=="string"){if(typeof d[e]>"u")throw new TypeError(`No method named "${e}"`);d[e]()}})}};Y.on(document,Qh,vs,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(let e of le.getMultipleElementsFromSelector(this))fi.getOrCreateInstance(e,{toggle:!1}).toggle()});zt(fi);var Ya="dropdown",af="bs.dropdown",pi=`.${af}`,Es=".data-api",lf="Escape",Ja="Tab",cf="ArrowUp",Xa="ArrowDown",uf=2,df=`hide${pi}`,hf=`hidden${pi}`,ff=`show${pi}`,pf=`shown${pi}`,Ol=`click${pi}${Es}`,Dl=`keydown${pi}${Es}`,gf=`keyup${pi}${Es}`,Ni="show",mf="dropup",vf="dropend",bf="dropstart",yf="dropup-center",wf="dropdown-center",ci='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ef=`${ci}.${Ni}`,io=".dropdown-menu",Cf=".navbar",Tf=".navbar-nav",Sf=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",_f=Ut()?"top-end":"top-start",Af=Ut()?"top-start":"top-end",$f=Ut()?"bottom-end":"bottom-start",Lf=Ut()?"bottom-start":"bottom-end",xf=Ut()?"left-start":"right-start",Mf=Ut()?"right-start":"left-start",kf="top",Rf="bottom",If={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Of={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},At=class extends Ot{constructor(e,c){super(e,c),this._popper=null,this._parent=this._element.parentNode,this._menu=le.next(this._element,io)[0]||le.prev(this._element,io)[0]||le.findOne(io,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return If}static get DefaultType(){return Of}static get NAME(){return Ya}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Hn(this._element)||this._isShown())return;let e={relatedTarget:this._element};if(!Y.trigger(this._element,ff,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Tf))for(let d of[].concat(...document.body.children))Y.on(d,"mouseover",ro);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ni),this._element.classList.add(Ni),Y.trigger(this._element,pf,e)}}hide(){if(Hn(this._element)||!this._isShown())return;let e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!Y.trigger(this._element,df,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(let d of[].concat(...document.body.children))Y.off(d,"mouseover",ro);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ni),this._element.classList.remove(Ni),this._element.setAttribute("aria-expanded","false"),_n.removeDataAttribute(this._menu,"popper"),Y.trigger(this._element,hf,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Sn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Ya.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Jr>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Sn(this._config.reference)?e=Fn(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);let c=this._getPopperConfig();this._popper=hr(e,this._menu,c)}_isShown(){return this._menu.classList.contains(Ni)}_getPlacement(){let e=this._parent;if(e.classList.contains(vf))return xf;if(e.classList.contains(bf))return Mf;if(e.classList.contains(yf))return kf;if(e.classList.contains(wf))return Rf;let c=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(mf)?c?Af:_f:c?Lf:$f}_detectNavbar(){return this._element.closest(Cf)!==null}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(c=>Number.parseInt(c,10)):typeof e=="function"?c=>e(c,this._element):e}_getPopperConfig(){let e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(_n.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..._t(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:c}){let d=le.find(Sf,this._menu).filter(p=>Vi(p));d.length&&ys(d,c,e===Xa,!d.includes(c)).focus()}static jQueryInterface(e){return this.each(function(){let c=At.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}static clearMenus(e){if(e.button===uf||e.type==="keyup"&&e.key!==Ja)return;let c=le.find(Ef);for(let d of c){let p=At.getInstance(d);if(!p||p._config.autoClose===!1)continue;let g=e.composedPath(),a=g.includes(p._menu);if(g.includes(p._element)||p._config.autoClose==="inside"&&!a||p._config.autoClose==="outside"&&a||p._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Ja||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;let u={relatedTarget:p._element};e.type==="click"&&(u.clickEvent=e),p._completeHide(u)}}static dataApiKeydownHandler(e){let c=/input|textarea/i.test(e.target.tagName),d=e.key===lf,p=[cf,Xa].includes(e.key);if(!p&&!d||c&&!d)return;e.preventDefault();let g=this.matches(ci)?this:le.prev(this,ci)[0]||le.next(this,ci)[0]||le.findOne(ci,e.delegateTarget.parentNode),a=At.getOrCreateInstance(g);if(p){e.stopPropagation(),a.show(),a._selectMenuItem(e);return}a._isShown()&&(e.stopPropagation(),a.hide(),g.focus())}};Y.on(document,Dl,ci,At.dataApiKeydownHandler);Y.on(document,Dl,io,At.dataApiKeydownHandler);Y.on(document,Ol,At.clearMenus);Y.on(document,gf,At.clearMenus);Y.on(document,Ol,ci,function(t){t.preventDefault(),At.getOrCreateInstance(this).toggle()});zt(At);var Pl="backdrop",Df="fade",Qa="show",Za=`mousedown.bs.${Pl}`,Pf={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Nf={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},oo=class extends di{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Pf}static get DefaultType(){return Nf}static get NAME(){return Pl}show(e){if(!this._config.isVisible){_t(e);return}this._append();let c=this._getElement();this._config.isAnimated&&vr(c),c.classList.add(Qa),this._emulateAnimation(()=>{_t(e)})}hide(e){if(!this._config.isVisible){_t(e);return}this._getElement().classList.remove(Qa),this._emulateAnimation(()=>{this.dispose(),_t(e)})}dispose(){this._isAppended&&(Y.off(this._element,Za),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){let e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(Df),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Fn(e.rootElement),e}_append(){if(this._isAppended)return;let e=this._getElement();this._config.rootElement.append(e),Y.on(e,Za,()=>{_t(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Cl(e,this._getElement(),this._config.isAnimated)}},Ff="focustrap",Hf="bs.focustrap",so=`.${Hf}`,Bf=`focusin${so}`,Wf=`keydown.tab${so}`,Uf="Tab",Vf="forward",qa="backward",jf={autofocus:!0,trapElement:null},zf={autofocus:"boolean",trapElement:"element"},ao=class extends di{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return jf}static get DefaultType(){return zf}static get NAME(){return Ff}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),Y.off(document,so),Y.on(document,Bf,e=>this._handleFocusin(e)),Y.on(document,Wf,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,Y.off(document,so))}_handleFocusin(e){let{trapElement:c}=this._config;if(e.target===document||e.target===c||c.contains(e.target))return;let d=le.focusableChildren(c);d.length===0?c.focus():this._lastTabNavDirection===qa?d[d.length-1].focus():d[0].focus()}_handleKeydown(e){e.key===Uf&&(this._lastTabNavDirection=e.shiftKey?qa:Vf)}},el=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",tl=".sticky-top",Zr="padding-right",nl="margin-right",gr=class{constructor(){this._element=document.body}getWidth(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){let e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Zr,c=>c+e),this._setElementAttributes(el,Zr,c=>c+e),this._setElementAttributes(tl,nl,c=>c-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Zr),this._resetElementAttributes(el,Zr),this._resetElementAttributes(tl,nl)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,c,d){let p=this.getWidth(),g=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+p)return;this._saveInitialAttribute(a,c);let u=window.getComputedStyle(a).getPropertyValue(c);a.style.setProperty(c,`${d(Number.parseFloat(u))}px`)};this._applyManipulationCallback(e,g)}_saveInitialAttribute(e,c){let d=e.style.getPropertyValue(c);d&&_n.setDataAttribute(e,c,d)}_resetElementAttributes(e,c){let d=p=>{let g=_n.getDataAttribute(p,c);if(g===null){p.style.removeProperty(c);return}_n.removeDataAttribute(p,c),p.style.setProperty(c,g)};this._applyManipulationCallback(e,d)}_applyManipulationCallback(e,c){if(Sn(e)){c(e);return}for(let d of le.find(e,this._element))c(d)}},Gf="modal",Kf="bs.modal",Vt=`.${Kf}`,Yf=".data-api",Jf="Escape",Xf=`hide${Vt}`,Qf=`hidePrevented${Vt}`,Nl=`hidden${Vt}`,Fl=`show${Vt}`,Zf=`shown${Vt}`,qf=`resize${Vt}`,ep=`click.dismiss${Vt}`,tp=`mousedown.dismiss${Vt}`,np=`keydown.dismiss${Vt}`,ip=`click${Vt}${Yf}`,il="modal-open",rp="fade",rl="show",as="modal-static",op=".modal.show",sp=".modal-dialog",ap=".modal-body",lp='[data-bs-toggle="modal"]',cp={backdrop:!0,focus:!0,keyboard:!0},up={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},jt=class extends Ot{constructor(e,c){super(e,c),this._dialog=le.findOne(sp,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new gr,this._addEventListeners()}static get Default(){return cp}static get DefaultType(){return up}static get NAME(){return Gf}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||Y.trigger(this._element,Fl,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(il),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||Y.trigger(this._element,Xf).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(rl),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){Y.off(window,Vt),Y.off(this._dialog,Vt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new oo({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ao({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;let c=le.findOne(ap,this._dialog);c&&(c.scrollTop=0),vr(this._element),this._element.classList.add(rl);let d=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,Y.trigger(this._element,Zf,{relatedTarget:e})};this._queueCallback(d,this._dialog,this._isAnimated())}_addEventListeners(){Y.on(this._element,np,e=>{if(e.key===Jf){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),Y.on(window,qf,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),Y.on(this._element,tp,e=>{Y.one(this._element,ep,c=>{if(!(this._element!==e.target||this._element!==c.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(il),this._resetAdjustments(),this._scrollBar.reset(),Y.trigger(this._element,Nl)})}_isAnimated(){return this._element.classList.contains(rp)}_triggerBackdropTransition(){if(Y.trigger(this._element,Qf).defaultPrevented)return;let c=this._element.scrollHeight>document.documentElement.clientHeight,d=this._element.style.overflowY;d==="hidden"||this._element.classList.contains(as)||(c||(this._element.style.overflowY="hidden"),this._element.classList.add(as),this._queueCallback(()=>{this._element.classList.remove(as),this._queueCallback(()=>{this._element.style.overflowY=d},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),d=c>0;if(d&&!e){let p=Ut()?"paddingLeft":"paddingRight";this._element.style[p]=`${c}px`}if(!d&&e){let p=Ut()?"paddingRight":"paddingLeft";this._element.style[p]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,c){return this.each(function(){let d=jt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof d[e]>"u")throw new TypeError(`No method named "${e}"`);d[e](c)}})}};Y.on(document,ip,lp,function(t){let e=le.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),Y.one(e,Fl,p=>{p.defaultPrevented||Y.one(e,Nl,()=>{Vi(this)&&this.focus()})});let c=le.findOne(op);c&&jt.getInstance(c).hide(),jt.getOrCreateInstance(e).toggle(this)});lo(jt);zt(jt);var dp="offcanvas",hp="bs.offcanvas",An=`.${hp}`,Hl=".data-api",fp=`load${An}${Hl}`,pp="Escape",ol="show",sl="showing",al="hiding",gp="offcanvas-backdrop",Bl=".offcanvas.show",mp=`show${An}`,vp=`shown${An}`,bp=`hide${An}`,ll=`hidePrevented${An}`,Wl=`hidden${An}`,yp=`resize${An}`,wp=`click${An}${Hl}`,Ep=`keydown.dismiss${An}`,Cp='[data-bs-toggle="offcanvas"]',Tp={backdrop:!0,keyboard:!0,scroll:!1},Sp={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},dn=class extends Ot{constructor(e,c){super(e,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Tp}static get DefaultType(){return Sp}static get NAME(){return dp}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||Y.trigger(this._element,mp,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new gr().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(sl);let d=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(ol),this._element.classList.remove(sl),Y.trigger(this._element,vp,{relatedTarget:e})};this._queueCallback(d,this._element,!0)}hide(){if(!this._isShown||Y.trigger(this._element,bp).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(al),this._backdrop.hide();let c=()=>{this._element.classList.remove(ol,al),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new gr().reset(),Y.trigger(this._element,Wl)};this._queueCallback(c,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let e=()=>{if(this._config.backdrop==="static"){Y.trigger(this._element,ll);return}this.hide()},c=!!this._config.backdrop;return new oo({className:gp,isVisible:c,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:c?e:null})}_initializeFocusTrap(){return new ao({trapElement:this._element})}_addEventListeners(){Y.on(this._element,Ep,e=>{if(e.key===pp){if(this._config.keyboard){this.hide();return}Y.trigger(this._element,ll)}})}static jQueryInterface(e){return this.each(function(){let c=dn.getOrCreateInstance(this,e);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};Y.on(document,wp,Cp,function(t){let e=le.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Hn(this))return;Y.one(e,Wl,()=>{Vi(this)&&this.focus()});let c=le.findOne(Bl);c&&c!==e&&dn.getInstance(c).hide(),dn.getOrCreateInstance(e).toggle(this)});Y.on(window,fp,()=>{for(let t of le.find(Bl))dn.getOrCreateInstance(t).show()});Y.on(window,yp,()=>{for(let t of le.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&dn.getOrCreateInstance(t).hide()});lo(dn);zt(dn);var _p=/^aria-[\w-]*$/i,Ul={"*":["class","dir","id","lang","role",_p],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ap=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$p=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Lp=(t,e)=>{let c=t.nodeName.toLowerCase();return e.includes(c)?Ap.has(c)?!!$p.test(t.nodeValue):!0:e.filter(d=>d instanceof RegExp).some(d=>d.test(c))};function xp(t,e,c){if(!t.length)return t;if(c&&typeof c=="function")return c(t);let p=new window.DOMParser().parseFromString(t,"text/html"),g=[].concat(...p.body.querySelectorAll("*"));for(let a of g){let u=a.nodeName.toLowerCase();if(!Object.keys(e).includes(u)){a.remove();continue}let o=[].concat(...a.attributes),r=[].concat(e["*"]||[],e[u]||[]);for(let n of o)Lp(n,r)||a.removeAttribute(n.nodeName)}return p.body.innerHTML}var Mp="TemplateFactory",kp={allowList:Ul,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Rp={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Ip={entry:"(string|element|function|null)",selector:"(string|element)"},bs=class extends di{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return kp}static get DefaultType(){return Rp}static get NAME(){return Mp}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){let e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(let[p,g]of Object.entries(this._config.content))this._setContent(e,g,p);let c=e.children[0],d=this._resolvePossibleFunction(this._config.extraClass);return d&&c.classList.add(...d.split(" ")),c}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(let[c,d]of Object.entries(e))super._typeCheckConfig({selector:c,entry:d},Ip)}_setContent(e,c,d){let p=le.findOne(d,e);if(p){if(c=this._resolvePossibleFunction(c),!c){p.remove();return}if(Sn(c)){this._putElementInTemplate(Fn(c),p);return}if(this._config.html){p.innerHTML=this._maybeSanitize(c);return}p.textContent=c}}_maybeSanitize(e){return this._config.sanitize?xp(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return _t(e,[this])}_putElementInTemplate(e,c){if(this._config.html){c.innerHTML="",c.append(e);return}c.textContent=e.textContent}},Op="tooltip",Dp=new Set(["sanitize","allowList","sanitizeFn"]),ls="fade",Pp="modal",qr="show",Np=".tooltip-inner",cl=`.${Pp}`,ul="hide.bs.modal",pr="hover",cs="focus",Fp="click",Hp="manual",Bp="hide",Wp="hidden",Up="show",Vp="shown",jp="inserted",zp="click",Gp="focusin",Kp="focusout",Yp="mouseenter",Jp="mouseleave",Xp={AUTO:"auto",TOP:"top",RIGHT:Ut()?"left":"right",BOTTOM:"bottom",LEFT:Ut()?"right":"left"},Qp={allowList:Ul,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Zp={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Bn=class extends Ot{constructor(e,c){if(typeof Jr>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Qp}static get DefaultType(){return Zp}static get NAME(){return Op}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),Y.off(this._element.closest(cl),ul,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let e=Y.trigger(this._element,this.constructor.eventName(Up)),d=(wl(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!d)return;this._disposePopper();let p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));let{container:g}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(g.append(p),Y.trigger(this._element,this.constructor.eventName(jp))),this._popper=this._createPopper(p),p.classList.add(qr),"ontouchstart"in document.documentElement)for(let u of[].concat(...document.body.children))Y.on(u,"mouseover",ro);let a=()=>{Y.trigger(this._element,this.constructor.eventName(Vp)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown()||Y.trigger(this._element,this.constructor.eventName(Bp)).defaultPrevented)return;if(this._getTipElement().classList.remove(qr),"ontouchstart"in document.documentElement)for(let p of[].concat(...document.body.children))Y.off(p,"mouseover",ro);this._activeTrigger[Fp]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[pr]=!1,this._isHovered=null;let d=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),Y.trigger(this._element,this.constructor.eventName(Wp)))};this._queueCallback(d,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){let c=this._getTemplateFactory(e).toHtml();if(!c)return null;c.classList.remove(ls,qr),c.classList.add(`bs-${this.constructor.NAME}-auto`);let d=Fd(this.constructor.NAME).toString();return c.setAttribute("id",d),this._isAnimated()&&c.classList.add(ls),c}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new bs({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Np]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ls)}_isShown(){return this.tip&&this.tip.classList.contains(qr)}_createPopper(e){let c=_t(this._config.placement,[this,e,this._element]),d=Xp[c.toUpperCase()];return hr(this._element,e,this._getPopperConfig(d))}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(c=>Number.parseInt(c,10)):typeof e=="function"?c=>e(c,this._element):e}_resolvePossibleFunction(e){return _t(e,[this._element])}_getPopperConfig(e){let c={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:d=>{this._getTipElement().setAttribute("data-popper-placement",d.state.placement)}}]};return{...c,..._t(this._config.popperConfig,[c])}}_setListeners(){let e=this._config.trigger.split(" ");for(let c of e)if(c==="click")Y.on(this._element,this.constructor.eventName(zp),this._config.selector,d=>{this._initializeOnDelegatedTarget(d).toggle()});else if(c!==Hp){let d=c===pr?this.constructor.eventName(Yp):this.constructor.eventName(Gp),p=c===pr?this.constructor.eventName(Jp):this.constructor.eventName(Kp);Y.on(this._element,d,this._config.selector,g=>{let a=this._initializeOnDelegatedTarget(g);a._activeTrigger[g.type==="focusin"?cs:pr]=!0,a._enter()}),Y.on(this._element,p,this._config.selector,g=>{let a=this._initializeOnDelegatedTarget(g);a._activeTrigger[g.type==="focusout"?cs:pr]=a._element.contains(g.relatedTarget),a._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},Y.on(this._element.closest(cl),ul,this._hideModalHandler)}_fixTitle(){let e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,c){clearTimeout(this._timeout),this._timeout=setTimeout(e,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){let c=_n.getDataAttributes(this._element);for(let d of Object.keys(c))Dp.has(d)&&delete c[d];return e={...c,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Fn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){let e={};for(let[c,d]of Object.entries(this._config))this.constructor.Default[c]!==d&&(e[c]=d);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){let c=Bn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}};zt(Bn);var qp="popover",eg=".popover-header",tg=".popover-body",ng={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ig={...Bn.DefaultType,content:"(null|string|element|function)"},mr=class extends Bn{static get Default(){return ng}static get DefaultType(){return ig}static get NAME(){return qp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[eg]:this._getTitle(),[tg]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){let c=mr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}};zt(mr);var rg="scrollspy",og="bs.scrollspy",Cs=`.${og}`,sg=".data-api",ag=`activate${Cs}`,dl=`click${Cs}`,lg=`load${Cs}${sg}`,cg="dropdown-item",Di="active",ug='[data-bs-spy="scroll"]',us="[href]",dg=".nav, .list-group",hl=".nav-link",hg=".nav-item",fg=".list-group-item",pg=`${hl}, ${hg} > ${hl}, ${fg}`,gg=".dropdown",mg=".dropdown-toggle",vg={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},bg={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},Ui=class extends Ot{constructor(e,c){super(e,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return vg}static get DefaultType(){return bg}static get NAME(){return rg}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Fn(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(c=>Number.parseFloat(c))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(Y.off(this._config.target,dl),Y.on(this._config.target,dl,us,e=>{let c=this._observableSections.get(e.target.hash);if(c){e.preventDefault();let d=this._rootElement||window,p=c.offsetTop-this._element.offsetTop;if(d.scrollTo){d.scrollTo({top:p,behavior:"smooth"});return}d.scrollTop=p}}))}_getNewObserver(){let e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),e)}_observerCallback(e){let c=a=>this._targetLinks.get(`#${a.target.id}`),d=a=>{this._previousScrollData.visibleEntryTop=a.target.offsetTop,this._process(c(a))},p=(this._rootElement||document.documentElement).scrollTop,g=p>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=p;for(let a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(a));continue}let u=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(g&&u){if(d(a),!p)return;continue}!g&&!u&&d(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let e=le.find(us,this._config.target);for(let c of e){if(!c.hash||Hn(c))continue;let d=le.findOne(decodeURI(c.hash),this._element);Vi(d)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,d))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Di),this._activateParents(e),Y.trigger(this._element,ag,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(cg)){le.findOne(mg,e.closest(gg)).classList.add(Di);return}for(let c of le.parents(e,dg))for(let d of le.prev(c,pg))d.classList.add(Di)}_clearActiveClass(e){e.classList.remove(Di);let c=le.find(`${us}.${Di}`,e);for(let d of c)d.classList.remove(Di)}static jQueryInterface(e){return this.each(function(){let c=Ui.getOrCreateInstance(this,e);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(window,lg,()=>{for(let t of le.find(ug))Ui.getOrCreateInstance(t)});zt(Ui);var yg="tab",wg="bs.tab",gi=`.${wg}`,Eg=`hide${gi}`,Cg=`hidden${gi}`,Tg=`show${gi}`,Sg=`shown${gi}`,_g=`click${gi}`,Ag=`keydown${gi}`,$g=`load${gi}`,Lg="ArrowLeft",fl="ArrowRight",xg="ArrowUp",pl="ArrowDown",ds="Home",gl="End",ui="active",ml="fade",hs="show",Mg="dropdown",Vl=".dropdown-toggle",kg=".dropdown-menu",fs=`:not(${Vl})`,Rg='.list-group, .nav, [role="tablist"]',Ig=".nav-item, .list-group-item",Og=`.nav-link${fs}, .list-group-item${fs}, [role="tab"]${fs}`,jl='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ps=`${Og}, ${jl}`,Dg=`.${ui}[data-bs-toggle="tab"], .${ui}[data-bs-toggle="pill"], .${ui}[data-bs-toggle="list"]`,Wn=class extends Ot{constructor(e){super(e),this._parent=this._element.closest(Rg),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),Y.on(this._element,Ag,c=>this._keydown(c)))}static get NAME(){return yg}show(){let e=this._element;if(this._elemIsActive(e))return;let c=this._getActiveElem(),d=c?Y.trigger(c,Eg,{relatedTarget:e}):null;Y.trigger(e,Tg,{relatedTarget:c}).defaultPrevented||d&&d.defaultPrevented||(this._deactivate(c,e),this._activate(e,c))}_activate(e,c){if(!e)return;e.classList.add(ui),this._activate(le.getElementFromSelector(e));let d=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(hs);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),Y.trigger(e,Sg,{relatedTarget:c})};this._queueCallback(d,e,e.classList.contains(ml))}_deactivate(e,c){if(!e)return;e.classList.remove(ui),e.blur(),this._deactivate(le.getElementFromSelector(e));let d=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(hs);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),Y.trigger(e,Cg,{relatedTarget:c})};this._queueCallback(d,e,e.classList.contains(ml))}_keydown(e){if(![Lg,fl,xg,pl,ds,gl].includes(e.key))return;e.stopPropagation(),e.preventDefault();let c=this._getChildren().filter(p=>!Hn(p)),d;if([ds,gl].includes(e.key))d=c[e.key===ds?0:c.length-1];else{let p=[fl,pl].includes(e.key);d=ys(c,e.target,p,!0)}d&&(d.focus({preventScroll:!0}),Wn.getOrCreateInstance(d).show())}_getChildren(){return le.find(ps,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,c){this._setAttributeIfNotExists(e,"role","tablist");for(let d of c)this._setInitialAttributesOnChild(d)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);let c=this._elemIsActive(e),d=this._getOuterElement(e);e.setAttribute("aria-selected",c),d!==e&&this._setAttributeIfNotExists(d,"role","presentation"),c||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){let c=le.getElementFromSelector(e);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,c){let d=this._getOuterElement(e);if(!d.classList.contains(Mg))return;let p=(g,a)=>{let u=le.findOne(g,d);u&&u.classList.toggle(a,c)};p(Vl,ui),p(kg,hs),d.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(e,c,d){e.hasAttribute(c)||e.setAttribute(c,d)}_elemIsActive(e){return e.classList.contains(ui)}_getInnerElement(e){return e.matches(ps)?e:le.findOne(ps,e)}_getOuterElement(e){return e.closest(Ig)||e}static jQueryInterface(e){return this.each(function(){let c=Wn.getOrCreateInstance(this);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(document,_g,jl,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!Hn(this)&&Wn.getOrCreateInstance(this).show()});Y.on(window,$g,()=>{for(let t of le.find(Dg))Wn.getOrCreateInstance(t)});zt(Wn);var Pg="toast",Ng="bs.toast",jn=`.${Ng}`,Fg=`mouseover${jn}`,Hg=`mouseout${jn}`,Bg=`focusin${jn}`,Wg=`focusout${jn}`,Ug=`hide${jn}`,Vg=`hidden${jn}`,jg=`show${jn}`,zg=`shown${jn}`,Gg="fade",vl="hide",eo="show",to="showing",Kg={animation:"boolean",autohide:"boolean",delay:"number"},Yg={animation:!0,autohide:!0,delay:5e3},Un=class extends Ot{constructor(e,c){super(e,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Yg}static get DefaultType(){return Kg}static get NAME(){return Pg}show(){if(Y.trigger(this._element,jg).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Gg);let c=()=>{this._element.classList.remove(to),Y.trigger(this._element,zg),this._maybeScheduleHide()};this._element.classList.remove(vl),vr(this._element),this._element.classList.add(eo,to),this._queueCallback(c,this._element,this._config.animation)}hide(){if(!this.isShown()||Y.trigger(this._element,Ug).defaultPrevented)return;let c=()=>{this._element.classList.add(vl),this._element.classList.remove(to,eo),Y.trigger(this._element,Vg)};this._element.classList.add(to),this._queueCallback(c,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(eo),super.dispose()}isShown(){return this._element.classList.contains(eo)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,c){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=c;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=c;break}}if(c){this._clearTimeout();return}let d=e.relatedTarget;this._element===d||this._element.contains(d)||this._maybeScheduleHide()}_setListeners(){Y.on(this._element,Fg,e=>this._onInteraction(e,!0)),Y.on(this._element,Hg,e=>this._onInteraction(e,!1)),Y.on(this._element,Bg,e=>this._onInteraction(e,!0)),Y.on(this._element,Wg,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){let c=Un.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};lo(Un);zt(Un);var vc=Fo(zl());var Xl=Fo(Gl()),Ql=Fo(Yl());var wr={modalBodyConfirm:null,buttonConfirmed:null,toastContainer:null};function Zl(){ce(wr)}var De=function(t,e,c,d,...p){let g=t.insertRow();g.id=e,zn(g,e,e,0);let a=e;return p.forEach(u=>{zn(g,u),a=u}),c&&g.classList.add("table-active"),d&&$s(g,Jl,Xg(Jl,Jg,d),"Copy to clipboard"),g};function zi(t,e,c,d=!1,p=null){let g=t.insertCell(0);g.style.verticalAlign="middle",g.style.width="25px";let a=document.createElement("input");return a.classList.add("form-check-input"),a.type="checkbox",a.id=e,a.checked=c,a.disabled=d,p&&(a.onchange=p),g.append(a),a}function zn(t,e,c=null,d=-1){let p=t.insertCell(d);return p.innerHTML=e,p.setAttribute("data-bs-toggle","tooltip"),p.title=c!=null?c:e,p}function $s(t,e,c,d){let p=t.insertCell();p.classList.add("table-action-column");let g=document.createElement("button");g.classList.add("btn"),g.style.padding="0",g.innerHTML=``,d&&(g.title=d),g.onclick=c,p.appendChild(g)}var Jl="bi-copy",Jg="bi-check-lg";function Xg(t,e,c){return d=>{navigator.clipboard.writeText(c);let p=d.currentTarget.querySelector(".bi");p.classList.replace(t,e),setTimeout(()=>p.classList.replace(e,t),500)}}function fo(t,e){let c=document.createElement("th");c.innerHTML=e,t.appendChild(c)}function $t(t,e){t.innerHTML="",e.forEach(c=>{let d=document.createElement("option");d.text=c,t.appendChild(d)})}function Gn(t,e){e.forEach(c=>{mi(t,c)})}function mi(t,e,c=!1,d){let p=document.createElement("li");p.innerHTML=c?``:`${e}`,t.appendChild(p)}function Gi(t,e,c,d,p=null){let g="tab"+Math.random().toString(36).replace("0.",""),a=document.createElement("li");a.classList.add("nav-item"),p&&(a.setAttribute("data-bs-toggle","tooltip"),a.setAttribute("title",p)),a.innerHTML=`${c}`,t.appendChild(a);let u=document.createElement("template");return u.innerHTML=d,u.content.firstElementChild.id=g,e.appendChild(u.content.firstElementChild),g}function ce(t,e=null){Object.keys(t).forEach(c=>{if(t[c]=(e!=null?e:document).getElementById(c),!t[c])throw new Error(`Element ${c} not found.`)})}function qt(t,e="Error",c=""){let d=document.createElement("div");d.classList.add("toast"),d.innerHTML=`
+`,"error_marker.css",!1)});ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,e,c){"use strict";t("./loader_build")(e);var d=t("./lib/dom"),p=t("./range").Range,g=t("./editor").Editor,a=t("./edit_session").EditSession,u=t("./undomanager").UndoManager,o=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.edit=function(r,n){if(typeof r=="string"){var i=r;if(r=document.getElementById(i),!r)throw new Error("ace.edit can't find div #"+i)}if(r&&r.env&&r.env.editor instanceof g)return r.env.editor;var s="";if(r&&/input|textarea/i.test(r.tagName)){var l=r;s=l.value,r=d.createElement("pre"),l.parentNode.replaceChild(r,l)}else r&&(s=r.textContent,r.innerHTML="");var h=e.createEditSession(s),f=new g(new o(r),h,n),b={document:h,editor:f,onResize:f.resize.bind(f,null)};return l&&(b.textarea=l),f.on("destroy",function(){b.editor.container.env=null}),f.container.env=f.env=b,f},e.createEditSession=function(r,n){var i=new a(r,n);return i.setUndoManager(new u),i},e.Range=p,e.Editor=g,e.EditSession=a,e.UndoManager=u,e.VirtualRenderer=o,e.version=e.config.version});(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var e=function(){return this}();!e&&typeof window<"u"&&(e=window),!e&&typeof self<"u"&&(e=self),e.ace||(e.ace=t);for(var c in t)t.hasOwnProperty(c)&&(e.ace[c]=t[c]);e.ace.default=e.ace,typeof uo=="object"&&typeof Kl=="object"&&uo&&(uo.exports=e.ace)})})()});var Yr={};ld(Yr,{afterMain:()=>Ma,afterRead:()=>$a,afterWrite:()=>Ra,applyStyles:()=>$i,arrow:()=>Br,auto:()=>rr,basePlacements:()=>En,beforeMain:()=>La,beforeRead:()=>_a,beforeWrite:()=>ka,bottom:()=>it,clippingParents:()=>Ho,computeStyles:()=>xi,createPopper:()=>fr,createPopperBase:()=>Ua,createPopperLite:()=>Va,detectOverflow:()=>Tt,end:()=>Dn,eventListeners:()=>Mi,flip:()=>jr,hide:()=>zr,left:()=>Xe,main:()=>xa,modifierPhases:()=>Wo,offset:()=>Gr,placements:()=>sr,popper:()=>Zn,popperGenerator:()=>si,popperOffsets:()=>Ri,preventOverflow:()=>Kr,read:()=>Aa,reference:()=>Bo,right:()=>Qe,start:()=>un,top:()=>Je,variationPlacements:()=>Hr,viewport:()=>or,write:()=>Ia});var Je="top",it="bottom",Qe="right",Xe="left",rr="auto",En=[Je,it,Qe,Xe],un="start",Dn="end",Ho="clippingParents",or="viewport",Zn="popper",Bo="reference",Hr=En.reduce(function(t,e){return t.concat([e+"-"+un,e+"-"+Dn])},[]),sr=[].concat(En,[rr]).reduce(function(t,e){return t.concat([e,e+"-"+un,e+"-"+Dn])},[]),_a="beforeRead",Aa="read",$a="afterRead",La="beforeMain",xa="main",Ma="afterMain",ka="beforeWrite",Ia="write",Ra="afterWrite",Wo=[_a,Aa,$a,La,xa,Ma,ka,Ia,Ra];function ut(t){return t?(t.nodeName||"").toLowerCase():null}function Ge(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ht(t){var e=Ge(t).Element;return t instanceof e||t instanceof Element}function at(t){var e=Ge(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ai(t){if(typeof ShadowRoot>"u")return!1;var e=Ge(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function ud(t){var e=t.state;Object.keys(e.elements).forEach(function(c){var d=e.styles[c]||{},p=e.attributes[c]||{},g=e.elements[c];!at(g)||!ut(g)||(Object.assign(g.style,d),Object.keys(p).forEach(function(a){var u=p[a];u===!1?g.removeAttribute(a):g.setAttribute(a,u===!0?"":u)}))})}function dd(t){var e=t.state,c={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,c.popper),e.styles=c,e.elements.arrow&&Object.assign(e.elements.arrow.style,c.arrow),function(){Object.keys(e.elements).forEach(function(d){var p=e.elements[d],g=e.attributes[d]||{},a=Object.keys(e.styles.hasOwnProperty(d)?e.styles[d]:c[d]),u=a.reduce(function(o,r){return o[r]="",o},{});!at(p)||!ut(p)||(Object.assign(p.style,u),Object.keys(g).forEach(function(o){p.removeAttribute(o)}))})}}var $i={name:"applyStyles",enabled:!0,phase:"write",fn:ud,effect:dd,requires:["computeStyles"]};function dt(t){return t.split("-")[0]}var Qt=Math.max,qn=Math.min,Cn=Math.round;function Li(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ar(){return!/^((?!chrome|android).)*safari/i.test(Li())}function Bt(t,e,c){e===void 0&&(e=!1),c===void 0&&(c=!1);var d=t.getBoundingClientRect(),p=1,g=1;e&&at(t)&&(p=t.offsetWidth>0&&Cn(d.width)/t.offsetWidth||1,g=t.offsetHeight>0&&Cn(d.height)/t.offsetHeight||1);var a=Ht(t)?Ge(t):window,u=a.visualViewport,o=!ar()&&c,r=(d.left+(o&&u?u.offsetLeft:0))/p,n=(d.top+(o&&u?u.offsetTop:0))/g,i=d.width/p,s=d.height/g;return{width:i,height:s,top:n,right:r+i,bottom:n+s,left:r,x:r,y:n}}function ei(t){var e=Bt(t),c=t.offsetWidth,d=t.offsetHeight;return Math.abs(e.width-c)<=1&&(c=e.width),Math.abs(e.height-d)<=1&&(d=e.height),{x:t.offsetLeft,y:t.offsetTop,width:c,height:d}}function lr(t,e){var c=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(c&&Ai(c)){var d=e;do{if(d&&t.isSameNode(d))return!0;d=d.parentNode||d.host}while(d)}return!1}function Ct(t){return Ge(t).getComputedStyle(t)}function Uo(t){return["table","td","th"].indexOf(ut(t))>=0}function mt(t){return((Ht(t)?t.ownerDocument:t.document)||window.document).documentElement}function Tn(t){return ut(t)==="html"?t:t.assignedSlot||t.parentNode||(Ai(t)?t.host:null)||mt(t)}function Oa(t){return!at(t)||Ct(t).position==="fixed"?null:t.offsetParent}function hd(t){var e=/firefox/i.test(Li()),c=/Trident/i.test(Li());if(c&&at(t)){var d=Ct(t);if(d.position==="fixed")return null}var p=Tn(t);for(Ai(p)&&(p=p.host);at(p)&&["html","body"].indexOf(ut(p))<0;){var g=Ct(p);if(g.transform!=="none"||g.perspective!=="none"||g.contain==="paint"||["transform","perspective"].indexOf(g.willChange)!==-1||e&&g.willChange==="filter"||e&&g.filter&&g.filter!=="none")return p;p=p.parentNode}return null}function Zt(t){for(var e=Ge(t),c=Oa(t);c&&Uo(c)&&Ct(c).position==="static";)c=Oa(c);return c&&(ut(c)==="html"||ut(c)==="body"&&Ct(c).position==="static")?e:c||hd(t)||e}function ti(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ni(t,e,c){return Qt(t,qn(e,c))}function Da(t,e,c){var d=ni(t,e,c);return d>c?c:d}function cr(){return{top:0,right:0,bottom:0,left:0}}function ur(t){return Object.assign({},cr(),t)}function dr(t,e){return e.reduce(function(c,d){return c[d]=t,c},{})}var fd=function(e,c){return e=typeof e=="function"?e(Object.assign({},c.rects,{placement:c.placement})):e,ur(typeof e!="number"?e:dr(e,En))};function pd(t){var e,c=t.state,d=t.name,p=t.options,g=c.elements.arrow,a=c.modifiersData.popperOffsets,u=dt(c.placement),o=ti(u),r=[Xe,Qe].indexOf(u)>=0,n=r?"height":"width";if(!(!g||!a)){var i=fd(p.padding,c),s=ei(g),l=o==="y"?Je:Xe,h=o==="y"?it:Qe,f=c.rects.reference[n]+c.rects.reference[o]-a[o]-c.rects.popper[n],b=a[o]-c.rects.reference[o],C=Zt(g),w=C?o==="y"?C.clientHeight||0:C.clientWidth||0:0,x=f/2-b/2,A=i[l],v=w-s[n]-i[h],E=w/2-s[n]/2+x,$=ni(A,E,v),M=o;c.modifiersData[d]=(e={},e[M]=$,e.centerOffset=$-E,e)}}function gd(t){var e=t.state,c=t.options,d=c.element,p=d===void 0?"[data-popper-arrow]":d;p!=null&&(typeof p=="string"&&(p=e.elements.popper.querySelector(p),!p)||lr(e.elements.popper,p)&&(e.elements.arrow=p))}var Br={name:"arrow",enabled:!0,phase:"main",fn:pd,effect:gd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wt(t){return t.split("-")[1]}var md={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vd(t,e){var c=t.x,d=t.y,p=e.devicePixelRatio||1;return{x:Cn(c*p)/p||0,y:Cn(d*p)/p||0}}function Pa(t){var e,c=t.popper,d=t.popperRect,p=t.placement,g=t.variation,a=t.offsets,u=t.position,o=t.gpuAcceleration,r=t.adaptive,n=t.roundOffsets,i=t.isFixed,s=a.x,l=s===void 0?0:s,h=a.y,f=h===void 0?0:h,b=typeof n=="function"?n({x:l,y:f}):{x:l,y:f};l=b.x,f=b.y;var C=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),x=Xe,A=Je,v=window;if(r){var E=Zt(c),$="clientHeight",M="clientWidth";if(E===Ge(c)&&(E=mt(c),Ct(E).position!=="static"&&u==="absolute"&&($="scrollHeight",M="scrollWidth")),E=E,p===Je||(p===Xe||p===Qe)&&g===Dn){A=it;var S=i&&E===v&&v.visualViewport?v.visualViewport.height:E[$];f-=S-d.height,f*=o?1:-1}if(p===Xe||(p===Je||p===it)&&g===Dn){x=Qe;var T=i&&E===v&&v.visualViewport?v.visualViewport.width:E[M];l-=T-d.width,l*=o?1:-1}}var y=Object.assign({position:u},r&&md),m=n===!0?vd({x:l,y:f},Ge(c)):{x:l,y:f};if(l=m.x,f=m.y,o){var L;return Object.assign({},y,(L={},L[A]=w?"0":"",L[x]=C?"0":"",L.transform=(v.devicePixelRatio||1)<=1?"translate("+l+"px, "+f+"px)":"translate3d("+l+"px, "+f+"px, 0)",L))}return Object.assign({},y,(e={},e[A]=w?f+"px":"",e[x]=C?l+"px":"",e.transform="",e))}function bd(t){var e=t.state,c=t.options,d=c.gpuAcceleration,p=d===void 0?!0:d,g=c.adaptive,a=g===void 0?!0:g,u=c.roundOffsets,o=u===void 0?!0:u,r={placement:dt(e.placement),variation:Wt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:p,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Pa(Object.assign({},r,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:o})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Pa(Object.assign({},r,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var xi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bd,data:{}};var Wr={passive:!0};function yd(t){var e=t.state,c=t.instance,d=t.options,p=d.scroll,g=p===void 0?!0:p,a=d.resize,u=a===void 0?!0:a,o=Ge(e.elements.popper),r=[].concat(e.scrollParents.reference,e.scrollParents.popper);return g&&r.forEach(function(n){n.addEventListener("scroll",c.update,Wr)}),u&&o.addEventListener("resize",c.update,Wr),function(){g&&r.forEach(function(n){n.removeEventListener("scroll",c.update,Wr)}),u&&o.removeEventListener("resize",c.update,Wr)}}var Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yd,data:{}};var wd={left:"right",right:"left",bottom:"top",top:"bottom"};function ki(t){return t.replace(/left|right|bottom|top/g,function(e){return wd[e]})}var Ed={start:"end",end:"start"};function Ur(t){return t.replace(/start|end/g,function(e){return Ed[e]})}function ii(t){var e=Ge(t),c=e.pageXOffset,d=e.pageYOffset;return{scrollLeft:c,scrollTop:d}}function ri(t){return Bt(mt(t)).left+ii(t).scrollLeft}function Vo(t,e){var c=Ge(t),d=mt(t),p=c.visualViewport,g=d.clientWidth,a=d.clientHeight,u=0,o=0;if(p){g=p.width,a=p.height;var r=ar();(r||!r&&e==="fixed")&&(u=p.offsetLeft,o=p.offsetTop)}return{width:g,height:a,x:u+ri(t),y:o}}function jo(t){var e,c=mt(t),d=ii(t),p=(e=t.ownerDocument)==null?void 0:e.body,g=Qt(c.scrollWidth,c.clientWidth,p?p.scrollWidth:0,p?p.clientWidth:0),a=Qt(c.scrollHeight,c.clientHeight,p?p.scrollHeight:0,p?p.clientHeight:0),u=-d.scrollLeft+ri(t),o=-d.scrollTop;return Ct(p||c).direction==="rtl"&&(u+=Qt(c.clientWidth,p?p.clientWidth:0)-g),{width:g,height:a,x:u,y:o}}function oi(t){var e=Ct(t),c=e.overflow,d=e.overflowX,p=e.overflowY;return/auto|scroll|overlay|hidden/.test(c+p+d)}function Vr(t){return["html","body","#document"].indexOf(ut(t))>=0?t.ownerDocument.body:at(t)&&oi(t)?t:Vr(Tn(t))}function Pn(t,e){var c;e===void 0&&(e=[]);var d=Vr(t),p=d===((c=t.ownerDocument)==null?void 0:c.body),g=Ge(d),a=p?[g].concat(g.visualViewport||[],oi(d)?d:[]):d,u=e.concat(a);return p?u:u.concat(Pn(Tn(a)))}function Ii(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Cd(t,e){var c=Bt(t,!1,e==="fixed");return c.top=c.top+t.clientTop,c.left=c.left+t.clientLeft,c.bottom=c.top+t.clientHeight,c.right=c.left+t.clientWidth,c.width=t.clientWidth,c.height=t.clientHeight,c.x=c.left,c.y=c.top,c}function Na(t,e,c){return e===or?Ii(Vo(t,c)):Ht(e)?Cd(e,c):Ii(jo(mt(t)))}function Td(t){var e=Pn(Tn(t)),c=["absolute","fixed"].indexOf(Ct(t).position)>=0,d=c&&at(t)?Zt(t):t;return Ht(d)?e.filter(function(p){return Ht(p)&&lr(p,d)&&ut(p)!=="body"}):[]}function zo(t,e,c,d){var p=e==="clippingParents"?Td(t):[].concat(e),g=[].concat(p,[c]),a=g[0],u=g.reduce(function(o,r){var n=Na(t,r,d);return o.top=Qt(n.top,o.top),o.right=qn(n.right,o.right),o.bottom=qn(n.bottom,o.bottom),o.left=Qt(n.left,o.left),o},Na(t,a,d));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function hr(t){var e=t.reference,c=t.element,d=t.placement,p=d?dt(d):null,g=d?Wt(d):null,a=e.x+e.width/2-c.width/2,u=e.y+e.height/2-c.height/2,o;switch(p){case Je:o={x:a,y:e.y-c.height};break;case it:o={x:a,y:e.y+e.height};break;case Qe:o={x:e.x+e.width,y:u};break;case Xe:o={x:e.x-c.width,y:u};break;default:o={x:e.x,y:e.y}}var r=p?ti(p):null;if(r!=null){var n=r==="y"?"height":"width";switch(g){case un:o[r]=o[r]-(e[n]/2-c[n]/2);break;case Dn:o[r]=o[r]+(e[n]/2-c[n]/2);break;default:}}return o}function Tt(t,e){e===void 0&&(e={});var c=e,d=c.placement,p=d===void 0?t.placement:d,g=c.strategy,a=g===void 0?t.strategy:g,u=c.boundary,o=u===void 0?Ho:u,r=c.rootBoundary,n=r===void 0?or:r,i=c.elementContext,s=i===void 0?Zn:i,l=c.altBoundary,h=l===void 0?!1:l,f=c.padding,b=f===void 0?0:f,C=ur(typeof b!="number"?b:dr(b,En)),w=s===Zn?Bo:Zn,x=t.rects.popper,A=t.elements[h?w:s],v=zo(Ht(A)?A:A.contextElement||mt(t.elements.popper),o,n,a),E=Bt(t.elements.reference),$=hr({reference:E,element:x,strategy:"absolute",placement:p}),M=Ii(Object.assign({},x,$)),S=s===Zn?M:E,T={top:v.top-S.top+C.top,bottom:S.bottom-v.bottom+C.bottom,left:v.left-S.left+C.left,right:S.right-v.right+C.right},y=t.modifiersData.offset;if(s===Zn&&y){var m=y[p];Object.keys(T).forEach(function(L){var _=[Qe,it].indexOf(L)>=0?1:-1,k=[Je,it].indexOf(L)>=0?"y":"x";T[L]+=m[k]*_})}return T}function Go(t,e){e===void 0&&(e={});var c=e,d=c.placement,p=c.boundary,g=c.rootBoundary,a=c.padding,u=c.flipVariations,o=c.allowedAutoPlacements,r=o===void 0?sr:o,n=Wt(d),i=n?u?Hr:Hr.filter(function(h){return Wt(h)===n}):En,s=i.filter(function(h){return r.indexOf(h)>=0});s.length===0&&(s=i);var l=s.reduce(function(h,f){return h[f]=Tt(t,{placement:f,boundary:p,rootBoundary:g,padding:a})[dt(f)],h},{});return Object.keys(l).sort(function(h,f){return l[h]-l[f]})}function Sd(t){if(dt(t)===rr)return[];var e=ki(t);return[Ur(t),e,Ur(e)]}function _d(t){var e=t.state,c=t.options,d=t.name;if(!e.modifiersData[d]._skip){for(var p=c.mainAxis,g=p===void 0?!0:p,a=c.altAxis,u=a===void 0?!0:a,o=c.fallbackPlacements,r=c.padding,n=c.boundary,i=c.rootBoundary,s=c.altBoundary,l=c.flipVariations,h=l===void 0?!0:l,f=c.allowedAutoPlacements,b=e.options.placement,C=dt(b),w=C===b,x=o||(w||!h?[ki(b)]:Sd(b)),A=[b].concat(x).reduce(function(U,j){return U.concat(dt(j)===rr?Go(e,{placement:j,boundary:n,rootBoundary:i,padding:r,flipVariations:h,allowedAutoPlacements:f}):j)},[]),v=e.rects.reference,E=e.rects.popper,$=new Map,M=!0,S=A[0],T=0;T=0,k=_?"width":"height",I=Tt(e,{placement:y,boundary:n,rootBoundary:i,altBoundary:s,padding:r}),R=_?L?Qe:Xe:L?it:Je;v[k]>E[k]&&(R=ki(R));var D=ki(R),O=[];if(g&&O.push(I[m]<=0),u&&O.push(I[R]<=0,I[D]<=0),O.every(function(U){return U})){S=y,M=!1;break}$.set(y,O)}if(M)for(var N=h?3:1,P=function(j){var J=A.find(function(z){var X=$.get(z);if(X)return X.slice(0,j).every(function(ee){return ee})});if(J)return S=J,"break"},H=N;H>0;H--){var F=P(H);if(F==="break")break}e.placement!==S&&(e.modifiersData[d]._skip=!0,e.placement=S,e.reset=!0)}}var jr={name:"flip",enabled:!0,phase:"main",fn:_d,requiresIfExists:["offset"],data:{_skip:!1}};function Fa(t,e,c){return c===void 0&&(c={x:0,y:0}),{top:t.top-e.height-c.y,right:t.right-e.width+c.x,bottom:t.bottom-e.height+c.y,left:t.left-e.width-c.x}}function Ha(t){return[Je,Qe,it,Xe].some(function(e){return t[e]>=0})}function Ad(t){var e=t.state,c=t.name,d=e.rects.reference,p=e.rects.popper,g=e.modifiersData.preventOverflow,a=Tt(e,{elementContext:"reference"}),u=Tt(e,{altBoundary:!0}),o=Fa(a,d),r=Fa(u,p,g),n=Ha(o),i=Ha(r);e.modifiersData[c]={referenceClippingOffsets:o,popperEscapeOffsets:r,isReferenceHidden:n,hasPopperEscaped:i},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":n,"data-popper-escaped":i})}var zr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ad};function $d(t,e,c){var d=dt(t),p=[Xe,Je].indexOf(d)>=0?-1:1,g=typeof c=="function"?c(Object.assign({},e,{placement:t})):c,a=g[0],u=g[1];return a=a||0,u=(u||0)*p,[Xe,Qe].indexOf(d)>=0?{x:u,y:a}:{x:a,y:u}}function Ld(t){var e=t.state,c=t.options,d=t.name,p=c.offset,g=p===void 0?[0,0]:p,a=sr.reduce(function(n,i){return n[i]=$d(i,e.rects,g),n},{}),u=a[e.placement],o=u.x,r=u.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=o,e.modifiersData.popperOffsets.y+=r),e.modifiersData[d]=a}var Gr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ld};function xd(t){var e=t.state,c=t.name;e.modifiersData[c]=hr({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Ri={name:"popperOffsets",enabled:!0,phase:"read",fn:xd,data:{}};function Ko(t){return t==="x"?"y":"x"}function Md(t){var e=t.state,c=t.options,d=t.name,p=c.mainAxis,g=p===void 0?!0:p,a=c.altAxis,u=a===void 0?!1:a,o=c.boundary,r=c.rootBoundary,n=c.altBoundary,i=c.padding,s=c.tether,l=s===void 0?!0:s,h=c.tetherOffset,f=h===void 0?0:h,b=Tt(e,{boundary:o,rootBoundary:r,padding:i,altBoundary:n}),C=dt(e.placement),w=Wt(e.placement),x=!w,A=ti(C),v=Ko(A),E=e.modifiersData.popperOffsets,$=e.rects.reference,M=e.rects.popper,S=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,T=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),y=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,m={x:0,y:0};if(E){if(g){var L,_=A==="y"?Je:Xe,k=A==="y"?it:Qe,I=A==="y"?"height":"width",R=E[A],D=R+b[_],O=R-b[k],N=l?-M[I]/2:0,P=w===un?$[I]:M[I],H=w===un?-M[I]:-$[I],F=e.elements.arrow,U=l&&F?ei(F):{width:0,height:0},j=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:cr(),J=j[_],z=j[k],X=ni(0,$[I],U[I]),ee=x?$[I]/2-N-X-J-T.mainAxis:P-X-J-T.mainAxis,Z=x?-$[I]/2+N+X+z+T.mainAxis:H+X+z+T.mainAxis,pe=e.elements.arrow&&Zt(e.elements.arrow),ve=pe?A==="y"?pe.clientTop||0:pe.clientLeft||0:0,de=(L=y?.[A])!=null?L:0,B=R+ee-de-ve,K=R+Z-de,ne=ni(l?qn(D,B):D,R,l?Qt(O,K):O);E[A]=ne,m[A]=ne-R}if(u){var Q,se=A==="x"?Je:Xe,te=A==="x"?it:Qe,re=E[v],Se=v==="y"?"height":"width",he=re+b[se],xe=re-b[te],W=[Je,Xe].indexOf(C)!==-1,G=(Q=y?.[v])!=null?Q:0,q=W?he:re-$[Se]-M[Se]-G+T.altAxis,ue=W?re+$[Se]+M[Se]-G-T.altAxis:xe,Ce=l&&W?Da(q,re,ue):ni(l?q:he,re,l?ue:xe);E[v]=Ce,m[v]=Ce-re}e.modifiersData[d]=m}}var Kr={name:"preventOverflow",enabled:!0,phase:"main",fn:Md,requiresIfExists:["offset"]};function Yo(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Jo(t){return t===Ge(t)||!at(t)?ii(t):Yo(t)}function kd(t){var e=t.getBoundingClientRect(),c=Cn(e.width)/t.offsetWidth||1,d=Cn(e.height)/t.offsetHeight||1;return c!==1||d!==1}function Xo(t,e,c){c===void 0&&(c=!1);var d=at(e),p=at(e)&&kd(e),g=mt(e),a=Bt(t,p,c),u={scrollLeft:0,scrollTop:0},o={x:0,y:0};return(d||!d&&!c)&&((ut(e)!=="body"||oi(g))&&(u=Jo(e)),at(e)?(o=Bt(e,!0),o.x+=e.clientLeft,o.y+=e.clientTop):g&&(o.x=ri(g))),{x:a.left+u.scrollLeft-o.x,y:a.top+u.scrollTop-o.y,width:a.width,height:a.height}}function Id(t){var e=new Map,c=new Set,d=[];t.forEach(function(g){e.set(g.name,g)});function p(g){c.add(g.name);var a=[].concat(g.requires||[],g.requiresIfExists||[]);a.forEach(function(u){if(!c.has(u)){var o=e.get(u);o&&p(o)}}),d.push(g)}return t.forEach(function(g){c.has(g.name)||p(g)}),d}function Qo(t){var e=Id(t);return Wo.reduce(function(c,d){return c.concat(e.filter(function(p){return p.phase===d}))},[])}function Zo(t){var e;return function(){return e||(e=new Promise(function(c){Promise.resolve().then(function(){e=void 0,c(t())})})),e}}function qo(t){var e=t.reduce(function(c,d){var p=c[d.name];return c[d.name]=p?Object.assign({},p,d,{options:Object.assign({},p.options,d.options),data:Object.assign({},p.data,d.data)}):d,c},{});return Object.keys(e).map(function(c){return e[c]})}var Ba={placement:"bottom",modifiers:[],strategy:"absolute"};function Wa(){for(var t=arguments.length,e=new Array(t),c=0;c(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,c)=>`#${CSS.escape(c)}`)),t),Nd=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Fd=t=>{do t+=Math.floor(Math.random()*Dd);while(document.getElementById(t));return t},Hd=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:c}=window.getComputedStyle(t),d=Number.parseFloat(e),p=Number.parseFloat(c);return!d&&!p?0:(e=e.split(",")[0],c=c.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(c))*Pd)},yl=t=>{t.dispatchEvent(new Event(gs))},Sn=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),Fn=t=>Sn(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(bl(t)):null,Vi=t=>{if(!Sn(t)||t.getClientRects().length===0)return!1;let e=getComputedStyle(t).getPropertyValue("visibility")==="visible",c=t.closest("details:not([open])");if(!c)return e;if(c!==t){let d=t.closest("summary");if(d&&d.parentNode!==c||d===null)return!1}return e},Hn=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",wl=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){let e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?wl(t.parentNode):null},io=()=>{},br=t=>{t.offsetHeight},El=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ts=[],Bd=t=>{document.readyState==="loading"?(ts.length||document.addEventListener("DOMContentLoaded",()=>{for(let e of ts)e()}),ts.push(t)):t()},Ut=()=>document.documentElement.dir==="rtl",zt=t=>{Bd(()=>{let e=El();if(e){let c=t.NAME,d=e.fn[c];e.fn[c]=t.jQueryInterface,e.fn[c].Constructor=t,e.fn[c].noConflict=()=>(e.fn[c]=d,t.jQueryInterface)}})},_t=(t,e=[],c=t)=>typeof t=="function"?t(...e):c,Cl=(t,e,c=!0)=>{if(!c){_t(t);return}let d=5,p=Hd(e)+d,g=!1,a=({target:u})=>{u===e&&(g=!0,e.removeEventListener(gs,a),_t(t))};e.addEventListener(gs,a),setTimeout(()=>{g||yl(e)},p)},ys=(t,e,c,d)=>{let p=t.length,g=t.indexOf(e);return g===-1?!c&&d?t[p-1]:t[0]:(g+=c?1:-1,d&&(g=(g+p)%p),t[Math.max(0,Math.min(g,p-1))])},Wd=/[^.]*(?=\..*)\.|.*/,Ud=/\..*/,Vd=/::\d+$/,ns={},ja=1,Tl={mouseenter:"mouseover",mouseleave:"mouseout"},jd=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Sl(t,e){return e&&`${e}::${ja++}`||t.uidEvent||ja++}function _l(t){let e=Sl(t);return t.uidEvent=e,ns[e]=ns[e]||{},ns[e]}function zd(t,e){return function c(d){return ws(d,{delegateTarget:t}),c.oneOff&&Y.off(t,d.type,e),e.apply(t,[d])}}function Gd(t,e,c){return function d(p){let g=t.querySelectorAll(e);for(let{target:a}=p;a&&a!==this;a=a.parentNode)for(let u of g)if(u===a)return ws(p,{delegateTarget:a}),d.oneOff&&Y.off(t,p.type,e,c),c.apply(a,[p])}}function Al(t,e,c=null){return Object.values(t).find(d=>d.callable===e&&d.delegationSelector===c)}function $l(t,e,c){let d=typeof e=="string",p=d?c:e||c,g=Ll(t);return jd.has(g)||(g=t),[d,p,g]}function za(t,e,c,d,p){if(typeof e!="string"||!t)return;let[g,a,u]=$l(e,c,d);e in Tl&&(a=(h=>function(f){if(!f.relatedTarget||f.relatedTarget!==f.delegateTarget&&!f.delegateTarget.contains(f.relatedTarget))return h.call(this,f)})(a));let o=_l(t),r=o[u]||(o[u]={}),n=Al(r,a,g?c:null);if(n){n.oneOff=n.oneOff&&p;return}let i=Sl(a,e.replace(Wd,"")),s=g?Gd(t,c,a):zd(t,a);s.delegationSelector=g?c:null,s.callable=a,s.oneOff=p,s.uidEvent=i,r[i]=s,t.addEventListener(u,s,g)}function ms(t,e,c,d,p){let g=Al(e[c],d,p);g&&(t.removeEventListener(c,g,!!p),delete e[c][g.uidEvent])}function Kd(t,e,c,d){let p=e[c]||{};for(let[g,a]of Object.entries(p))g.includes(d)&&ms(t,e,c,a.callable,a.delegationSelector)}function Ll(t){return t=t.replace(Ud,""),Tl[t]||t}var Y={on(t,e,c,d){za(t,e,c,d,!1)},one(t,e,c,d){za(t,e,c,d,!0)},off(t,e,c,d){if(typeof e!="string"||!t)return;let[p,g,a]=$l(e,c,d),u=a!==e,o=_l(t),r=o[a]||{},n=e.startsWith(".");if(typeof g<"u"){if(!Object.keys(r).length)return;ms(t,o,a,g,p?c:null);return}if(n)for(let i of Object.keys(o))Kd(t,o,i,e.slice(1));for(let[i,s]of Object.entries(r)){let l=i.replace(Vd,"");(!u||e.includes(l))&&ms(t,o,a,s.callable,s.delegationSelector)}},trigger(t,e,c){if(typeof e!="string"||!t)return null;let d=El(),p=Ll(e),g=e!==p,a=null,u=!0,o=!0,r=!1;g&&d&&(a=d.Event(e,c),d(t).trigger(a),u=!a.isPropagationStopped(),o=!a.isImmediatePropagationStopped(),r=a.isDefaultPrevented());let n=ws(new Event(e,{bubbles:u,cancelable:!0}),c);return r&&n.preventDefault(),o&&t.dispatchEvent(n),n.defaultPrevented&&a&&a.preventDefault(),n}};function ws(t,e={}){for(let[c,d]of Object.entries(e))try{t[c]=d}catch{Object.defineProperty(t,c,{configurable:!0,get(){return d}})}return t}function Ga(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function is(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var _n={setDataAttribute(t,e,c){t.setAttribute(`data-bs-${is(e)}`,c)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${is(e)}`)},getDataAttributes(t){if(!t)return{};let e={},c=Object.keys(t.dataset).filter(d=>d.startsWith("bs")&&!d.startsWith("bsConfig"));for(let d of c){let p=d.replace(/^bs/,"");p=p.charAt(0).toLowerCase()+p.slice(1,p.length),e[p]=Ga(t.dataset[d])}return e},getDataAttribute(t,e){return Ga(t.getAttribute(`data-bs-${is(e)}`))}},ci=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,c){let d=Sn(c)?_n.getDataAttribute(c,"config"):{};return{...this.constructor.Default,...typeof d=="object"?d:{},...Sn(c)?_n.getDataAttributes(c):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,c=this.constructor.DefaultType){for(let[d,p]of Object.entries(c)){let g=e[d],a=Sn(g)?"element":Nd(g);if(!new RegExp(p).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${d}" provided type "${a}" but expected type "${p}".`)}}},Yd="5.3.2",Ot=class extends ci{constructor(e,c){super(),e=Fn(e),e&&(this._element=e,this._config=this._getConfig(c),es.set(this._element,this.constructor.DATA_KEY,this))}dispose(){es.remove(this._element,this.constructor.DATA_KEY),Y.off(this._element,this.constructor.EVENT_KEY);for(let e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,c,d=!0){Cl(e,c,d)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return es.get(Fn(e),this.DATA_KEY)}static getOrCreateInstance(e,c={}){return this.getInstance(e)||new this(e,typeof c=="object"?c:null)}static get VERSION(){return Yd}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},rs=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let c=t.getAttribute("href");if(!c||!c.includes("#")&&!c.startsWith("."))return null;c.includes("#")&&!c.startsWith("#")&&(c=`#${c.split("#")[1]}`),e=c&&c!=="#"?bl(c.trim()):null}return e},le={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(c=>c.matches(e))},parents(t,e){let c=[],d=t.parentNode.closest(e);for(;d;)c.push(d),d=d.parentNode.closest(e);return c},prev(t,e){let c=t.previousElementSibling;for(;c;){if(c.matches(e))return[c];c=c.previousElementSibling}return[]},next(t,e){let c=t.nextElementSibling;for(;c;){if(c.matches(e))return[c];c=c.nextElementSibling}return[]},focusableChildren(t){let e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(c=>`${c}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(c=>!Hn(c)&&Vi(c))},getSelectorFromElement(t){let e=rs(t);return e&&le.findOne(e)?e:null},getElementFromSelector(t){let e=rs(t);return e?le.findOne(e):null},getMultipleElementsFromSelector(t){let e=rs(t);return e?le.find(e):[]}},ao=(t,e="hide")=>{let c=`click.dismiss${t.EVENT_KEY}`,d=t.NAME;Y.on(document,c,`[data-bs-dismiss="${d}"]`,function(p){if(["A","AREA"].includes(this.tagName)&&p.preventDefault(),Hn(this))return;let g=le.getElementFromSelector(this)||this.closest(`.${d}`);t.getOrCreateInstance(g)[e]()})},Jd="alert",Xd="bs.alert",xl=`.${Xd}`,Qd=`close${xl}`,Zd=`closed${xl}`,qd="fade",eh="show",Hi=class extends Ot{static get NAME(){return Jd}close(){if(Y.trigger(this._element,Qd).defaultPrevented)return;this._element.classList.remove(eh);let c=this._element.classList.contains(qd);this._queueCallback(()=>this._destroyElement(),this._element,c)}_destroyElement(){this._element.remove(),Y.trigger(this._element,Zd),this.dispose()}static jQueryInterface(e){return this.each(function(){let c=Hi.getOrCreateInstance(this);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};ao(Hi,"close");zt(Hi);var th="button",nh="bs.button",ih=`.${nh}`,rh=".data-api",oh="active",Ka='[data-bs-toggle="button"]',sh=`click${ih}${rh}`,Bi=class extends Ot{static get NAME(){return th}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(oh))}static jQueryInterface(e){return this.each(function(){let c=Bi.getOrCreateInstance(this);e==="toggle"&&c[e]()})}};Y.on(document,sh,Ka,t=>{t.preventDefault();let e=t.target.closest(Ka);Bi.getOrCreateInstance(e).toggle()});zt(Bi);var ah="swipe",ji=".bs.swipe",lh=`touchstart${ji}`,ch=`touchmove${ji}`,uh=`touchend${ji}`,dh=`pointerdown${ji}`,hh=`pointerup${ji}`,fh="touch",ph="pen",gh="pointer-event",mh=40,vh={endCallback:null,leftCallback:null,rightCallback:null},bh={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},Wi=class extends ci{constructor(e,c){super(),this._element=e,!(!e||!Wi.isSupported())&&(this._config=this._getConfig(c),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return vh}static get DefaultType(){return bh}static get NAME(){return ah}dispose(){Y.off(this._element,ji)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),_t(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){let e=Math.abs(this._deltaX);if(e<=mh)return;let c=e/this._deltaX;this._deltaX=0,c&&_t(c>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(Y.on(this._element,dh,e=>this._start(e)),Y.on(this._element,hh,e=>this._end(e)),this._element.classList.add(gh)):(Y.on(this._element,lh,e=>this._start(e)),Y.on(this._element,ch,e=>this._move(e)),Y.on(this._element,uh,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===ph||e.pointerType===fh)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},yh="carousel",wh="bs.carousel",Vn=`.${wh}`,Ml=".data-api",Eh="ArrowLeft",Ch="ArrowRight",Th=500,pr="next",Oi="prev",Pi="left",to="right",Sh=`slide${Vn}`,os=`slid${Vn}`,_h=`keydown${Vn}`,Ah=`mouseenter${Vn}`,$h=`mouseleave${Vn}`,Lh=`dragstart${Vn}`,xh=`load${Vn}${Ml}`,Mh=`click${Vn}${Ml}`,kl="carousel",Jr="active",kh="slide",Ih="carousel-item-end",Rh="carousel-item-start",Oh="carousel-item-next",Dh="carousel-item-prev",Il=".active",Rl=".carousel-item",Ph=Il+Rl,Nh=".carousel-item img",Fh=".carousel-indicators",Hh="[data-bs-slide], [data-bs-slide-to]",Bh='[data-bs-ride="carousel"]',Wh={[Eh]:to,[Ch]:Pi},Uh={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Vh={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},ui=class extends Ot{constructor(e,c){super(e,c),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=le.findOne(Fh,this._element),this._addEventListeners(),this._config.ride===kl&&this.cycle()}static get Default(){return Uh}static get DefaultType(){return Vh}static get NAME(){return yh}next(){this._slide(pr)}nextWhenVisible(){!document.hidden&&Vi(this._element)&&this.next()}prev(){this._slide(Oi)}pause(){this._isSliding&&yl(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){Y.one(this._element,os,()=>this.cycle());return}this.cycle()}}to(e){let c=this._getItems();if(e>c.length-1||e<0)return;if(this._isSliding){Y.one(this._element,os,()=>this.to(e));return}let d=this._getItemIndex(this._getActive());if(d===e)return;let p=e>d?pr:Oi;this._slide(p,c[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&Y.on(this._element,_h,e=>this._keydown(e)),this._config.pause==="hover"&&(Y.on(this._element,Ah,()=>this.pause()),Y.on(this._element,$h,()=>this._maybeEnableCycle())),this._config.touch&&Wi.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let d of le.find(Nh,this._element))Y.on(d,Lh,p=>p.preventDefault());let c={leftCallback:()=>this._slide(this._directionToOrder(Pi)),rightCallback:()=>this._slide(this._directionToOrder(to)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Th+this._config.interval))}};this._swipeHelper=new Wi(this._element,c)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let c=Wh[e.key];c&&(e.preventDefault(),this._slide(this._directionToOrder(c)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;let c=le.findOne(Il,this._indicatorsElement);c.classList.remove(Jr),c.removeAttribute("aria-current");let d=le.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);d&&(d.classList.add(Jr),d.setAttribute("aria-current","true"))}_updateInterval(){let e=this._activeElement||this._getActive();if(!e)return;let c=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=c||this._config.defaultInterval}_slide(e,c=null){if(this._isSliding)return;let d=this._getActive(),p=e===pr,g=c||ys(this._getItems(),d,p,this._config.wrap);if(g===d)return;let a=this._getItemIndex(g),u=l=>Y.trigger(this._element,l,{relatedTarget:g,direction:this._orderToDirection(e),from:this._getItemIndex(d),to:a});if(u(Sh).defaultPrevented||!d||!g)return;let r=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=g;let n=p?Rh:Ih,i=p?Oh:Dh;g.classList.add(i),br(g),d.classList.add(n),g.classList.add(n);let s=()=>{g.classList.remove(n,i),g.classList.add(Jr),d.classList.remove(Jr,i,n),this._isSliding=!1,u(os)};this._queueCallback(s,d,this._isAnimated()),r&&this.cycle()}_isAnimated(){return this._element.classList.contains(kh)}_getActive(){return le.findOne(Ph,this._element)}_getItems(){return le.find(Rl,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ut()?e===Pi?Oi:pr:e===Pi?pr:Oi}_orderToDirection(e){return Ut()?e===Oi?Pi:to:e===Oi?to:Pi}static jQueryInterface(e){return this.each(function(){let c=ui.getOrCreateInstance(this,e);if(typeof e=="number"){c.to(e);return}if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(document,Mh,Hh,function(t){let e=le.getElementFromSelector(this);if(!e||!e.classList.contains(kl))return;t.preventDefault();let c=ui.getOrCreateInstance(e),d=this.getAttribute("data-bs-slide-to");if(d){c.to(d),c._maybeEnableCycle();return}if(_n.getDataAttribute(this,"slide")==="next"){c.next(),c._maybeEnableCycle();return}c.prev(),c._maybeEnableCycle()});Y.on(window,xh,()=>{let t=le.find(Bh);for(let e of t)ui.getOrCreateInstance(e)});zt(ui);var jh="collapse",zh="bs.collapse",yr=`.${zh}`,Gh=".data-api",Kh=`show${yr}`,Yh=`shown${yr}`,Jh=`hide${yr}`,Xh=`hidden${yr}`,Qh=`click${yr}${Gh}`,ss="show",Fi="collapse",Xr="collapsing",Zh="collapsed",qh=`:scope .${Fi} .${Fi}`,ef="collapse-horizontal",tf="width",nf="height",rf=".collapse.show, .collapse.collapsing",vs='[data-bs-toggle="collapse"]',of={parent:null,toggle:!0},sf={parent:"(null|element)",toggle:"boolean"},di=class extends Ot{constructor(e,c){super(e,c),this._isTransitioning=!1,this._triggerArray=[];let d=le.find(vs);for(let p of d){let g=le.getSelectorFromElement(p),a=le.find(g).filter(u=>u===this._element);g!==null&&a.length&&this._triggerArray.push(p)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return of}static get DefaultType(){return sf}static get NAME(){return jh}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(rf).filter(u=>u!==this._element).map(u=>di.getOrCreateInstance(u,{toggle:!1}))),e.length&&e[0]._isTransitioning||Y.trigger(this._element,Kh).defaultPrevented)return;for(let u of e)u.hide();let d=this._getDimension();this._element.classList.remove(Fi),this._element.classList.add(Xr),this._element.style[d]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let p=()=>{this._isTransitioning=!1,this._element.classList.remove(Xr),this._element.classList.add(Fi,ss),this._element.style[d]="",Y.trigger(this._element,Yh)},a=`scroll${d[0].toUpperCase()+d.slice(1)}`;this._queueCallback(p,this._element,!0),this._element.style[d]=`${this._element[a]}px`}hide(){if(this._isTransitioning||!this._isShown()||Y.trigger(this._element,Jh).defaultPrevented)return;let c=this._getDimension();this._element.style[c]=`${this._element.getBoundingClientRect()[c]}px`,br(this._element),this._element.classList.add(Xr),this._element.classList.remove(Fi,ss);for(let p of this._triggerArray){let g=le.getElementFromSelector(p);g&&!this._isShown(g)&&this._addAriaAndCollapsedClass([p],!1)}this._isTransitioning=!0;let d=()=>{this._isTransitioning=!1,this._element.classList.remove(Xr),this._element.classList.add(Fi),Y.trigger(this._element,Xh)};this._element.style[c]="",this._queueCallback(d,this._element,!0)}_isShown(e=this._element){return e.classList.contains(ss)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Fn(e.parent),e}_getDimension(){return this._element.classList.contains(ef)?tf:nf}_initializeChildren(){if(!this._config.parent)return;let e=this._getFirstLevelChildren(vs);for(let c of e){let d=le.getElementFromSelector(c);d&&this._addAriaAndCollapsedClass([c],this._isShown(d))}}_getFirstLevelChildren(e){let c=le.find(qh,this._config.parent);return le.find(e,this._config.parent).filter(d=>!c.includes(d))}_addAriaAndCollapsedClass(e,c){if(e.length)for(let d of e)d.classList.toggle(Zh,!c),d.setAttribute("aria-expanded",c)}static jQueryInterface(e){let c={};return typeof e=="string"&&/show|hide/.test(e)&&(c.toggle=!1),this.each(function(){let d=di.getOrCreateInstance(this,c);if(typeof e=="string"){if(typeof d[e]>"u")throw new TypeError(`No method named "${e}"`);d[e]()}})}};Y.on(document,Qh,vs,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(let e of le.getMultipleElementsFromSelector(this))di.getOrCreateInstance(e,{toggle:!1}).toggle()});zt(di);var Ya="dropdown",af="bs.dropdown",hi=`.${af}`,Es=".data-api",lf="Escape",Ja="Tab",cf="ArrowUp",Xa="ArrowDown",uf=2,df=`hide${hi}`,hf=`hidden${hi}`,ff=`show${hi}`,pf=`shown${hi}`,Ol=`click${hi}${Es}`,Dl=`keydown${hi}${Es}`,gf=`keyup${hi}${Es}`,Ni="show",mf="dropup",vf="dropend",bf="dropstart",yf="dropup-center",wf="dropdown-center",ai='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ef=`${ai}.${Ni}`,no=".dropdown-menu",Cf=".navbar",Tf=".navbar-nav",Sf=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",_f=Ut()?"top-end":"top-start",Af=Ut()?"top-start":"top-end",$f=Ut()?"bottom-end":"bottom-start",Lf=Ut()?"bottom-start":"bottom-end",xf=Ut()?"left-start":"right-start",Mf=Ut()?"right-start":"left-start",kf="top",If="bottom",Rf={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Of={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},At=class extends Ot{constructor(e,c){super(e,c),this._popper=null,this._parent=this._element.parentNode,this._menu=le.next(this._element,no)[0]||le.prev(this._element,no)[0]||le.findOne(no,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Rf}static get DefaultType(){return Of}static get NAME(){return Ya}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Hn(this._element)||this._isShown())return;let e={relatedTarget:this._element};if(!Y.trigger(this._element,ff,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Tf))for(let d of[].concat(...document.body.children))Y.on(d,"mouseover",io);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ni),this._element.classList.add(Ni),Y.trigger(this._element,pf,e)}}hide(){if(Hn(this._element)||!this._isShown())return;let e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!Y.trigger(this._element,df,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(let d of[].concat(...document.body.children))Y.off(d,"mouseover",io);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ni),this._element.classList.remove(Ni),this._element.setAttribute("aria-expanded","false"),_n.removeDataAttribute(this._menu,"popper"),Y.trigger(this._element,hf,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Sn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Ya.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Yr>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Sn(this._config.reference)?e=Fn(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);let c=this._getPopperConfig();this._popper=fr(e,this._menu,c)}_isShown(){return this._menu.classList.contains(Ni)}_getPlacement(){let e=this._parent;if(e.classList.contains(vf))return xf;if(e.classList.contains(bf))return Mf;if(e.classList.contains(yf))return kf;if(e.classList.contains(wf))return If;let c=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(mf)?c?Af:_f:c?Lf:$f}_detectNavbar(){return this._element.closest(Cf)!==null}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(c=>Number.parseInt(c,10)):typeof e=="function"?c=>e(c,this._element):e}_getPopperConfig(){let e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(_n.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..._t(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:c}){let d=le.find(Sf,this._menu).filter(p=>Vi(p));d.length&&ys(d,c,e===Xa,!d.includes(c)).focus()}static jQueryInterface(e){return this.each(function(){let c=At.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}static clearMenus(e){if(e.button===uf||e.type==="keyup"&&e.key!==Ja)return;let c=le.find(Ef);for(let d of c){let p=At.getInstance(d);if(!p||p._config.autoClose===!1)continue;let g=e.composedPath(),a=g.includes(p._menu);if(g.includes(p._element)||p._config.autoClose==="inside"&&!a||p._config.autoClose==="outside"&&a||p._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Ja||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;let u={relatedTarget:p._element};e.type==="click"&&(u.clickEvent=e),p._completeHide(u)}}static dataApiKeydownHandler(e){let c=/input|textarea/i.test(e.target.tagName),d=e.key===lf,p=[cf,Xa].includes(e.key);if(!p&&!d||c&&!d)return;e.preventDefault();let g=this.matches(ai)?this:le.prev(this,ai)[0]||le.next(this,ai)[0]||le.findOne(ai,e.delegateTarget.parentNode),a=At.getOrCreateInstance(g);if(p){e.stopPropagation(),a.show(),a._selectMenuItem(e);return}a._isShown()&&(e.stopPropagation(),a.hide(),g.focus())}};Y.on(document,Dl,ai,At.dataApiKeydownHandler);Y.on(document,Dl,no,At.dataApiKeydownHandler);Y.on(document,Ol,At.clearMenus);Y.on(document,gf,At.clearMenus);Y.on(document,Ol,ai,function(t){t.preventDefault(),At.getOrCreateInstance(this).toggle()});zt(At);var Pl="backdrop",Df="fade",Qa="show",Za=`mousedown.bs.${Pl}`,Pf={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Nf={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},ro=class extends ci{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Pf}static get DefaultType(){return Nf}static get NAME(){return Pl}show(e){if(!this._config.isVisible){_t(e);return}this._append();let c=this._getElement();this._config.isAnimated&&br(c),c.classList.add(Qa),this._emulateAnimation(()=>{_t(e)})}hide(e){if(!this._config.isVisible){_t(e);return}this._getElement().classList.remove(Qa),this._emulateAnimation(()=>{this.dispose(),_t(e)})}dispose(){this._isAppended&&(Y.off(this._element,Za),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){let e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(Df),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Fn(e.rootElement),e}_append(){if(this._isAppended)return;let e=this._getElement();this._config.rootElement.append(e),Y.on(e,Za,()=>{_t(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Cl(e,this._getElement(),this._config.isAnimated)}},Ff="focustrap",Hf="bs.focustrap",oo=`.${Hf}`,Bf=`focusin${oo}`,Wf=`keydown.tab${oo}`,Uf="Tab",Vf="forward",qa="backward",jf={autofocus:!0,trapElement:null},zf={autofocus:"boolean",trapElement:"element"},so=class extends ci{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return jf}static get DefaultType(){return zf}static get NAME(){return Ff}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),Y.off(document,oo),Y.on(document,Bf,e=>this._handleFocusin(e)),Y.on(document,Wf,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,Y.off(document,oo))}_handleFocusin(e){let{trapElement:c}=this._config;if(e.target===document||e.target===c||c.contains(e.target))return;let d=le.focusableChildren(c);d.length===0?c.focus():this._lastTabNavDirection===qa?d[d.length-1].focus():d[0].focus()}_handleKeydown(e){e.key===Uf&&(this._lastTabNavDirection=e.shiftKey?qa:Vf)}},el=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",tl=".sticky-top",Qr="padding-right",nl="margin-right",mr=class{constructor(){this._element=document.body}getWidth(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){let e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Qr,c=>c+e),this._setElementAttributes(el,Qr,c=>c+e),this._setElementAttributes(tl,nl,c=>c-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Qr),this._resetElementAttributes(el,Qr),this._resetElementAttributes(tl,nl)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,c,d){let p=this.getWidth(),g=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+p)return;this._saveInitialAttribute(a,c);let u=window.getComputedStyle(a).getPropertyValue(c);a.style.setProperty(c,`${d(Number.parseFloat(u))}px`)};this._applyManipulationCallback(e,g)}_saveInitialAttribute(e,c){let d=e.style.getPropertyValue(c);d&&_n.setDataAttribute(e,c,d)}_resetElementAttributes(e,c){let d=p=>{let g=_n.getDataAttribute(p,c);if(g===null){p.style.removeProperty(c);return}_n.removeDataAttribute(p,c),p.style.setProperty(c,g)};this._applyManipulationCallback(e,d)}_applyManipulationCallback(e,c){if(Sn(e)){c(e);return}for(let d of le.find(e,this._element))c(d)}},Gf="modal",Kf="bs.modal",Vt=`.${Kf}`,Yf=".data-api",Jf="Escape",Xf=`hide${Vt}`,Qf=`hidePrevented${Vt}`,Nl=`hidden${Vt}`,Fl=`show${Vt}`,Zf=`shown${Vt}`,qf=`resize${Vt}`,ep=`click.dismiss${Vt}`,tp=`mousedown.dismiss${Vt}`,np=`keydown.dismiss${Vt}`,ip=`click${Vt}${Yf}`,il="modal-open",rp="fade",rl="show",as="modal-static",op=".modal.show",sp=".modal-dialog",ap=".modal-body",lp='[data-bs-toggle="modal"]',cp={backdrop:!0,focus:!0,keyboard:!0},up={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},jt=class extends Ot{constructor(e,c){super(e,c),this._dialog=le.findOne(sp,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new mr,this._addEventListeners()}static get Default(){return cp}static get DefaultType(){return up}static get NAME(){return Gf}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||Y.trigger(this._element,Fl,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(il),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||Y.trigger(this._element,Xf).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(rl),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){Y.off(window,Vt),Y.off(this._dialog,Vt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ro({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new so({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;let c=le.findOne(ap,this._dialog);c&&(c.scrollTop=0),br(this._element),this._element.classList.add(rl);let d=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,Y.trigger(this._element,Zf,{relatedTarget:e})};this._queueCallback(d,this._dialog,this._isAnimated())}_addEventListeners(){Y.on(this._element,np,e=>{if(e.key===Jf){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),Y.on(window,qf,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),Y.on(this._element,tp,e=>{Y.one(this._element,ep,c=>{if(!(this._element!==e.target||this._element!==c.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(il),this._resetAdjustments(),this._scrollBar.reset(),Y.trigger(this._element,Nl)})}_isAnimated(){return this._element.classList.contains(rp)}_triggerBackdropTransition(){if(Y.trigger(this._element,Qf).defaultPrevented)return;let c=this._element.scrollHeight>document.documentElement.clientHeight,d=this._element.style.overflowY;d==="hidden"||this._element.classList.contains(as)||(c||(this._element.style.overflowY="hidden"),this._element.classList.add(as),this._queueCallback(()=>{this._element.classList.remove(as),this._queueCallback(()=>{this._element.style.overflowY=d},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,c=this._scrollBar.getWidth(),d=c>0;if(d&&!e){let p=Ut()?"paddingLeft":"paddingRight";this._element.style[p]=`${c}px`}if(!d&&e){let p=Ut()?"paddingRight":"paddingLeft";this._element.style[p]=`${c}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,c){return this.each(function(){let d=jt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof d[e]>"u")throw new TypeError(`No method named "${e}"`);d[e](c)}})}};Y.on(document,ip,lp,function(t){let e=le.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),Y.one(e,Fl,p=>{p.defaultPrevented||Y.one(e,Nl,()=>{Vi(this)&&this.focus()})});let c=le.findOne(op);c&&jt.getInstance(c).hide(),jt.getOrCreateInstance(e).toggle(this)});ao(jt);zt(jt);var dp="offcanvas",hp="bs.offcanvas",An=`.${hp}`,Hl=".data-api",fp=`load${An}${Hl}`,pp="Escape",ol="show",sl="showing",al="hiding",gp="offcanvas-backdrop",Bl=".offcanvas.show",mp=`show${An}`,vp=`shown${An}`,bp=`hide${An}`,ll=`hidePrevented${An}`,Wl=`hidden${An}`,yp=`resize${An}`,wp=`click${An}${Hl}`,Ep=`keydown.dismiss${An}`,Cp='[data-bs-toggle="offcanvas"]',Tp={backdrop:!0,keyboard:!0,scroll:!1},Sp={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},dn=class extends Ot{constructor(e,c){super(e,c),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Tp}static get DefaultType(){return Sp}static get NAME(){return dp}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||Y.trigger(this._element,mp,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new mr().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(sl);let d=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(ol),this._element.classList.remove(sl),Y.trigger(this._element,vp,{relatedTarget:e})};this._queueCallback(d,this._element,!0)}hide(){if(!this._isShown||Y.trigger(this._element,bp).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(al),this._backdrop.hide();let c=()=>{this._element.classList.remove(ol,al),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new mr().reset(),Y.trigger(this._element,Wl)};this._queueCallback(c,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let e=()=>{if(this._config.backdrop==="static"){Y.trigger(this._element,ll);return}this.hide()},c=!!this._config.backdrop;return new ro({className:gp,isVisible:c,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:c?e:null})}_initializeFocusTrap(){return new so({trapElement:this._element})}_addEventListeners(){Y.on(this._element,Ep,e=>{if(e.key===pp){if(this._config.keyboard){this.hide();return}Y.trigger(this._element,ll)}})}static jQueryInterface(e){return this.each(function(){let c=dn.getOrCreateInstance(this,e);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};Y.on(document,wp,Cp,function(t){let e=le.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Hn(this))return;Y.one(e,Wl,()=>{Vi(this)&&this.focus()});let c=le.findOne(Bl);c&&c!==e&&dn.getInstance(c).hide(),dn.getOrCreateInstance(e).toggle(this)});Y.on(window,fp,()=>{for(let t of le.find(Bl))dn.getOrCreateInstance(t).show()});Y.on(window,yp,()=>{for(let t of le.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&dn.getOrCreateInstance(t).hide()});ao(dn);zt(dn);var _p=/^aria-[\w-]*$/i,Ul={"*":["class","dir","id","lang","role",_p],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ap=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),$p=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Lp=(t,e)=>{let c=t.nodeName.toLowerCase();return e.includes(c)?Ap.has(c)?!!$p.test(t.nodeValue):!0:e.filter(d=>d instanceof RegExp).some(d=>d.test(c))};function xp(t,e,c){if(!t.length)return t;if(c&&typeof c=="function")return c(t);let p=new window.DOMParser().parseFromString(t,"text/html"),g=[].concat(...p.body.querySelectorAll("*"));for(let a of g){let u=a.nodeName.toLowerCase();if(!Object.keys(e).includes(u)){a.remove();continue}let o=[].concat(...a.attributes),r=[].concat(e["*"]||[],e[u]||[]);for(let n of o)Lp(n,r)||a.removeAttribute(n.nodeName)}return p.body.innerHTML}var Mp="TemplateFactory",kp={allowList:Ul,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Ip={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Rp={entry:"(string|element|function|null)",selector:"(string|element)"},bs=class extends ci{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return kp}static get DefaultType(){return Ip}static get NAME(){return Mp}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){let e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(let[p,g]of Object.entries(this._config.content))this._setContent(e,g,p);let c=e.children[0],d=this._resolvePossibleFunction(this._config.extraClass);return d&&c.classList.add(...d.split(" ")),c}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(let[c,d]of Object.entries(e))super._typeCheckConfig({selector:c,entry:d},Rp)}_setContent(e,c,d){let p=le.findOne(d,e);if(p){if(c=this._resolvePossibleFunction(c),!c){p.remove();return}if(Sn(c)){this._putElementInTemplate(Fn(c),p);return}if(this._config.html){p.innerHTML=this._maybeSanitize(c);return}p.textContent=c}}_maybeSanitize(e){return this._config.sanitize?xp(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return _t(e,[this])}_putElementInTemplate(e,c){if(this._config.html){c.innerHTML="",c.append(e);return}c.textContent=e.textContent}},Op="tooltip",Dp=new Set(["sanitize","allowList","sanitizeFn"]),ls="fade",Pp="modal",Zr="show",Np=".tooltip-inner",cl=`.${Pp}`,ul="hide.bs.modal",gr="hover",cs="focus",Fp="click",Hp="manual",Bp="hide",Wp="hidden",Up="show",Vp="shown",jp="inserted",zp="click",Gp="focusin",Kp="focusout",Yp="mouseenter",Jp="mouseleave",Xp={AUTO:"auto",TOP:"top",RIGHT:Ut()?"left":"right",BOTTOM:"bottom",LEFT:Ut()?"right":"left"},Qp={allowList:Ul,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Zp={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Bn=class extends Ot{constructor(e,c){if(typeof Yr>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,c),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Qp}static get DefaultType(){return Zp}static get NAME(){return Op}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),Y.off(this._element.closest(cl),ul,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let e=Y.trigger(this._element,this.constructor.eventName(Up)),d=(wl(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!d)return;this._disposePopper();let p=this._getTipElement();this._element.setAttribute("aria-describedby",p.getAttribute("id"));let{container:g}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(g.append(p),Y.trigger(this._element,this.constructor.eventName(jp))),this._popper=this._createPopper(p),p.classList.add(Zr),"ontouchstart"in document.documentElement)for(let u of[].concat(...document.body.children))Y.on(u,"mouseover",io);let a=()=>{Y.trigger(this._element,this.constructor.eventName(Vp)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(a,this.tip,this._isAnimated())}hide(){if(!this._isShown()||Y.trigger(this._element,this.constructor.eventName(Bp)).defaultPrevented)return;if(this._getTipElement().classList.remove(Zr),"ontouchstart"in document.documentElement)for(let p of[].concat(...document.body.children))Y.off(p,"mouseover",io);this._activeTrigger[Fp]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[gr]=!1,this._isHovered=null;let d=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),Y.trigger(this._element,this.constructor.eventName(Wp)))};this._queueCallback(d,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){let c=this._getTemplateFactory(e).toHtml();if(!c)return null;c.classList.remove(ls,Zr),c.classList.add(`bs-${this.constructor.NAME}-auto`);let d=Fd(this.constructor.NAME).toString();return c.setAttribute("id",d),this._isAnimated()&&c.classList.add(ls),c}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new bs({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Np]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ls)}_isShown(){return this.tip&&this.tip.classList.contains(Zr)}_createPopper(e){let c=_t(this._config.placement,[this,e,this._element]),d=Xp[c.toUpperCase()];return fr(this._element,e,this._getPopperConfig(d))}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(c=>Number.parseInt(c,10)):typeof e=="function"?c=>e(c,this._element):e}_resolvePossibleFunction(e){return _t(e,[this._element])}_getPopperConfig(e){let c={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:d=>{this._getTipElement().setAttribute("data-popper-placement",d.state.placement)}}]};return{...c,..._t(this._config.popperConfig,[c])}}_setListeners(){let e=this._config.trigger.split(" ");for(let c of e)if(c==="click")Y.on(this._element,this.constructor.eventName(zp),this._config.selector,d=>{this._initializeOnDelegatedTarget(d).toggle()});else if(c!==Hp){let d=c===gr?this.constructor.eventName(Yp):this.constructor.eventName(Gp),p=c===gr?this.constructor.eventName(Jp):this.constructor.eventName(Kp);Y.on(this._element,d,this._config.selector,g=>{let a=this._initializeOnDelegatedTarget(g);a._activeTrigger[g.type==="focusin"?cs:gr]=!0,a._enter()}),Y.on(this._element,p,this._config.selector,g=>{let a=this._initializeOnDelegatedTarget(g);a._activeTrigger[g.type==="focusout"?cs:gr]=a._element.contains(g.relatedTarget),a._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},Y.on(this._element.closest(cl),ul,this._hideModalHandler)}_fixTitle(){let e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,c){clearTimeout(this._timeout),this._timeout=setTimeout(e,c)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){let c=_n.getDataAttributes(this._element);for(let d of Object.keys(c))Dp.has(d)&&delete c[d];return e={...c,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Fn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){let e={};for(let[c,d]of Object.entries(this._config))this.constructor.Default[c]!==d&&(e[c]=d);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){let c=Bn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}};zt(Bn);var qp="popover",eg=".popover-header",tg=".popover-body",ng={...Bn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ig={...Bn.DefaultType,content:"(null|string|element|function)"},vr=class extends Bn{static get Default(){return ng}static get DefaultType(){return ig}static get NAME(){return qp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[eg]:this._getTitle(),[tg]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){let c=vr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e]()}})}};zt(vr);var rg="scrollspy",og="bs.scrollspy",Cs=`.${og}`,sg=".data-api",ag=`activate${Cs}`,dl=`click${Cs}`,lg=`load${Cs}${sg}`,cg="dropdown-item",Di="active",ug='[data-bs-spy="scroll"]',us="[href]",dg=".nav, .list-group",hl=".nav-link",hg=".nav-item",fg=".list-group-item",pg=`${hl}, ${hg} > ${hl}, ${fg}`,gg=".dropdown",mg=".dropdown-toggle",vg={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},bg={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},Ui=class extends Ot{constructor(e,c){super(e,c),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return vg}static get DefaultType(){return bg}static get NAME(){return rg}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Fn(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(c=>Number.parseFloat(c))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(Y.off(this._config.target,dl),Y.on(this._config.target,dl,us,e=>{let c=this._observableSections.get(e.target.hash);if(c){e.preventDefault();let d=this._rootElement||window,p=c.offsetTop-this._element.offsetTop;if(d.scrollTo){d.scrollTo({top:p,behavior:"smooth"});return}d.scrollTop=p}}))}_getNewObserver(){let e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(c=>this._observerCallback(c),e)}_observerCallback(e){let c=a=>this._targetLinks.get(`#${a.target.id}`),d=a=>{this._previousScrollData.visibleEntryTop=a.target.offsetTop,this._process(c(a))},p=(this._rootElement||document.documentElement).scrollTop,g=p>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=p;for(let a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(c(a));continue}let u=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(g&&u){if(d(a),!p)return;continue}!g&&!u&&d(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let e=le.find(us,this._config.target);for(let c of e){if(!c.hash||Hn(c))continue;let d=le.findOne(decodeURI(c.hash),this._element);Vi(d)&&(this._targetLinks.set(decodeURI(c.hash),c),this._observableSections.set(c.hash,d))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Di),this._activateParents(e),Y.trigger(this._element,ag,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(cg)){le.findOne(mg,e.closest(gg)).classList.add(Di);return}for(let c of le.parents(e,dg))for(let d of le.prev(c,pg))d.classList.add(Di)}_clearActiveClass(e){e.classList.remove(Di);let c=le.find(`${us}.${Di}`,e);for(let d of c)d.classList.remove(Di)}static jQueryInterface(e){return this.each(function(){let c=Ui.getOrCreateInstance(this,e);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(window,lg,()=>{for(let t of le.find(ug))Ui.getOrCreateInstance(t)});zt(Ui);var yg="tab",wg="bs.tab",fi=`.${wg}`,Eg=`hide${fi}`,Cg=`hidden${fi}`,Tg=`show${fi}`,Sg=`shown${fi}`,_g=`click${fi}`,Ag=`keydown${fi}`,$g=`load${fi}`,Lg="ArrowLeft",fl="ArrowRight",xg="ArrowUp",pl="ArrowDown",ds="Home",gl="End",li="active",ml="fade",hs="show",Mg="dropdown",Vl=".dropdown-toggle",kg=".dropdown-menu",fs=`:not(${Vl})`,Ig='.list-group, .nav, [role="tablist"]',Rg=".nav-item, .list-group-item",Og=`.nav-link${fs}, .list-group-item${fs}, [role="tab"]${fs}`,jl='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ps=`${Og}, ${jl}`,Dg=`.${li}[data-bs-toggle="tab"], .${li}[data-bs-toggle="pill"], .${li}[data-bs-toggle="list"]`,Wn=class extends Ot{constructor(e){super(e),this._parent=this._element.closest(Ig),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),Y.on(this._element,Ag,c=>this._keydown(c)))}static get NAME(){return yg}show(){let e=this._element;if(this._elemIsActive(e))return;let c=this._getActiveElem(),d=c?Y.trigger(c,Eg,{relatedTarget:e}):null;Y.trigger(e,Tg,{relatedTarget:c}).defaultPrevented||d&&d.defaultPrevented||(this._deactivate(c,e),this._activate(e,c))}_activate(e,c){if(!e)return;e.classList.add(li),this._activate(le.getElementFromSelector(e));let d=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(hs);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),Y.trigger(e,Sg,{relatedTarget:c})};this._queueCallback(d,e,e.classList.contains(ml))}_deactivate(e,c){if(!e)return;e.classList.remove(li),e.blur(),this._deactivate(le.getElementFromSelector(e));let d=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(hs);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),Y.trigger(e,Cg,{relatedTarget:c})};this._queueCallback(d,e,e.classList.contains(ml))}_keydown(e){if(![Lg,fl,xg,pl,ds,gl].includes(e.key))return;e.stopPropagation(),e.preventDefault();let c=this._getChildren().filter(p=>!Hn(p)),d;if([ds,gl].includes(e.key))d=c[e.key===ds?0:c.length-1];else{let p=[fl,pl].includes(e.key);d=ys(c,e.target,p,!0)}d&&(d.focus({preventScroll:!0}),Wn.getOrCreateInstance(d).show())}_getChildren(){return le.find(ps,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,c){this._setAttributeIfNotExists(e,"role","tablist");for(let d of c)this._setInitialAttributesOnChild(d)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);let c=this._elemIsActive(e),d=this._getOuterElement(e);e.setAttribute("aria-selected",c),d!==e&&this._setAttributeIfNotExists(d,"role","presentation"),c||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){let c=le.getElementFromSelector(e);c&&(this._setAttributeIfNotExists(c,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(c,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,c){let d=this._getOuterElement(e);if(!d.classList.contains(Mg))return;let p=(g,a)=>{let u=le.findOne(g,d);u&&u.classList.toggle(a,c)};p(Vl,li),p(kg,hs),d.setAttribute("aria-expanded",c)}_setAttributeIfNotExists(e,c,d){e.hasAttribute(c)||e.setAttribute(c,d)}_elemIsActive(e){return e.classList.contains(li)}_getInnerElement(e){return e.matches(ps)?e:le.findOne(ps,e)}_getOuterElement(e){return e.closest(Rg)||e}static jQueryInterface(e){return this.each(function(){let c=Wn.getOrCreateInstance(this);if(typeof e=="string"){if(c[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);c[e]()}})}};Y.on(document,_g,jl,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!Hn(this)&&Wn.getOrCreateInstance(this).show()});Y.on(window,$g,()=>{for(let t of le.find(Dg))Wn.getOrCreateInstance(t)});zt(Wn);var Pg="toast",Ng="bs.toast",jn=`.${Ng}`,Fg=`mouseover${jn}`,Hg=`mouseout${jn}`,Bg=`focusin${jn}`,Wg=`focusout${jn}`,Ug=`hide${jn}`,Vg=`hidden${jn}`,jg=`show${jn}`,zg=`shown${jn}`,Gg="fade",vl="hide",qr="show",eo="showing",Kg={animation:"boolean",autohide:"boolean",delay:"number"},Yg={animation:!0,autohide:!0,delay:5e3},Un=class extends Ot{constructor(e,c){super(e,c),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Yg}static get DefaultType(){return Kg}static get NAME(){return Pg}show(){if(Y.trigger(this._element,jg).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Gg);let c=()=>{this._element.classList.remove(eo),Y.trigger(this._element,zg),this._maybeScheduleHide()};this._element.classList.remove(vl),br(this._element),this._element.classList.add(qr,eo),this._queueCallback(c,this._element,this._config.animation)}hide(){if(!this.isShown()||Y.trigger(this._element,Ug).defaultPrevented)return;let c=()=>{this._element.classList.add(vl),this._element.classList.remove(eo,qr),Y.trigger(this._element,Vg)};this._element.classList.add(eo),this._queueCallback(c,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(qr),super.dispose()}isShown(){return this._element.classList.contains(qr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,c){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=c;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=c;break}}if(c){this._clearTimeout();return}let d=e.relatedTarget;this._element===d||this._element.contains(d)||this._maybeScheduleHide()}_setListeners(){Y.on(this._element,Fg,e=>this._onInteraction(e,!0)),Y.on(this._element,Hg,e=>this._onInteraction(e,!1)),Y.on(this._element,Bg,e=>this._onInteraction(e,!0)),Y.on(this._element,Wg,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){let c=Un.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof c[e]>"u")throw new TypeError(`No method named "${e}"`);c[e](this)}})}};ao(Un);zt(Un);var vc=Fo(zl());var Xl=Fo(Gl()),Ql=Fo(Yl());var Er={modalBodyConfirm:null,buttonConfirmed:null,toastContainer:null};function Zl(){ce(Er)}var De=function(t,e,c,d,...p){let g=t.insertRow();g.id=e,zn(g,e,e,0);let a=e;return p.forEach(u=>{zn(g,u),a=u}),c&&g.classList.add("table-active"),d&&$s(g,Jl,Xg(Jl,Jg,d),"Copy to clipboard"),g};function zi(t,e,c,d=!1,p=null){let g=t.insertCell(0);g.style.verticalAlign="middle",g.style.width="25px";let a=document.createElement("input");return a.classList.add("form-check-input"),a.type="checkbox",a.id=e,a.checked=c,a.disabled=d,p&&(a.onchange=p),g.append(a),a}function zn(t,e,c=null,d=-1){let p=t.insertCell(d);return p.innerHTML=e,p.setAttribute("data-bs-toggle","tooltip"),p.title=c!=null?c:e,p}function $s(t,e,c,d){let p=t.insertCell();p.classList.add("table-action-column");let g=document.createElement("button");g.classList.add("btn"),g.style.padding="0",g.innerHTML=``,d&&(g.title=d),g.onclick=c,p.appendChild(g)}var Jl="bi-copy",Jg="bi-check-lg";function Xg(t,e,c){return d=>{navigator.clipboard.writeText(c);let p=d.currentTarget.querySelector(".bi");p.classList.replace(t,e),setTimeout(()=>p.classList.replace(e,t),500)}}function ho(t,e){let c=document.createElement("th");c.innerHTML=e,t.appendChild(c)}function $t(t,e){t.innerHTML="",e.forEach(c=>{let d=document.createElement("option");d.text=c,t.appendChild(d)})}function Gn(t,e){e.forEach(c=>{pi(t,c)})}function pi(t,e,c=!1,d){let p=document.createElement("li");p.innerHTML=c?``:`${e}`,t.appendChild(p)}function Gi(t,e,c,d,p=null){let g="tab"+Math.random().toString(36).replace("0.",""),a=document.createElement("li");a.classList.add("nav-item"),p&&(a.setAttribute("data-bs-toggle","tooltip"),a.setAttribute("title",p)),a.innerHTML=`${c}`,t.appendChild(a);let u=document.createElement("template");return u.innerHTML=d,u.content.firstElementChild.id=g,e.appendChild(u.content.firstElementChild),g}function ce(t,e=null){Object.keys(t).forEach(c=>{if(t[c]=(e!=null?e:document).getElementById(c),!t[c])throw new Error(`Element ${c} not found.`)})}function qt(t,e="Error",c=""){let d=document.createElement("div");d.classList.add("toast"),d.innerHTML=`
${e} ${c}
-
${t}
`,wr.toastContainer.appendChild(d),d.addEventListener("hidden.bs.toast",()=>{d.remove()}),new Un(d).show()}function Qg(t){this.message=t,this.name="UserException"}function ie(t,e,c=null){if(c&&c.classList.remove("is-invalid"),!t)throw c?(c.parentNode.getElementsByClassName("invalid-feedback")[0].innerHTML=e,c.classList.add("is-invalid")):qt(e,"Error"),new Qg(e)}function Er(t,e=!1){return e?t.replace("T"," ").replace("Z","").replace("."," "):t.split(".")[0].replace("T"," ")}var yr;function Lt(t,e,c){yr=yr!=null?yr:new jt("#modalConfirm"),wr.modalBodyConfirm.innerHTML=t,wr.buttonConfirmed.innerText=e,wr.buttonConfirmed.onclick=c,yr.show()}function $e(t,e,c=!1,d=!1){let p=Ql.edit(t);return p.setOption("wrap",d),p.session.setMode(e),c&&(p.setReadOnly(!0),p.renderer.setShowGutter(!1)),p}function ql(t,e,c){return new Xl.default({selector:t,data:{src:e,keys:["label","group"]},placeHolder:c,resultsList:{class:"dropdown-menu show",maxResults:30},resultItem:{class:"dropdown-item",highlight:!0,element:(d,p)=>{d.style="display: flex;",d.innerHTML=`${p.key==="label"?p.match:p.value.label} +
${t}
`,Er.toastContainer.appendChild(d),d.addEventListener("hidden.bs.toast",()=>{d.remove()}),new Un(d).show()}function Qg(t){this.message=t,this.name="UserException"}function ie(t,e,c=null){if(c&&c.classList.remove("is-invalid"),!t)throw c?(c.parentNode.getElementsByClassName("invalid-feedback")[0].innerHTML=e,c.classList.add("is-invalid")):qt(e,"Error"),new Qg(e)}function Cr(t,e=!1){return e?t.replace("T"," ").replace("Z","").replace("."," "):t.split(".")[0].replace("T"," ")}var wr;function Lt(t,e,c){wr=wr!=null?wr:new jt("#modalConfirm"),Er.modalBodyConfirm.innerHTML=t,Er.buttonConfirmed.innerText=e,Er.buttonConfirmed.onclick=c,wr.show()}function $e(t,e,c=!1,d=!1){let p=Ql.edit(t);return p.setOption("wrap",d),p.session.setMode(e),c&&(p.setReadOnly(!0),p.renderer.setShowGutter(!1)),p}function ql(t,e,c){return new Xl.default({selector:t,data:{src:e,keys:["label","group"]},placeHolder:c,resultsList:{class:"dropdown-menu show",maxResults:30},resultItem:{class:"dropdown-item",highlight:!0,element:(d,p)=>{d.style="display: flex;",d.innerHTML=`${p.key==="label"?p.match:p.value.label} - ${p.key==="group"?p.match:p.value.group}`}},events:{input:{results:()=>{Array.from(document.getElementsByClassName("resizable_pane")).forEach(d=>{d.style.overflow="unset"})},close:()=>{Array.from(document.getElementsByClassName("resizable_pane")).forEach(d=>{d.style.overflow="auto"})}}}})}function Gt(t,e){t.addEventListener("click",()=>{e.classList.remove("is-invalid")})}function ec(t,e){Array.from(t.rows).forEach(c=>{e(c)?c.classList.add("table-active"):c.classList.remove("table-active")})}function be(t){return JSON.stringify(t,null,2)}function tc(t,e){let c=t.value.indexOf(e);return c>=0?(t.focus(),t.setSelectionRange(c,c+e.length),!0):!1}function Cr(t,e,c){!c||c.length===e.length?t.textContent=e.length>0?e.length.toString():"":t.textContent=`${c.length}/${e.length}`}var nc=`