openc3-cosmos-tool-tlmviewer 5.15.1 → 5.15.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- (self["webpackChunk_openc3_cosmos_tool_tlmviewer"]=self["webpackChunk_openc3_cosmos_tool_tlmviewer"]||[]).push([[721],{7752:(t,e,n)=>{"use strict";n.d(e,{Be:()=>b,D$:()=>a});var i={logger:self.console,WebSocket:self.WebSocket},r={log(...t){this.enabled&&(t.push(Date.now()),i.logger.log("[ActionCable]",...t))}};const o=()=>(new Date).getTime(),s=t=>(o()-t)/1e3;class a{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=o(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),r.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=o(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=o()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=o(),r.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,n=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),i=0===this.reconnectAttempts?1:e,r=i*Math.random();return 1e3*t*n*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(r.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${s(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?r.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${s(this.disconnectedAt)} s`):(r.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return s(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&s(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout((()=>{!this.connectionIsStale()&&this.connection.isOpen()||(r.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}a.staleThreshold=6,a.reconnectionBackoffRate=.15;var l={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:c,protocols:u}=l,h=u.slice(0,u.length-1),d=[].indexOf;class f{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new a(this),this.disconnected=!0}send(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)}open(){if(this.isActive())return r.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const t=[...u,...this.consumer.subprotocols||[]];return r.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${t}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new i.WebSocket(this.consumer.url,t),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(r.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(t){r.log("Failed to reopen WebSocket",t)}finally{r.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return d.call(h,this.getProtocol())>=0}isState(...t){return d.call(t,this.getState())>=0}getState(){if(this.webSocket)for(let t in i.WebSocket)if(i.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase();return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}f.reopenDelay=500,f.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:i,reconnect:o,type:s}=JSON.parse(t.data);switch(s){case c.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case c.disconnect:return r.log(`Disconnecting. Reason: ${i}`),this.close({allowReconnect:o});case c.ping:return this.monitor.recordPing();case c.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case c.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(r.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){r.log("WebSocket onerror event")}};const p=function(t,e){if(null!=e)for(let n in e){const i=e[n];t[n]=i}return t};class g{constructor(t,e={},n){this.consumer=t,this.identifier=JSON.stringify(e),p(this,n)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class m{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){-1==this.pendingSubscriptions.indexOf(t)?(r.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):r.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){r.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&"function"===typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map((t=>{r.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class v{constructor(t){this.consumer=t,this.guarantor=new m(this),this.subscriptions=[]}create(t,e){const n=t,i="object"===typeof n?n:{channel:n},r=new g(this.consumer,i,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((t=>(this.forget(t),this.notify(t,"rejected"),t)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((n=>this.notify(n,t,...e)))}notify(t,e,...n){let i;return i="string"===typeof t?this.findAll(t):[t],i.map((t=>"function"===typeof t[e]?t[e](...n):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){r.log(`Subscription confirmed ${t}`),this.findAll(t).map((t=>this.guarantor.forget(t)))}sendCommand(t,e){const{identifier:n}=t;return this.consumer.send({command:e,identifier:n})}}class y{constructor(t){this._url=t,this.subscriptions=new v(this),this.connection=new f(this),this.subprotocols=[]}get url(){return w(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(t){this.subprotocols=[...this.subprotocols,t]}}function w(t){if("function"===typeof t&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return t}function b(t=_("url")||l.default_mount_path){return new y(t)}function _(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}},2132:(t,e,n)=>{"use strict";n.d(e,{A:()=>sr});n(9375),n(7146),n(4293),n(2682),n(785),n(8357),n(6196),n(821),n(6554),n(8472),n(7404),n(5803),n(3912),n(3647),n(9358),n(5114),n(7010);const i=!0,r="u-",o="uplot",s=r+"hz",a=r+"vt",l=r+"title",c=r+"wrap",u=r+"under",h=r+"over",d=r+"axis",f=r+"off",p=r+"select",g=r+"cursor-x",m=r+"cursor-y",v=r+"cursor-pt",y=r+"legend",w=r+"live",b=r+"inline",_=r+"series",x=r+"marker",S=r+"label",A=r+"value",C="width",k="height",$="top",T="bottom",L="left",R="right",E="#000",M=E+"0",D="mousemove",I="mousedown",O="mouseup",P="mouseenter",N="mouseleave",F="dblclick",W="resize",H="scroll",B="change",z="dppxchange",U="--",j="undefined"!=typeof window,G=j?document:null,V=j?window:null,Y=j?navigator:null;let q,K;function X(){let t=devicePixelRatio;q!=t&&(q=t,K&&ht(B,K,X),K=matchMedia(`(min-resolution: ${q-.001}dppx) and (max-resolution: ${q+.001}dppx)`),ut(B,K,X),V.dispatchEvent(new CustomEvent(z)))}function Q(t,e){if(null!=e){let n=t.classList;!n.contains(e)&&n.add(e)}}function Z(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function J(t,e,n){t.style[e]=n+"px"}function tt(t,e,n,i){let r=G.createElement(t);return null!=e&&Q(r,e),null!=n&&n.insertBefore(r,i),r}function et(t,e){return tt("div",t,e)}const nt=new WeakMap;function it(t,e,n,i,r){let o="translate("+e+"px,"+n+"px)",s=nt.get(t);o!=s&&(t.style.transform=o,nt.set(t,o),e<0||n<0||e>i||n>r?Q(t,f):Z(t,f))}const rt=new WeakMap;function ot(t,e,n){let i=e+n,r=rt.get(t);i!=r&&(rt.set(t,i),t.style.background=e,t.style.borderColor=n)}const st=new WeakMap;function at(t,e,n,i){let r=e+""+n,o=st.get(t);r!=o&&(st.set(t,r),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=i?-e/2+"px":0,t.style.marginTop=i?-n/2+"px":0)}const lt={passive:!0},ct={...lt,capture:!0};function ut(t,e,n,i){e.addEventListener(t,n,i?ct:lt)}function ht(t,e,n,i){e.removeEventListener(t,n,i?ct:lt)}function dt(t,e,n,i){let r;n=n||0,i=i||e.length-1;let o=i<=2147483647;while(i-n>1)r=o?n+i>>1:Et((n+i)/2),e[r]<t?n=r:i=r;return t-e[n]<=e[i]-t?n:i}function ft(t,e,n,i){for(let r=1==i?e:n;r>=e&&r<=n;r+=i)if(null!=t[r])return r;return-1}function pt(t,e,n,i){let r=zt,o=-zt;if(1==i)r=t[e],o=t[n];else if(-1==i)r=t[n],o=t[e];else for(let s=e;s<=n;s++){let e=t[s];null!=e&&(e<r&&(r=e),e>o&&(o=e))}return[r,o]}function gt(t,e,n){let i=zt,r=-zt;for(let o=e;o<=n;o++){let e=t[o];null!=e&&e>0&&(e<i&&(i=e),e>r&&(r=e))}return[i==zt?1:i,r==-zt?10:r]}function mt(t,e,n,i){let r=Nt(t),o=Nt(e),s=10==n?Ft:Wt;t==e&&(-1==r?(t*=n,e/=n):(t/=n,e*=n));let a=1==r?Et:Dt,l=1==o?Dt:Et,c=a(s(Rt(t))),u=l(s(Rt(e))),h=Pt(n,c),d=Pt(n,u);return 10==n&&(c<0&&(h=ne(h,-c)),u<0&&(d=ne(d,-u))),i||2==n?(t=h*r,e=d*o):(t=ee(t,h),e=te(e,d)),[t,e]}function vt(t,e,n,i){let r=mt(t,e,n,i);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}j&&X();const yt=.1,wt={mode:3,pad:yt},bt={pad:0,soft:null,mode:0},_t={min:bt,max:bt};function xt(t,e,n,i){return fe(n)?Ct(t,e,n):(bt.pad=n,bt.soft=i?0:null,bt.mode=i?3:0,Ct(t,e,_t))}function St(t,e){return null==t?e:t}function At(t,e,n){e=St(e,0),n=St(n,t.length-1);while(e<=n){if(null!=t[e])return!0;e++}return!1}function Ct(t,e,n){let i=n.min,r=n.max,o=St(i.pad,0),s=St(r.pad,0),a=St(i.hard,-zt),l=St(r.hard,zt),c=St(i.soft,zt),u=St(r.soft,-zt),h=St(i.mode,0),d=St(r.mode,0),f=e-t,p=Ft(f),g=Ot(Rt(t),Rt(e)),m=Ft(g),v=Rt(m-p);(f<1e-9||v>10)&&(f=0,0!=t&&0!=e||(f=1e-9,2==h&&c!=zt&&(o=0),2==d&&u!=-zt&&(s=0)));let y=f||g||1e3,w=Ft(y),b=Pt(10,Et(w)),_=y*(0==f?0==t?.1:1:o),x=ne(ee(t-_,b/10),9),S=t>=c&&(1==h||3==h&&x<=c||2==h&&x>=c)?c:zt,A=Ot(a,x<S&&t>=S?S:It(S,x)),C=y*(0==f?0==e?.1:1:s),k=ne(te(e+C,b/10),9),$=e<=u&&(1==d||3==d&&k>=u||2==d&&k<=u)?u:-zt,T=It(l,k>$&&e<=$?$:Ot($,k));return A==T&&0==A&&(T=100),[A,T]}const kt=new Intl.NumberFormat(j?Y.language:"en-US"),$t=t=>kt.format(t),Tt=Math,Lt=Tt.PI,Rt=Tt.abs,Et=Tt.floor,Mt=Tt.round,Dt=Tt.ceil,It=Tt.min,Ot=Tt.max,Pt=Tt.pow,Nt=Tt.sign,Ft=Tt.log10,Wt=Tt.log2,Ht=(t,e=1)=>Tt.sinh(t)*e,Bt=(t,e=1)=>Tt.asinh(t/e),zt=1/0;function Ut(t){return 1+(0|Ft((t^t>>31)-(t>>31)))}function jt(t,e,n){return It(Ot(t,e),n)}function Gt(t){return"function"==typeof t?t:()=>t}const Vt=()=>{},Yt=t=>t,qt=(t,e)=>e,Kt=t=>null,Xt=t=>!0,Qt=(t,e)=>t==e,Zt=t=>ne(t,14);function Jt(t,e){return Zt(ne(Zt(t/e))*e)}function te(t,e){return Zt(Dt(Zt(t/e))*e)}function ee(t,e){return Zt(Et(Zt(t/e))*e)}function ne(t,e=0){if(ue(t))return t;let n=10**e,i=t*n*(1+Number.EPSILON);return Mt(i)/n}const ie=new Map;function re(t){return((""+t).split(".")[1]||"").length}function oe(t,e,n,i){let r=[],o=i.map(re);for(let s=e;s<n;s++){let e=Rt(s),n=ne(Pt(t,s),e);for(let t=0;t<i.length;t++){let a=i[t]*n,l=(a>=0&&s>=0?0:e)+(s>=o[t]?0:o[t]),c=ne(a,l);r.push(c),ie.set(c,l)}}return r}const se={},ae=[],le=[null,null],ce=Array.isArray,ue=Number.isInteger,he=t=>void 0===t;function de(t){return"string"==typeof t}function fe(t){let e=!1;if(null!=t){let n=t.constructor;e=null==n||n==Object}return e}function pe(t){return null!=t&&"object"==typeof t}const ge=Object.getPrototypeOf(Uint8Array);function me(t,e=fe){let n;if(ce(t)){let i=t.find((t=>null!=t));if(ce(i)||e(i)){n=Array(t.length);for(let i=0;i<t.length;i++)n[i]=me(t[i],e)}else n=t.slice()}else if(t instanceof ge)n=t.slice();else if(e(t)){n={};for(let i in t)n[i]=me(t[i],e)}else n=t;return n}function ve(t){let e=arguments;for(let n=1;n<e.length;n++){let i=e[n];for(let e in i)fe(t[e])?ve(t[e],me(i[e])):t[e]=me(i[e])}return t}const ye=0,we=1,be=2;function _e(t,e,n){for(let i,r=0,o=-1;r<e.length;r++){let s=e[r];if(s>o){i=s-1;while(i>=0&&null==t[i])t[i--]=null;i=s+1;while(i<n&&null==t[i])t[o=i++]=null}}}function xe(t,e){if(Ce(t)){let e=t[0].slice();for(let n=1;n<t.length;n++)e.push(...t[n].slice(1));return ke(e[0])||(e=Ae(e)),e}let n=new Set;for(let s=0;s<t.length;s++){let e=t[s],i=e[0],r=i.length;for(let t=0;t<r;t++)n.add(i[t])}let i=[Array.from(n).sort(((t,e)=>t-e))],r=i[0].length,o=new Map;for(let s=0;s<r;s++)o.set(i[0][s],s);for(let s=0;s<t.length;s++){let n=t[s],a=n[0];for(let t=1;t<n.length;t++){let l=n[t],c=Array(r).fill(void 0),u=e?e[s][t]:we,h=[];for(let t=0;t<l.length;t++){let e=l[t],n=o.get(a[t]);null===e?u!=ye&&(c[n]=e,u==be&&h.push(n)):c[n]=e}_e(c,h,r),i.push(c)}}return i}const Se="undefined"==typeof queueMicrotask?t=>Promise.resolve().then(t):queueMicrotask;function Ae(t){let e=t[0],n=e.length,i=Array(n);for(let o=0;o<i.length;o++)i[o]=o;i.sort(((t,n)=>e[t]-e[n]));let r=[];for(let o=0;o<t.length;o++){let e=t[o],s=Array(n);for(let t=0;t<n;t++)s[t]=e[i[t]];r.push(s)}return r}function Ce(t){let e=t[0][0],n=e.length;for(let i=1;i<t.length;i++){let r=t[i][0];if(r.length!=n)return!1;if(r!=e)for(let t=0;t<n;t++)if(r[t]!=e[t])return!1}return!0}function ke(t,e=100){const n=t.length;if(n<=1)return!0;let i=0,r=n-1;while(i<=r&&null==t[i])i++;while(r>=i&&null==t[r])r--;if(r<=i)return!0;const o=Ot(1,Et((r-i+1)/e));for(let s=t[i],a=i+o;a<=r;a+=o){const e=t[a];if(null!=e){if(e<=s)return!1;s=e}}return!0}const $e=["January","February","March","April","May","June","July","August","September","October","November","December"],Te=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Le(t){return t.slice(0,3)}const Re=Te.map(Le),Ee=$e.map(Le),Me={MMMM:$e,MMM:Ee,WWWW:Te,WWW:Re};function De(t){return(t<10?"0":"")+t}function Ie(t){return(t<10?"00":t<100?"0":"")+t}const Oe={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>De(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>De(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>De(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return 0==e?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>De(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>De(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>Ie(t.getMilliseconds())};function Pe(t,e){e=e||Me;let n,i=[],r=/\{([a-z]+)\}|[^{]+/gi;while(n=r.exec(t))i.push("{"==n[0][0]?Oe[n[1]]:n[0]);return t=>{let n="";for(let r=0;r<i.length;r++)n+="string"==typeof i[r]?i[r]:i[r](t,e);return n}}const Ne=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function Fe(t,e){let n;return"UTC"==e||"Etc/UTC"==e?n=new Date(+t+6e4*t.getTimezoneOffset()):e==Ne?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const We=t=>t%1==0,He=[1,2,2.5,5],Be=oe(10,-16,0,He),ze=oe(10,0,16,He),Ue=ze.filter(We),je=Be.concat(ze),Ge="\n",Ve="{YYYY}",Ye=Ge+Ve,qe="{M}/{D}",Ke=Ge+qe,Xe=Ke+"/{YY}",Qe="{aa}",Ze="{h}:{mm}",Je=Ze+Qe,tn=Ge+Je,en=":{ss}",nn=null;function rn(t){let e=1e3*t,n=60*e,i=60*n,r=24*i,o=30*r,s=365*r,a=1==t?oe(10,0,3,He).filter(We):oe(10,-3,0,He),l=a.concat([e,5*e,10*e,15*e,30*e,n,5*n,10*n,15*n,30*n,i,2*i,3*i,4*i,6*i,8*i,12*i,r,2*r,3*r,4*r,5*r,6*r,7*r,8*r,9*r,10*r,15*r,o,2*o,3*o,4*o,6*o,s,2*s,5*s,10*s,25*s,50*s,100*s]);const c=[[s,Ve,nn,nn,nn,nn,nn,nn,1],[28*r,"{MMM}",Ye,nn,nn,nn,nn,nn,1],[r,qe,Ye,nn,nn,nn,nn,nn,1],[i,"{h}"+Qe,Xe,nn,Ke,nn,nn,nn,1],[n,Je,Xe,nn,Ke,nn,nn,nn,1],[e,en,Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1],[t,en+".{fff}",Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1]];function u(e){return(a,l,c,u,h,d)=>{let f=[],p=h>=s,g=h>=o&&h<s,m=e(c),v=ne(m*t,3),y=pn(m.getFullYear(),p?0:m.getMonth(),g||p?1:m.getDate()),w=ne(y*t,3);if(g||p){let n=g?h/o:0,i=p?h/s:0,r=v==w?v:ne(pn(y.getFullYear()+i,y.getMonth()+n,1)*t,3),a=new Date(Mt(r/t)),l=a.getFullYear(),c=a.getMonth();for(let o=0;r<=u;o++){let s=pn(l+i*o,c+n*o,1),a=s-e(ne(s*t,3));r=ne((+s+a)*t,3),r<=u&&f.push(r)}}else{let o=h>=r?r:h,s=Et(c)-Et(v),p=w+s+te(v-w,o);f.push(p);let g=e(p),m=g.getHours()+g.getMinutes()/n+g.getSeconds()/i,y=h/i,b=a.axes[l]._space,_=d/b;while(1){if(p=ne(p+h,1==t?0:3),p>u)break;if(y>1){let t=Et(ne(m+y,6))%24,n=e(p),r=n.getHours(),o=r-t;o>1&&(o=-1),p-=o*i,m=(m+y)%24;let s=f[f.length-1],a=ne((p-s)/h,3);a*_>=.7&&f.push(p)}else f.push(p)}}return f}}return[l,c,u]}const[on,sn,an]=rn(1),[ln,cn,un]=rn(.001);function hn(t,e){return t.map((t=>t.map(((n,i)=>0==i||8==i||null==n?n:e(1==i||0==t[8]?n:t[1]+n)))))}function dn(t,e){return(n,i,r,o,s)=>{let a,l,c,u,h,d,f=e.find((t=>s>=t[0]))||e[e.length-1];return i.map((e=>{let n=t(e),i=n.getFullYear(),r=n.getMonth(),o=n.getDate(),s=n.getHours(),p=n.getMinutes(),g=n.getSeconds(),m=i!=a&&f[2]||r!=l&&f[3]||o!=c&&f[4]||s!=u&&f[5]||p!=h&&f[6]||g!=d&&f[7]||f[1];return a=i,l=r,c=o,u=s,h=p,d=g,m(n)}))}}function fn(t,e){let n=Pe(e);return(e,i,r,o,s)=>i.map((e=>n(t(e))))}function pn(t,e,n){return new Date(t,e,n)}function gn(t,e){return e(t)}oe(2,-53,53,[1]);const mn="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function vn(t,e){return(n,i,r,o)=>null==o?U:e(t(i))}function yn(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function wn(t,e){return t.series[e].fill(t,e)}const bn={show:!0,live:!0,isolate:!1,mount:Vt,markers:{show:!0,width:2,stroke:yn,fill:wn,dash:"solid"},idx:null,idxs:null,values:[]};function _n(t,e){let n=t.cursor.points,i=et(),r=n.size(t,e);J(i,C,r),J(i,k,r);let o=r/-2;J(i,"marginLeft",o),J(i,"marginTop",o);let s=n.width(t,e,r);return s&&J(i,"borderWidth",s),i}function xn(t,e){let n=t.series[e].points;return n._fill||n._stroke}function Sn(t,e){let n=t.series[e].points;return n._stroke||n._fill}function An(t,e){let n=t.series[e].points;return n.size}function Cn(t,e,n){return n}const kn=[0,0];function $n(t,e,n){return kn[0]=e,kn[1]=n,kn}function Tn(t,e,n,i=!0){return t=>{0==t.button&&(!i||t.target==e)&&n(t)}}function Ln(t,e,n,i=!0){return t=>{(!i||t.target==e)&&n(t)}}const Rn={show:!0,x:!0,y:!0,lock:!1,move:$n,points:{show:_n,size:An,width:0,stroke:Sn,fill:xn},bind:{mousedown:Tn,mouseup:Tn,click:Tn,dblclick:Tn,mousemove:Ln,mouseleave:Ln,mouseenter:Ln},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,i,r)=>i-r,prox:-1,bias:0},left:-10,top:-10,idx:null,dataIdx:Cn,idxs:null,event:null},En={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Mn=ve({},En,{filter:qt}),Dn=ve({},Mn,{size:10}),In=ve({},En,{show:!1}),On='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Pn="bold "+On,Nn=1.5,Fn={show:!0,scale:"x",stroke:E,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Pn,side:2,grid:Mn,ticks:Dn,border:In,font:On,lineGap:Nn,rotate:0},Wn="Value",Hn="Time",Bn={show:!0,scale:"x",auto:!1,sorted:1,min:zt,max:-zt,idxs:[]};function zn(t,e,n,i,r){return e.map((t=>null==t?"":$t(t)))}function Un(t,e,n,i,r,o,s){let a=[],l=ie.get(r)||0;n=s?n:ne(te(n,r),l);for(let c=n;c<=i;c=ne(c+r,l))a.push(Object.is(c,-0)?0:c);return a}function jn(t,e,n,i,r,o,s){const a=[],l=t.scales[t.axes[e].scale].log,c=10==l?Ft:Wt,u=Et(c(n));r=Pt(l,u),10==l&&u<0&&(r=ne(r,-u));let h=n;do{a.push(h),h+=r,10==l&&(h=ne(h,ie.get(r))),h>=r*l&&(r=h)}while(h<=i);return a}function Gn(t,e,n,i,r,o,s){let a=t.scales[t.axes[e].scale],l=a.asinh,c=i>l?jn(t,e,Ot(l,n),i,r):[l],u=i>=0&&n<=0?[0]:[],h=n<-l?jn(t,e,Ot(l,-i),-n,r):[l];return h.reverse().map((t=>-t)).concat(u,c)}const Vn=/./,Yn=/[12357]/,qn=/[125]/,Kn=/1/,Xn=(t,e,n,i)=>t.map(((t,r)=>4==e&&0==t||r%i==0&&n.test(t.toExponential()[t<0?1:0])?t:null));function Qn(t,e,n,i,r){let o=t.axes[n],s=o.scale,a=t.scales[s],l=t.valToPos,c=o._space,u=l(10,s),h=l(9,s)-u>=c?Vn:l(7,s)-u>=c?Yn:l(5,s)-u>=c?qn:Kn;if(h==Kn){let t=Rt(l(1,s)-u);if(t<c)return Xn(e.slice().reverse(),a.distr,h,Dt(c/t)).reverse()}return Xn(e,a.distr,h,1)}function Zn(t,e,n,i,r){let o=t.axes[n],s=o.scale,a=o._space,l=t.valToPos,c=Rt(l(1,s)-l(2,s));return c<a?Xn(e.slice().reverse(),3,Vn,Dt(a/c)).reverse():e}function Jn(t,e,n,i){return null==i?U:null==e?"":$t(e)}const ti={show:!0,scale:"y",stroke:E,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Pn,side:3,grid:Mn,ticks:Dn,border:In,font:On,lineGap:Nn,rotate:0};function ei(t,e){let n=3+2*(t||1);return ne(n*e,3)}function ni(t,e){let{scale:n,idxs:i}=t.series[0],r=t._data[0],o=t.valToPos(r[i[0]],n,!0),s=t.valToPos(r[i[1]],n,!0),a=Rt(s-o),l=t.series[e],c=a/(l.points.space*q);return i[1]-i[0]<=c}const ii={scale:null,auto:!0,sorted:0,min:zt,max:-zt},ri=(t,e,n,i,r)=>r,oi={show:!0,auto:!0,sorted:0,gaps:ri,alpha:1,facets:[ve({},ii,{scale:"x"}),ve({},ii,{scale:"y"})]},si={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ri,alpha:1,points:{show:ni,filter:null},values:null,min:zt,max:-zt,idxs:[],path:null,clip:null};function ai(t,e,n,i,r){return n/10}const li={time:i,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ci=ve({},li,{time:!1,ori:1}),ui={};function hi(t,e){let n=ui[t];return n||(n={key:t,plots:[],sub(t){n.plots.push(t)},unsub(t){n.plots=n.plots.filter((e=>e!=t))},pub(t,e,i,r,o,s,a){for(let l=0;l<n.plots.length;l++)n.plots[l]!=e&&n.plots[l].pub(t,e,i,r,o,s,a)}},null!=t&&(ui[t]=n)),n}const di=1,fi=2;function pi(t,e,n){const i=t.mode,r=t.series[e],o=2==i?t._data[e]:t._data,s=t.scales,a=t.bbox;let l=o[0],c=2==i?o[1]:o[e],u=2==i?s[r.facets[0].scale]:s[t.series[0].scale],h=2==i?s[r.facets[1].scale]:s[r.scale],d=a.left,f=a.top,p=a.width,g=a.height,m=t.valToPosH,v=t.valToPosV;return 0==u.ori?n(r,l,c,u,h,m,v,d,f,p,g,Si,Ci,$i,Li,Ei):n(r,l,c,u,h,v,m,f,d,g,p,Ai,ki,Ti,Ri,Mi)}function gi(t,e){let n=0,i=0,r=St(t.bands,ae);for(let o=0;o<r.length;o++){let t=r[o];t.series[0]==e?n=t.dir:t.series[1]==e&&(1==t.dir?i|=1:i|=2)}return[n,1==i?-1:2==i?1:3==i?2:0]}function mi(t,e,n,i,r){let o=t.mode,s=t.series[e],a=2==o?s.facets[1].scale:s.scale,l=t.scales[a];return-1==r?l.min:1==r?l.max:3==l.distr?1==l.dir?l.min:l.max:0}function vi(t,e,n,i,r,o){return pi(t,e,((t,e,s,a,l,c,u,h,d,f,p)=>{let g=t.pxRound;const m=a.dir*(0==a.ori?1:-1),v=0==a.ori?Ci:ki;let y,w;1==m?(y=n,w=i):(y=i,w=n);let b=g(c(e[y],a,f,h)),_=g(u(s[y],l,p,d)),x=g(c(e[w],a,f,h)),S=g(u(1==o?l.max:l.min,l,p,d)),A=new Path2D(r);return v(A,x,S),v(A,b,S),v(A,b,_),A}))}function yi(t,e,n,i,r,o){let s=null;if(t.length>0){s=new Path2D;const a=0==e?$i:Ti;let l=n;for(let e=0;e<t.length;e++){let n=t[e];if(n[1]>n[0]){let t=n[0]-l;t>0&&a(s,l,i,t,i+o),l=n[1]}}let c=n+r-l,u=10;c>0&&a(s,l,i-u/2,c,i+o+u)}return s}function wi(t,e,n){let i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function bi(t,e,n,i,r,o,s){let a=[],l=t.length;for(let c=1==r?n:i;c>=n&&c<=i;c+=r){let u=e[c];if(null===u){let u=c,h=c;if(1==r)while(++c<=i&&null===e[c])h=c;else while(--c>=n&&null===e[c])h=c;let d=o(t[u]),f=h==u?d:o(t[h]),p=u-r,g=s<=0&&p>=0&&p<l?o(t[p]):d;d=g;let m=h+r,v=s>=0&&m>=0&&m<l?o(t[m]):f;f=v,f>=d&&a.push([d,f])}}return a}function _i(t){return 0==t?Yt:1==t?Mt:e=>Jt(e,t)}function xi(t){let e=0==t?Si:Ai,n=0==t?(t,e,n,i,r,o)=>{t.arcTo(e,n,i,r,o)}:(t,e,n,i,r,o)=>{t.arcTo(n,e,r,i,o)},i=0==t?(t,e,n,i,r)=>{t.rect(e,n,i,r)}:(t,e,n,i,r)=>{t.rect(n,e,r,i)};return(t,r,o,s,a,l=0,c=0)=>{0==l&&0==c?i(t,r,o,s,a):(l=It(l,s/2,a/2),c=It(c,s/2,a/2),e(t,r+l,o),n(t,r+s,o,r+s,o+a,l),n(t,r+s,o+a,r,o+a,c),n(t,r,o+a,r,o,c),n(t,r,o,r+s,o,l),t.closePath())}}const Si=(t,e,n)=>{t.moveTo(e,n)},Ai=(t,e,n)=>{t.moveTo(n,e)},Ci=(t,e,n)=>{t.lineTo(e,n)},ki=(t,e,n)=>{t.lineTo(n,e)},$i=xi(0),Ti=xi(1),Li=(t,e,n,i,r,o)=>{t.arc(e,n,i,r,o)},Ri=(t,e,n,i,r,o)=>{t.arc(n,e,i,r,o)},Ei=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(e,n,i,r,o,s)},Mi=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(n,e,r,i,s,o)};function Di(t){return(t,e,n,i,r)=>pi(t,e,((e,o,s,a,l,c,u,h,d,f,p)=>{let g,m,{pxRound:v,points:y}=e;0==a.ori?(g=Si,m=Li):(g=Ai,m=Ri);const w=ne(y.width*q,3);let b=(y.size-y.width)/2*q,_=ne(2*b,3),x=new Path2D,S=new Path2D,{left:A,top:C,width:k,height:$}=t.bbox;$i(S,A-_,C-_,k+2*_,$+2*_);const T=t=>{if(null!=s[t]){let e=v(c(o[t],a,f,h)),n=v(u(s[t],l,p,d));g(x,e+b,n),m(x,e,n,b,0,2*Lt)}};if(r)r.forEach(T);else for(let t=n;t<=i;t++)T(t);return{stroke:w>0?x:null,fill:x,clip:S,flags:di|fi}}))}function Ii(t){return(e,n,i,r,o,s)=>{i!=r&&(o!=i&&s!=i&&t(e,n,i),o!=r&&s!=r&&t(e,n,r),t(e,n,s))}}const Oi=Ii(Ci),Pi=Ii(ki);function Ni(t){const e=St(null===t||void 0===t?void 0:t.alignGaps,0);return(t,n,i,r)=>pi(t,n,((o,s,a,l,c,u,h,d,f,p,g)=>{let m,v,y=o.pxRound,w=t=>y(u(t,l,p,d)),b=t=>y(h(t,c,g,f));0==l.ori?(m=Ci,v=Oi):(m=ki,v=Pi);const _=l.dir*(0==l.ori?1:-1),x={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},S=x.stroke;let A,C,k,$=zt,T=-zt,L=w(s[1==_?i:r]),R=ft(a,i,r,1*_),E=ft(a,i,r,-1*_),M=w(s[R]),D=w(s[E]),I=!1;for(let t=1==_?i:r;t>=i&&t<=r;t+=_){let e=w(s[t]),n=a[t];e==L?null!=n?(C=b(n),$==zt&&(m(S,e,C),A=C),$=It(C,$),T=Ot(C,T)):null===n&&(I=!0):($!=zt&&(v(S,L,$,T,A,C),k=L),null!=n?(C=b(n),m(S,e,C),$=T=A=C):($=zt,T=-zt,null===n&&(I=!0)),L=e)}$!=zt&&$!=T&&k!=L&&v(S,L,$,T,A,C);let[O,P]=gi(t,n);if(null!=o.fill||0!=O){let e=x.fill=new Path2D(S),i=o.fillTo(t,n,o.min,o.max,O),r=b(i);m(e,D,r),m(e,M,r)}if(!o.spanGaps){let c=[];I&&c.push(...bi(s,a,i,r,_,w,e)),x.gaps=c=o.gaps(t,n,i,r,c),x.clip=yi(c,l.ori,d,f,p,g)}return 0!=P&&(x.band=2==P?[vi(t,n,i,r,S,-1),vi(t,n,i,r,S,1)]:vi(t,n,i,r,S,P)),x}))}function Fi(t){const e=St(t.align,1),n=St(t.ascDesc,!1),i=St(t.alignGaps,0),r=St(t.extend,!1);return(t,o,s,a)=>pi(t,o,((l,c,u,h,d,f,p,g,m,v,y)=>{let w=l.pxRound,{left:b,width:_}=t.bbox,x=t=>w(f(t,h,v,g)),S=t=>w(p(t,d,y,m)),A=0==h.ori?Ci:ki;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},k=C.stroke,$=h.dir*(0==h.ori?1:-1);s=ft(u,s,a,1),a=ft(u,s,a,-1);let T=S(u[1==$?s:a]),L=x(c[1==$?s:a]),R=L,E=L;r&&-1==e&&(E=b,A(k,E,T)),A(k,L,T);for(let t=1==$?s:a;t>=s&&t<=a;t+=$){let n=u[t];if(null==n)continue;let i=x(c[t]),r=S(n);1==e?A(k,i,T):A(k,R,r),A(k,i,r),T=r,R=i}let M=R;r&&1==e&&(M=b+_,A(k,M,T));let[D,I]=gi(t,o);if(null!=l.fill||0!=D){let e=C.fill=new Path2D(k),n=l.fillTo(t,o,l.min,l.max,D),i=S(n);A(e,M,i),A(e,E,i)}if(!l.spanGaps){let r=[];r.push(...bi(c,u,s,a,$,x,i));let d=l.width*q/2,f=n||1==e?d:-d,p=n||-1==e?-d:d;r.forEach((t=>{t[0]+=f,t[1]+=p})),C.gaps=r=l.gaps(t,o,s,a,r),C.clip=yi(r,h.ori,g,m,v,y)}return 0!=I&&(C.band=2==I?[vi(t,o,s,a,k,-1),vi(t,o,s,a,k,1)]:vi(t,o,s,a,k,I)),C}))}function Wi(t){t=t||se;const e=St(t.size,[.6,zt,1]),n=t.align||0,i=(t.gap||0)*q;let r=t.radius;r=null==r?[0,0]:"number"==typeof r?[r,0]:r;const o=Gt(r),s=1-e[0],a=St(e[1],zt)*q,l=St(e[2],1)*q,c=St(t.disp,se),u=St(t.each,(t=>{})),{fill:h,stroke:d}=c;return(t,e,r,f)=>pi(t,e,((p,g,m,v,y,w,b,_,x,S,A)=>{let C,k,$=p.pxRound;0==v.ori?[C,k]=o(t,e):[k,C]=o(t,e);const T=v.dir*(0==v.ori?1:-1);let L,R,E=0==v.ori?$i:Ti,M=0==v.ori?u:(t,e,n,i,r,o,s)=>{u(t,e,n,r,i,s,o)},D=St(t.bands,ae).find((t=>t.series[0]==e)),I=null!=D?D.dir:0,O=p.fillTo(t,e,p.min,p.max,I),P=$(b(O,y,A,x)),N=$(p.width*q),F=!1,W=null,H=null,B=null,z=null;null==h||0!=N&&null==d||(F=!0,W=h.values(t,e,r,f),H=new Map,new Set(W).forEach((t=>{null!=t&&H.set(t,new Path2D)})),N>0&&(B=d.values(t,e,r,f),z=new Map,new Set(B).forEach((t=>{null!=t&&z.set(t,new Path2D)}))));let{x0:U,size:j}=c;if(null!=U&&null!=j){g=U.values(t,e,r,f),2==U.unit&&(g=g.map((e=>t.posToVal(_+e*S,v.key,!0))));let n=j.values(t,e,r,f);R=2==j.unit?n[0]*S:w(n[0],v,S,_)-w(0,v,S,_),N>=R/2&&(N=0),R=$(jt(R-N,l,a)),L=1==T?-N/2:R+N/2}else{let t=S;if(g.length>1){let e=null;for(let n=0,i=1/0;n<g.length;n++)if(void 0!==m[n]){if(null!=e){let r=Rt(g[n]-g[e]);r<i&&(i=r,t=Rt(w(g[n],v,S,_)-w(g[e],v,S,_)))}e=n}}let e=t*s;R=t-e-i,N>=R/2&&(N=0),e+i<5&&($=Yt),R=$(jt(t-e,l,a)-N-i),L=(0==n?R/2:n==T?0:R)-n*T*i/2}const G={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},V=F?null:new Path2D;let Y=null;if(null!=D)Y=t.data[D.series[1]];else{let{y0:n,y1:i}=c;null!=n&&null!=i&&(m=i.values(t,e,r,f),Y=n.values(t,e,r,f))}let K=C*R,X=k*R;for(let n=1==T?r:f;n>=r&&n<=f;n+=T){let i=m[n];if(null==i)continue;if(null!=Y){var Q;let t=null!==(Q=Y[n])&&void 0!==Q?Q:0;if(i-t==0)continue;P=b(t,y,A,x)}let r=2!=v.distr||null!=c?g[n]:n,o=w(r,v,S,_),s=b(St(i,O),y,A,x),a=$(o-L),l=$(Ot(s,P)),u=$(It(s,P)),h=l-u;if(null!=i){let r=i<0?X:K,o=i<0?K:X;F?(N>0&&null!=B[n]&&E(z.get(B[n]),a,u+Et(N/2),R,Ot(0,h-N),r,o),null!=W[n]&&E(H.get(W[n]),a,u+Et(N/2),R,Ot(0,h-N),r,o)):E(V,a,u+Et(N/2),R,Ot(0,h-N),r,o),M(t,e,n,a-N/2,u,R+N,h)}}if(N>0)G.stroke=F?z:V;else if(!F){var Z;G._fill=0==p.width?p._fill:null!==(Z=p._stroke)&&void 0!==Z?Z:p._fill,G.width=0}return G.fill=F?H:V,G}))}function Hi(t,e){const n=St(null===e||void 0===e?void 0:e.alignGaps,0);return(e,i,r,o)=>pi(e,i,((s,a,l,c,u,h,d,f,p,g,m)=>{let v,y,w,b=s.pxRound,_=t=>b(h(t,c,g,f)),x=t=>b(d(t,u,m,p));0==c.ori?(v=Si,w=Ci,y=Ei):(v=Ai,w=ki,y=Mi);const S=c.dir*(0==c.ori?1:-1);r=ft(l,r,o,1),o=ft(l,r,o,-1);let A=_(a[1==S?r:o]),C=A,k=[],$=[];for(let t=1==S?r:o;t>=r&&t<=o;t+=S){let e=l[t];if(null!=e){let e=a[t],n=_(e);k.push(C=n),$.push(x(l[t]))}}const T={stroke:t(k,$,v,w,y,b),fill:null,clip:null,band:null,gaps:null,flags:di},L=T.stroke;let[R,E]=gi(e,i);if(null!=s.fill||0!=R){let t=T.fill=new Path2D(L),n=s.fillTo(e,i,s.min,s.max,R),r=x(n);w(t,C,r),w(t,A,r)}if(!s.spanGaps){let t=[];t.push(...bi(a,l,r,o,S,_,n)),T.gaps=t=s.gaps(e,i,r,o,t),T.clip=yi(t,c.ori,f,p,g,m)}return 0!=E&&(T.band=2==E?[vi(e,i,r,o,L,-1),vi(e,i,r,o,L,1)]:vi(e,i,r,o,L,E)),T}))}function Bi(t){return Hi(zi,t)}function zi(t,e,n,i,r,o){const s=t.length;if(s<2)return null;const a=new Path2D;if(n(a,t[0],e[0]),2==s)i(a,t[1],e[1]);else{let n=Array(s),i=Array(s-1),o=Array(s-1),l=Array(s-1);for(let r=0;r<s-1;r++)o[r]=e[r+1]-e[r],l[r]=t[r+1]-t[r],i[r]=o[r]/l[r];n[0]=i[0];for(let t=1;t<s-1;t++)0===i[t]||0===i[t-1]||i[t-1]>0!==i[t]>0?n[t]=0:(n[t]=3*(l[t-1]+l[t])/((2*l[t]+l[t-1])/i[t-1]+(l[t]+2*l[t-1])/i[t]),isFinite(n[t])||(n[t]=0));n[s-1]=i[s-2];for(let c=0;c<s-1;c++)r(a,t[c]+l[c]/3,e[c]+n[c]*l[c]/3,t[c+1]-l[c]/3,e[c+1]-n[c+1]*l[c]/3,t[c+1],e[c+1])}return a}const Ui=new Set;function ji(){for(let t of Ui)t.syncRect(!0)}j&&(ut(W,V,ji),ut(H,V,ji,!0),ut(z,V,(()=>{sr.pxRatio=q})));const Gi=Ni(),Vi=Di();function Yi(t,e,n,i){let r=i?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1));return r.map(((t,i)=>Ki(t,i,e,n)))}function qi(t,e){return t.map(((t,n)=>0==n?null:ve({},e,t)))}function Ki(t,e,n,i){return ve({},0==e?n:i,t)}function Xi(t,e,n){return null==e?le:[e,n]}const Qi=Xi;function Zi(t,e,n){return null==e?le:xt(e,n,yt,!0)}function Ji(t,e,n,i){return null==e?le:mt(e,n,t.scales[i].log,!1)}const tr=Ji;function er(t,e,n,i){return null==e?le:vt(e,n,t.scales[i].log,!1)}const nr=er;function ir(t,e,n,i,r){let o=Ot(Ut(t),Ut(e)),s=e-t,a=dt(r/i*s,n);do{let t=n[a],e=i*t/s;if(e>=r&&o+(t<5?ie.get(t):0)<=17)return[t,e]}while(++a<n.length);return[0,0]}function rr(t){let e,n;return t=t.replace(/(\d+)px/,((t,i)=>(e=Mt((n=+i)*q))+"px")),[t,e,n]}function or(t){t.show&&[t.font,t.labelFont].forEach((t=>{let e=ne(t[2]*q,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e}))}function sr(t,e,n){const i={mode:St(t.mode,1)},r=i.mode;function E(t,e){let n=3==e.distr?Ft(t>0?t:e.clamp(i,t,e.min,e.max,e.key)):4==e.distr?Bt(t,e.asinh):t;return(n-e._min)/(e._max-e._min)}function W(t,e,n,i){let r=E(t,e);return i+n*(-1==e.dir?1-r:r)}function H(t,e,n,i){let r=E(t,e);return i+n*(-1==e.dir?r:1-r)}function B(t,e,n,i){return 0==e.ori?W(t,e,n,i):H(t,e,n,i)}i.valToPosH=W,i.valToPosV=H;let j=!1;i.status=0;const Y=i.root=et(o);if(null!=t.id&&(Y.id=t.id),Q(Y,t.class),t.title){let e=et(l,Y);e.textContent=t.title}const K=tt("canvas"),X=i.ctx=K.getContext("2d"),nt=et(c,Y);ut("click",nt,(t=>{if(t.target===st){let e=kr!=xr||$r!=Sr;e&&Dr.click(i,t)}}),!0);const rt=i.under=et(u,nt);nt.appendChild(K);const st=i.over=et(h,nt);t=me(t);const lt=+St(t.pxAlign,1),ct=_i(lt);(t.plugins||[]).forEach((e=>{e.opts&&(t=e.opts(i,t)||t)}));const ft=t.ms||.001,bt=i.series=1==r?Yi(t.series||[],Bn,si,!1):qi(t.series||[null],oi),_t=i.axes=Yi(t.axes||[],Fn,ti,!0),Ct=i.scales={},kt=i.bands=t.bands||[];kt.forEach((t=>{t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1)}));const $t=2==r?bt[1].facets[0].scale:bt[0].scale,Tt={axes:pr,series:Hi},Et=(t.drawOrder||["axes","series"]).map((t=>Tt[t]));function Nt(e){let n=Ct[e];if(null==n){let i=(t.scales||se)[e]||se;if(null!=i.from)Nt(i.from),Ct[e]=ve({},Ct[i.from],i,{key:e});else{n=Ct[e]=ve({},e==$t?li:ci,i),n.key=e;let t=n.time,o=n.range,s=ce(o);if((e!=$t||2==r&&!t)&&(!s||null!=o[0]&&null!=o[1]||(o={min:null==o[0]?wt:{mode:1,hard:o[0],soft:o[0]},max:null==o[1]?wt:{mode:1,hard:o[1],soft:o[1]}},s=!1),!s&&fe(o))){let t=o;o=(e,n,i)=>null==n?le:xt(n,i,t)}n.range=Gt(o||(t?Qi:e==$t?3==n.distr?tr:4==n.distr?nr:Xi:3==n.distr?Ji:4==n.distr?er:Zi)),n.auto=Gt(!s&&n.auto),n.clamp=Gt(n.clamp||ai),n._min=n._max=null}}}Nt("x"),Nt("y"),1==r&&bt.forEach((t=>{Nt(t.scale)})),_t.forEach((t=>{Nt(t.scale)}));for(let o in t.scales)Nt(o);const Wt=Ct[$t],Ut=Wt.distr;let Vt,Yt;0==Wt.ori?(Q(Y,s),Vt=W,Yt=H):(Q(Y,a),Vt=H,Yt=W);const Zt={};for(let o in Ct){let t=Ct[o];null==t.min&&null==t.max||(Zt[o]={min:t.min,max:t.max},t.min=t.max=null)}const ee=t.tzDate||(t=>new Date(Mt(t/ft))),oe=t.fmtDate||Pe,ue=1==ft?an(ee):un(ee),ge=dn(ee,hn(1==ft?sn:cn,oe)),ye=vn(ee,gn(mn,oe)),we=[],be=i.legend=ve({},bn,t.legend),_e=be.show,xe=be.markers;let Ae,Ce,ke;be.idxs=we,xe.width=Gt(xe.width),xe.dash=Gt(xe.dash),xe.stroke=Gt(xe.stroke),xe.fill=Gt(xe.fill);let $e,Te=[],Le=[],Re=!1,Ee={};if(be.live){const t=bt[1]?bt[1].values:null;Re=null!=t,$e=Re?t(i,1,0):{_:0};for(let e in $e)Ee[e]=U}if(_e)if(Ae=tt("table",y,Y),ke=tt("tbody",null,Ae),be.mount(i,Ae),Re){Ce=tt("thead",null,Ae,ke);let t=tt("tr",null,Ce);for(var Me in tt("th",null,t),$e)tt("th",S,t).textContent=Me}else Q(Ae,b),be.live&&Q(Ae,w);const De={show:!0},Ie={show:!1};function Oe(t,e){if(0==e&&(Re||!be.live||2==r))return le;let n=[],o=tt("tr",_,ke,ke.childNodes[e]);Q(o,t.class),t.show||Q(o,f);let s=tt("th",null,o);if(xe.show){let t=et(x,s);if(e>0){let n=xe.width(i,e);n&&(t.style.border=n+"px "+xe.dash(i,e)+" "+xe.stroke(i,e)),t.style.background=xe.fill(i,e)}}let a=et(S,s);for(var l in a.textContent=t.label,e>0&&(xe.show||(a.style.color=t.width>0?xe.stroke(i,e):xe.fill(i,e)),Fe("click",s,(e=>{if(Ln._lock)return;En(e);let n=bt.indexOf(t);if((e.ctrlKey||e.metaKey)!=be.isolate){let t=bt.some(((t,e)=>e>0&&e!=n&&t.show));bt.forEach(((e,i)=>{i>0&&Br(i,t?i==n?De:Ie:De,!0,To.setSeries)}))}else Br(n,{show:!t.show},!0,To.setSeries)}),!1),In&&Fe(P,s,(e=>{Ln._lock||(En(e),Br(bt.indexOf(t),Kr,!0,To.setSeries))}),!1)),$e){let t=tt("td",A,o);t.textContent="--",n.push(t)}return[o,n]}const Ne=new Map;function Fe(t,e,n,r=!0){const o=Ne.get(e)||{},s=Ln.bind[t](i,e,n,r);s&&(ut(t,e,o[t]=s),Ne.set(e,o))}function We(t,e,n){const i=Ne.get(e)||{};for(let r in i)null!=t&&r!=t||(ht(r,e,i[r]),delete i[r]);null==t&&Ne.delete(e)}let He=0,Be=0,ze=0,Ge=0,Ve=0,Ye=0,qe=Ve,Ke=Ye,Xe=ze,Qe=Ge,Ze=0,Je=0,tn=0,en=0;i.bbox={};let nn=!1,rn=!1,pn=!1,yn=!1,wn=!1,_n=!1;function xn(t,e,n){(n||t!=i.width||e!=i.height)&&Sn(t,e),gr(!1),pn=!0,rn=!0,Lr()}function Sn(t,e){i.width=He=ze=t,i.height=Be=Ge=e,Ve=Ye=0,$n(),Tn();let n=i.bbox;Ze=n.left=Jt(Ve*q,.5),Je=n.top=Jt(Ye*q,.5),tn=n.width=Jt(ze*q,.5),en=n.height=Jt(Ge*q,.5)}const An=3;function Cn(){let t=!1,e=0;while(!t){e++;let n=dr(e),r=fr(e);t=e==An||n&&r,t||(Sn(i.width,i.height),rn=!0)}}function kn({width:t,height:e}){xn(t,e)}function $n(){let t=!1,e=!1,n=!1,i=!1;_t.forEach(((r,o)=>{if(r.show&&r._show){let{side:o,_size:s}=r,a=o%2,l=null!=r.label?r.labelSize:0,c=s+l;c>0&&(a?(ze-=c,3==o?(Ve+=c,i=!0):n=!0):(Ge-=c,0==o?(Ye+=c,t=!0):e=!0))}})),Xn[0]=t,Xn[1]=n,Xn[2]=e,Xn[3]=i,ze-=ui[1]+ui[3],Ve+=ui[3],Ge-=ui[2]+ui[0],Ye+=ui[0]}function Tn(){let t=Ve+ze,e=Ye+Ge,n=Ve,i=Ye;function r(r,o){switch(r){case 1:return t+=o,t-o;case 2:return e+=o,e-o;case 3:return n-=o,n+o;case 0:return i-=o,i+o}}_t.forEach(((t,e)=>{if(t.show&&t._show){let e=t.side;t._pos=r(e,t._size),null!=t.label&&(t._lpos=r(e,t.labelSize))}}))}i.setSize=kn;const Ln=i.cursor=ve({},Rn,{drag:{y:2==r}},t.cursor),En=t=>{Ln.event=t};Ln.idxs=we,Ln._lock=!1;let Mn=Ln.points;Mn.show=Gt(Mn.show),Mn.size=Gt(Mn.size),Mn.stroke=Gt(Mn.stroke),Mn.width=Gt(Mn.width),Mn.fill=Gt(Mn.fill);const Dn=i.focus=ve({},t.focus||{alpha:.3},Ln.focus),In=Dn.prox>=0;let On=[null],Pn=[null],Nn=[null];function Vn(t,e){if(e>0){let n=Ln.points.show(i,e);if(n)return Q(n,v),Q(n,t.class),it(n,-10,-10,ze,Ge),st.insertBefore(n,On[e]),n}}function Yn(t,e){if(1==r||e>0){let e=1==r&&Ct[t.scale].time,n=t.value;t.value=e?de(n)?vn(ee,gn(n,oe)):n||ye:n||Jn,t.label=t.label||(e?Hn:Wn)}if(e>0){t.width=null==t.width?1:t.width,t.paths=t.paths||Gi||Kt,t.fillTo=Gt(t.fillTo||mi),t.pxAlign=+St(t.pxAlign,lt),t.pxRound=_i(t.pxAlign),t.stroke=Gt(t.stroke||null),t.fill=Gt(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;let e=ei(Ot(1,t.width),1),n=t.points=ve({},{size:e,width:Ot(1,.2*e),stroke:t.stroke,space:2*e,paths:Vi,_stroke:null,_fill:null},t.points);n.show=Gt(n.show),n.filter=Gt(n.filter),n.fill=Gt(n.fill),n.stroke=Gt(n.stroke),n.paths=Gt(n.paths),n.pxAlign=t.pxAlign}if(_e){let n=Oe(t,e);Te.splice(e,0,n[0]),Le.splice(e,0,n[1]),be.values.push(null)}if(Ln.show){we.splice(e,0,null);let n=Vn(t,e);null!=n&&(On.splice(e,0,n),Pn.splice(e,0,0),Nn.splice(e,0,0))}ko("addSeries",e)}function qn(t,e){e=null==e?bt.length:e,t=1==r?Ki(t,e,Bn,si):Ki(t,e,null,oi),bt.splice(e,0,t),Yn(bt[e],e)}function Kn(t){if(bt.splice(t,1),_e){be.values.splice(t,1),Le.splice(t,1);let e=Te.splice(t,1)[0];We(null,e.firstChild),e.remove()}Ln.show&&(we.splice(t,1),On.length>1&&(On.splice(t,1)[0].remove(),Pn.splice(t,1),Nn.splice(t,1))),ko("delSeries",t)}i.addSeries=qn,i.delSeries=Kn;const Xn=[!1,!1,!1,!1];function ni(t,e){if(t._show=t.show,t.show){let n=t.side%2,r=Ct[t.scale];null==r&&(t.scale=n?bt[1].scale:$t,r=Ct[t.scale]);let o=r.time;t.size=Gt(t.size),t.space=Gt(t.space),t.rotate=Gt(t.rotate),ce(t.incrs)&&t.incrs.forEach((t=>{!ie.has(t)&&ie.set(t,re(t))})),t.incrs=Gt(t.incrs||(2==r.distr?Ue:o?1==ft?on:ln:je)),t.splits=Gt(t.splits||(o&&1==r.distr?ue:3==r.distr?jn:4==r.distr?Gn:Un)),t.stroke=Gt(t.stroke),t.grid.stroke=Gt(t.grid.stroke),t.ticks.stroke=Gt(t.ticks.stroke),t.border.stroke=Gt(t.border.stroke);let s=t.values;t.values=ce(s)&&!ce(s[0])?Gt(s):o?ce(s)?dn(ee,hn(s,oe)):de(s)?fn(ee,s):s||ge:s||zn,t.filter=Gt(t.filter||(r.distr>=3&&10==r.log?Qn:3==r.distr&&2==r.log?Zn:qt)),t.font=rr(t.font),t.labelFont=rr(t.labelFont),t._size=t.size(i,null,e,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(Xn[e]=!0,t._el=et(d,nt))}}function ii(t,e,n,i){let[r,o,s,a]=n,l=e%2,c=0;return 0==l&&(a||o)&&(c=0==e&&!r||2==e&&!s?Mt(Fn.size/3):0),1==l&&(r||s)&&(c=1==e&&!o||3==e&&!a?Mt(ti.size/2):0),c}const ri=i.padding=(t.padding||[ii,ii,ii,ii]).map((t=>Gt(St(t,ii)))),ui=i._padding=ri.map(((t,e)=>t(i,e,Xn,0)));let pi,gi=null,vi=null;const yi=1==r?bt[0].idxs:null;let wi,bi,xi,Si,Ai,Ci,ki,$i,Ti,Li,Ri=null,Ei=!1;function Mi(t,n){if(e=null==t?[]:t,2==r){pi=0;for(let t=1;t<bt.length;t++)pi+=e[t][0].length;i._data=e}else{0==e.length&&(e=[[]]),Ri=e[0],pi=Ri.length;let t=e;if(2==Ut){t=e.slice();let n=t[0]=Array(pi);for(let t=0;t<pi;t++)n[t]=t}i._data=e=t}if(i.data=e,gr(!0),ko("setData"),2==Ut&&(pn=!0),!1!==n){let t=Wt;t.auto(i,Ei)?Di():Hr($t,t.min,t.max),yn=yn||Ln.left>=0,_n=!0,Lr()}}function Di(){let t,n;Ei=!0,1==r&&(pi>0?(gi=yi[0]=0,vi=yi[1]=pi-1,t=e[0][gi],n=e[0][vi],2==Ut?(t=gi,n=vi):t==n&&(3==Ut?[t,n]=mt(t,t,Wt.log,!1):4==Ut?[t,n]=vt(t,t,Wt.log,!1):Wt.time?n=t+Mt(86400/ft):[t,n]=xt(t,n,yt,!0))):(gi=yi[0]=t=null,vi=yi[1]=n=null)),Hr($t,t,n)}function Ii(t,e,n,i,r,o){var s,a,l,c,u;null!==(s=t)&&void 0!==s||(t=M),null!==(a=n)&&void 0!==a||(n=ae),null!==(l=i)&&void 0!==l||(i="butt"),null!==(c=r)&&void 0!==c||(r=M),null!==(u=o)&&void 0!==u||(o="round"),t!=wi&&(X.strokeStyle=wi=t),r!=bi&&(X.fillStyle=bi=r),e!=xi&&(X.lineWidth=xi=e),o!=Ai&&(X.lineJoin=Ai=o),i!=Ci&&(X.lineCap=Ci=i),n!=Si&&X.setLineDash(Si=n)}function Oi(t,e,n,i){e!=bi&&(X.fillStyle=bi=e),t!=ki&&(X.font=ki=t),n!=$i&&(X.textAlign=$i=n),i!=Ti&&(X.textBaseline=Ti=i)}function Pi(t,e,n,r,o=0){if(r.length>0&&t.auto(i,Ei)&&(null==e||null==e.min)){let e=St(gi,0),i=St(vi,r.length-1),s=null==n.min?3==t.distr?gt(r,e,i):pt(r,e,i,o):[n.min,n.max];t.min=It(t.min,n.min=s[0]),t.max=Ot(t.max,n.max=s[1])}}i.setData=Mi;const Ni={min:null,max:null};function Fi(){for(let e in Ct){let t=Ct[e];null==Zt[e]&&(null==t.min||null!=Zt[$t]&&t.auto(i,Ei))&&(Zt[e]=Ni)}for(let e in Ct){let t=Ct[e];null==Zt[e]&&null!=t.from&&null!=Zt[t.from]&&(Zt[e]=Ni)}null!=Zt[$t]&&gr(!0);let t={};for(let e in Zt){let n=Zt[e];if(null!=n){let o=t[e]=me(Ct[e],pe);if(null!=n.min)ve(o,n);else if(e!=$t||2==r)if(0==pi&&null==o.from){let t=o.range(i,null,null,e);o.min=t[0],o.max=t[1]}else o.min=zt,o.max=-zt}}if(pi>0){bt.forEach(((n,o)=>{if(1==r){let r=n.scale,s=Zt[r];if(null==s)return;let a=t[r];if(0==o){let t=a.range(i,a.min,a.max,r);a.min=t[0],a.max=t[1],gi=dt(a.min,e[0]),vi=dt(a.max,e[0]),vi-gi>1&&(e[0][gi]<a.min&&gi++,e[0][vi]>a.max&&vi--),n.min=Ri[gi],n.max=Ri[vi]}else n.show&&n.auto&&Pi(a,s,n,e[o],n.sorted);n.idxs[0]=gi,n.idxs[1]=vi}else if(o>0&&n.show&&n.auto){let[i,r]=n.facets,s=i.scale,a=r.scale,[l,c]=e[o];Pi(t[s],Zt[s],i,l,i.sorted),Pi(t[a],Zt[a],r,c,r.sorted),n.min=r.min,n.max=r.max}}));for(let e in t){let n=t[e],r=Zt[e];if(null==n.from&&(null==r||null==r.min)){let t=n.range(i,n.min==zt?null:n.min,n.max==-zt?null:n.max,e);n.min=t[0],n.max=t[1]}}}for(let e in t){let n=t[e];if(null!=n.from){let r=t[n.from];if(null==r.min)n.min=n.max=null;else{let t=n.range(i,r.min,r.max,e);n.min=t[0],n.max=t[1]}}}let n={},o=!1;for(let e in t){let i=t[e],r=Ct[e];if(r.min!=i.min||r.max!=i.max){r.min=i.min,r.max=i.max;let t=r.distr;r._min=3==t?Ft(r.min):4==t?Bt(r.min,r.asinh):r.min,r._max=3==t?Ft(r.max):4==t?Bt(r.max,r.asinh):r.max,n[e]=o=!0}}if(o){bt.forEach(((t,e)=>{2==r?e>0&&n.y&&(t._paths=null):n[t.scale]&&(t._paths=null)}));for(let t in n)pn=!0,ko("setScale",t);Ln.show&&Ln.left>=0&&(yn=_n=!0)}for(let e in Zt)Zt[e]=null}function Wi(t){let e=jt(gi-1,0,pi-1),n=jt(vi+1,0,pi-1);while(null==t[e]&&e>0)e--;while(null==t[n]&&n<pi-1)n++;return[e,n]}function Hi(){pi>0&&(bt.forEach(((t,n)=>{if(n>0&&t.show&&(Bi(n,!1),Bi(n,!0),null==t._paths)){let o=2==r?[0,e[n][0].length-1]:Wi(e[n]);t._paths=t.paths(i,n,o[0],o[1])}})),bt.forEach(((t,e)=>{if(e>0&&t.show){Li!=t.alpha&&(X.globalAlpha=Li=t.alpha),null!=t._paths&&zi(e,!1);{let n=null!=t._paths?t._paths.gaps:null,r=t.points.show(i,e,gi,vi,n),o=t.points.filter(i,e,r,n);(r||o)&&(t.points._paths=t.points.paths(i,e,gi,vi,o),zi(e,!0))}1!=Li&&(X.globalAlpha=Li=1),ko("drawSeries",e)}})))}function Bi(t,e){let n=e?bt[t].points:bt[t];n._stroke=n.stroke(i,t),n._fill=n.fill(i,t)}function zi(t,e){let n=e?bt[t].points:bt[t],{stroke:i,fill:r,clip:o,flags:s,_stroke:a=n._stroke,_fill:l=n._fill,_width:c=n.width}=n._paths;c=ne(c*q,3);let u=null,h=c%2/2;e&&null==l&&(l=c>0?"#fff":a);let d=1==n.pxAlign&&h>0;if(d&&X.translate(h,h),!e){let t=Ze-c/2,e=Je-c/2,n=tn+c,i=en+c;u=new Path2D,u.rect(t,e,n,i)}e?ar(a,c,n.dash,n.cap,l,i,r,s,o):ji(t,a,c,n.dash,n.cap,l,i,r,s,u,o),d&&X.translate(-h,-h)}function ji(t,n,r,o,s,a,l,c,u,h,d){let f=!1;0!=u&&kt.forEach(((p,g)=>{if(p.series[0]==t){let t,m=bt[p.series[1]],v=e[p.series[1]],y=(m._paths||se).band;ce(y)&&(y=1==p.dir?y[0]:y[1]);let w=null;m.show&&y&&At(v,gi,vi)?(w=p.fill(i,g)||a,t=m._paths.clip):y=null,ar(n,r,o,s,w,l,c,u,h,d,t,y),f=!0}})),f||ar(n,r,o,s,a,l,c,u,h,d)}const sr=di|fi;function ar(t,e,n,i,r,o,s,a,l,c,u,h){Ii(t,e,n,i,r),(l||c||h)&&(X.save(),l&&X.clip(l),c&&X.clip(c)),h?(a&sr)==sr?(X.clip(h),u&&X.clip(u),cr(r,s),lr(t,o,e)):a&fi?(cr(r,s),X.clip(h),lr(t,o,e)):a&di&&(X.save(),X.clip(h),u&&X.clip(u),cr(r,s),X.restore(),lr(t,o,e)):(cr(r,s),lr(t,o,e)),(l||c||h)&&X.restore()}function lr(t,e,n){n>0&&(e instanceof Map?e.forEach(((t,e)=>{X.strokeStyle=wi=e,X.stroke(t)})):null!=e&&t&&X.stroke(e))}function cr(t,e){e instanceof Map?e.forEach(((t,e)=>{X.fillStyle=bi=e,X.fill(t)})):null!=e&&t&&X.fill(e)}function ur(t,e,n,r){let o,s=_t[t];if(r<=0)o=[0,0];else{let a=s._space=s.space(i,t,e,n,r),l=s._incrs=s.incrs(i,t,e,n,r,a);o=ir(e,n,l,r,a)}return s._found=o}function hr(t,e,n,i,r,o,s,a,l,c){let u=s%2/2;1==lt&&X.translate(u,u),Ii(a,s,l,c,a),X.beginPath();let h,d,f,p,g=r+(0==i||3==i?-o:o);0==n?(d=r,p=g):(h=r,f=g);for(let m=0;m<t.length;m++)null!=e[m]&&(0==n?h=f=t[m]:d=p=t[m],X.moveTo(h,d),X.lineTo(f,p));X.stroke(),1==lt&&X.translate(-u,-u)}function dr(t){let e=!0;return _t.forEach(((n,r)=>{if(!n.show)return;let o=Ct[n.scale];if(null==o.min)return void(n._show&&(e=!1,n._show=!1,gr(!1)));n._show||(e=!1,n._show=!0,gr(!1));let s=n.side,a=s%2,{min:l,max:c}=o,[u,h]=ur(r,l,c,0==a?ze:Ge);if(0==h)return;let d=2==o.distr,f=n._splits=n.splits(i,r,l,c,u,h,d),p=2==o.distr?f.map((t=>Ri[t])):f,g=2==o.distr?Ri[f[1]]-Ri[f[0]]:u,m=n._values=n.values(i,n.filter(i,p,r,h,g),r,h,g);n._rotate=2==s?n.rotate(i,m,r,h):0;let v=n._size;n._size=Dt(n.size(i,m,r,t)),null!=v&&n._size!=v&&(e=!1)})),e}function fr(t){let e=!0;return ri.forEach(((n,r)=>{let o=n(i,r,Xn,t);o!=ui[r]&&(e=!1),ui[r]=o})),e}function pr(){for(let t=0;t<_t.length;t++){let e=_t[t];if(!e.show||!e._show)continue;let n,r,o=e.side,s=o%2,a=e.stroke(i,t),l=0==o||3==o?-1:1;if(e.label){let t=e.labelGap*l,i=Mt((e._lpos+t)*q);Oi(e.labelFont[0],a,"center",2==o?$:T),X.save(),1==s?(n=r=0,X.translate(i,Mt(Je+en/2)),X.rotate((3==o?-Lt:Lt)/2)):(n=Mt(Ze+tn/2),r=i),X.fillText(e.label,n,r),X.restore()}let[c,u]=e._found;if(0==u)continue;let h=Ct[e.scale],d=0==s?tn:en,f=0==s?Ze:Je,p=Mt(e.gap*q),g=e._splits,m=2==h.distr?g.map((t=>Ri[t])):g,v=2==h.distr?Ri[g[1]]-Ri[g[0]]:c,y=e.ticks,w=e.border,b=y.show?Mt(y.size*q):0,_=e._rotate*-Lt/180,x=ct(e._pos*q),S=(b+p)*l,A=x+S;r=0==s?A:0,n=1==s?A:0;let C=e.font[0],k=1==e.align?L:2==e.align?R:_>0?L:_<0?R:0==s?"center":3==o?R:L,E=_||1==s?"middle":2==o?$:T;Oi(C,a,k,E);let M=e.font[1]*e.lineGap,D=g.map((t=>ct(B(t,h,d,f)))),I=e._values;for(let t=0;t<I.length;t++){let e=I[t];if(null!=e){0==s?n=D[t]:r=D[t],e=""+e;let i=-1==e.indexOf("\n")?[e]:e.split(/\n/gm);for(let t=0;t<i.length;t++){let e=i[t];_?(X.save(),X.translate(n,r+t*M),X.rotate(_),X.fillText(e,0,0),X.restore()):X.fillText(e,n,r+t*M)}}}y.show&&hr(D,y.filter(i,m,t,u,v),s,o,x,b,ne(y.width*q,3),y.stroke(i,t),y.dash,y.cap);let O=e.grid;O.show&&hr(D,O.filter(i,m,t,u,v),s,0==s?2:1,0==s?Je:Ze,0==s?en:tn,ne(O.width*q,3),O.stroke(i,t),O.dash,O.cap),w.show&&hr([x],[1],0==s?1:0,0==s?1:2,1==s?Je:Ze,1==s?en:tn,ne(w.width*q,3),w.stroke(i,t),w.dash,w.cap)}ko("drawAxes")}function gr(t){bt.forEach(((e,n)=>{n>0&&(e._paths=null,t&&(1==r?(e.min=null,e.max=null):e.facets.forEach((t=>{t.min=null,t.max=null}))))}))}let mr,vr,yr,wr,br,_r,xr,Sr,Ar,Cr,kr,$r,Tr=!1;function Lr(){Tr||(Se(Rr),Tr=!0)}function Rr(){if(nn&&(Fi(),nn=!1),pn&&(Cn(),pn=!1),rn){if(J(rt,L,Ve),J(rt,$,Ye),J(rt,C,ze),J(rt,k,Ge),J(st,L,Ve),J(st,$,Ye),J(st,C,ze),J(st,k,Ge),J(nt,C,He),J(nt,k,Be),K.width=Mt(He*q),K.height=Mt(Be*q),_t.forEach((({_el:t,_show:e,_size:n,_pos:i,side:r})=>{if(null!=t)if(e){let e=3===r||0===r?n:0,o=r%2==1;J(t,o?"left":"top",i-e),J(t,o?"width":"height",n),J(t,o?"top":"left",o?Ye:Ve),J(t,o?"height":"width",o?Ge:ze),Z(t,f)}else Q(t,f)})),wi=bi=xi=Ai=Ci=ki=$i=Ti=Si=null,Li=1,co(!0),Ve!=qe||Ye!=Ke||ze!=Xe||Ge!=Qe){gr(!1);let t=ze/Xe,e=Ge/Qe;if(Ln.show&&!yn&&Ln.left>=0){Ln.left*=t,Ln.top*=e,yr&&it(yr,Mt(Ln.left),0,ze,Ge),wr&&it(wr,0,Mt(Ln.top),ze,Ge);for(let n=1;n<On.length;n++)Pn[n]*=t,Nn[n]*=e,it(On[n],te(Pn[n],1),te(Nn[n],1),ze,Ge)}if(Pr.show&&!wn&&Pr.left>=0&&Pr.width>0){Pr.left*=t,Pr.width*=t,Pr.top*=e,Pr.height*=e;for(let t in fo)J(Nr,t,Pr[t])}qe=Ve,Ke=Ye,Xe=ze,Qe=Ge}ko("setSize"),rn=!1}He>0&&Be>0&&(X.clearRect(0,0,K.width,K.height),ko("drawClear"),Et.forEach((t=>t())),ko("draw")),Pr.show&&wn&&(Fr(Pr),wn=!1),Ln.show&&yn&&(ao(null,!0,!1),yn=!1),be.show&&be.live&&_n&&(oo(),_n=!1),j||(j=!0,i.status=1,ko("ready")),Ei=!1,Tr=!1}function Er(t,n){let r=Ct[t];if(null==r.from){if(0==pi){let e=r.range(i,n.min,n.max,t);n.min=e[0],n.max=e[1]}if(n.min>n.max){let t=n.min;n.min=n.max,n.max=t}if(pi>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;t==$t&&2==r.distr&&pi>0&&(n.min=dt(n.min,e[0]),n.max=dt(n.max,e[0]),n.min==n.max&&n.max++),Zt[t]=n,nn=!0,Lr()}}i.redraw=(t,e)=>{pn=e||!1,!1!==t?Hr($t,Wt.min,Wt.max):Lr()},i.setScale=Er;let Mr=!1;const Dr=Ln.drag;let Ir=Dr.x,Or=Dr.y;Ln.show&&(Ln.x&&(mr=et(g,st)),Ln.y&&(vr=et(m,st)),0==Wt.ori?(yr=mr,wr=vr):(yr=vr,wr=mr),kr=Ln.left,$r=Ln.top);const Pr=i.select=ve({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Nr=Pr.show?et(p,Pr.over?st:rt):null;function Fr(t,e){if(Pr.show){for(let e in t)Pr[e]=t[e],e in fo&&J(Nr,e,t[e]);!1!==e&&ko("setSelect")}}function Wr(t,e){let n=bt[t],i=_e?Te[t]:null;n.show?i&&Z(i,f):(i&&Q(i,f),On.length>1&&it(On[t],-10,-10,ze,Ge))}function Hr(t,e,n){Er(t,{min:e,max:n})}function Br(t,e,n,o){null!=e.focus&&Xr(t),null!=e.show&&bt.forEach(((n,i)=>{i>0&&(t==i||null==t)&&(n.show=e.show,Wr(i,e.show),Hr(2==r?n.facets[1].scale:n.scale,null,null),Lr())})),!1!==n&&ko("setSeries",t,e),o&&Eo("setSeries",i,t,e)}function zr(t,e){ve(kt[t],e)}function Ur(t,e){t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1),e=null==e?kt.length:e,kt.splice(e,0,t)}function jr(t){null==t?kt.length=0:kt.splice(t,1)}function Gr(t,e){bt[t].alpha=e,Ln.show&&On[t]&&(On[t].style.opacity=e),_e&&Te[t]&&(Te[t].style.opacity=e)}let Vr,Yr,qr;i.setSelect=Fr,i.setSeries=Br,i.addBand=Ur,i.setBand=zr,i.delBand=jr;const Kr={focus:!0};function Xr(t){if(t!=qr){let e=null==t,n=1!=Dn.alpha;bt.forEach(((i,r)=>{let o=e||0==r||r==t;i._focus=e?null:o,n&&Gr(r,o?1:Dn.alpha)})),qr=t,n&&Lr()}}function Qr(t,e,n){let i=Ct[e];n&&(t=t/q-(1==i.ori?Ye:Ve));let r=ze;1==i.ori&&(r=Ge,t=r-t),-1==i.dir&&(t=r-t);let o=i._min,s=i._max,a=t/r,l=o+(s-o)*a,c=i.distr;return 3==c?Pt(10,l):4==c?Ht(l,i.asinh):l}function Zr(t,n){let i=Qr(t,$t,n);return dt(i,e[0],gi,vi)}function Jr(t){t(i),Lr()}function to(t,e){J(Nr,L,Pr.left=t),J(Nr,C,Pr.width=e)}function eo(t,e){J(Nr,$,Pr.top=t),J(Nr,k,Pr.height=e)}_e&&In&&Fe(N,Ae,(t=>{Ln._lock||(En(t),null!=qr&&Br(null,Kr,!0,To.setSeries))})),i.valToIdx=t=>dt(t,e[0]),i.posToIdx=Zr,i.posToVal=Qr,i.valToPos=(t,e,n)=>0==Ct[e].ori?W(t,Ct[e],n?tn:ze,n?Ze:0):H(t,Ct[e],n?en:Ge,n?Je:0),i.batch=Jr,i.setCursor=(t,e,n)=>{kr=t.left,$r=t.top,ao(null,e,n)};let no=0==Wt.ori?to:eo,io=1==Wt.ori?to:eo;function ro(){if(_e&&be.live)for(let t=2==r?1:0;t<bt.length;t++){if(0==t&&Re)continue;let e=be.values[t],n=0;for(let i in e)Le[t][n++].firstChild.nodeValue=e[i]}}function oo(t,e){null!=t&&(t.idxs?t.idxs.forEach(((t,e)=>{we[e]=t})):he(t.idx)||we.fill(t.idx),be.idx=we[0]);for(let n=0;n<bt.length;n++)(n>0||1==r&&!Re)&&so(n,we[n]);_e&&be.live&&ro(),_n=!1,!1!==e&&ko("setLegend")}function so(t,n){var r;let o,s=bt[t],a=0==t&&2==Ut?Ri:e[t];Re?o=null!==(r=s.values(i,t,n))&&void 0!==r?r:Ee:(o=s.value(i,null==n?null:a[n],t,n),o=null==o?Ee:{_:o}),be.values[t]=o}function ao(t,n,o){let s;Ar=kr,Cr=$r,[kr,$r]=Ln.move(i,kr,$r),Ln.show&&(yr&&it(yr,Mt(kr),0,ze,Ge),wr&&it(wr,0,Mt($r),ze,Ge));let a=gi>vi;Vr=zt;let l=0==Wt.ori?ze:Ge,c=1==Wt.ori?ze:Ge;if(kr<0||0==pi||a){s=null;for(let t=0;t<bt.length;t++)t>0&&On.length>1&&it(On[t],-10,-10,ze,Ge);In&&Br(null,Kr,!0,null==t&&To.setSeries),be.live&&(we.fill(s),_n=!0)}else{let t,n,o;1==r&&(t=0==Wt.ori?kr:$r,n=Qr(t,$t),s=dt(n,e[0],gi,vi),o=Vt(e[0][s],Wt,l,0));for(let a=2==r?1:0;a<bt.length;a++){let t=bt[a],u=we[a],h=null==u?null:1==r?e[a][u]:e[a][1][u],d=Ln.dataIdx(i,a,s,n),f=null==d?null:1==r?e[a][d]:e[a][1][d];_n=_n||f!=h||d!=u,we[a]=d;let p=d==s?o:Vt(1==r?e[0][d]:e[a][0][d],Wt,l,0);if(a>0&&t.show){let e,n,o=null==f?-10:Yt(f,1==r?Ct[t.scale]:Ct[t.facets[1].scale],c,0);if(In&&1==r&&null!=f){let e=Rt(Dn.dist(i,a,d,o,$r));if(e<Vr){let n=Dn.bias;if(0!=n){let i=1==Wt.ori?kr:$r,r=Qr(i,t.scale),o=f>=0?1:-1,s=r>=0?1:-1;s==o&&(1==s?1==n?f>=r:f<=r:1==n?f<=r:f>=r)&&(Vr=e,Yr=a)}else Vr=e,Yr=a}}if(0==Wt.ori?(e=p,n=o):(e=o,n=p),_n&&On.length>1){ot(On[a],Ln.points.fill(i,a),Ln.points.stroke(i,a));let t,r,o,s,l=!0,c=Ln.points.bbox;if(null!=c){l=!1;let e=c(i,a);o=e.left,s=e.top,t=e.width,r=e.height}else o=e,s=n,t=r=Ln.points.size(i,a);at(On[a],t,r,l),Pn[a]=o,Nn[a]=s,it(On[a],te(o,1),te(s,1),ze,Ge)}}}}if(Ln.idx=s,Ln.left=kr,Ln.top=$r,_n&&(be.idx=s,oo()),Pr.show&&Mr)if(null!=t){let[e,n]=To.scales,[i,r]=To.match,[o,s]=t.cursor.sync.scales,a=t.cursor.drag;if(Ir=a._x,Or=a._y,Ir||Or){let a,u,h,d,f,{left:p,top:g,width:m,height:v}=t.select,y=t.scales[e].ori,w=t.posToVal,b=null!=e&&i(e,o),_=null!=n&&r(n,s);b&&Ir?(0==y?(a=p,u=m):(a=g,u=v),h=Ct[e],d=Vt(w(a,o),h,l,0),f=Vt(w(a+u,o),h,l,0),no(It(d,f),Rt(f-d))):no(0,l),_&&Or?(1==y?(a=p,u=m):(a=g,u=v),h=Ct[n],d=Yt(w(a,s),h,c,0),f=Yt(w(a+u,s),h,c,0),io(It(d,f),Rt(f-d))):io(0,c)}else po()}else{let t=Rt(Ar-br),e=Rt(Cr-_r);if(1==Wt.ori){let n=t;t=e,e=n}Ir=Dr.x&&t>=Dr.dist,Or=Dr.y&&e>=Dr.dist;let n,i,r=Dr.uni;null!=r?Ir&&Or&&(Ir=t>=r,Or=e>=r,Ir||Or||(e>t?Or=!0:Ir=!0)):Dr.x&&Dr.y&&(Ir||Or)&&(Ir=Or=!0),Ir&&(0==Wt.ori?(n=xr,i=kr):(n=Sr,i=$r),no(It(n,i),Rt(i-n)),Or||io(0,c)),Or&&(1==Wt.ori?(n=xr,i=kr):(n=Sr,i=$r),io(It(n,i),Rt(i-n)),Ir||no(0,l)),Ir||Or||(no(0,0),io(0,0))}if(Dr._x=Ir,Dr._y=Or,null==t){if(o){if(null!=Lo){let[t,e]=To.scales;To.values[0]=null!=t?Qr(0==Wt.ori?kr:$r,t):null,To.values[1]=null!=e?Qr(1==Wt.ori?kr:$r,e):null}Eo(D,i,kr,$r,ze,Ge,s)}if(In){let t=o&&To.setSeries,e=Dn.prox;null==qr?Vr<=e&&Br(Yr,Kr,!0,t):Vr>e?Br(null,Kr,!0,t):Yr!=qr&&Br(Yr,Kr,!0,t)}}!1!==n&&ko("setCursor")}i.setLegend=oo;let lo=null;function co(t=!1){t?lo=null:(lo=st.getBoundingClientRect(),ko("syncRect",lo))}function uo(t,e,n,i,r,o,s){Ln._lock||Mr&&null!=t&&0==t.movementX&&0==t.movementY||(ho(t,e,n,i,r,o,s,!1,null!=t),null!=t?ao(null,!0,!0):ao(e,!0,!1))}function ho(t,e,n,r,o,s,a,l,c){if(null==lo&&co(!1),En(t),null!=t)n=t.clientX-lo.left,r=t.clientY-lo.top;else{if(n<0||r<0)return kr=-10,void($r=-10);let[t,i]=To.scales,a=e.cursor.sync,[l,c]=a.values,[u,h]=a.scales,[d,f]=To.match,p=e.axes[0].side%2==1,g=0==Wt.ori?ze:Ge,m=1==Wt.ori?ze:Ge,v=p?s:o,y=p?o:s,w=p?r:n,b=p?n:r;if(n=null!=u?d(t,u)?B(l,Ct[t],g,0):-10:g*(w/v),r=null!=h?f(i,h)?B(c,Ct[i],m,0):-10:m*(b/y),1==Wt.ori){let t=n;n=r,r=t}}c&&((n<=1||n>=ze-1)&&(n=Jt(n,ze)),(r<=1||r>=Ge-1)&&(r=Jt(r,Ge))),l?(br=n,_r=r,[xr,Sr]=Ln.move(i,n,r)):(kr=n,$r=r)}Object.defineProperty(i,"rect",{get(){return null==lo&&co(!1),lo}});const fo={width:0,height:0,left:0,top:0};function po(){Fr(fo,!1)}let go,mo,vo,yo;function wo(t,e,n,r,o,s,a){Mr=!0,Ir=Or=Dr._x=Dr._y=!1,ho(t,e,n,r,o,s,a,!0,!1),null!=t&&(Fe(O,G,bo,!1),Eo(I,i,xr,Sr,ze,Ge,null));let{left:l,top:c,width:u,height:h}=Pr;go=l,mo=c,vo=u,yo=h,po()}function bo(t,e,n,r,o,s,a){Mr=Dr._x=Dr._y=!1,ho(t,e,n,r,o,s,a,!1,!0);let{left:l,top:c,width:u,height:h}=Pr,d=u>0||h>0,f=go!=l||mo!=c||vo!=u||yo!=h;if(d&&f&&Fr(Pr),Dr.setScale&&d&&f){let t=l,e=u,n=c,i=h;if(1==Wt.ori&&(t=c,e=h,n=l,i=u),Ir&&Hr($t,Qr(t,$t),Qr(t+e,$t)),Or)for(let r in Ct){let t=Ct[r];r!=$t&&null==t.from&&t.min!=zt&&Hr(r,Qr(n+i,r),Qr(n,r))}po()}else Ln.lock&&(Ln._lock=!Ln._lock,Ln._lock||ao(null,!0,!1));null!=t&&(We(O,G),Eo(O,i,kr,$r,ze,Ge,null))}function _o(t,e,n,i,r,o,s){if(Ln._lock)return;En(t);let a=Mr;if(Mr){let t,e,n=!0,i=!0,r=10;0==Wt.ori?(t=Ir,e=Or):(t=Or,e=Ir),t&&e&&(n=kr<=r||kr>=ze-r,i=$r<=r||$r>=Ge-r),t&&n&&(kr=kr<xr?0:ze),e&&i&&($r=$r<Sr?0:Ge),ao(null,!0,!0),Mr=!1}kr=-10,$r=-10,ao(null,!0,!0),a&&(Mr=a)}function xo(t,e,n,r,o,s,a){Ln._lock||(En(t),Di(),po(),null!=t&&Eo(F,i,kr,$r,ze,Ge,null))}function So(){_t.forEach(or),xn(i.width,i.height,!0)}ut(z,V,So);const Ao={};Ao.mousedown=wo,Ao.mousemove=uo,Ao.mouseup=bo,Ao.dblclick=xo,Ao["setSeries"]=(t,e,n,r)=>{let o=To.match[2];n=o(i,e,n),-1!=n&&Br(n,r,!0,!1)},Ln.show&&(Fe(I,st,wo),Fe(D,st,uo),Fe(P,st,(t=>{En(t),co(!1)})),Fe(N,st,_o),Fe(F,st,xo),Ui.add(i),i.syncRect=co);const Co=i.hooks=t.hooks||{};function ko(t,e,n){t in Co&&Co[t].forEach((t=>{t.call(null,i,e,n)}))}(t.plugins||[]).forEach((t=>{for(let e in t.hooks)Co[e]=(Co[e]||[]).concat(t.hooks[e])}));const $o=(t,e,n)=>n,To=ve({key:null,setSeries:!1,filters:{pub:Xt,sub:Xt},scales:[$t,bt[1]?bt[1].scale:null],match:[Qt,Qt,$o],values:[null,null]},Ln.sync);2==To.match.length&&To.match.push($o),Ln.sync=To;const Lo=To.key,Ro=hi(Lo);function Eo(t,e,n,i,r,o,s){To.filters.pub(t,e,n,i,r,o,s)&&Ro.pub(t,e,n,i,r,o,s)}function Mo(t,e,n,i,r,o,s){To.filters.sub(t,e,n,i,r,o,s)&&Ao[t](null,e,n,i,r,o,s)}function Do(){var t;Ro.unsub(i),Ui.delete(i),Ne.clear(),ht(z,V,So),Y.remove(),null===(t=Ae)||void 0===t||t.remove(),ko("destroy")}function Io(){ko("init",t,e),Mi(e||t.data,!1),Zt[$t]?Er($t,Zt[$t]):Di(),wn=Pr.show&&(Pr.width>0||Pr.height>0),yn=_n=!0,xn(t.width,t.height)}return Ro.sub(i),i.pub=Mo,i.destroy=Do,bt.forEach(Yn),_t.forEach(ni),n?n instanceof HTMLElement?(n.appendChild(Y),Io()):n(i,Io):Io(),i}sr.assign=ve,sr.fmtNum=$t,sr.rangeNum=xt,sr.rangeLog=mt,sr.rangeAsinh=vt,sr.orient=pi,sr.pxRatio=q,sr.join=xe,sr.fmtDate=Pe,sr.tzDate=Fe,sr.sync=hi;{sr.addGap=wi,sr.clipGaps=yi;let t=sr.paths={points:Di};t.linear=Ni,t.stepped=Fi,t.bars=Wi,t.spline=Bi}},6717:(t,e,n)=>{t=n.nmd(t),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(t,e,n){"use strict";function i(t){var e=(new Date).toLocaleString("en-us",t);return 1==e.length?"0"+e:e}var r=t("./lib/dom"),o=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,a=t("./lib/lang"),l=t("./range").Range,c=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,h=t("./tokenizer").Tokenizer,d=t("./clipboard"),f={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,n){var i=t.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return d.getText&&d.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(t){var e=t.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:i.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:i.bind(null,{year:"2-digit"}),CURRENT_MONTH:i.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:i.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.bind(null,{month:"short"}),CURRENT_DATE:i.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:i.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.bind(null,{weekday:"short"}),CURRENT_HOUR:i.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:i.bind(null,{minute:"2-digit"}),CURRENT_SECOND:i.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var p=function(){function t(){this.snippetMap={},this.snippetNameMap={},this.variables=f}return t.prototype.getTokenizer=function(){return t.$tokenizer||this.createTokenizer()},t.prototype.createTokenizer=function(){function e(t){return t=t.substr(1),/^\d+$/.test(t)?[{tabstopId:parseInt(t,10)}]:[{text:t}]}function n(t){return"(?:[^\\\\"+t+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(t,e,n){var i=n[0];return i.fmtString=!0,i.guard=t.slice(1,-1),i.flag="",""},next:"formatString"};return t.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(t=i),[t]}},{regex:/}/,onMatch:function(t,e,n){return[n.length?n.shift():t]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(t,e,n){var i=t.slice(1,-1).replace(/\\[,|\\]|,/g,(function(t){return 2==t.length?t[1]:"\0"})).split("\0").map((function(t){return{value:t}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(t,e,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?t=i:"n"==i?t="\n":"t"==i?t="\t":-1!="ulULE".indexOf(i)&&(t={changeCase:i,local:i>"a"}),[t]}},{regex:"/\\w*}",onMatch:function(t,e,n){var i=n.shift();return i&&(i.flag=t.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(t,e,n){return[{text:t.slice(1)}]}},{regex:/\${\w+/,onMatch:function(t,e,n){var i={text:t.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(t,e,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(t,e,n){var i=n[0];return i.formatFunction=t.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(t,e,n){"+"==t[1]&&(n[0].ifEnd=n[0]),"?"==t[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),t.$tokenizer},t.prototype.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map((function(t){return t.value||t}))},t.prototype.getVariableValue=function(t,e,n){if(/^\d+$/.test(e))return(this.variables.__||{})[e]||"";if(/^[A-Z]\d+$/.test(e))return(this.variables[e[0]+"__"]||{})[e.substr(1)]||"";if(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e))return"";var i=this.variables[e];return"function"==typeof i&&(i=this.variables[e](t,e,n)),null==i?"":i},t.prototype.tmStrFormat=function(t,e,n){if(!e.fmt)return t;var i=e.flag||"",r=e.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof e.fmt?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,s=this,a=t.replace(r,(function(){var t=s.variables.__;s.variables.__=[].slice.call(arguments);for(var e=s.resolveVariables(o,n),i="E",r=0;r<e.length;r++){var a=e[r];if("object"==typeof a)if(e[r]="",a.changeCase&&a.local){var l=e[r+1];l&&"string"==typeof l&&("u"==a.changeCase?e[r]=l[0].toUpperCase():e[r]=l[0].toLowerCase(),e[r+1]=l.substr(1))}else a.changeCase&&(i=a.changeCase);else"U"==i?e[r]=a.toUpperCase():"L"==i&&(e[r]=a.toLowerCase())}return s.variables.__=t,e.join("")}));return a},t.prototype.tmFormatFunction=function(t,e,n){return"upcase"==e.formatFunction?t.toUpperCase():"downcase"==e.formatFunction?t.toLowerCase():t},t.prototype.resolveVariables=function(t,e){function n(e){var n=t.indexOf(e,s+1);-1!=n&&(s=n)}for(var i=[],r="",o=!0,s=0;s<t.length;s++){var a=t[s];if("string"!=typeof a){if(a){if(o=!1,a.fmtString){var l=t.indexOf(a,s+1);-1==l&&(l=t.length),a.fmt=t.slice(s+1,l),s=l}if(a.text){var c=this.getVariableValue(e,a.text,r)+"";a.fmtString&&(c=this.tmStrFormat(c,a,e)),a.formatFunction&&(c=this.tmFormatFunction(c,a,e)),c&&!a.ifEnd?(i.push(c),n(a)):!c&&a.ifEnd&&n(a.ifEnd)}else a.elseEnd?n(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&i.push(a)}}else i.push(a),"\n"==a?(o=!0,r=""):o&&(r=/^\t*/.exec(a)[0],o=/\S/.test(a))}return i},t.prototype.getDisplayTextForSnippet=function(t,e){var n=g.call(this,t,e);return n.text},t.prototype.insertSnippetForSelection=function(t,e,n){void 0===n&&(n={});var i=g.call(this,t,e,n),r=t.getSelectionRange(),o=t.session.replace(r,i.text),s=new m(t),a=t.inVirtualSelectionMode&&t.selection.index;s.addTabstops(i.tabstops,r.start,o,a)},t.prototype.insertSnippet=function(t,e,n){void 0===n&&(n={});var i=this;if(t.inVirtualSelectionMode)return i.insertSnippetForSelection(t,e,n);t.forEachSelection((function(){i.insertSnippetForSelection(t,e,n)}),null,{keepOrder:!0}),t.tabstopManager&&t.tabstopManager.tabNext()},t.prototype.$getScope=function(t){var e=t.session.$mode.$id||"";if(e=e.split("/").pop(),"html"===e||"php"===e){"php"===e&&!t.session.$mode.inlinePhp&&(e="html");var n=t.getCursorPosition(),i=t.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?e="javascript":"css-"==i.substring(0,4)?e="css":"php-"==i.substring(0,4)&&(e="php"))}return e},t.prototype.getActiveScopes=function(t){var e=this.$getScope(t),n=[e],i=this.snippetMap;return i[e]&&i[e].includeScopes&&n.push.apply(n,i[e].includeScopes),n.push("_"),n},t.prototype.expandWithTab=function(t,e){var n=this,i=t.forEachSelection((function(){return n.expandSnippetForSelection(t,e)}),null,{keepOrder:!0});return i&&t.tabstopManager&&t.tabstopManager.tabNext(),i},t.prototype.expandSnippetForSelection=function(t,e){var n,i=t.getCursorPosition(),r=t.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(t).some((function(t){var e=a[t];return e&&(n=this.findMatchingSnippet(e,o,s)),!!n}),this),!!n&&(e&&e.dryRun||(t.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(t,n.content),this.variables.M__=this.variables.T__=null),!0)},t.prototype.findMatchingSnippet=function(t,e,n){for(var i=t.length;i--;){var r=t[i];if((!r.startRe||r.startRe.test(e))&&((!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe)))return r.matchBefore=r.startRe?r.startRe.exec(e):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(e)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},t.prototype.register=function(t,e){function n(t){return t&&!/^\^?\(.*\)\$?$|^\\b$/.test(t)&&(t="(?:"+t+")"),t||""}function i(t,e,i){return t=n(t),e=n(e),i?(t=e+t,t&&"$"!=t[t.length-1]&&(t+="$")):(t+=e,t&&"^"!=t[0]&&(t="^"+t)),new RegExp(t)}function r(t){t.scope||(t.scope=e||"_"),e=t.scope,o[e]||(o[e]=[],s[e]={});var n=s[e];if(t.name){var r=n[t.name];r&&l.unregister(r),n[t.name]=t}o[e].push(t),t.prefix&&(t.tabTrigger=t.prefix),!t.content&&t.body&&(t.content=Array.isArray(t.body)?t.body.join("\n"):t.body),t.tabTrigger&&!t.trigger&&(!t.guard&&/^\w/.test(t.tabTrigger)&&(t.guard="\\b"),t.trigger=a.escapeRegExp(t.tabTrigger)),(t.trigger||t.guard||t.endTrigger||t.endGuard)&&(t.startRe=i(t.trigger,t.guard,!0),t.triggerRe=new RegExp(t.trigger),t.endRe=i(t.endTrigger,t.endGuard,!0),t.endTriggerRe=new RegExp(t.endTrigger))}var o=this.snippetMap,s=this.snippetNameMap,l=this;t||(t=[]),Array.isArray(t)?t.forEach(r):Object.keys(t).forEach((function(e){r(t[e])})),this._signal("registerSnippets",{scope:e})},t.prototype.unregister=function(t,e){function n(t){var n=r[t.scope||e];if(n&&n[t.name]){delete n[t.name];var o=i[t.scope||e],s=o&&o.indexOf(t);s>=0&&o.splice(s,1)}}var i=this.snippetMap,r=this.snippetNameMap;t.content?n(t):Array.isArray(t)&&t.forEach(n)},t.prototype.parseSnippetFile=function(t){t=t.replace(/\r/g,"");var e,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(e=r.exec(t)){if(e[1])try{i=JSON.parse(e[1]),n.push(i)}catch(s){}if(e[4])i.content=e[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=e[2],a=e[3];if("regex"==o){var l=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=l.exec(a)[1],i.trigger=l.exec(a)[1],i.endTrigger=l.exec(a)[1],i.endGuard=l.exec(a)[1]}else"snippet"==o?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):o&&(i[o]=a)}}return n},t.prototype.getSnippetByName=function(t,e){var n,i=this.snippetNameMap;return this.getActiveScopes(e).some((function(e){var r=i[e];return r&&(n=r[t]),!!n}),this),n},t}();o.implement(p.prototype,s);var g=function(t,e,n){function i(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if("object"==typeof i){if(u[i.tabstopId])continue;var r=t.lastIndexOf(i,n-1);i=e[r]||{tabstopId:i.tabstopId}}e[n]=i}return e}void 0===n&&(n={});var r=t.getCursorPosition(),o=t.session.getLine(r.row),s=t.session.getTabString(),a=o.match(/^\s*/)[0];r.column<a.length&&(a=a.slice(0,r.column)),e=e.replace(/\r/g,"");var l=this.tokenizeTmSnippet(e);l=this.resolveVariables(l,t),l=l.map((function(t){return"\n"!=t||n.excludeExtraIndent?"string"==typeof t?t.replace(/\t/g,s):t:t+a}));var c=[];l.forEach((function(t,e){if("object"==typeof t){var n=t.tabstopId,i=c[n];if(i||(i=c[n]=[],i.index=n,i.value="",i.parents={}),-1===i.indexOf(t)){t.choices&&!i.choices&&(i.choices=t.choices),i.push(t);var r=l.indexOf(t,e+1);if(-1!==r){var o=l.slice(e+1,r),s=o.some((function(t){return"object"==typeof t}));s&&!i.value?i.value=o:o.length&&(!i.value||"string"!=typeof i.value)&&(i.value=o.join(""))}}}})),c.forEach((function(t){t.length=0}));for(var u={},h=0;h<l.length;h++){var d=l[h];if("object"==typeof d){var f=d.tabstopId,p=c[f],g=l.indexOf(d,h+1);if(u[f])u[f]===d&&(delete u[f],Object.keys(u).forEach((function(t){p.parents[t]=!0})));else{u[f]=d;var m=p.value;"string"!=typeof m?m=i(m):d.fmt&&(m=this.tmStrFormat(m,d,t)),l.splice.apply(l,[h+1,Math.max(0,g-h)].concat(m,d)),-1===p.indexOf(d)&&p.push(d)}}}var v=0,y=0,w="";return l.forEach((function(t){if("string"==typeof t){var e=t.split("\n");e.length>1?(y=e[e.length-1].length,v+=e.length-1):y+=t.length,w+=t}else t&&(t.start?t.end={row:v,column:y}:t.start={row:v,column:y})})),{text:w,tabstops:c,tokens:l}},m=function(){function t(t){if(this.index=0,this.ranges=[],this.tabstops=[],t.tabstopManager)return t.tabstopManager;t.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)}return t.prototype.attach=function(t){this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.session=t.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},t.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},t.prototype.onChange=function(t){for(var e="r"==t.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=this.tabstops.slice(),o=0;o<r.length;o++){var s=r[o],a=s==n||i[s.index];if(s.rangeList.$bias=a?0:1,"remove"==t.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(t.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(t.end,l);u=u<0?-u-1:u-1;for(var h=s.rangeList.ranges.slice(c,u),d=0;d<h.length;d++)this.removeRange(h[d])}s.rangeList.$onChange(t)}var f=this.session;!this.$inChange&&e&&1==f.getLength()&&!f.getValue()&&this.detach()},t.prototype.updateLinkedFields=function(){var t=this.selectedTabstop;if(t&&t.hasLinkedRanges&&t.firstNonLinked){this.$inChange=!0;for(var n=this.session,i=n.getTextRange(t.firstNonLinked),r=0;r<t.length;r++){var o=t[r];if(o.linked){var s=o.original,a=e.snippetManager.tmStrFormat(i,s,this.editor);n.replace(o,a)}}this.$inChange=!1}},t.prototype.onAfterExec=function(t){t.command&&!t.command.readOnly&&this.updateLinkedFields()},t.prototype.onChangeSelection=function(){if(this.editor){for(var t=this.editor.selection.lead,e=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(t.row,t.column),o=n||this.ranges[i].contains(e.row,e.column);if(r&&o)return}this.detach()}},t.prototype.onChangeSession=function(){this.detach()},t.prototype.tabNext=function(t){var e=this.tabstops.length,n=this.index+(t||1);n=Math.min(Math.max(n,1),e),n==e&&(n=0),this.selectTabstop(n),0===n&&this.detach()},t.prototype.selectTabstop=function(t){this.$openTabstops=null;var e=this.tabstops[this.index];if(e&&this.addTabstopMarkers(e),this.index=t,e=this.tabstops[this.index],e&&e.length){this.selectedTabstop=e;var n=e.firstNonLinked||e;if(e.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var i=this.editor.multiSelect;i.toSingleRange(n);for(var r=0;r<e.length;r++)e.hasLinkedRanges&&e[r].linked||i.addRange(e[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},t.prototype.addTabstops=function(t,e,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!t[0]){var r=l.fromPoints(n,n);y(r.start,e),y(r.end,e),t[0]=[r],t[0].index=0}var o=this.index,s=[o+1,0],a=this.ranges;t.forEach((function(t,n){for(var r=this.$openTabstops[n]||t,o=0;o<t.length;o++){var u=t[o],h=l.fromPoints(u.start,u.end||u.start);v(h.start,e),v(h.end,e),h.original=u,h.tabstop=r,a.push(h),r!=t?r.unshift(h):r[o]=h,u.fmtString||r.firstNonLinked&&i?(h.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=h)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===t&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new c,r.rangeList.$bias=0,r.rangeList.addList(r)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},t.prototype.addTabstopMarkers=function(t){var e=this.session;t.forEach((function(t){t.markerId||(t.markerId=e.addMarker(t,"ace_snippet-marker","text"))}))},t.prototype.removeTabstopMarkers=function(t){var e=this.session;t.forEach((function(t){e.removeMarker(t.markerId),t.markerId=null}))},t.prototype.removeRange=function(t){var e=t.tabstop.indexOf(t);-1!=e&&t.tabstop.splice(e,1),e=this.ranges.indexOf(t),-1!=e&&this.ranges.splice(e,1),e=t.tabstop.rangeList.ranges.indexOf(t),-1!=e&&t.tabstop.splice(e,1),this.session.removeMarker(t.markerId),t.tabstop.length||(e=this.tabstops.indexOf(t.tabstop),-1!=e&&this.tabstops.splice(e,1),this.tabstops.length||this.detach())},t}();m.prototype.keyboardHandler=new u,m.prototype.keyboardHandler.bindKeys({Tab:function(t){e.snippetManager&&e.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}});var v=function(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row},y=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),e.snippetManager=new p;var w=t("./editor").Editor;(function(){this.insertSnippet=function(t,n){return e.snippetManager.insertSnippet(this,t,n)},this.expandSnippet=function(t){return e.snippetManager.expandWithTab(this,t)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../virtual_renderer").VirtualRenderer,r=t("../editor").Editor,o=t("../range").Range,s=t("../lib/event"),a=t("../lib/lang"),l=t("../lib/dom"),c=t("../config").nls,u=t("./../lib/useragent"),h=function(t){return"suggest-aria-id:".concat(t)},d=u.isSafari?"menu":"listbox",f=u.isSafari?"menuitem":"option",p=u.isSafari?"aria-current":"aria-selected",g=function(t){var e=new i(t);e.$maxLines=4;var n=new r(e);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(){function t(t){var e=l.createElement("div"),n=g(e);t&&t.appendChild(e),e.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",d),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(t){var e=t.getDocumentPosition();n.selection.moveToPosition(e),m.start.row=m.end.row=e.row,t.stop()}));var r,u=new o(-1,0,-1,1/0),m=new o(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(t){t?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(t){if(r){if(r.x!=t.x||r.y!=t.y){r=t,r.scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var e=r.getDocumentPosition().row;u.start.row!=e&&(u.id||n.setRow(e),y(e))}}else r=t})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var t=r.getDocumentPosition().row;u.id||n.setRow(t),y(t,!0)}})),n.renderer.on("afterRender",(function(){var t=n.getRow(),e=n.renderer.$textLayer,i=e.element.childNodes[t-e.config.firstRow],r=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute(p),n.selectedNode.removeAttribute("id")),n.selectedNode=i,i){l.addCssClass(i,"ace_selected");var o=h(t);i.id=o,e.element.setAttribute("aria-activedescendant",o),r.setAttribute("aria-activedescendant",o),i.setAttribute("role",f),i.setAttribute("aria-roledescription",c("item")),i.setAttribute("aria-label",n.getData(t).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",t+1),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute(p,"true")}}));var v=function(){y(-1)},y=function(t,e){t!==u.start.row&&(u.start.row=u.end.row=t,e||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,v()})),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(t){var e=n.data[t];return"string"==typeof e?e:e&&e.value||""};var w=n.session.bgTokenizer;return w.$tokenizeRow=function(t){function e(t,e){t&&r.push({type:(i.className||"")+(e||""),value:t})}var i=n.data[t],r=[];if(!i)return r;"string"==typeof i&&(i={value:i});for(var o=i.caption||i.value||i.name,s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(i.matchMask&1<<u||u==a.length)){var h=a.slice(c,u);c=u;var d=s.indexOf(h,l);if(-1==d)continue;e(o.slice(l,d),""),l=d+h.length,e(o.slice(d,l),"completion-highlight")}return e(o.slice(l,o.length),""),r.push({type:"completion-spacer",value:" "}),i.meta&&r.push({type:"completion-meta",value:i.meta}),i.message&&r.push({type:"completion-message",value:i.message}),r},w.$updateOnChange=i,w.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(t,e){n.filterText=e||"",n.setValue(a.stringRepeat("\n",t.length),-1),n.data=t||[],n.setRow(0)},n.getData=function(t){return n.data[t]},n.getRow=function(){return m.start.row},n.setRow=function(t){t=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,t)),m.start.row!=t&&(n.selection.clearSelection(),m.start.row=m.end.row=t||0,n.session._emit("changeBackMarker"),n.moveCursorTo(t||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(t,e,i,o){if(!o&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===t.top&&n.anchorPos.left===t.left&&n.anchor===i)return!0;var s=this.container,a=window.innerHeight,l=window.innerWidth,c=this.renderer,u=c.$maxLines*e*1.4,h={top:0,bottom:0,left:0},d=a-t.top-3*this.$borderSize-e,f=t.top-3*this.$borderSize;i||(i=f<=d||d>=u?"bottom":"top"),"top"===i?(h.bottom=t.top-this.$borderSize,h.top=h.bottom-u):"bottom"===i&&(h.top=t.top+e+this.$borderSize,h.bottom=h.top+u);var p=h.top>=0&&h.bottom<=a;if(!o&&!p)return!1;c.$maxPixelHeight=p?null:"top"===i?f:d,"top"===i?(s.style.top="",s.style.bottom=a-h.bottom+"px",n.isTopdown=!1):(s.style.top=h.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var g=t.left;return g+s.offsetWidth>l&&(g=l-s.offsetWidth),s.style.left=g+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),r=null),n.anchorPos=t,n.anchor=i,!0},n.show=function(t,e,n){this.tryShow(t,e,n?"bottom":void 0,!0)},n.goTo=function(t){var e=this.getRow(),n=this.session.getLength()-1;switch(t){case"up":e=e<=0?n:e-1;break;case"down":e=e>=n?-1:e+1;break;case"start":e=0;break;case"end":e=n}this.setRow(e)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return t}();l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),e.AcePopup=m,e.$singleLineEditor=g,e.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(t,e,n){"use strict";var i=function(){function t(t){this.editor=t,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return t.prototype.setScreenReaderContent=function(t){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var t=this.popup.getRow(),e=this.popup.renderer.$textLayer,n=e.element.childNodes[t-e.config.firstRow];if(n){for(var i="doc-tooltip ",r=0;r<this._lines.length;r++)i+="ace-inline-screenreader-line-".concat(r," ");n.setAttribute("aria-describedby",i)}}.bind(this)));while(this.screenReaderDiv.firstChild)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=t.split(/\r\n|\r|\n/);var e=this.createCodeBlock();this.screenReaderDiv.appendChild(e)},t.prototype.destroy=function(){this.screenReaderDiv.remove()},t.prototype.createCodeBlock=function(){var t=document.createElement("pre");t.setAttribute("id","ace-inline-screenreader");for(var e=0;e<this._lines.length;e++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(e));var i=document.createTextNode(this._lines[e]);n.appendChild(i),t.appendChild(n)}return t},t}();e.AceInlineScreenReader=i})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],(function(t,e,n){"use strict";var i=t("../snippets").snippetManager,r=t("./inline_screenreader").AceInlineScreenReader,o=function(){function t(){this.editor=null}return t.prototype.show=function(t,e,n){if(n=n||"",t&&this.editor&&this.editor!==t&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!t||!e)return!1;this.inlineScreenReader||(this.inlineScreenReader=new r(t));var o=e.snippet?i.getDisplayTextForSnippet(t,e.snippet):e.value;return!(e.hideInlinePreview||!o||!o.startsWith(n))&&(this.editor=t,this.inlineScreenReader.setScreenReaderContent(o),o=o.slice(n.length),""===o?t.removeGhostText():t.setGhostText(o),!0)},t.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},t.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},t.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},t}();e.AceInline=o})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(t,e,n){"use strict";e.parForEach=function(t,e,n){var i=0,r=t.length;0===r&&n();for(var o=0;o<r;o++)e(t[o],(function(t,e){i++,i===r&&n(t,e)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;e.retrievePrecedingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e-1;o>=0;o--){if(!n.test(t[o]))break;r.push(t[o])}return r.reverse().join("")},e.retrieveFollowingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e;o<t.length;o++){if(!n.test(t[o]))break;r.push(t[o])}return r},e.getCompletionPrefix=function(t){var e,n=t.getCursorPosition(),i=t.session.getLine(n.row);return t.completers.forEach(function(t){t.identifierRegexps&&t.identifierRegexps.forEach(function(t){!e&&t&&(e=this.retrievePrecedingIdentifier(i,n.column,t))}.bind(this))}.bind(this)),e||this.retrievePrecedingIdentifier(i,n.column)},e.triggerAutocomplete=function(t){var e=t.getCursorPosition(),n=t.session.getLine(e.row),i=0===e.column?0:e.column-1,r=n[i];return t.completers.some((function(t){if(t.triggerCharacters&&Array.isArray(t.triggerCharacters))return t.triggerCharacters.includes(r)}))}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],(function(t,e,n){"use strict";var i=t("./keyboard/hash_handler").HashHandler,r=t("./autocomplete/popup").AcePopup,o=t("./autocomplete/inline").AceInline,s=t("./autocomplete/popup").getAriaId,a=t("./autocomplete/util"),l=t("./lib/lang"),c=t("./lib/dom"),u=t("./snippets").snippetManager,h=t("./config"),d=t("./lib/event"),f=t("./lib/scroll").preventParentScroll,p=function(t,e){e.completer&&e.completer.destroy()},g=function(){function t(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var e=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!e||0===this.editor.completers.length||(this.completions=new v(t.completionsForLoading),this.openPopup(this.editor,e.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(t,"completionsForLoading",{get:function(){return[{caption:h.nls("Loading..."),value:""}]},enumerable:!1,configurable:!0}),t.prototype.$init=function(){return this.popup=new r(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(t){this.insertMatch(),t.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),d.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},t.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new o,this.inlineRenderer},t.prototype.getPopup=function(){return this.popup||this.$init()},t.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},t.prototype.$seen=function(t){!this.hasSeen.has(t)&&t&&t.completer&&t.completer.onSeen&&"function"==typeof t.completer.onSeen&&(t.completer.onSeen(this.editor,t),this.hasSeen.add(t))},t.prototype.$onPopupChange=function(t){if(this.inlineRenderer&&this.inlineEnabled){var e=t?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(e),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},t.prototype.$updateGhostText=function(t){var e=this.base.row,n=this.base.column,i=this.editor.getCursorPosition().column,r=this.editor.session.getLine(e).slice(n,i);this.inlineRenderer.show(this.editor,t,r)?this.$seen(t):this.inlineRenderer.hide()},t.prototype.$onPopupRender=function(){var t=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var e=this.popup.getFirstVisibleRow();e<=this.popup.getLastVisibleRow();e++){var n=this.popup.getData(e);n&&(!t||n.hideInlinePreview)&&this.$seen(n)}},t.prototype.$onPopupShow=function(t){this.$onPopupChange(t),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},t.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var t=this.editor.container.parentNode,e=[];while(t)e.push(t),t.addEventListener("scroll",this.onLayoutChange,{passive:!0}),t=t.parentNode;this.$elements=e}},t.prototype.unObserveLayoutChanges=function(){var t=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(e){e.removeEventListener("scroll",t.onLayoutChange,{passive:!0})})),this.$elements=null},t.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},t.prototype.$updatePopupPosition=function(){var t=this.editor,e=t.renderer,n=e.layerConfig.lineHeight,i=e.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var r=t.container.getBoundingClientRect();i.top+=r.top-e.layerConfig.offset,i.left+=r.left-t.renderer.scrollLeft,i.left+=e.gutterWidth;var o={top:i.top,left:i.left};e.$ghostText&&e.$ghostTextWidget&&this.base.row===e.$ghostText.position.row&&(o.top+=e.$ghostTextWidget.el.offsetHeight);var s=t.container.getBoundingClientRect().bottom-n,a=s<o.top?{top:s,left:o.left}:o;this.popup.tryShow(a,n,"bottom")||this.popup.tryShow(i,n,"top")||this.popup.show(i,n)},t.prototype.openPopup=function(t,e,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var i,r=this.popup.getRow(),o=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),t.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(i=this.popup.data.indexOf(o)),i&&-1!==i||(i=0),this.popup.setRow(this.autoSelect?i:-1),i===r&&o!==this.completions.filtered[i]&&this.$onPopupChange();var a=this.inlineRenderer&&this.inlineEnabled;if(i===r&&a){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n?n&&!e&&this.detach():(this.popup.setTheme(t.getTheme()),this.popup.setFontSize(t.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},t.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},t.prototype.changeListener=function(t){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},t.prototype.blurListener=function(t){var e=document.activeElement,n=this.editor.textInput.getElement(),i=t.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(t.relatedTarget),r=this.popup&&this.popup.container;e!=n&&e.parentNode!=r&&!i&&e!=this.tooltipNode&&t.relatedTarget!=n&&this.detach()},t.prototype.mousedownListener=function(t){this.detach()},t.prototype.mousewheelListener=function(t){this.popup.isMouseOver||this.detach()},t.prototype.mouseOutListener=function(t){this.popup.isOpen&&this.$updatePopupPosition()},t.prototype.goTo=function(t){this.popup.goTo(t)},t.prototype.insertMatch=function(t,e){if(t||(t=this.popup.getData(this.popup.getRow())),!t)return!1;if(""===t.value)return this.detach();var n=this.completions,i=this.getCompletionProvider().insertMatch(this.editor,t,n.filterText,e);return this.completions==n&&this.detach(),i},t.prototype.showPopup=function(t,e){this.editor&&this.detach(),this.activated=!0,this.editor=t,t.completer!=this&&(t.completer&&t.completer.detach(),t.completer=this),t.on("changeSelection",this.changeListener),t.on("blur",this.blurListener),t.on("mousedown",this.mousedownListener),t.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,e)},t.prototype.getCompletionProvider=function(t){return this.completionProvider||(this.completionProvider=new m(t)),this.completionProvider},t.prototype.gatherCompletions=function(t,e){return this.getCompletionProvider().gatherCompletions(t,e)},t.prototype.updateCompletions=function(e,n){if(e&&this.base&&this.completions){var i=this.editor.getCursorPosition(),r=this.editor.session.getTextRange({start:this.base,end:i});if(r==this.completions.filterText)return;return this.completions.setFilter(r),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=r||this.completions.filtered[0].snippet?void this.openPopup(this.editor,r,e):this.detach():this.detach()}if(n&&n.matches){i=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(i.row,i.column),this.base.$insertRight=!0,this.completions=new v(n.matches),this.openPopup(this.editor,"",e)}var o=this.editor.getSession();i=this.editor.getCursorPosition(),r=a.getCompletionPrefix(this.editor);this.base=o.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var s={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:r,pos:i}).provideCompletions(this.editor,s,function(n,i,r){var o=i.filtered,s=a.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),r){if(!o.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(s)),l){var c=[{caption:l,value:""}];return this.completions=new v(c),this.openPopup(this.editor,s,e),void this.popup.renderer.setStyle("ace_loading",!1)}return this.detach()}if(1==o.length&&o[0].value==s&&!o[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==o.length)return this.insertMatch(o[0])}this.completions=!r&&this.showLoadingState?new v(t.completionsForLoading.concat(o),i.filterText):i,this.openPopup(this.editor,s,e),this.popup.renderer.setStyle("ace_loading",!r)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},t.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},t.prototype.updateDocTooltip=function(){var t=this.popup,e=this.completions.filtered,n=e&&(e[t.getHoveredRow()]||e[t.getRow()]),i=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var r=this.editor.completers.length,o=0;o<r;o++){var s=this.editor.completers[o];if(s.getDocTooltip&&n.completerId===s.id){i=s.getDocTooltip(n);break}}if(!i&&"string"!=typeof n&&(i=n),"string"==typeof i&&(i={docText:i}),!i||!i.docHTML&&!i.docText)return this.hideDocTooltip();this.showDocTooltip(i)},t.prototype.showDocTooltip=function(t){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",f));var e=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(e.isDark?"ace_dark ":"")+(e.cssClass||"");var n=this.tooltipNode;t.docHTML?n.innerHTML=t.docHTML:t.docText&&(n.textContent=t.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var i=this.popup,r=i.container.getBoundingClientRect();n.style.top=i.container.style.top,n.style.bottom=i.container.style.bottom,n.style.display="block",window.innerWidth-r.right<320?r.left<320?i.isTopdown?(n.style.top=r.bottom+"px",n.style.left=r.left+"px",n.style.right="",n.style.bottom=""):(n.style.top=i.container.offsetTop-n.offsetHeight+"px",n.style.left=r.left+"px",n.style.right="",n.style.bottom=""):(n.style.right=window.innerWidth-r.left+"px",n.style.left=""):(n.style.left=r.right+1+"px",n.style.right="")},t.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var t=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==t&&this.editor.focus(),this.tooltipNode=null,t.parentNode&&t.parentNode.removeChild(t)}},t.prototype.onTooltipClick=function(t){var e=t.target;while(e&&e!=this.tooltipNode){if("A"==e.nodeName&&e.href){e.rel="noreferrer",e.target="_blank";break}e=e.parentNode}},t.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var t=this.popup.container;t&&t.parentNode&&t.parentNode.removeChild(t)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},t}();g.prototype.commands={Up:function(t){t.completer.goTo("up")},Down:function(t){t.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(t){t.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(t){t.completer.goTo("end")},Esc:function(t){t.completer.detach()},Return:function(t){return t.completer.insertMatch()},"Shift-Return":function(t){t.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(t){var e=t.completer.insertMatch();if(e||t.tabstopManager)return e;t.completer.goTo("down")},PageUp:function(t){t.completer.popup.gotoPageUp()},PageDown:function(t){t.completer.popup.gotoPageDown()}},g.for=function(t){return t.completer instanceof g||(t.completer&&(t.completer.destroy(),t.completer=null),h.get("sharedPopups")?(g.$sharedInstance||(g.$sharedInstance=new g),t.completer=g.$sharedInstance):(t.completer=new g,t.once("destroy",p))),t.completer},g.startCommand={name:"startAutocomplete",exec:function(t,e){var n=g.for(t);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(t,e),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var m=function(){function t(t){this.initialPosition=t,this.active=!0}return t.prototype.insertByIndex=function(t,e,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(t,this.completions.filtered[e],n)},t.prototype.insertMatch=function(t,e,n){if(!e)return!1;if(t.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(t,e);else{if(!this.completions)return!1;var i=this.completions.filterText.length,r=0;if(e.range&&e.range.start.row===e.range.end.row&&(i-=this.initialPosition.prefix.length,i+=this.initialPosition.pos.column-e.range.start.column,r+=e.range.end.column-this.initialPosition.pos.column),i||r){var o;o=t.selection.getAllRanges?t.selection.getAllRanges():[t.getSelectionRange()];for(var s,a=0;s=o[a];a++)s.start.column-=i,s.end.column+=r,t.session.remove(s)}e.snippet?u.insertSnippet(t,e.snippet):this.$insertString(t,e),e.completer&&e.completer.onInsert&&"function"==typeof e.completer.onInsert&&e.completer.onInsert(t,e),e.command&&"startAutocomplete"===e.command&&t.execCommand(e.command)}return t.endOperation(),!0},t.prototype.$insertString=function(t,e){var n=e.value||e;t.execCommand("insertstring",n)},t.prototype.gatherCompletions=function(t,e){var n=t.getSession(),i=t.getCursorPosition(),r=a.getCompletionPrefix(t),o=[];this.completers=t.completers;var s=t.completers.length;return t.completers.forEach((function(l,c){l.getCompletions(t,n,i,r,(function(n,i){l.hideInlinePreview&&(i=i.map((function(t){return Object.assign(t,{hideInlinePreview:l.hideInlinePreview})}))),!n&&i&&(o=o.concat(i)),e(null,{prefix:a.getCompletionPrefix(t),matches:o,finished:0===--s})}))})),!0},t.prototype.provideCompletions=function(t,e,n){var i=function(t){var i=t.prefix,r=t.matches;this.completions=new v(r),e.exactMatch&&(this.completions.exactMatch=!0),e.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(i),(t.finished||this.completions.filtered.length)&&n(null,this.completions,t.finished)}.bind(this),r=!0,o=null;if(this.gatherCompletions(t,function(t,e){if(this.active){t&&(n(t,[],!0),this.detach());var s=e.prefix;0===s.indexOf(e.prefix)&&(r?o=e:i(e))}}.bind(this)),r=!1,o){var s=o;o=null,i(s)}},t.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(t){"function"==typeof t.cancel&&t.cancel()}))},t}(),v=function(){function t(t,e){this.all=t,this.filtered=t,this.filterText=e||"",this.exactMatch=!1,this.ignoreCaption=!1}return t.prototype.setFilter=function(t){if(t.length>this.filterText&&0===t.lastIndexOf(this.filterText,0))var e=this.filtered;else e=this.all;this.filterText=t,e=this.filterCompletions(e,this.filterText),e=e.sort((function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)}));var n=null;e=e.filter((function(t){var e=t.snippet||t.caption||t.value;return e!==n&&(n=e,!0)})),this.filtered=e},t.prototype.filterCompletions=function(t,e){var n=[],i=e.toUpperCase(),r=e.toLowerCase();t:for(var o,s=0;o=t[s];s++){var a=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(a){var l,c,u=-1,h=0,d=0;if(this.exactMatch){if(e!==a.substr(0,e.length))continue t}else{var f=a.toLowerCase().indexOf(r);if(f>-1)d=f;else for(var p=0;p<e.length;p++){var g=a.indexOf(r[p],u+1),m=a.indexOf(i[p],u+1);if(l=g>=0&&(m<0||g<m)?g:m,l<0)continue t;c=l-u-1,c>0&&(-1===u&&(d+=10),d+=c,h|=1<<p),u=l}}o.matchMask=h,o.exactMatch=d?0:1,o.$score=(o.score||0)-d,n.push(o)}}return n},t}();e.Autocomplete=g,e.CompletionProvider=m,e.FilteredList=v})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(t,e,n){function i(t,e){var n=t.getTextRange(o.fromPoints({row:0,column:0},e));return n.split(s).length-1}function r(t,e){var n=i(t,e),r=t.getValue().split(s),o=Object.create(null),a=r[n];return r.forEach((function(t,e){if(t&&t!==a){var i=Math.abs(n-e),s=r.length-i;o[t]?o[t]=Math.max(s,o[t]):o[t]=s}})),o}var o=t("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;e.getCompletions=function(t,e,n,i,o){var s=r(e,n),a=Object.keys(s);o(null,a.map((function(t){return{caption:t,value:t,score:s[t],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(t,e,n){"use strict";var i=t("../snippets").snippetManager,r=t("../autocomplete").Autocomplete,o=t("../config"),s=t("../lib/lang"),a=t("../autocomplete/util"),l=t("../autocomplete/text_completer"),c={getCompletions:function(t,e,n,i,r){if(e.$mode.completer)return e.$mode.completer.getCompletions(t,e,n,i,r);var o=t.session.getState(n.row),s=e.$mode.getCompletions(o,e,n,i);s=s.map((function(t){return t.completerId=c.id,t})),r(null,s)},id:"keywordCompleter"},u=function(t){var e={};return t.replace(/\${(\d+)(:(.*?))?}/g,(function(t,n,i,r){return e[n]=r||""})).replace(/\$(\d+?)/g,(function(t,n){return e[n]}))},h={getCompletions:function(t,e,n,r,o){var s=[],a=e.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=i.getActiveScopes(t);var l=i.snippetMap,c=[];s.forEach((function(t){for(var e=l[t]||[],n=e.length;n--;){var i=e[n],r=i.name||i.tabTrigger;r&&c.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",completerId:h.id})}}),this),o(null,c)},getDocTooltip:function(t){t.snippet&&!t.docHTML&&(t.docHTML=["<b>",s.escapeHTML(t.caption),"</b>","<hr></hr>",s.escapeHTML(u(t.snippet))].join(""))},id:"snippetCompleter"},d=[h,l,c];e.setCompleters=function(t){d.length=0,t&&d.push.apply(d,t)},e.addCompleter=function(t){d.push(t)},e.textCompleter=l,e.keyWordCompleter=c,e.snippetCompleter=h;var f,p={name:"expandSnippet",exec:function(t){return i.expandWithTab(t)},bindKey:"Tab"},g=function(t,e){m(e.session.$mode)},m=function(t){"string"==typeof t&&(t=o.$modes[t]),t&&(i.files||(i.files={}),v(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(m))},v=function(t,e){e&&t&&!i.files[t]&&(i.files[t]={},o.loadModule(e,(function(e){e&&(i.files[t]=e,!e.snippets&&e.snippetText&&(e.snippets=i.parseSnippetFile(e.snippetText)),i.register(e.snippets||[],e.scope),e.includeScopes&&(i.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach((function(t){m("ace/mode/"+t)}))))})))},y=function(t){var e=t.editor,n=e.completer&&e.completer.activated;if("backspace"===t.command.name)n&&!a.getCompletionPrefix(e)&&e.completer.detach();else if("insertstring"===t.command.name&&!n){f=t;var i=t.editor.$liveAutocompletionDelay;i?w.delay(i):b(t)}},w=s.delayedCall((function(){b(f)}),0),b=function(t){var e=t.editor,n=a.getCompletionPrefix(e),i=a.triggerAutocomplete(e);if(n&&n.length>=e.$liveAutocompletionThreshold||i){var o=r.for(e);o.autoShown=!0,o.showPopup(e)}},_=t("../editor").Editor;t("../config").defineOptions(_.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:d),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(t){t?(this.commands.addCommand(p),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(p),this.off("changeMode",g))},value:!1}})})),function(){ace.require(["ace/ext/language_tools"],(function(e){t&&(t.exports=e)}))}()},9946:(t,e,n)=>{t=n.nmd(t),ace.define("ace/ext/searchbox-css",["require","exports","module"],(function(t,e,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: "";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}'})),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/lang"),o=t("../lib/event"),s=t("./searchbox-css"),a=t("../keyboard/hash_handler").HashHandler,l=t("../lib/keys"),c=t("../config").nls,u=999;i.importCssString(s,"ace_searchbox",!1);var h=function(){function t(t,e,n){this.activeInput;var r=i.createElement("div");i.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("Search In Selection")},"S"]]],r),this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(t),i.importCssString(s,"ace_searchbox",t.container)}return t.prototype.setEditor=function(t){t.searchBox=this,t.renderer.scroller.appendChild(this.element),this.editor=t},t.prototype.setSession=function(t){this.searchRange=null,this.$syncOptions(!0)},t.prototype.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOption=t.querySelector("[action=searchInSelection]"),this.replaceOption=t.querySelector("[action=toggleReplace]"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=t.querySelector(".ace_search_counter")},t.prototype.$init=function(){var t=this.element;this.$initElements(t);var e=this;o.addListener(t,"mousedown",(function(t){setTimeout((function(){e.activeInput.focus()}),0),o.stopPropagation(t)})),o.addListener(t,"click",(function(t){var n=t.target||t.srcElement,i=n.getAttribute("action");i&&e[i]?e[i]():e.$searchBarKb.commands[i]&&e.$searchBarKb.commands[i].exec(e),o.stopPropagation(t)})),o.addCommandKeyListener(t,(function(t,n,i){var r=l.keyCodeToString(i),s=e.$searchBarKb.findKeyCommand(n,r);s&&s.exec&&(s.exec(e),o.stopEvent(t))})),this.$onChange=r.delayedCall((function(){e.find(!1,!1)})),o.addListener(this.searchInput,"input",(function(){e.$onChange.schedule(20)})),o.addListener(this.searchInput,"focus",(function(){e.activeInput=e.searchInput,e.searchInput.value&&e.highlight()})),o.addListener(this.replaceInput,"focus",(function(){e.activeInput=e.replaceInput,e.searchInput.value&&e.highlight()}))},t.prototype.setSearchRange=function(t){this.searchRange=t,t?this.searchRangeMarker=this.editor.session.addMarker(t,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},t.prototype.$syncOptions=function(t){i.setCssClass(this.replaceOption,"checked",this.searchRange),i.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var e=this.editor.getReadOnly();this.replaceOption.style.display=e?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!e?"":"none",this.find(!1,!1,t)},t.prototype.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},t.prototype.find=function(t,e,n){var r=this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:e,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange}),o=!r&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",o),this.editor._emit("findSearchBox",{match:!o}),this.highlight(),this.updateCounter()},t.prototype.updateCounter=function(){var t=this.editor,e=t.$search.$options.re,n=e.unicode,i=0,o=0;if(e){var s=this.searchRange?t.session.getTextRange(this.searchRange):t.getValue(),a=t.session.doc.positionToIndex(t.selection.anchor);this.searchRange&&(a-=t.session.doc.positionToIndex(this.searchRange.start));var l,h=e.lastIndex=0;while(l=e.exec(s)){if(i++,h=l.index,h<=a&&o++,i>u)break;if(!l[0]&&(e.lastIndex=h+=r.skipEmptyMatch(s,h,n),h>=s.length))break}}this.searchCounter.textContent=c("$0 of $1",[o,i>u?u+"+":i])},t.prototype.findNext=function(){this.find(!0,!1)},t.prototype.findPrev=function(){this.find(!0,!0)},t.prototype.findAll=function(){var t=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),e=!t&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},t.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},t.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},t.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},t.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},t.prototype.show=function(t,e){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=e,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},t.prototype.isFocused=function(){var t=document.activeElement;return t==this.searchInput||t==this.replaceInput},t}(),d=new a;d.bindKeys({"Ctrl-f|Command-f":function(t){var e=t.isReplace=!t.isReplace;t.replaceBox.style.display=e?"":"none",t.replaceOption.checked=!1,t.$syncOptions(),t.searchInput.focus()},"Ctrl-H|Command-Option-F":function(t){t.editor.getReadOnly()||(t.replaceOption.checked=!0,t.$syncOptions(),t.replaceInput.focus())},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout((function(){t.hide()}))},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},"Alt-Return":function(t){t.activeInput==t.replaceInput&&t.replaceAll(),t.findAll()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),d.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}},{name:"toggleReplace",exec:function(t){t.replaceOption.checked=!t.replaceOption.checked,t.$syncOptions()}},{name:"searchInSelection",exec:function(t){t.searchOption.checked=!t.searchRange,t.setSearchRange(t.searchOption.checked&&t.editor.getSelectionRange()),t.$syncOptions()}}]);var f=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]);h.prototype.$searchBarKb=d,h.prototype.$closeSearchBarKb=f,e.SearchBox=h,e.Search=function(t,e){var n=t.searchBox||new h(t);n.show(t.session.getTextRange(),e)}})),function(){ace.require(["ace/ext/searchbox"],(function(e){t&&(t.exports=e)}))}()},1136:(t,e,n)=>{t=n.nmd(t),function(){ace.require(["ace/mode/text"],(function(e){t&&(t.exports=e)}))}()},5617:(t,e,n)=>{t=n.nmd(t),ace.define("ace/theme/twilight-css",["require","exports","module"],(function(t,e,n){n.exports=".ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],(function(t,e,n){e.isDark=!0,e.cssClass="ace-twilight",e.cssText=t("./twilight-css");var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass,!1)})),function(){ace.require(["ace/theme/twilight"],(function(e){t&&(t.exports=e)}))}()},1841:(t,e,n)=>{t=n.nmd(t),function(){var t="ace",e=function(){return this}();if(e||"undefined"==typeof window||(e=window),t||"undefined"===typeof requirejs){var n=function(t,e,i){"string"===typeof t?(2==arguments.length&&(i=e),n.modules[t]||(n.payloads[t]=i,n.modules[t]=null)):n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};n.modules={},n.payloads={};var i=function(t,e,n){if("string"===typeof e){var i=s(t,e);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var o=[],a=0,l=e.length;a<l;++a){var c=s(t,e[a]);if(void 0==c&&r.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},r=function(t,e){var n=i("",t,e);return void 0==n&&r.original?r.original.apply(this,arguments):n},o=function(t,e){if(-1!==e.indexOf("!")){var n=e.split("!");return o(t,n[0])+"!"+o(t,n[1])}if("."==e.charAt(0)){var i=t.split("/").slice(0,-1).join("/");e=i+"/"+e;while(-1!==e.indexOf(".")&&r!=e){var r=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return e},s=function(t,e){e=o(t,e);var r=n.modules[e];if(!r){if(r=n.payloads[e],"function"===typeof r){var s={},a={id:e,uri:"",exports:s,packaged:!0},l=function(t,n){return i(e,t,n)},c=r(l,s,a);s=c||a.exports,n.modules[e]=s,delete n.payloads[e]}r=n.modules[e]=s||r}return r};a(t)}function a(t){var i=e;t&&(e[t]||(e[t]={}),i=e[t]),i.define&&i.define.packaged||(n.original=i.define,i.define=n,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(t,e,n){function i(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(t,e){return e=e||0,this.lastIndexOf(t,e)===e})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(t,e){var n=this;(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e})),String.prototype.repeat||i(String.prototype,"repeat",(function(t){var e="",n=this;while(t>0)1&t&&(e+=n),(t>>=1)&&(n+=n);return e})),String.prototype.includes||i(String.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Object.assign||(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];void 0!==i&&null!==i&&Object.keys(i).forEach((function(t){e[t]=i[t]}))}return e}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(e){return t[e]}))}),Array.prototype.find||i(Array.prototype,"find",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return r}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Array.prototype.fill||i(Array.prototype,"fill",(function(t){var e=this,n=e.length>>>0,i=arguments[1],r=i|0,o=r<0?Math.max(n+r,0):Math.min(r,n),s=arguments[2],a=void 0===s?n:s|0,l=a<0?Math.max(n+a,0):Math.min(a,n);while(o<l)e[o]=t,o++;return e})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(t,e,n){"use strict";t("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(t,e,n){e.deepCopy=function t(e){if("object"!==typeof e||!e)return e;var n;if(Array.isArray(e)){n=[];for(var i=0;i<e.length;i++)n[i]=t(e[i]);return n}if("[object Object]"!==Object.prototype.toString.call(e))return e;for(var i in n={},e)n[i]=t(e[i]);return n}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(t,e,n){"use strict";e.last=function(t){return t[t.length-1]},e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){var n="";while(e>0)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&"object"==typeof t[n]?e[n]=this.copyObject(t[n]):e[n]=t[n];return e},e.deepCopy=t("./deep_copy").deepCopy,e.arrayToMap=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var n in t)e[n]=t[n];return e},e.arrayRemove=function(t,e){for(var n=0;n<=t.length;n++)e===t[n]&&t.splice(n,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return(""+t).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},e.getMatchOffsets=function(t,e){var n=[];return t.replace(e,(function(t){n.push({offset:arguments[arguments.length-2],length:t.length})})),n},e.deferredCall=function(t){var e=null,n=function(){e=null,t()},i=function(t){return i.cancel(),e=setTimeout(n,t||0),i};return i.schedule=i,i.call=function(){return this.cancel(),t(),i},i.cancel=function(){return clearTimeout(e),e=null,i},i.isPending=function(){return e},i},e.delayedCall=function(t,e){var n=null,i=function(){n=null,t()},r=function(t){null==n&&(n=setTimeout(i,t||e))};return r.delay=function(t){n&&clearTimeout(n),n=setTimeout(i,t||e)},r.schedule=r,r.call=function(){this.cancel(),t()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r},e.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(t){return!1}return!0},e.skipEmptyMatch=function(t,e,n){return n&&t.codePointAt(e)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,e,n){"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 i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",s=i.appName||"";e.isWin="win"==r,e.isMac="mac"==r,e.isLinux="linux"==r,e.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=o.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window["opera"]),e.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,e.isSafari=parseFloat(o.split(" Safari/")[1])&&!e.isChrome||void 0,e.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,e.isAIR=o.indexOf("AdobeAIR")>=0,e.isAndroid=o.indexOf("Android")>=0,e.isChromeOS=o.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(o)&&!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,n){"use strict";var i,r=t("./useragent"),o="http://www.w3.org/1999/xhtml";e.buildDom=function t(e,n,i){if("string"==typeof e&&e){var r=document.createTextNode(e);return n&&n.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if("string"!=typeof e[0]||!e[0]){for(var o=[],s=0;s<e.length;s++){var a=t(e[s],n,i);a&&o.push(a)}return o}var l=document.createElement(e[0]),c=e[1],u=1;c&&"object"==typeof c&&!Array.isArray(c)&&(u=2);for(s=u;s<e.length;s++)t(e[s],l,i);return 2==u&&Object.keys(c).forEach((function(t){var e=c[t];"class"===t?l.className=Array.isArray(e)?e.join(" "):e:"function"==typeof e||"value"==t||"$"==t[0]?l[t]=e:"ref"===t?i&&(i[e]=l):"style"===t?"string"==typeof e&&(l.style.cssText=e):null!=e&&l.setAttribute(t,e)})),n&&n.appendChild(l),l},e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||o,t):document.createElement(t)},e.removeChildren=function(t){t.innerHTML=""},e.createTextNode=function(t,e){var n=e?e.ownerDocument:document;return n.createTextNode(t)},e.createFragment=function(t){var e=t?t.ownerDocument:document;return e.createDocumentFragment()},e.hasCssClass=function(t,e){var n=(t.className+"").split(/\s+/g);return-1!==n.indexOf(e)},e.addCssClass=function(t,n){e.hasCssClass(t,n)||(t.className+=" "+n)},e.removeCssClass=function(t,e){var n=t.className.split(/\s+/g);while(1){var i=n.indexOf(e);if(-1==i)break;n.splice(i,1)}t.className=n.join(" ")},e.toggleCssClass=function(t,e){var n=t.className.split(/\s+/g),i=!0;while(1){var r=n.indexOf(e);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(e),t.className=n.join(" "),i},e.setCssClass=function(t,n,i){i?e.addCssClass(t,n):e.removeCssClass(t,n)},e.hasCssString=function(t,e){var n,i=0;if(e=e||document,n=e.querySelectorAll("style"))while(i<n.length)if(n[i++].id===t)return!0},e.removeElementById=function(t,e){e=e||document,e.getElementById(t)&&e.getElementById(t).remove()};var s=[];function a(){var t=s;s=null,t&&t.forEach((function(t){l(t[0],t[1])}))}function l(t,n,r){if("undefined"!=typeof document){if(s)if(r)a();else if(!1===r)return s.push([t,n]);if(!i){var o=r;r&&r.getRootNode?(o=r.getRootNode(),o&&o!=r||(o=document)):o=document;var l=o.ownerDocument||o;if(n&&e.hasCssString(n,o))return null;n&&(t+="\n/*# sourceURL=ace/css/"+n+" */");var c=e.createElement("style");c.appendChild(l.createTextNode(t)),n&&(c.id=n),o==l&&(o=e.getDocumentHead(l)),o.insertBefore(c,o.firstChild)}}}if(e.useStrictCSP=function(t){i=t,0==t?a():s||(s=[])},e.importCssString=l,e.importCssStylsheet=function(t,n){e.buildDom(["link",{rel:"stylesheet",href:t}],e.getDocumentHead(n))},e.scrollbarWidth=function(t){var n=e.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=e.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=t&&t.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},e.computedStyle=function(t,e){return window.getComputedStyle(t,"")||{}},e.setStyle=function(t,e,n){t[e]!==n&&(t[e]=n)},e.HAS_CSS_ANIMATION=!1,e.HAS_CSS_TRANSFORMS=!1,e.HI_DPI=!r.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(e.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");e.HI_DPI&&void 0!==c.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),r.isEdge||"undefined"===typeof c.style.animationName||(e.HAS_CSS_ANIMATION=!0),c=null}e.HAS_CSS_TRANSFORMS?e.translate=function(t,e,n){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:e.translate=function(t,e,n){t.style.top=Math.round(n)+"px",t.style.left=Math.round(e)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(t,e,n){
1
+ (self["webpackChunk_openc3_cosmos_tool_tlmviewer"]=self["webpackChunk_openc3_cosmos_tool_tlmviewer"]||[]).push([[533],{7752:(t,e,n)=>{"use strict";n.d(e,{Be:()=>b,D$:()=>a});var i={logger:self.console,WebSocket:self.WebSocket},r={log(...t){this.enabled&&(t.push(Date.now()),i.logger.log("[ActionCable]",...t))}};const o=()=>(new Date).getTime(),s=t=>(o()-t)/1e3;class a{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=o(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),r.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=o(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=o()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=o(),r.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,n=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),i=0===this.reconnectAttempts?1:e,r=i*Math.random();return 1e3*t*n*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(r.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${s(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?r.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${s(this.disconnectedAt)} s`):(r.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return s(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&s(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout((()=>{!this.connectionIsStale()&&this.connection.isOpen()||(r.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}a.staleThreshold=6,a.reconnectionBackoffRate=.15;var l={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:c,protocols:u}=l,h=u.slice(0,u.length-1),d=[].indexOf;class f{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new a(this),this.disconnected=!0}send(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)}open(){if(this.isActive())return r.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{const t=[...u,...this.consumer.subprotocols||[]];return r.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${t}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new i.WebSocket(this.consumer.url,t),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(r.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(t){r.log("Failed to reopen WebSocket",t)}finally{r.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return d.call(h,this.getProtocol())>=0}isState(...t){return d.call(t,this.getState())>=0}getState(){if(this.webSocket)for(let t in i.WebSocket)if(i.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase();return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}f.reopenDelay=500,f.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:i,reconnect:o,type:s}=JSON.parse(t.data);switch(s){case c.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case c.disconnect:return r.log(`Disconnecting. Reason: ${i}`),this.close({allowReconnect:o});case c.ping:return this.monitor.recordPing();case c.confirmation:return this.subscriptions.confirmSubscription(e),this.reconnectAttempted?(this.reconnectAttempted=!1,this.subscriptions.notify(e,"connected",{reconnected:!0})):this.subscriptions.notify(e,"connected",{reconnected:!1});case c.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(r.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){r.log("WebSocket onerror event")}};const p=function(t,e){if(null!=e)for(let n in e){const i=e[n];t[n]=i}return t};class g{constructor(t,e={},n){this.consumer=t,this.identifier=JSON.stringify(e),p(this,n)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class m{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){-1==this.pendingSubscriptions.indexOf(t)?(r.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):r.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){r.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&"function"===typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map((t=>{r.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class v{constructor(t){this.consumer=t,this.guarantor=new m(this),this.subscriptions=[]}create(t,e){const n=t,i="object"===typeof n?n:{channel:n},r=new g(this.consumer,i,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((t=>(this.forget(t),this.notify(t,"rejected"),t)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((n=>this.notify(n,t,...e)))}notify(t,e,...n){let i;return i="string"===typeof t?this.findAll(t):[t],i.map((t=>"function"===typeof t[e]?t[e](...n):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){r.log(`Subscription confirmed ${t}`),this.findAll(t).map((t=>this.guarantor.forget(t)))}sendCommand(t,e){const{identifier:n}=t;return this.consumer.send({command:e,identifier:n})}}class y{constructor(t){this._url=t,this.subscriptions=new v(this),this.connection=new f(this),this.subprotocols=[]}get url(){return w(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(t){this.subprotocols=[...this.subprotocols,t]}}function w(t){if("function"===typeof t&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return t}function b(t=_("url")||l.default_mount_path){return new y(t)}function _(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}},2132:(t,e,n)=>{"use strict";n.d(e,{A:()=>sr});n(9375),n(2482),n(7067),n(4147),n(7146),n(4293),n(2682),n(785),n(8357),n(6196),n(821),n(6554),n(8472),n(7404),n(5803),n(3912),n(7010);const i=!0,r="u-",o="uplot",s=r+"hz",a=r+"vt",l=r+"title",c=r+"wrap",u=r+"under",h=r+"over",d=r+"axis",f=r+"off",p=r+"select",g=r+"cursor-x",m=r+"cursor-y",v=r+"cursor-pt",y=r+"legend",w=r+"live",b=r+"inline",_=r+"series",x=r+"marker",S=r+"label",A=r+"value",C="width",k="height",$="top",T="bottom",L="left",R="right",E="#000",M=E+"0",D="mousemove",I="mousedown",O="mouseup",P="mouseenter",N="mouseleave",F="dblclick",W="resize",H="scroll",B="change",z="dppxchange",U="--",j="undefined"!=typeof window,G=j?document:null,V=j?window:null,Y=j?navigator:null;let q,K;function X(){let t=devicePixelRatio;q!=t&&(q=t,K&&ht(B,K,X),K=matchMedia(`(min-resolution: ${q-.001}dppx) and (max-resolution: ${q+.001}dppx)`),ut(B,K,X),V.dispatchEvent(new CustomEvent(z)))}function Q(t,e){if(null!=e){let n=t.classList;!n.contains(e)&&n.add(e)}}function Z(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function J(t,e,n){t.style[e]=n+"px"}function tt(t,e,n,i){let r=G.createElement(t);return null!=e&&Q(r,e),null!=n&&n.insertBefore(r,i),r}function et(t,e){return tt("div",t,e)}const nt=new WeakMap;function it(t,e,n,i,r){let o="translate("+e+"px,"+n+"px)",s=nt.get(t);o!=s&&(t.style.transform=o,nt.set(t,o),e<0||n<0||e>i||n>r?Q(t,f):Z(t,f))}const rt=new WeakMap;function ot(t,e,n){let i=e+n,r=rt.get(t);i!=r&&(rt.set(t,i),t.style.background=e,t.style.borderColor=n)}const st=new WeakMap;function at(t,e,n,i){let r=e+""+n,o=st.get(t);r!=o&&(st.set(t,r),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=i?-e/2+"px":0,t.style.marginTop=i?-n/2+"px":0)}const lt={passive:!0},ct={...lt,capture:!0};function ut(t,e,n,i){e.addEventListener(t,n,i?ct:lt)}function ht(t,e,n,i){e.removeEventListener(t,n,i?ct:lt)}function dt(t,e,n,i){let r;n=n||0,i=i||e.length-1;let o=i<=2147483647;while(i-n>1)r=o?n+i>>1:Et((n+i)/2),e[r]<t?n=r:i=r;return t-e[n]<=e[i]-t?n:i}function ft(t,e,n,i){for(let r=1==i?e:n;r>=e&&r<=n;r+=i)if(null!=t[r])return r;return-1}function pt(t,e,n,i){let r=zt,o=-zt;if(1==i)r=t[e],o=t[n];else if(-1==i)r=t[n],o=t[e];else for(let s=e;s<=n;s++){let e=t[s];null!=e&&(e<r&&(r=e),e>o&&(o=e))}return[r,o]}function gt(t,e,n){let i=zt,r=-zt;for(let o=e;o<=n;o++){let e=t[o];null!=e&&e>0&&(e<i&&(i=e),e>r&&(r=e))}return[i==zt?1:i,r==-zt?10:r]}function mt(t,e,n,i){let r=Nt(t),o=Nt(e),s=10==n?Ft:Wt;t==e&&(-1==r?(t*=n,e/=n):(t/=n,e*=n));let a=1==r?Et:Dt,l=1==o?Dt:Et,c=a(s(Rt(t))),u=l(s(Rt(e))),h=Pt(n,c),d=Pt(n,u);return 10==n&&(c<0&&(h=ne(h,-c)),u<0&&(d=ne(d,-u))),i||2==n?(t=h*r,e=d*o):(t=ee(t,h),e=te(e,d)),[t,e]}function vt(t,e,n,i){let r=mt(t,e,n,i);return 0==t&&(r[0]=0),0==e&&(r[1]=0),r}j&&X();const yt=.1,wt={mode:3,pad:yt},bt={pad:0,soft:null,mode:0},_t={min:bt,max:bt};function xt(t,e,n,i){return fe(n)?Ct(t,e,n):(bt.pad=n,bt.soft=i?0:null,bt.mode=i?3:0,Ct(t,e,_t))}function St(t,e){return null==t?e:t}function At(t,e,n){e=St(e,0),n=St(n,t.length-1);while(e<=n){if(null!=t[e])return!0;e++}return!1}function Ct(t,e,n){let i=n.min,r=n.max,o=St(i.pad,0),s=St(r.pad,0),a=St(i.hard,-zt),l=St(r.hard,zt),c=St(i.soft,zt),u=St(r.soft,-zt),h=St(i.mode,0),d=St(r.mode,0),f=e-t,p=Ft(f),g=Ot(Rt(t),Rt(e)),m=Ft(g),v=Rt(m-p);(f<1e-9||v>10)&&(f=0,0!=t&&0!=e||(f=1e-9,2==h&&c!=zt&&(o=0),2==d&&u!=-zt&&(s=0)));let y=f||g||1e3,w=Ft(y),b=Pt(10,Et(w)),_=y*(0==f?0==t?.1:1:o),x=ne(ee(t-_,b/10),9),S=t>=c&&(1==h||3==h&&x<=c||2==h&&x>=c)?c:zt,A=Ot(a,x<S&&t>=S?S:It(S,x)),C=y*(0==f?0==e?.1:1:s),k=ne(te(e+C,b/10),9),$=e<=u&&(1==d||3==d&&k>=u||2==d&&k<=u)?u:-zt,T=It(l,k>$&&e<=$?$:Ot($,k));return A==T&&0==A&&(T=100),[A,T]}const kt=new Intl.NumberFormat(j?Y.language:"en-US"),$t=t=>kt.format(t),Tt=Math,Lt=Tt.PI,Rt=Tt.abs,Et=Tt.floor,Mt=Tt.round,Dt=Tt.ceil,It=Tt.min,Ot=Tt.max,Pt=Tt.pow,Nt=Tt.sign,Ft=Tt.log10,Wt=Tt.log2,Ht=(t,e=1)=>Tt.sinh(t)*e,Bt=(t,e=1)=>Tt.asinh(t/e),zt=1/0;function Ut(t){return 1+(0|Ft((t^t>>31)-(t>>31)))}function jt(t,e,n){return It(Ot(t,e),n)}function Gt(t){return"function"==typeof t?t:()=>t}const Vt=()=>{},Yt=t=>t,qt=(t,e)=>e,Kt=t=>null,Xt=t=>!0,Qt=(t,e)=>t==e,Zt=t=>ne(t,14);function Jt(t,e){return Zt(ne(Zt(t/e))*e)}function te(t,e){return Zt(Dt(Zt(t/e))*e)}function ee(t,e){return Zt(Et(Zt(t/e))*e)}function ne(t,e=0){if(ue(t))return t;let n=10**e,i=t*n*(1+Number.EPSILON);return Mt(i)/n}const ie=new Map;function re(t){return((""+t).split(".")[1]||"").length}function oe(t,e,n,i){let r=[],o=i.map(re);for(let s=e;s<n;s++){let e=Rt(s),n=ne(Pt(t,s),e);for(let t=0;t<i.length;t++){let a=i[t]*n,l=(a>=0&&s>=0?0:e)+(s>=o[t]?0:o[t]),c=ne(a,l);r.push(c),ie.set(c,l)}}return r}const se={},ae=[],le=[null,null],ce=Array.isArray,ue=Number.isInteger,he=t=>void 0===t;function de(t){return"string"==typeof t}function fe(t){let e=!1;if(null!=t){let n=t.constructor;e=null==n||n==Object}return e}function pe(t){return null!=t&&"object"==typeof t}const ge=Object.getPrototypeOf(Uint8Array);function me(t,e=fe){let n;if(ce(t)){let i=t.find((t=>null!=t));if(ce(i)||e(i)){n=Array(t.length);for(let i=0;i<t.length;i++)n[i]=me(t[i],e)}else n=t.slice()}else if(t instanceof ge)n=t.slice();else if(e(t)){n={};for(let i in t)n[i]=me(t[i],e)}else n=t;return n}function ve(t){let e=arguments;for(let n=1;n<e.length;n++){let i=e[n];for(let e in i)fe(t[e])?ve(t[e],me(i[e])):t[e]=me(i[e])}return t}const ye=0,we=1,be=2;function _e(t,e,n){for(let i,r=0,o=-1;r<e.length;r++){let s=e[r];if(s>o){i=s-1;while(i>=0&&null==t[i])t[i--]=null;i=s+1;while(i<n&&null==t[i])t[o=i++]=null}}}function xe(t,e){if(Ce(t)){let e=t[0].slice();for(let n=1;n<t.length;n++)e.push(...t[n].slice(1));return ke(e[0])||(e=Ae(e)),e}let n=new Set;for(let s=0;s<t.length;s++){let e=t[s],i=e[0],r=i.length;for(let t=0;t<r;t++)n.add(i[t])}let i=[Array.from(n).sort(((t,e)=>t-e))],r=i[0].length,o=new Map;for(let s=0;s<r;s++)o.set(i[0][s],s);for(let s=0;s<t.length;s++){let n=t[s],a=n[0];for(let t=1;t<n.length;t++){let l=n[t],c=Array(r).fill(void 0),u=e?e[s][t]:we,h=[];for(let t=0;t<l.length;t++){let e=l[t],n=o.get(a[t]);null===e?u!=ye&&(c[n]=e,u==be&&h.push(n)):c[n]=e}_e(c,h,r),i.push(c)}}return i}const Se="undefined"==typeof queueMicrotask?t=>Promise.resolve().then(t):queueMicrotask;function Ae(t){let e=t[0],n=e.length,i=Array(n);for(let o=0;o<i.length;o++)i[o]=o;i.sort(((t,n)=>e[t]-e[n]));let r=[];for(let o=0;o<t.length;o++){let e=t[o],s=Array(n);for(let t=0;t<n;t++)s[t]=e[i[t]];r.push(s)}return r}function Ce(t){let e=t[0][0],n=e.length;for(let i=1;i<t.length;i++){let r=t[i][0];if(r.length!=n)return!1;if(r!=e)for(let t=0;t<n;t++)if(r[t]!=e[t])return!1}return!0}function ke(t,e=100){const n=t.length;if(n<=1)return!0;let i=0,r=n-1;while(i<=r&&null==t[i])i++;while(r>=i&&null==t[r])r--;if(r<=i)return!0;const o=Ot(1,Et((r-i+1)/e));for(let s=t[i],a=i+o;a<=r;a+=o){const e=t[a];if(null!=e){if(e<=s)return!1;s=e}}return!0}const $e=["January","February","March","April","May","June","July","August","September","October","November","December"],Te=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Le(t){return t.slice(0,3)}const Re=Te.map(Le),Ee=$e.map(Le),Me={MMMM:$e,MMM:Ee,WWWW:Te,WWW:Re};function De(t){return(t<10?"0":"")+t}function Ie(t){return(t<10?"00":t<100?"0":"")+t}const Oe={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>De(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>De(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>De(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return 0==e?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>De(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>De(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>Ie(t.getMilliseconds())};function Pe(t,e){e=e||Me;let n,i=[],r=/\{([a-z]+)\}|[^{]+/gi;while(n=r.exec(t))i.push("{"==n[0][0]?Oe[n[1]]:n[0]);return t=>{let n="";for(let r=0;r<i.length;r++)n+="string"==typeof i[r]?i[r]:i[r](t,e);return n}}const Ne=(new Intl.DateTimeFormat).resolvedOptions().timeZone;function Fe(t,e){let n;return"UTC"==e||"Etc/UTC"==e?n=new Date(+t+6e4*t.getTimezoneOffset()):e==Ne?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const We=t=>t%1==0,He=[1,2,2.5,5],Be=oe(10,-16,0,He),ze=oe(10,0,16,He),Ue=ze.filter(We),je=Be.concat(ze),Ge="\n",Ve="{YYYY}",Ye=Ge+Ve,qe="{M}/{D}",Ke=Ge+qe,Xe=Ke+"/{YY}",Qe="{aa}",Ze="{h}:{mm}",Je=Ze+Qe,tn=Ge+Je,en=":{ss}",nn=null;function rn(t){let e=1e3*t,n=60*e,i=60*n,r=24*i,o=30*r,s=365*r,a=1==t?oe(10,0,3,He).filter(We):oe(10,-3,0,He),l=a.concat([e,5*e,10*e,15*e,30*e,n,5*n,10*n,15*n,30*n,i,2*i,3*i,4*i,6*i,8*i,12*i,r,2*r,3*r,4*r,5*r,6*r,7*r,8*r,9*r,10*r,15*r,o,2*o,3*o,4*o,6*o,s,2*s,5*s,10*s,25*s,50*s,100*s]);const c=[[s,Ve,nn,nn,nn,nn,nn,nn,1],[28*r,"{MMM}",Ye,nn,nn,nn,nn,nn,1],[r,qe,Ye,nn,nn,nn,nn,nn,1],[i,"{h}"+Qe,Xe,nn,Ke,nn,nn,nn,1],[n,Je,Xe,nn,Ke,nn,nn,nn,1],[e,en,Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1],[t,en+".{fff}",Xe+" "+Je,nn,Ke+" "+Je,nn,tn,nn,1]];function u(e){return(a,l,c,u,h,d)=>{let f=[],p=h>=s,g=h>=o&&h<s,m=e(c),v=ne(m*t,3),y=pn(m.getFullYear(),p?0:m.getMonth(),g||p?1:m.getDate()),w=ne(y*t,3);if(g||p){let n=g?h/o:0,i=p?h/s:0,r=v==w?v:ne(pn(y.getFullYear()+i,y.getMonth()+n,1)*t,3),a=new Date(Mt(r/t)),l=a.getFullYear(),c=a.getMonth();for(let o=0;r<=u;o++){let s=pn(l+i*o,c+n*o,1),a=s-e(ne(s*t,3));r=ne((+s+a)*t,3),r<=u&&f.push(r)}}else{let o=h>=r?r:h,s=Et(c)-Et(v),p=w+s+te(v-w,o);f.push(p);let g=e(p),m=g.getHours()+g.getMinutes()/n+g.getSeconds()/i,y=h/i,b=a.axes[l]._space,_=d/b;while(1){if(p=ne(p+h,1==t?0:3),p>u)break;if(y>1){let t=Et(ne(m+y,6))%24,n=e(p),r=n.getHours(),o=r-t;o>1&&(o=-1),p-=o*i,m=(m+y)%24;let s=f[f.length-1],a=ne((p-s)/h,3);a*_>=.7&&f.push(p)}else f.push(p)}}return f}}return[l,c,u]}const[on,sn,an]=rn(1),[ln,cn,un]=rn(.001);function hn(t,e){return t.map((t=>t.map(((n,i)=>0==i||8==i||null==n?n:e(1==i||0==t[8]?n:t[1]+n)))))}function dn(t,e){return(n,i,r,o,s)=>{let a,l,c,u,h,d,f=e.find((t=>s>=t[0]))||e[e.length-1];return i.map((e=>{let n=t(e),i=n.getFullYear(),r=n.getMonth(),o=n.getDate(),s=n.getHours(),p=n.getMinutes(),g=n.getSeconds(),m=i!=a&&f[2]||r!=l&&f[3]||o!=c&&f[4]||s!=u&&f[5]||p!=h&&f[6]||g!=d&&f[7]||f[1];return a=i,l=r,c=o,u=s,h=p,d=g,m(n)}))}}function fn(t,e){let n=Pe(e);return(e,i,r,o,s)=>i.map((e=>n(t(e))))}function pn(t,e,n){return new Date(t,e,n)}function gn(t,e){return e(t)}oe(2,-53,53,[1]);const mn="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function vn(t,e){return(n,i,r,o)=>null==o?U:e(t(i))}function yn(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function wn(t,e){return t.series[e].fill(t,e)}const bn={show:!0,live:!0,isolate:!1,mount:Vt,markers:{show:!0,width:2,stroke:yn,fill:wn,dash:"solid"},idx:null,idxs:null,values:[]};function _n(t,e){let n=t.cursor.points,i=et(),r=n.size(t,e);J(i,C,r),J(i,k,r);let o=r/-2;J(i,"marginLeft",o),J(i,"marginTop",o);let s=n.width(t,e,r);return s&&J(i,"borderWidth",s),i}function xn(t,e){let n=t.series[e].points;return n._fill||n._stroke}function Sn(t,e){let n=t.series[e].points;return n._stroke||n._fill}function An(t,e){let n=t.series[e].points;return n.size}function Cn(t,e,n){return n}const kn=[0,0];function $n(t,e,n){return kn[0]=e,kn[1]=n,kn}function Tn(t,e,n,i=!0){return t=>{0==t.button&&(!i||t.target==e)&&n(t)}}function Ln(t,e,n,i=!0){return t=>{(!i||t.target==e)&&n(t)}}const Rn={show:!0,x:!0,y:!0,lock:!1,move:$n,points:{show:_n,size:An,width:0,stroke:Sn,fill:xn},bind:{mousedown:Tn,mouseup:Tn,click:Tn,dblclick:Tn,mousemove:Ln,mouseleave:Ln,mouseenter:Ln},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,i,r)=>i-r,prox:-1,bias:0},left:-10,top:-10,idx:null,dataIdx:Cn,idxs:null,event:null},En={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Mn=ve({},En,{filter:qt}),Dn=ve({},Mn,{size:10}),In=ve({},En,{show:!1}),On='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Pn="bold "+On,Nn=1.5,Fn={show:!0,scale:"x",stroke:E,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Pn,side:2,grid:Mn,ticks:Dn,border:In,font:On,lineGap:Nn,rotate:0},Wn="Value",Hn="Time",Bn={show:!0,scale:"x",auto:!1,sorted:1,min:zt,max:-zt,idxs:[]};function zn(t,e,n,i,r){return e.map((t=>null==t?"":$t(t)))}function Un(t,e,n,i,r,o,s){let a=[],l=ie.get(r)||0;n=s?n:ne(te(n,r),l);for(let c=n;c<=i;c=ne(c+r,l))a.push(Object.is(c,-0)?0:c);return a}function jn(t,e,n,i,r,o,s){const a=[],l=t.scales[t.axes[e].scale].log,c=10==l?Ft:Wt,u=Et(c(n));r=Pt(l,u),10==l&&u<0&&(r=ne(r,-u));let h=n;do{a.push(h),h+=r,10==l&&(h=ne(h,ie.get(r))),h>=r*l&&(r=h)}while(h<=i);return a}function Gn(t,e,n,i,r,o,s){let a=t.scales[t.axes[e].scale],l=a.asinh,c=i>l?jn(t,e,Ot(l,n),i,r):[l],u=i>=0&&n<=0?[0]:[],h=n<-l?jn(t,e,Ot(l,-i),-n,r):[l];return h.reverse().map((t=>-t)).concat(u,c)}const Vn=/./,Yn=/[12357]/,qn=/[125]/,Kn=/1/,Xn=(t,e,n,i)=>t.map(((t,r)=>4==e&&0==t||r%i==0&&n.test(t.toExponential()[t<0?1:0])?t:null));function Qn(t,e,n,i,r){let o=t.axes[n],s=o.scale,a=t.scales[s],l=t.valToPos,c=o._space,u=l(10,s),h=l(9,s)-u>=c?Vn:l(7,s)-u>=c?Yn:l(5,s)-u>=c?qn:Kn;if(h==Kn){let t=Rt(l(1,s)-u);if(t<c)return Xn(e.slice().reverse(),a.distr,h,Dt(c/t)).reverse()}return Xn(e,a.distr,h,1)}function Zn(t,e,n,i,r){let o=t.axes[n],s=o.scale,a=o._space,l=t.valToPos,c=Rt(l(1,s)-l(2,s));return c<a?Xn(e.slice().reverse(),3,Vn,Dt(a/c)).reverse():e}function Jn(t,e,n,i){return null==i?U:null==e?"":$t(e)}const ti={show:!0,scale:"y",stroke:E,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Pn,side:3,grid:Mn,ticks:Dn,border:In,font:On,lineGap:Nn,rotate:0};function ei(t,e){let n=3+2*(t||1);return ne(n*e,3)}function ni(t,e){let{scale:n,idxs:i}=t.series[0],r=t._data[0],o=t.valToPos(r[i[0]],n,!0),s=t.valToPos(r[i[1]],n,!0),a=Rt(s-o),l=t.series[e],c=a/(l.points.space*q);return i[1]-i[0]<=c}const ii={scale:null,auto:!0,sorted:0,min:zt,max:-zt},ri=(t,e,n,i,r)=>r,oi={show:!0,auto:!0,sorted:0,gaps:ri,alpha:1,facets:[ve({},ii,{scale:"x"}),ve({},ii,{scale:"y"})]},si={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ri,alpha:1,points:{show:ni,filter:null},values:null,min:zt,max:-zt,idxs:[],path:null,clip:null};function ai(t,e,n,i,r){return n/10}const li={time:i,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ci=ve({},li,{time:!1,ori:1}),ui={};function hi(t,e){let n=ui[t];return n||(n={key:t,plots:[],sub(t){n.plots.push(t)},unsub(t){n.plots=n.plots.filter((e=>e!=t))},pub(t,e,i,r,o,s,a){for(let l=0;l<n.plots.length;l++)n.plots[l]!=e&&n.plots[l].pub(t,e,i,r,o,s,a)}},null!=t&&(ui[t]=n)),n}const di=1,fi=2;function pi(t,e,n){const i=t.mode,r=t.series[e],o=2==i?t._data[e]:t._data,s=t.scales,a=t.bbox;let l=o[0],c=2==i?o[1]:o[e],u=2==i?s[r.facets[0].scale]:s[t.series[0].scale],h=2==i?s[r.facets[1].scale]:s[r.scale],d=a.left,f=a.top,p=a.width,g=a.height,m=t.valToPosH,v=t.valToPosV;return 0==u.ori?n(r,l,c,u,h,m,v,d,f,p,g,Si,Ci,$i,Li,Ei):n(r,l,c,u,h,v,m,f,d,g,p,Ai,ki,Ti,Ri,Mi)}function gi(t,e){let n=0,i=0,r=St(t.bands,ae);for(let o=0;o<r.length;o++){let t=r[o];t.series[0]==e?n=t.dir:t.series[1]==e&&(1==t.dir?i|=1:i|=2)}return[n,1==i?-1:2==i?1:3==i?2:0]}function mi(t,e,n,i,r){let o=t.mode,s=t.series[e],a=2==o?s.facets[1].scale:s.scale,l=t.scales[a];return-1==r?l.min:1==r?l.max:3==l.distr?1==l.dir?l.min:l.max:0}function vi(t,e,n,i,r,o){return pi(t,e,((t,e,s,a,l,c,u,h,d,f,p)=>{let g=t.pxRound;const m=a.dir*(0==a.ori?1:-1),v=0==a.ori?Ci:ki;let y,w;1==m?(y=n,w=i):(y=i,w=n);let b=g(c(e[y],a,f,h)),_=g(u(s[y],l,p,d)),x=g(c(e[w],a,f,h)),S=g(u(1==o?l.max:l.min,l,p,d)),A=new Path2D(r);return v(A,x,S),v(A,b,S),v(A,b,_),A}))}function yi(t,e,n,i,r,o){let s=null;if(t.length>0){s=new Path2D;const a=0==e?$i:Ti;let l=n;for(let e=0;e<t.length;e++){let n=t[e];if(n[1]>n[0]){let t=n[0]-l;t>0&&a(s,l,i,t,i+o),l=n[1]}}let c=n+r-l,u=10;c>0&&a(s,l,i-u/2,c,i+o+u)}return s}function wi(t,e,n){let i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function bi(t,e,n,i,r,o,s){let a=[],l=t.length;for(let c=1==r?n:i;c>=n&&c<=i;c+=r){let u=e[c];if(null===u){let u=c,h=c;if(1==r)while(++c<=i&&null===e[c])h=c;else while(--c>=n&&null===e[c])h=c;let d=o(t[u]),f=h==u?d:o(t[h]),p=u-r,g=s<=0&&p>=0&&p<l?o(t[p]):d;d=g;let m=h+r,v=s>=0&&m>=0&&m<l?o(t[m]):f;f=v,f>=d&&a.push([d,f])}}return a}function _i(t){return 0==t?Yt:1==t?Mt:e=>Jt(e,t)}function xi(t){let e=0==t?Si:Ai,n=0==t?(t,e,n,i,r,o)=>{t.arcTo(e,n,i,r,o)}:(t,e,n,i,r,o)=>{t.arcTo(n,e,r,i,o)},i=0==t?(t,e,n,i,r)=>{t.rect(e,n,i,r)}:(t,e,n,i,r)=>{t.rect(n,e,r,i)};return(t,r,o,s,a,l=0,c=0)=>{0==l&&0==c?i(t,r,o,s,a):(l=It(l,s/2,a/2),c=It(c,s/2,a/2),e(t,r+l,o),n(t,r+s,o,r+s,o+a,l),n(t,r+s,o+a,r,o+a,c),n(t,r,o+a,r,o,c),n(t,r,o,r+s,o,l),t.closePath())}}const Si=(t,e,n)=>{t.moveTo(e,n)},Ai=(t,e,n)=>{t.moveTo(n,e)},Ci=(t,e,n)=>{t.lineTo(e,n)},ki=(t,e,n)=>{t.lineTo(n,e)},$i=xi(0),Ti=xi(1),Li=(t,e,n,i,r,o)=>{t.arc(e,n,i,r,o)},Ri=(t,e,n,i,r,o)=>{t.arc(n,e,i,r,o)},Ei=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(e,n,i,r,o,s)},Mi=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(n,e,r,i,s,o)};function Di(t){return(t,e,n,i,r)=>pi(t,e,((e,o,s,a,l,c,u,h,d,f,p)=>{let g,m,{pxRound:v,points:y}=e;0==a.ori?(g=Si,m=Li):(g=Ai,m=Ri);const w=ne(y.width*q,3);let b=(y.size-y.width)/2*q,_=ne(2*b,3),x=new Path2D,S=new Path2D,{left:A,top:C,width:k,height:$}=t.bbox;$i(S,A-_,C-_,k+2*_,$+2*_);const T=t=>{if(null!=s[t]){let e=v(c(o[t],a,f,h)),n=v(u(s[t],l,p,d));g(x,e+b,n),m(x,e,n,b,0,2*Lt)}};if(r)r.forEach(T);else for(let t=n;t<=i;t++)T(t);return{stroke:w>0?x:null,fill:x,clip:S,flags:di|fi}}))}function Ii(t){return(e,n,i,r,o,s)=>{i!=r&&(o!=i&&s!=i&&t(e,n,i),o!=r&&s!=r&&t(e,n,r),t(e,n,s))}}const Oi=Ii(Ci),Pi=Ii(ki);function Ni(t){const e=St(null===t||void 0===t?void 0:t.alignGaps,0);return(t,n,i,r)=>pi(t,n,((o,s,a,l,c,u,h,d,f,p,g)=>{let m,v,y=o.pxRound,w=t=>y(u(t,l,p,d)),b=t=>y(h(t,c,g,f));0==l.ori?(m=Ci,v=Oi):(m=ki,v=Pi);const _=l.dir*(0==l.ori?1:-1),x={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},S=x.stroke;let A,C,k,$=zt,T=-zt,L=w(s[1==_?i:r]),R=ft(a,i,r,1*_),E=ft(a,i,r,-1*_),M=w(s[R]),D=w(s[E]),I=!1;for(let t=1==_?i:r;t>=i&&t<=r;t+=_){let e=w(s[t]),n=a[t];e==L?null!=n?(C=b(n),$==zt&&(m(S,e,C),A=C),$=It(C,$),T=Ot(C,T)):null===n&&(I=!0):($!=zt&&(v(S,L,$,T,A,C),k=L),null!=n?(C=b(n),m(S,e,C),$=T=A=C):($=zt,T=-zt,null===n&&(I=!0)),L=e)}$!=zt&&$!=T&&k!=L&&v(S,L,$,T,A,C);let[O,P]=gi(t,n);if(null!=o.fill||0!=O){let e=x.fill=new Path2D(S),i=o.fillTo(t,n,o.min,o.max,O),r=b(i);m(e,D,r),m(e,M,r)}if(!o.spanGaps){let c=[];I&&c.push(...bi(s,a,i,r,_,w,e)),x.gaps=c=o.gaps(t,n,i,r,c),x.clip=yi(c,l.ori,d,f,p,g)}return 0!=P&&(x.band=2==P?[vi(t,n,i,r,S,-1),vi(t,n,i,r,S,1)]:vi(t,n,i,r,S,P)),x}))}function Fi(t){const e=St(t.align,1),n=St(t.ascDesc,!1),i=St(t.alignGaps,0),r=St(t.extend,!1);return(t,o,s,a)=>pi(t,o,((l,c,u,h,d,f,p,g,m,v,y)=>{let w=l.pxRound,{left:b,width:_}=t.bbox,x=t=>w(f(t,h,v,g)),S=t=>w(p(t,d,y,m)),A=0==h.ori?Ci:ki;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:di},k=C.stroke,$=h.dir*(0==h.ori?1:-1);s=ft(u,s,a,1),a=ft(u,s,a,-1);let T=S(u[1==$?s:a]),L=x(c[1==$?s:a]),R=L,E=L;r&&-1==e&&(E=b,A(k,E,T)),A(k,L,T);for(let t=1==$?s:a;t>=s&&t<=a;t+=$){let n=u[t];if(null==n)continue;let i=x(c[t]),r=S(n);1==e?A(k,i,T):A(k,R,r),A(k,i,r),T=r,R=i}let M=R;r&&1==e&&(M=b+_,A(k,M,T));let[D,I]=gi(t,o);if(null!=l.fill||0!=D){let e=C.fill=new Path2D(k),n=l.fillTo(t,o,l.min,l.max,D),i=S(n);A(e,M,i),A(e,E,i)}if(!l.spanGaps){let r=[];r.push(...bi(c,u,s,a,$,x,i));let d=l.width*q/2,f=n||1==e?d:-d,p=n||-1==e?-d:d;r.forEach((t=>{t[0]+=f,t[1]+=p})),C.gaps=r=l.gaps(t,o,s,a,r),C.clip=yi(r,h.ori,g,m,v,y)}return 0!=I&&(C.band=2==I?[vi(t,o,s,a,k,-1),vi(t,o,s,a,k,1)]:vi(t,o,s,a,k,I)),C}))}function Wi(t){t=t||se;const e=St(t.size,[.6,zt,1]),n=t.align||0,i=(t.gap||0)*q;let r=t.radius;r=null==r?[0,0]:"number"==typeof r?[r,0]:r;const o=Gt(r),s=1-e[0],a=St(e[1],zt)*q,l=St(e[2],1)*q,c=St(t.disp,se),u=St(t.each,(t=>{})),{fill:h,stroke:d}=c;return(t,e,r,f)=>pi(t,e,((p,g,m,v,y,w,b,_,x,S,A)=>{let C,k,$=p.pxRound;0==v.ori?[C,k]=o(t,e):[k,C]=o(t,e);const T=v.dir*(0==v.ori?1:-1);let L,R,E=0==v.ori?$i:Ti,M=0==v.ori?u:(t,e,n,i,r,o,s)=>{u(t,e,n,r,i,s,o)},D=St(t.bands,ae).find((t=>t.series[0]==e)),I=null!=D?D.dir:0,O=p.fillTo(t,e,p.min,p.max,I),P=$(b(O,y,A,x)),N=$(p.width*q),F=!1,W=null,H=null,B=null,z=null;null==h||0!=N&&null==d||(F=!0,W=h.values(t,e,r,f),H=new Map,new Set(W).forEach((t=>{null!=t&&H.set(t,new Path2D)})),N>0&&(B=d.values(t,e,r,f),z=new Map,new Set(B).forEach((t=>{null!=t&&z.set(t,new Path2D)}))));let{x0:U,size:j}=c;if(null!=U&&null!=j){g=U.values(t,e,r,f),2==U.unit&&(g=g.map((e=>t.posToVal(_+e*S,v.key,!0))));let n=j.values(t,e,r,f);R=2==j.unit?n[0]*S:w(n[0],v,S,_)-w(0,v,S,_),N>=R/2&&(N=0),R=$(jt(R-N,l,a)),L=1==T?-N/2:R+N/2}else{let t=S;if(g.length>1){let e=null;for(let n=0,i=1/0;n<g.length;n++)if(void 0!==m[n]){if(null!=e){let r=Rt(g[n]-g[e]);r<i&&(i=r,t=Rt(w(g[n],v,S,_)-w(g[e],v,S,_)))}e=n}}let e=t*s;R=t-e-i,N>=R/2&&(N=0),e+i<5&&($=Yt),R=$(jt(t-e,l,a)-N-i),L=(0==n?R/2:n==T?0:R)-n*T*i/2}const G={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},V=F?null:new Path2D;let Y=null;if(null!=D)Y=t.data[D.series[1]];else{let{y0:n,y1:i}=c;null!=n&&null!=i&&(m=i.values(t,e,r,f),Y=n.values(t,e,r,f))}let K=C*R,X=k*R;for(let n=1==T?r:f;n>=r&&n<=f;n+=T){let i=m[n];if(null==i)continue;if(null!=Y){var Q;let t=null!==(Q=Y[n])&&void 0!==Q?Q:0;if(i-t==0)continue;P=b(t,y,A,x)}let r=2!=v.distr||null!=c?g[n]:n,o=w(r,v,S,_),s=b(St(i,O),y,A,x),a=$(o-L),l=$(Ot(s,P)),u=$(It(s,P)),h=l-u;if(null!=i){let r=i<0?X:K,o=i<0?K:X;F?(N>0&&null!=B[n]&&E(z.get(B[n]),a,u+Et(N/2),R,Ot(0,h-N),r,o),null!=W[n]&&E(H.get(W[n]),a,u+Et(N/2),R,Ot(0,h-N),r,o)):E(V,a,u+Et(N/2),R,Ot(0,h-N),r,o),M(t,e,n,a-N/2,u,R+N,h)}}if(N>0)G.stroke=F?z:V;else if(!F){var Z;G._fill=0==p.width?p._fill:null!==(Z=p._stroke)&&void 0!==Z?Z:p._fill,G.width=0}return G.fill=F?H:V,G}))}function Hi(t,e){const n=St(null===e||void 0===e?void 0:e.alignGaps,0);return(e,i,r,o)=>pi(e,i,((s,a,l,c,u,h,d,f,p,g,m)=>{let v,y,w,b=s.pxRound,_=t=>b(h(t,c,g,f)),x=t=>b(d(t,u,m,p));0==c.ori?(v=Si,w=Ci,y=Ei):(v=Ai,w=ki,y=Mi);const S=c.dir*(0==c.ori?1:-1);r=ft(l,r,o,1),o=ft(l,r,o,-1);let A=_(a[1==S?r:o]),C=A,k=[],$=[];for(let t=1==S?r:o;t>=r&&t<=o;t+=S){let e=l[t];if(null!=e){let e=a[t],n=_(e);k.push(C=n),$.push(x(l[t]))}}const T={stroke:t(k,$,v,w,y,b),fill:null,clip:null,band:null,gaps:null,flags:di},L=T.stroke;let[R,E]=gi(e,i);if(null!=s.fill||0!=R){let t=T.fill=new Path2D(L),n=s.fillTo(e,i,s.min,s.max,R),r=x(n);w(t,C,r),w(t,A,r)}if(!s.spanGaps){let t=[];t.push(...bi(a,l,r,o,S,_,n)),T.gaps=t=s.gaps(e,i,r,o,t),T.clip=yi(t,c.ori,f,p,g,m)}return 0!=E&&(T.band=2==E?[vi(e,i,r,o,L,-1),vi(e,i,r,o,L,1)]:vi(e,i,r,o,L,E)),T}))}function Bi(t){return Hi(zi,t)}function zi(t,e,n,i,r,o){const s=t.length;if(s<2)return null;const a=new Path2D;if(n(a,t[0],e[0]),2==s)i(a,t[1],e[1]);else{let n=Array(s),i=Array(s-1),o=Array(s-1),l=Array(s-1);for(let r=0;r<s-1;r++)o[r]=e[r+1]-e[r],l[r]=t[r+1]-t[r],i[r]=o[r]/l[r];n[0]=i[0];for(let t=1;t<s-1;t++)0===i[t]||0===i[t-1]||i[t-1]>0!==i[t]>0?n[t]=0:(n[t]=3*(l[t-1]+l[t])/((2*l[t]+l[t-1])/i[t-1]+(l[t]+2*l[t-1])/i[t]),isFinite(n[t])||(n[t]=0));n[s-1]=i[s-2];for(let c=0;c<s-1;c++)r(a,t[c]+l[c]/3,e[c]+n[c]*l[c]/3,t[c+1]-l[c]/3,e[c+1]-n[c+1]*l[c]/3,t[c+1],e[c+1])}return a}const Ui=new Set;function ji(){for(let t of Ui)t.syncRect(!0)}j&&(ut(W,V,ji),ut(H,V,ji,!0),ut(z,V,(()=>{sr.pxRatio=q})));const Gi=Ni(),Vi=Di();function Yi(t,e,n,i){let r=i?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1));return r.map(((t,i)=>Ki(t,i,e,n)))}function qi(t,e){return t.map(((t,n)=>0==n?null:ve({},e,t)))}function Ki(t,e,n,i){return ve({},0==e?n:i,t)}function Xi(t,e,n){return null==e?le:[e,n]}const Qi=Xi;function Zi(t,e,n){return null==e?le:xt(e,n,yt,!0)}function Ji(t,e,n,i){return null==e?le:mt(e,n,t.scales[i].log,!1)}const tr=Ji;function er(t,e,n,i){return null==e?le:vt(e,n,t.scales[i].log,!1)}const nr=er;function ir(t,e,n,i,r){let o=Ot(Ut(t),Ut(e)),s=e-t,a=dt(r/i*s,n);do{let t=n[a],e=i*t/s;if(e>=r&&o+(t<5?ie.get(t):0)<=17)return[t,e]}while(++a<n.length);return[0,0]}function rr(t){let e,n;return t=t.replace(/(\d+)px/,((t,i)=>(e=Mt((n=+i)*q))+"px")),[t,e,n]}function or(t){t.show&&[t.font,t.labelFont].forEach((t=>{let e=ne(t[2]*q,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e}))}function sr(t,e,n){const i={mode:St(t.mode,1)},r=i.mode;function E(t,e){let n=3==e.distr?Ft(t>0?t:e.clamp(i,t,e.min,e.max,e.key)):4==e.distr?Bt(t,e.asinh):t;return(n-e._min)/(e._max-e._min)}function W(t,e,n,i){let r=E(t,e);return i+n*(-1==e.dir?1-r:r)}function H(t,e,n,i){let r=E(t,e);return i+n*(-1==e.dir?r:1-r)}function B(t,e,n,i){return 0==e.ori?W(t,e,n,i):H(t,e,n,i)}i.valToPosH=W,i.valToPosV=H;let j=!1;i.status=0;const Y=i.root=et(o);if(null!=t.id&&(Y.id=t.id),Q(Y,t.class),t.title){let e=et(l,Y);e.textContent=t.title}const K=tt("canvas"),X=i.ctx=K.getContext("2d"),nt=et(c,Y);ut("click",nt,(t=>{if(t.target===st){let e=kr!=xr||$r!=Sr;e&&Dr.click(i,t)}}),!0);const rt=i.under=et(u,nt);nt.appendChild(K);const st=i.over=et(h,nt);t=me(t);const lt=+St(t.pxAlign,1),ct=_i(lt);(t.plugins||[]).forEach((e=>{e.opts&&(t=e.opts(i,t)||t)}));const ft=t.ms||.001,bt=i.series=1==r?Yi(t.series||[],Bn,si,!1):qi(t.series||[null],oi),_t=i.axes=Yi(t.axes||[],Fn,ti,!0),Ct=i.scales={},kt=i.bands=t.bands||[];kt.forEach((t=>{t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1)}));const $t=2==r?bt[1].facets[0].scale:bt[0].scale,Tt={axes:pr,series:Hi},Et=(t.drawOrder||["axes","series"]).map((t=>Tt[t]));function Nt(e){let n=Ct[e];if(null==n){let i=(t.scales||se)[e]||se;if(null!=i.from)Nt(i.from),Ct[e]=ve({},Ct[i.from],i,{key:e});else{n=Ct[e]=ve({},e==$t?li:ci,i),n.key=e;let t=n.time,o=n.range,s=ce(o);if((e!=$t||2==r&&!t)&&(!s||null!=o[0]&&null!=o[1]||(o={min:null==o[0]?wt:{mode:1,hard:o[0],soft:o[0]},max:null==o[1]?wt:{mode:1,hard:o[1],soft:o[1]}},s=!1),!s&&fe(o))){let t=o;o=(e,n,i)=>null==n?le:xt(n,i,t)}n.range=Gt(o||(t?Qi:e==$t?3==n.distr?tr:4==n.distr?nr:Xi:3==n.distr?Ji:4==n.distr?er:Zi)),n.auto=Gt(!s&&n.auto),n.clamp=Gt(n.clamp||ai),n._min=n._max=null}}}Nt("x"),Nt("y"),1==r&&bt.forEach((t=>{Nt(t.scale)})),_t.forEach((t=>{Nt(t.scale)}));for(let o in t.scales)Nt(o);const Wt=Ct[$t],Ut=Wt.distr;let Vt,Yt;0==Wt.ori?(Q(Y,s),Vt=W,Yt=H):(Q(Y,a),Vt=H,Yt=W);const Zt={};for(let o in Ct){let t=Ct[o];null==t.min&&null==t.max||(Zt[o]={min:t.min,max:t.max},t.min=t.max=null)}const ee=t.tzDate||(t=>new Date(Mt(t/ft))),oe=t.fmtDate||Pe,ue=1==ft?an(ee):un(ee),ge=dn(ee,hn(1==ft?sn:cn,oe)),ye=vn(ee,gn(mn,oe)),we=[],be=i.legend=ve({},bn,t.legend),_e=be.show,xe=be.markers;let Ae,Ce,ke;be.idxs=we,xe.width=Gt(xe.width),xe.dash=Gt(xe.dash),xe.stroke=Gt(xe.stroke),xe.fill=Gt(xe.fill);let $e,Te=[],Le=[],Re=!1,Ee={};if(be.live){const t=bt[1]?bt[1].values:null;Re=null!=t,$e=Re?t(i,1,0):{_:0};for(let e in $e)Ee[e]=U}if(_e)if(Ae=tt("table",y,Y),ke=tt("tbody",null,Ae),be.mount(i,Ae),Re){Ce=tt("thead",null,Ae,ke);let t=tt("tr",null,Ce);for(var Me in tt("th",null,t),$e)tt("th",S,t).textContent=Me}else Q(Ae,b),be.live&&Q(Ae,w);const De={show:!0},Ie={show:!1};function Oe(t,e){if(0==e&&(Re||!be.live||2==r))return le;let n=[],o=tt("tr",_,ke,ke.childNodes[e]);Q(o,t.class),t.show||Q(o,f);let s=tt("th",null,o);if(xe.show){let t=et(x,s);if(e>0){let n=xe.width(i,e);n&&(t.style.border=n+"px "+xe.dash(i,e)+" "+xe.stroke(i,e)),t.style.background=xe.fill(i,e)}}let a=et(S,s);for(var l in a.textContent=t.label,e>0&&(xe.show||(a.style.color=t.width>0?xe.stroke(i,e):xe.fill(i,e)),Fe("click",s,(e=>{if(Ln._lock)return;En(e);let n=bt.indexOf(t);if((e.ctrlKey||e.metaKey)!=be.isolate){let t=bt.some(((t,e)=>e>0&&e!=n&&t.show));bt.forEach(((e,i)=>{i>0&&Br(i,t?i==n?De:Ie:De,!0,To.setSeries)}))}else Br(n,{show:!t.show},!0,To.setSeries)}),!1),In&&Fe(P,s,(e=>{Ln._lock||(En(e),Br(bt.indexOf(t),Kr,!0,To.setSeries))}),!1)),$e){let t=tt("td",A,o);t.textContent="--",n.push(t)}return[o,n]}const Ne=new Map;function Fe(t,e,n,r=!0){const o=Ne.get(e)||{},s=Ln.bind[t](i,e,n,r);s&&(ut(t,e,o[t]=s),Ne.set(e,o))}function We(t,e,n){const i=Ne.get(e)||{};for(let r in i)null!=t&&r!=t||(ht(r,e,i[r]),delete i[r]);null==t&&Ne.delete(e)}let He=0,Be=0,ze=0,Ge=0,Ve=0,Ye=0,qe=Ve,Ke=Ye,Xe=ze,Qe=Ge,Ze=0,Je=0,tn=0,en=0;i.bbox={};let nn=!1,rn=!1,pn=!1,yn=!1,wn=!1,_n=!1;function xn(t,e,n){(n||t!=i.width||e!=i.height)&&Sn(t,e),gr(!1),pn=!0,rn=!0,Lr()}function Sn(t,e){i.width=He=ze=t,i.height=Be=Ge=e,Ve=Ye=0,$n(),Tn();let n=i.bbox;Ze=n.left=Jt(Ve*q,.5),Je=n.top=Jt(Ye*q,.5),tn=n.width=Jt(ze*q,.5),en=n.height=Jt(Ge*q,.5)}const An=3;function Cn(){let t=!1,e=0;while(!t){e++;let n=dr(e),r=fr(e);t=e==An||n&&r,t||(Sn(i.width,i.height),rn=!0)}}function kn({width:t,height:e}){xn(t,e)}function $n(){let t=!1,e=!1,n=!1,i=!1;_t.forEach(((r,o)=>{if(r.show&&r._show){let{side:o,_size:s}=r,a=o%2,l=null!=r.label?r.labelSize:0,c=s+l;c>0&&(a?(ze-=c,3==o?(Ve+=c,i=!0):n=!0):(Ge-=c,0==o?(Ye+=c,t=!0):e=!0))}})),Xn[0]=t,Xn[1]=n,Xn[2]=e,Xn[3]=i,ze-=ui[1]+ui[3],Ve+=ui[3],Ge-=ui[2]+ui[0],Ye+=ui[0]}function Tn(){let t=Ve+ze,e=Ye+Ge,n=Ve,i=Ye;function r(r,o){switch(r){case 1:return t+=o,t-o;case 2:return e+=o,e-o;case 3:return n-=o,n+o;case 0:return i-=o,i+o}}_t.forEach(((t,e)=>{if(t.show&&t._show){let e=t.side;t._pos=r(e,t._size),null!=t.label&&(t._lpos=r(e,t.labelSize))}}))}i.setSize=kn;const Ln=i.cursor=ve({},Rn,{drag:{y:2==r}},t.cursor),En=t=>{Ln.event=t};Ln.idxs=we,Ln._lock=!1;let Mn=Ln.points;Mn.show=Gt(Mn.show),Mn.size=Gt(Mn.size),Mn.stroke=Gt(Mn.stroke),Mn.width=Gt(Mn.width),Mn.fill=Gt(Mn.fill);const Dn=i.focus=ve({},t.focus||{alpha:.3},Ln.focus),In=Dn.prox>=0;let On=[null],Pn=[null],Nn=[null];function Vn(t,e){if(e>0){let n=Ln.points.show(i,e);if(n)return Q(n,v),Q(n,t.class),it(n,-10,-10,ze,Ge),st.insertBefore(n,On[e]),n}}function Yn(t,e){if(1==r||e>0){let e=1==r&&Ct[t.scale].time,n=t.value;t.value=e?de(n)?vn(ee,gn(n,oe)):n||ye:n||Jn,t.label=t.label||(e?Hn:Wn)}if(e>0){t.width=null==t.width?1:t.width,t.paths=t.paths||Gi||Kt,t.fillTo=Gt(t.fillTo||mi),t.pxAlign=+St(t.pxAlign,lt),t.pxRound=_i(t.pxAlign),t.stroke=Gt(t.stroke||null),t.fill=Gt(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;let e=ei(Ot(1,t.width),1),n=t.points=ve({},{size:e,width:Ot(1,.2*e),stroke:t.stroke,space:2*e,paths:Vi,_stroke:null,_fill:null},t.points);n.show=Gt(n.show),n.filter=Gt(n.filter),n.fill=Gt(n.fill),n.stroke=Gt(n.stroke),n.paths=Gt(n.paths),n.pxAlign=t.pxAlign}if(_e){let n=Oe(t,e);Te.splice(e,0,n[0]),Le.splice(e,0,n[1]),be.values.push(null)}if(Ln.show){we.splice(e,0,null);let n=Vn(t,e);null!=n&&(On.splice(e,0,n),Pn.splice(e,0,0),Nn.splice(e,0,0))}ko("addSeries",e)}function qn(t,e){e=null==e?bt.length:e,t=1==r?Ki(t,e,Bn,si):Ki(t,e,null,oi),bt.splice(e,0,t),Yn(bt[e],e)}function Kn(t){if(bt.splice(t,1),_e){be.values.splice(t,1),Le.splice(t,1);let e=Te.splice(t,1)[0];We(null,e.firstChild),e.remove()}Ln.show&&(we.splice(t,1),On.length>1&&(On.splice(t,1)[0].remove(),Pn.splice(t,1),Nn.splice(t,1))),ko("delSeries",t)}i.addSeries=qn,i.delSeries=Kn;const Xn=[!1,!1,!1,!1];function ni(t,e){if(t._show=t.show,t.show){let n=t.side%2,r=Ct[t.scale];null==r&&(t.scale=n?bt[1].scale:$t,r=Ct[t.scale]);let o=r.time;t.size=Gt(t.size),t.space=Gt(t.space),t.rotate=Gt(t.rotate),ce(t.incrs)&&t.incrs.forEach((t=>{!ie.has(t)&&ie.set(t,re(t))})),t.incrs=Gt(t.incrs||(2==r.distr?Ue:o?1==ft?on:ln:je)),t.splits=Gt(t.splits||(o&&1==r.distr?ue:3==r.distr?jn:4==r.distr?Gn:Un)),t.stroke=Gt(t.stroke),t.grid.stroke=Gt(t.grid.stroke),t.ticks.stroke=Gt(t.ticks.stroke),t.border.stroke=Gt(t.border.stroke);let s=t.values;t.values=ce(s)&&!ce(s[0])?Gt(s):o?ce(s)?dn(ee,hn(s,oe)):de(s)?fn(ee,s):s||ge:s||zn,t.filter=Gt(t.filter||(r.distr>=3&&10==r.log?Qn:3==r.distr&&2==r.log?Zn:qt)),t.font=rr(t.font),t.labelFont=rr(t.labelFont),t._size=t.size(i,null,e,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(Xn[e]=!0,t._el=et(d,nt))}}function ii(t,e,n,i){let[r,o,s,a]=n,l=e%2,c=0;return 0==l&&(a||o)&&(c=0==e&&!r||2==e&&!s?Mt(Fn.size/3):0),1==l&&(r||s)&&(c=1==e&&!o||3==e&&!a?Mt(ti.size/2):0),c}const ri=i.padding=(t.padding||[ii,ii,ii,ii]).map((t=>Gt(St(t,ii)))),ui=i._padding=ri.map(((t,e)=>t(i,e,Xn,0)));let pi,gi=null,vi=null;const yi=1==r?bt[0].idxs:null;let wi,bi,xi,Si,Ai,Ci,ki,$i,Ti,Li,Ri=null,Ei=!1;function Mi(t,n){if(e=null==t?[]:t,2==r){pi=0;for(let t=1;t<bt.length;t++)pi+=e[t][0].length;i._data=e}else{0==e.length&&(e=[[]]),Ri=e[0],pi=Ri.length;let t=e;if(2==Ut){t=e.slice();let n=t[0]=Array(pi);for(let t=0;t<pi;t++)n[t]=t}i._data=e=t}if(i.data=e,gr(!0),ko("setData"),2==Ut&&(pn=!0),!1!==n){let t=Wt;t.auto(i,Ei)?Di():Hr($t,t.min,t.max),yn=yn||Ln.left>=0,_n=!0,Lr()}}function Di(){let t,n;Ei=!0,1==r&&(pi>0?(gi=yi[0]=0,vi=yi[1]=pi-1,t=e[0][gi],n=e[0][vi],2==Ut?(t=gi,n=vi):t==n&&(3==Ut?[t,n]=mt(t,t,Wt.log,!1):4==Ut?[t,n]=vt(t,t,Wt.log,!1):Wt.time?n=t+Mt(86400/ft):[t,n]=xt(t,n,yt,!0))):(gi=yi[0]=t=null,vi=yi[1]=n=null)),Hr($t,t,n)}function Ii(t,e,n,i,r,o){var s,a,l,c,u;null!==(s=t)&&void 0!==s||(t=M),null!==(a=n)&&void 0!==a||(n=ae),null!==(l=i)&&void 0!==l||(i="butt"),null!==(c=r)&&void 0!==c||(r=M),null!==(u=o)&&void 0!==u||(o="round"),t!=wi&&(X.strokeStyle=wi=t),r!=bi&&(X.fillStyle=bi=r),e!=xi&&(X.lineWidth=xi=e),o!=Ai&&(X.lineJoin=Ai=o),i!=Ci&&(X.lineCap=Ci=i),n!=Si&&X.setLineDash(Si=n)}function Oi(t,e,n,i){e!=bi&&(X.fillStyle=bi=e),t!=ki&&(X.font=ki=t),n!=$i&&(X.textAlign=$i=n),i!=Ti&&(X.textBaseline=Ti=i)}function Pi(t,e,n,r,o=0){if(r.length>0&&t.auto(i,Ei)&&(null==e||null==e.min)){let e=St(gi,0),i=St(vi,r.length-1),s=null==n.min?3==t.distr?gt(r,e,i):pt(r,e,i,o):[n.min,n.max];t.min=It(t.min,n.min=s[0]),t.max=Ot(t.max,n.max=s[1])}}i.setData=Mi;const Ni={min:null,max:null};function Fi(){for(let e in Ct){let t=Ct[e];null==Zt[e]&&(null==t.min||null!=Zt[$t]&&t.auto(i,Ei))&&(Zt[e]=Ni)}for(let e in Ct){let t=Ct[e];null==Zt[e]&&null!=t.from&&null!=Zt[t.from]&&(Zt[e]=Ni)}null!=Zt[$t]&&gr(!0);let t={};for(let e in Zt){let n=Zt[e];if(null!=n){let o=t[e]=me(Ct[e],pe);if(null!=n.min)ve(o,n);else if(e!=$t||2==r)if(0==pi&&null==o.from){let t=o.range(i,null,null,e);o.min=t[0],o.max=t[1]}else o.min=zt,o.max=-zt}}if(pi>0){bt.forEach(((n,o)=>{if(1==r){let r=n.scale,s=Zt[r];if(null==s)return;let a=t[r];if(0==o){let t=a.range(i,a.min,a.max,r);a.min=t[0],a.max=t[1],gi=dt(a.min,e[0]),vi=dt(a.max,e[0]),vi-gi>1&&(e[0][gi]<a.min&&gi++,e[0][vi]>a.max&&vi--),n.min=Ri[gi],n.max=Ri[vi]}else n.show&&n.auto&&Pi(a,s,n,e[o],n.sorted);n.idxs[0]=gi,n.idxs[1]=vi}else if(o>0&&n.show&&n.auto){let[i,r]=n.facets,s=i.scale,a=r.scale,[l,c]=e[o];Pi(t[s],Zt[s],i,l,i.sorted),Pi(t[a],Zt[a],r,c,r.sorted),n.min=r.min,n.max=r.max}}));for(let e in t){let n=t[e],r=Zt[e];if(null==n.from&&(null==r||null==r.min)){let t=n.range(i,n.min==zt?null:n.min,n.max==-zt?null:n.max,e);n.min=t[0],n.max=t[1]}}}for(let e in t){let n=t[e];if(null!=n.from){let r=t[n.from];if(null==r.min)n.min=n.max=null;else{let t=n.range(i,r.min,r.max,e);n.min=t[0],n.max=t[1]}}}let n={},o=!1;for(let e in t){let i=t[e],r=Ct[e];if(r.min!=i.min||r.max!=i.max){r.min=i.min,r.max=i.max;let t=r.distr;r._min=3==t?Ft(r.min):4==t?Bt(r.min,r.asinh):r.min,r._max=3==t?Ft(r.max):4==t?Bt(r.max,r.asinh):r.max,n[e]=o=!0}}if(o){bt.forEach(((t,e)=>{2==r?e>0&&n.y&&(t._paths=null):n[t.scale]&&(t._paths=null)}));for(let t in n)pn=!0,ko("setScale",t);Ln.show&&Ln.left>=0&&(yn=_n=!0)}for(let e in Zt)Zt[e]=null}function Wi(t){let e=jt(gi-1,0,pi-1),n=jt(vi+1,0,pi-1);while(null==t[e]&&e>0)e--;while(null==t[n]&&n<pi-1)n++;return[e,n]}function Hi(){pi>0&&(bt.forEach(((t,n)=>{if(n>0&&t.show&&(Bi(n,!1),Bi(n,!0),null==t._paths)){let o=2==r?[0,e[n][0].length-1]:Wi(e[n]);t._paths=t.paths(i,n,o[0],o[1])}})),bt.forEach(((t,e)=>{if(e>0&&t.show){Li!=t.alpha&&(X.globalAlpha=Li=t.alpha),null!=t._paths&&zi(e,!1);{let n=null!=t._paths?t._paths.gaps:null,r=t.points.show(i,e,gi,vi,n),o=t.points.filter(i,e,r,n);(r||o)&&(t.points._paths=t.points.paths(i,e,gi,vi,o),zi(e,!0))}1!=Li&&(X.globalAlpha=Li=1),ko("drawSeries",e)}})))}function Bi(t,e){let n=e?bt[t].points:bt[t];n._stroke=n.stroke(i,t),n._fill=n.fill(i,t)}function zi(t,e){let n=e?bt[t].points:bt[t],{stroke:i,fill:r,clip:o,flags:s,_stroke:a=n._stroke,_fill:l=n._fill,_width:c=n.width}=n._paths;c=ne(c*q,3);let u=null,h=c%2/2;e&&null==l&&(l=c>0?"#fff":a);let d=1==n.pxAlign&&h>0;if(d&&X.translate(h,h),!e){let t=Ze-c/2,e=Je-c/2,n=tn+c,i=en+c;u=new Path2D,u.rect(t,e,n,i)}e?ar(a,c,n.dash,n.cap,l,i,r,s,o):ji(t,a,c,n.dash,n.cap,l,i,r,s,u,o),d&&X.translate(-h,-h)}function ji(t,n,r,o,s,a,l,c,u,h,d){let f=!1;0!=u&&kt.forEach(((p,g)=>{if(p.series[0]==t){let t,m=bt[p.series[1]],v=e[p.series[1]],y=(m._paths||se).band;ce(y)&&(y=1==p.dir?y[0]:y[1]);let w=null;m.show&&y&&At(v,gi,vi)?(w=p.fill(i,g)||a,t=m._paths.clip):y=null,ar(n,r,o,s,w,l,c,u,h,d,t,y),f=!0}})),f||ar(n,r,o,s,a,l,c,u,h,d)}const sr=di|fi;function ar(t,e,n,i,r,o,s,a,l,c,u,h){Ii(t,e,n,i,r),(l||c||h)&&(X.save(),l&&X.clip(l),c&&X.clip(c)),h?(a&sr)==sr?(X.clip(h),u&&X.clip(u),cr(r,s),lr(t,o,e)):a&fi?(cr(r,s),X.clip(h),lr(t,o,e)):a&di&&(X.save(),X.clip(h),u&&X.clip(u),cr(r,s),X.restore(),lr(t,o,e)):(cr(r,s),lr(t,o,e)),(l||c||h)&&X.restore()}function lr(t,e,n){n>0&&(e instanceof Map?e.forEach(((t,e)=>{X.strokeStyle=wi=e,X.stroke(t)})):null!=e&&t&&X.stroke(e))}function cr(t,e){e instanceof Map?e.forEach(((t,e)=>{X.fillStyle=bi=e,X.fill(t)})):null!=e&&t&&X.fill(e)}function ur(t,e,n,r){let o,s=_t[t];if(r<=0)o=[0,0];else{let a=s._space=s.space(i,t,e,n,r),l=s._incrs=s.incrs(i,t,e,n,r,a);o=ir(e,n,l,r,a)}return s._found=o}function hr(t,e,n,i,r,o,s,a,l,c){let u=s%2/2;1==lt&&X.translate(u,u),Ii(a,s,l,c,a),X.beginPath();let h,d,f,p,g=r+(0==i||3==i?-o:o);0==n?(d=r,p=g):(h=r,f=g);for(let m=0;m<t.length;m++)null!=e[m]&&(0==n?h=f=t[m]:d=p=t[m],X.moveTo(h,d),X.lineTo(f,p));X.stroke(),1==lt&&X.translate(-u,-u)}function dr(t){let e=!0;return _t.forEach(((n,r)=>{if(!n.show)return;let o=Ct[n.scale];if(null==o.min)return void(n._show&&(e=!1,n._show=!1,gr(!1)));n._show||(e=!1,n._show=!0,gr(!1));let s=n.side,a=s%2,{min:l,max:c}=o,[u,h]=ur(r,l,c,0==a?ze:Ge);if(0==h)return;let d=2==o.distr,f=n._splits=n.splits(i,r,l,c,u,h,d),p=2==o.distr?f.map((t=>Ri[t])):f,g=2==o.distr?Ri[f[1]]-Ri[f[0]]:u,m=n._values=n.values(i,n.filter(i,p,r,h,g),r,h,g);n._rotate=2==s?n.rotate(i,m,r,h):0;let v=n._size;n._size=Dt(n.size(i,m,r,t)),null!=v&&n._size!=v&&(e=!1)})),e}function fr(t){let e=!0;return ri.forEach(((n,r)=>{let o=n(i,r,Xn,t);o!=ui[r]&&(e=!1),ui[r]=o})),e}function pr(){for(let t=0;t<_t.length;t++){let e=_t[t];if(!e.show||!e._show)continue;let n,r,o=e.side,s=o%2,a=e.stroke(i,t),l=0==o||3==o?-1:1;if(e.label){let t=e.labelGap*l,i=Mt((e._lpos+t)*q);Oi(e.labelFont[0],a,"center",2==o?$:T),X.save(),1==s?(n=r=0,X.translate(i,Mt(Je+en/2)),X.rotate((3==o?-Lt:Lt)/2)):(n=Mt(Ze+tn/2),r=i),X.fillText(e.label,n,r),X.restore()}let[c,u]=e._found;if(0==u)continue;let h=Ct[e.scale],d=0==s?tn:en,f=0==s?Ze:Je,p=Mt(e.gap*q),g=e._splits,m=2==h.distr?g.map((t=>Ri[t])):g,v=2==h.distr?Ri[g[1]]-Ri[g[0]]:c,y=e.ticks,w=e.border,b=y.show?Mt(y.size*q):0,_=e._rotate*-Lt/180,x=ct(e._pos*q),S=(b+p)*l,A=x+S;r=0==s?A:0,n=1==s?A:0;let C=e.font[0],k=1==e.align?L:2==e.align?R:_>0?L:_<0?R:0==s?"center":3==o?R:L,E=_||1==s?"middle":2==o?$:T;Oi(C,a,k,E);let M=e.font[1]*e.lineGap,D=g.map((t=>ct(B(t,h,d,f)))),I=e._values;for(let t=0;t<I.length;t++){let e=I[t];if(null!=e){0==s?n=D[t]:r=D[t],e=""+e;let i=-1==e.indexOf("\n")?[e]:e.split(/\n/gm);for(let t=0;t<i.length;t++){let e=i[t];_?(X.save(),X.translate(n,r+t*M),X.rotate(_),X.fillText(e,0,0),X.restore()):X.fillText(e,n,r+t*M)}}}y.show&&hr(D,y.filter(i,m,t,u,v),s,o,x,b,ne(y.width*q,3),y.stroke(i,t),y.dash,y.cap);let O=e.grid;O.show&&hr(D,O.filter(i,m,t,u,v),s,0==s?2:1,0==s?Je:Ze,0==s?en:tn,ne(O.width*q,3),O.stroke(i,t),O.dash,O.cap),w.show&&hr([x],[1],0==s?1:0,0==s?1:2,1==s?Je:Ze,1==s?en:tn,ne(w.width*q,3),w.stroke(i,t),w.dash,w.cap)}ko("drawAxes")}function gr(t){bt.forEach(((e,n)=>{n>0&&(e._paths=null,t&&(1==r?(e.min=null,e.max=null):e.facets.forEach((t=>{t.min=null,t.max=null}))))}))}let mr,vr,yr,wr,br,_r,xr,Sr,Ar,Cr,kr,$r,Tr=!1;function Lr(){Tr||(Se(Rr),Tr=!0)}function Rr(){if(nn&&(Fi(),nn=!1),pn&&(Cn(),pn=!1),rn){if(J(rt,L,Ve),J(rt,$,Ye),J(rt,C,ze),J(rt,k,Ge),J(st,L,Ve),J(st,$,Ye),J(st,C,ze),J(st,k,Ge),J(nt,C,He),J(nt,k,Be),K.width=Mt(He*q),K.height=Mt(Be*q),_t.forEach((({_el:t,_show:e,_size:n,_pos:i,side:r})=>{if(null!=t)if(e){let e=3===r||0===r?n:0,o=r%2==1;J(t,o?"left":"top",i-e),J(t,o?"width":"height",n),J(t,o?"top":"left",o?Ye:Ve),J(t,o?"height":"width",o?Ge:ze),Z(t,f)}else Q(t,f)})),wi=bi=xi=Ai=Ci=ki=$i=Ti=Si=null,Li=1,co(!0),Ve!=qe||Ye!=Ke||ze!=Xe||Ge!=Qe){gr(!1);let t=ze/Xe,e=Ge/Qe;if(Ln.show&&!yn&&Ln.left>=0){Ln.left*=t,Ln.top*=e,yr&&it(yr,Mt(Ln.left),0,ze,Ge),wr&&it(wr,0,Mt(Ln.top),ze,Ge);for(let n=1;n<On.length;n++)Pn[n]*=t,Nn[n]*=e,it(On[n],te(Pn[n],1),te(Nn[n],1),ze,Ge)}if(Pr.show&&!wn&&Pr.left>=0&&Pr.width>0){Pr.left*=t,Pr.width*=t,Pr.top*=e,Pr.height*=e;for(let t in fo)J(Nr,t,Pr[t])}qe=Ve,Ke=Ye,Xe=ze,Qe=Ge}ko("setSize"),rn=!1}He>0&&Be>0&&(X.clearRect(0,0,K.width,K.height),ko("drawClear"),Et.forEach((t=>t())),ko("draw")),Pr.show&&wn&&(Fr(Pr),wn=!1),Ln.show&&yn&&(ao(null,!0,!1),yn=!1),be.show&&be.live&&_n&&(oo(),_n=!1),j||(j=!0,i.status=1,ko("ready")),Ei=!1,Tr=!1}function Er(t,n){let r=Ct[t];if(null==r.from){if(0==pi){let e=r.range(i,n.min,n.max,t);n.min=e[0],n.max=e[1]}if(n.min>n.max){let t=n.min;n.min=n.max,n.max=t}if(pi>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;t==$t&&2==r.distr&&pi>0&&(n.min=dt(n.min,e[0]),n.max=dt(n.max,e[0]),n.min==n.max&&n.max++),Zt[t]=n,nn=!0,Lr()}}i.redraw=(t,e)=>{pn=e||!1,!1!==t?Hr($t,Wt.min,Wt.max):Lr()},i.setScale=Er;let Mr=!1;const Dr=Ln.drag;let Ir=Dr.x,Or=Dr.y;Ln.show&&(Ln.x&&(mr=et(g,st)),Ln.y&&(vr=et(m,st)),0==Wt.ori?(yr=mr,wr=vr):(yr=vr,wr=mr),kr=Ln.left,$r=Ln.top);const Pr=i.select=ve({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Nr=Pr.show?et(p,Pr.over?st:rt):null;function Fr(t,e){if(Pr.show){for(let e in t)Pr[e]=t[e],e in fo&&J(Nr,e,t[e]);!1!==e&&ko("setSelect")}}function Wr(t,e){let n=bt[t],i=_e?Te[t]:null;n.show?i&&Z(i,f):(i&&Q(i,f),On.length>1&&it(On[t],-10,-10,ze,Ge))}function Hr(t,e,n){Er(t,{min:e,max:n})}function Br(t,e,n,o){null!=e.focus&&Xr(t),null!=e.show&&bt.forEach(((n,i)=>{i>0&&(t==i||null==t)&&(n.show=e.show,Wr(i,e.show),Hr(2==r?n.facets[1].scale:n.scale,null,null),Lr())})),!1!==n&&ko("setSeries",t,e),o&&Eo("setSeries",i,t,e)}function zr(t,e){ve(kt[t],e)}function Ur(t,e){t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1),e=null==e?kt.length:e,kt.splice(e,0,t)}function jr(t){null==t?kt.length=0:kt.splice(t,1)}function Gr(t,e){bt[t].alpha=e,Ln.show&&On[t]&&(On[t].style.opacity=e),_e&&Te[t]&&(Te[t].style.opacity=e)}let Vr,Yr,qr;i.setSelect=Fr,i.setSeries=Br,i.addBand=Ur,i.setBand=zr,i.delBand=jr;const Kr={focus:!0};function Xr(t){if(t!=qr){let e=null==t,n=1!=Dn.alpha;bt.forEach(((i,r)=>{let o=e||0==r||r==t;i._focus=e?null:o,n&&Gr(r,o?1:Dn.alpha)})),qr=t,n&&Lr()}}function Qr(t,e,n){let i=Ct[e];n&&(t=t/q-(1==i.ori?Ye:Ve));let r=ze;1==i.ori&&(r=Ge,t=r-t),-1==i.dir&&(t=r-t);let o=i._min,s=i._max,a=t/r,l=o+(s-o)*a,c=i.distr;return 3==c?Pt(10,l):4==c?Ht(l,i.asinh):l}function Zr(t,n){let i=Qr(t,$t,n);return dt(i,e[0],gi,vi)}function Jr(t){t(i),Lr()}function to(t,e){J(Nr,L,Pr.left=t),J(Nr,C,Pr.width=e)}function eo(t,e){J(Nr,$,Pr.top=t),J(Nr,k,Pr.height=e)}_e&&In&&Fe(N,Ae,(t=>{Ln._lock||(En(t),null!=qr&&Br(null,Kr,!0,To.setSeries))})),i.valToIdx=t=>dt(t,e[0]),i.posToIdx=Zr,i.posToVal=Qr,i.valToPos=(t,e,n)=>0==Ct[e].ori?W(t,Ct[e],n?tn:ze,n?Ze:0):H(t,Ct[e],n?en:Ge,n?Je:0),i.batch=Jr,i.setCursor=(t,e,n)=>{kr=t.left,$r=t.top,ao(null,e,n)};let no=0==Wt.ori?to:eo,io=1==Wt.ori?to:eo;function ro(){if(_e&&be.live)for(let t=2==r?1:0;t<bt.length;t++){if(0==t&&Re)continue;let e=be.values[t],n=0;for(let i in e)Le[t][n++].firstChild.nodeValue=e[i]}}function oo(t,e){null!=t&&(t.idxs?t.idxs.forEach(((t,e)=>{we[e]=t})):he(t.idx)||we.fill(t.idx),be.idx=we[0]);for(let n=0;n<bt.length;n++)(n>0||1==r&&!Re)&&so(n,we[n]);_e&&be.live&&ro(),_n=!1,!1!==e&&ko("setLegend")}function so(t,n){var r;let o,s=bt[t],a=0==t&&2==Ut?Ri:e[t];Re?o=null!==(r=s.values(i,t,n))&&void 0!==r?r:Ee:(o=s.value(i,null==n?null:a[n],t,n),o=null==o?Ee:{_:o}),be.values[t]=o}function ao(t,n,o){let s;Ar=kr,Cr=$r,[kr,$r]=Ln.move(i,kr,$r),Ln.show&&(yr&&it(yr,Mt(kr),0,ze,Ge),wr&&it(wr,0,Mt($r),ze,Ge));let a=gi>vi;Vr=zt;let l=0==Wt.ori?ze:Ge,c=1==Wt.ori?ze:Ge;if(kr<0||0==pi||a){s=null;for(let t=0;t<bt.length;t++)t>0&&On.length>1&&it(On[t],-10,-10,ze,Ge);In&&Br(null,Kr,!0,null==t&&To.setSeries),be.live&&(we.fill(s),_n=!0)}else{let t,n,o;1==r&&(t=0==Wt.ori?kr:$r,n=Qr(t,$t),s=dt(n,e[0],gi,vi),o=Vt(e[0][s],Wt,l,0));for(let a=2==r?1:0;a<bt.length;a++){let t=bt[a],u=we[a],h=null==u?null:1==r?e[a][u]:e[a][1][u],d=Ln.dataIdx(i,a,s,n),f=null==d?null:1==r?e[a][d]:e[a][1][d];_n=_n||f!=h||d!=u,we[a]=d;let p=d==s?o:Vt(1==r?e[0][d]:e[a][0][d],Wt,l,0);if(a>0&&t.show){let e,n,o=null==f?-10:Yt(f,1==r?Ct[t.scale]:Ct[t.facets[1].scale],c,0);if(In&&1==r&&null!=f){let e=Rt(Dn.dist(i,a,d,o,$r));if(e<Vr){let n=Dn.bias;if(0!=n){let i=1==Wt.ori?kr:$r,r=Qr(i,t.scale),o=f>=0?1:-1,s=r>=0?1:-1;s==o&&(1==s?1==n?f>=r:f<=r:1==n?f<=r:f>=r)&&(Vr=e,Yr=a)}else Vr=e,Yr=a}}if(0==Wt.ori?(e=p,n=o):(e=o,n=p),_n&&On.length>1){ot(On[a],Ln.points.fill(i,a),Ln.points.stroke(i,a));let t,r,o,s,l=!0,c=Ln.points.bbox;if(null!=c){l=!1;let e=c(i,a);o=e.left,s=e.top,t=e.width,r=e.height}else o=e,s=n,t=r=Ln.points.size(i,a);at(On[a],t,r,l),Pn[a]=o,Nn[a]=s,it(On[a],te(o,1),te(s,1),ze,Ge)}}}}if(Ln.idx=s,Ln.left=kr,Ln.top=$r,_n&&(be.idx=s,oo()),Pr.show&&Mr)if(null!=t){let[e,n]=To.scales,[i,r]=To.match,[o,s]=t.cursor.sync.scales,a=t.cursor.drag;if(Ir=a._x,Or=a._y,Ir||Or){let a,u,h,d,f,{left:p,top:g,width:m,height:v}=t.select,y=t.scales[e].ori,w=t.posToVal,b=null!=e&&i(e,o),_=null!=n&&r(n,s);b&&Ir?(0==y?(a=p,u=m):(a=g,u=v),h=Ct[e],d=Vt(w(a,o),h,l,0),f=Vt(w(a+u,o),h,l,0),no(It(d,f),Rt(f-d))):no(0,l),_&&Or?(1==y?(a=p,u=m):(a=g,u=v),h=Ct[n],d=Yt(w(a,s),h,c,0),f=Yt(w(a+u,s),h,c,0),io(It(d,f),Rt(f-d))):io(0,c)}else po()}else{let t=Rt(Ar-br),e=Rt(Cr-_r);if(1==Wt.ori){let n=t;t=e,e=n}Ir=Dr.x&&t>=Dr.dist,Or=Dr.y&&e>=Dr.dist;let n,i,r=Dr.uni;null!=r?Ir&&Or&&(Ir=t>=r,Or=e>=r,Ir||Or||(e>t?Or=!0:Ir=!0)):Dr.x&&Dr.y&&(Ir||Or)&&(Ir=Or=!0),Ir&&(0==Wt.ori?(n=xr,i=kr):(n=Sr,i=$r),no(It(n,i),Rt(i-n)),Or||io(0,c)),Or&&(1==Wt.ori?(n=xr,i=kr):(n=Sr,i=$r),io(It(n,i),Rt(i-n)),Ir||no(0,l)),Ir||Or||(no(0,0),io(0,0))}if(Dr._x=Ir,Dr._y=Or,null==t){if(o){if(null!=Lo){let[t,e]=To.scales;To.values[0]=null!=t?Qr(0==Wt.ori?kr:$r,t):null,To.values[1]=null!=e?Qr(1==Wt.ori?kr:$r,e):null}Eo(D,i,kr,$r,ze,Ge,s)}if(In){let t=o&&To.setSeries,e=Dn.prox;null==qr?Vr<=e&&Br(Yr,Kr,!0,t):Vr>e?Br(null,Kr,!0,t):Yr!=qr&&Br(Yr,Kr,!0,t)}}!1!==n&&ko("setCursor")}i.setLegend=oo;let lo=null;function co(t=!1){t?lo=null:(lo=st.getBoundingClientRect(),ko("syncRect",lo))}function uo(t,e,n,i,r,o,s){Ln._lock||Mr&&null!=t&&0==t.movementX&&0==t.movementY||(ho(t,e,n,i,r,o,s,!1,null!=t),null!=t?ao(null,!0,!0):ao(e,!0,!1))}function ho(t,e,n,r,o,s,a,l,c){if(null==lo&&co(!1),En(t),null!=t)n=t.clientX-lo.left,r=t.clientY-lo.top;else{if(n<0||r<0)return kr=-10,void($r=-10);let[t,i]=To.scales,a=e.cursor.sync,[l,c]=a.values,[u,h]=a.scales,[d,f]=To.match,p=e.axes[0].side%2==1,g=0==Wt.ori?ze:Ge,m=1==Wt.ori?ze:Ge,v=p?s:o,y=p?o:s,w=p?r:n,b=p?n:r;if(n=null!=u?d(t,u)?B(l,Ct[t],g,0):-10:g*(w/v),r=null!=h?f(i,h)?B(c,Ct[i],m,0):-10:m*(b/y),1==Wt.ori){let t=n;n=r,r=t}}c&&((n<=1||n>=ze-1)&&(n=Jt(n,ze)),(r<=1||r>=Ge-1)&&(r=Jt(r,Ge))),l?(br=n,_r=r,[xr,Sr]=Ln.move(i,n,r)):(kr=n,$r=r)}Object.defineProperty(i,"rect",{get(){return null==lo&&co(!1),lo}});const fo={width:0,height:0,left:0,top:0};function po(){Fr(fo,!1)}let go,mo,vo,yo;function wo(t,e,n,r,o,s,a){Mr=!0,Ir=Or=Dr._x=Dr._y=!1,ho(t,e,n,r,o,s,a,!0,!1),null!=t&&(Fe(O,G,bo,!1),Eo(I,i,xr,Sr,ze,Ge,null));let{left:l,top:c,width:u,height:h}=Pr;go=l,mo=c,vo=u,yo=h,po()}function bo(t,e,n,r,o,s,a){Mr=Dr._x=Dr._y=!1,ho(t,e,n,r,o,s,a,!1,!0);let{left:l,top:c,width:u,height:h}=Pr,d=u>0||h>0,f=go!=l||mo!=c||vo!=u||yo!=h;if(d&&f&&Fr(Pr),Dr.setScale&&d&&f){let t=l,e=u,n=c,i=h;if(1==Wt.ori&&(t=c,e=h,n=l,i=u),Ir&&Hr($t,Qr(t,$t),Qr(t+e,$t)),Or)for(let r in Ct){let t=Ct[r];r!=$t&&null==t.from&&t.min!=zt&&Hr(r,Qr(n+i,r),Qr(n,r))}po()}else Ln.lock&&(Ln._lock=!Ln._lock,Ln._lock||ao(null,!0,!1));null!=t&&(We(O,G),Eo(O,i,kr,$r,ze,Ge,null))}function _o(t,e,n,i,r,o,s){if(Ln._lock)return;En(t);let a=Mr;if(Mr){let t,e,n=!0,i=!0,r=10;0==Wt.ori?(t=Ir,e=Or):(t=Or,e=Ir),t&&e&&(n=kr<=r||kr>=ze-r,i=$r<=r||$r>=Ge-r),t&&n&&(kr=kr<xr?0:ze),e&&i&&($r=$r<Sr?0:Ge),ao(null,!0,!0),Mr=!1}kr=-10,$r=-10,ao(null,!0,!0),a&&(Mr=a)}function xo(t,e,n,r,o,s,a){Ln._lock||(En(t),Di(),po(),null!=t&&Eo(F,i,kr,$r,ze,Ge,null))}function So(){_t.forEach(or),xn(i.width,i.height,!0)}ut(z,V,So);const Ao={};Ao.mousedown=wo,Ao.mousemove=uo,Ao.mouseup=bo,Ao.dblclick=xo,Ao["setSeries"]=(t,e,n,r)=>{let o=To.match[2];n=o(i,e,n),-1!=n&&Br(n,r,!0,!1)},Ln.show&&(Fe(I,st,wo),Fe(D,st,uo),Fe(P,st,(t=>{En(t),co(!1)})),Fe(N,st,_o),Fe(F,st,xo),Ui.add(i),i.syncRect=co);const Co=i.hooks=t.hooks||{};function ko(t,e,n){t in Co&&Co[t].forEach((t=>{t.call(null,i,e,n)}))}(t.plugins||[]).forEach((t=>{for(let e in t.hooks)Co[e]=(Co[e]||[]).concat(t.hooks[e])}));const $o=(t,e,n)=>n,To=ve({key:null,setSeries:!1,filters:{pub:Xt,sub:Xt},scales:[$t,bt[1]?bt[1].scale:null],match:[Qt,Qt,$o],values:[null,null]},Ln.sync);2==To.match.length&&To.match.push($o),Ln.sync=To;const Lo=To.key,Ro=hi(Lo);function Eo(t,e,n,i,r,o,s){To.filters.pub(t,e,n,i,r,o,s)&&Ro.pub(t,e,n,i,r,o,s)}function Mo(t,e,n,i,r,o,s){To.filters.sub(t,e,n,i,r,o,s)&&Ao[t](null,e,n,i,r,o,s)}function Do(){var t;Ro.unsub(i),Ui.delete(i),Ne.clear(),ht(z,V,So),Y.remove(),null===(t=Ae)||void 0===t||t.remove(),ko("destroy")}function Io(){ko("init",t,e),Mi(e||t.data,!1),Zt[$t]?Er($t,Zt[$t]):Di(),wn=Pr.show&&(Pr.width>0||Pr.height>0),yn=_n=!0,xn(t.width,t.height)}return Ro.sub(i),i.pub=Mo,i.destroy=Do,bt.forEach(Yn),_t.forEach(ni),n?n instanceof HTMLElement?(n.appendChild(Y),Io()):n(i,Io):Io(),i}sr.assign=ve,sr.fmtNum=$t,sr.rangeNum=xt,sr.rangeLog=mt,sr.rangeAsinh=vt,sr.orient=pi,sr.pxRatio=q,sr.join=xe,sr.fmtDate=Pe,sr.tzDate=Fe,sr.sync=hi;{sr.addGap=wi,sr.clipGaps=yi;let t=sr.paths={points:Di};t.linear=Ni,t.stepped=Fi,t.bars=Wi,t.spline=Bi}},6717:(t,e,n)=>{t=n.nmd(t),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(t,e,n){"use strict";function i(t){var e=(new Date).toLocaleString("en-us",t);return 1==e.length?"0"+e:e}var r=t("./lib/dom"),o=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,a=t("./lib/lang"),l=t("./range").Range,c=t("./range_list").RangeList,u=t("./keyboard/hash_handler").HashHandler,h=t("./tokenizer").Tokenizer,d=t("./clipboard"),f={CURRENT_WORD:function(t){return t.session.getTextRange(t.session.getWordRange())},SELECTION:function(t,e,n){var i=t.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(t){return t.session.getLine(t.getCursorPosition().row)},PREV_LINE:function(t){return t.session.getLine(t.getCursorPosition().row-1)},LINE_INDEX:function(t){return t.getCursorPosition().row},LINE_NUMBER:function(t){return t.getCursorPosition().row+1},SOFT_TABS:function(t){return t.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(t){return t.session.getTabSize()},CLIPBOARD:function(t){return d.getText&&d.getText()},FILENAME:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0]},FILENAME_BASE:function(t){return/[^/\\]*$/.exec(this.FILEPATH(t))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(t){return this.FILEPATH(t).replace(/[^/\\]*$/,"")},FILEPATH:function(t){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(t){var e=t.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(t){var e=t.session.$mode||{};return e.lineCommentStart||""},CURRENT_YEAR:i.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:i.bind(null,{year:"2-digit"}),CURRENT_MONTH:i.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:i.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.bind(null,{month:"short"}),CURRENT_DATE:i.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:i.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.bind(null,{weekday:"short"}),CURRENT_HOUR:i.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:i.bind(null,{minute:"2-digit"}),CURRENT_SECOND:i.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var p=function(){function t(){this.snippetMap={},this.snippetNameMap={},this.variables=f}return t.prototype.getTokenizer=function(){return t.$tokenizer||this.createTokenizer()},t.prototype.createTokenizer=function(){function e(t){return t=t.substr(1),/^\d+$/.test(t)?[{tabstopId:parseInt(t,10)}]:[{text:t}]}function n(t){return"(?:[^\\\\"+t+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(t,e,n){var i=n[0];return i.fmtString=!0,i.guard=t.slice(1,-1),i.flag="",""},next:"formatString"};return t.$tokenizer=new h({start:[{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(t=i),[t]}},{regex:/}/,onMatch:function(t,e,n){return[n.length?n.shift():t]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(t,e,n){var i=t.slice(1,-1).replace(/\\[,|\\]|,/g,(function(t){return 2==t.length?t[1]:"\0"})).split("\0").map((function(t){return{value:t}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(t,e,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(t,e,n){var i=t[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?t=i:"n"==i?t="\n":"t"==i?t="\t":-1!="ulULE".indexOf(i)&&(t={changeCase:i,local:i>"a"}),[t]}},{regex:"/\\w*}",onMatch:function(t,e,n){var i=n.shift();return i&&(i.flag=t.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(t,e,n){return[{text:t.slice(1)}]}},{regex:/\${\w+/,onMatch:function(t,e,n){var i={text:t.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(t,e,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||t]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(t,e,n){var i=n[0];return i.formatFunction=t.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(t,e,n){"+"==t[1]&&(n[0].ifEnd=n[0]),"?"==t[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),t.$tokenizer},t.prototype.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map((function(t){return t.value||t}))},t.prototype.getVariableValue=function(t,e,n){if(/^\d+$/.test(e))return(this.variables.__||{})[e]||"";if(/^[A-Z]\d+$/.test(e))return(this.variables[e[0]+"__"]||{})[e.substr(1)]||"";if(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e))return"";var i=this.variables[e];return"function"==typeof i&&(i=this.variables[e](t,e,n)),null==i?"":i},t.prototype.tmStrFormat=function(t,e,n){if(!e.fmt)return t;var i=e.flag||"",r=e.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof e.fmt?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,s=this,a=t.replace(r,(function(){var t=s.variables.__;s.variables.__=[].slice.call(arguments);for(var e=s.resolveVariables(o,n),i="E",r=0;r<e.length;r++){var a=e[r];if("object"==typeof a)if(e[r]="",a.changeCase&&a.local){var l=e[r+1];l&&"string"==typeof l&&("u"==a.changeCase?e[r]=l[0].toUpperCase():e[r]=l[0].toLowerCase(),e[r+1]=l.substr(1))}else a.changeCase&&(i=a.changeCase);else"U"==i?e[r]=a.toUpperCase():"L"==i&&(e[r]=a.toLowerCase())}return s.variables.__=t,e.join("")}));return a},t.prototype.tmFormatFunction=function(t,e,n){return"upcase"==e.formatFunction?t.toUpperCase():"downcase"==e.formatFunction?t.toLowerCase():t},t.prototype.resolveVariables=function(t,e){function n(e){var n=t.indexOf(e,s+1);-1!=n&&(s=n)}for(var i=[],r="",o=!0,s=0;s<t.length;s++){var a=t[s];if("string"!=typeof a){if(a){if(o=!1,a.fmtString){var l=t.indexOf(a,s+1);-1==l&&(l=t.length),a.fmt=t.slice(s+1,l),s=l}if(a.text){var c=this.getVariableValue(e,a.text,r)+"";a.fmtString&&(c=this.tmStrFormat(c,a,e)),a.formatFunction&&(c=this.tmFormatFunction(c,a,e)),c&&!a.ifEnd?(i.push(c),n(a)):!c&&a.ifEnd&&n(a.ifEnd)}else a.elseEnd?n(a.elseEnd):(null!=a.tabstopId||null!=a.changeCase)&&i.push(a)}}else i.push(a),"\n"==a?(o=!0,r=""):o&&(r=/^\t*/.exec(a)[0],o=/\S/.test(a))}return i},t.prototype.getDisplayTextForSnippet=function(t,e){var n=g.call(this,t,e);return n.text},t.prototype.insertSnippetForSelection=function(t,e,n){void 0===n&&(n={});var i=g.call(this,t,e,n),r=t.getSelectionRange(),o=t.session.replace(r,i.text),s=new m(t),a=t.inVirtualSelectionMode&&t.selection.index;s.addTabstops(i.tabstops,r.start,o,a)},t.prototype.insertSnippet=function(t,e,n){void 0===n&&(n={});var i=this;if(t.inVirtualSelectionMode)return i.insertSnippetForSelection(t,e,n);t.forEachSelection((function(){i.insertSnippetForSelection(t,e,n)}),null,{keepOrder:!0}),t.tabstopManager&&t.tabstopManager.tabNext()},t.prototype.$getScope=function(t){var e=t.session.$mode.$id||"";if(e=e.split("/").pop(),"html"===e||"php"===e){"php"===e&&!t.session.$mode.inlinePhp&&(e="html");var n=t.getCursorPosition(),i=t.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?e="javascript":"css-"==i.substring(0,4)?e="css":"php-"==i.substring(0,4)&&(e="php"))}return e},t.prototype.getActiveScopes=function(t){var e=this.$getScope(t),n=[e],i=this.snippetMap;return i[e]&&i[e].includeScopes&&n.push.apply(n,i[e].includeScopes),n.push("_"),n},t.prototype.expandWithTab=function(t,e){var n=this,i=t.forEachSelection((function(){return n.expandSnippetForSelection(t,e)}),null,{keepOrder:!0});return i&&t.tabstopManager&&t.tabstopManager.tabNext(),i},t.prototype.expandSnippetForSelection=function(t,e){var n,i=t.getCursorPosition(),r=t.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(t).some((function(t){var e=a[t];return e&&(n=this.findMatchingSnippet(e,o,s)),!!n}),this),!!n&&(e&&e.dryRun||(t.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(t,n.content),this.variables.M__=this.variables.T__=null),!0)},t.prototype.findMatchingSnippet=function(t,e,n){for(var i=t.length;i--;){var r=t[i];if((!r.startRe||r.startRe.test(e))&&((!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe)))return r.matchBefore=r.startRe?r.startRe.exec(e):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(e)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},t.prototype.register=function(t,e){function n(t){return t&&!/^\^?\(.*\)\$?$|^\\b$/.test(t)&&(t="(?:"+t+")"),t||""}function i(t,e,i){return t=n(t),e=n(e),i?(t=e+t,t&&"$"!=t[t.length-1]&&(t+="$")):(t+=e,t&&"^"!=t[0]&&(t="^"+t)),new RegExp(t)}function r(t){t.scope||(t.scope=e||"_"),e=t.scope,o[e]||(o[e]=[],s[e]={});var n=s[e];if(t.name){var r=n[t.name];r&&l.unregister(r),n[t.name]=t}o[e].push(t),t.prefix&&(t.tabTrigger=t.prefix),!t.content&&t.body&&(t.content=Array.isArray(t.body)?t.body.join("\n"):t.body),t.tabTrigger&&!t.trigger&&(!t.guard&&/^\w/.test(t.tabTrigger)&&(t.guard="\\b"),t.trigger=a.escapeRegExp(t.tabTrigger)),(t.trigger||t.guard||t.endTrigger||t.endGuard)&&(t.startRe=i(t.trigger,t.guard,!0),t.triggerRe=new RegExp(t.trigger),t.endRe=i(t.endTrigger,t.endGuard,!0),t.endTriggerRe=new RegExp(t.endTrigger))}var o=this.snippetMap,s=this.snippetNameMap,l=this;t||(t=[]),Array.isArray(t)?t.forEach(r):Object.keys(t).forEach((function(e){r(t[e])})),this._signal("registerSnippets",{scope:e})},t.prototype.unregister=function(t,e){function n(t){var n=r[t.scope||e];if(n&&n[t.name]){delete n[t.name];var o=i[t.scope||e],s=o&&o.indexOf(t);s>=0&&o.splice(s,1)}}var i=this.snippetMap,r=this.snippetNameMap;t.content?n(t):Array.isArray(t)&&t.forEach(n)},t.prototype.parseSnippetFile=function(t){t=t.replace(/\r/g,"");var e,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;while(e=r.exec(t)){if(e[1])try{i=JSON.parse(e[1]),n.push(i)}catch(s){}if(e[4])i.content=e[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=e[2],a=e[3];if("regex"==o){var l=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=l.exec(a)[1],i.trigger=l.exec(a)[1],i.endTrigger=l.exec(a)[1],i.endGuard=l.exec(a)[1]}else"snippet"==o?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):o&&(i[o]=a)}}return n},t.prototype.getSnippetByName=function(t,e){var n,i=this.snippetNameMap;return this.getActiveScopes(e).some((function(e){var r=i[e];return r&&(n=r[t]),!!n}),this),n},t}();o.implement(p.prototype,s);var g=function(t,e,n){function i(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if("object"==typeof i){if(u[i.tabstopId])continue;var r=t.lastIndexOf(i,n-1);i=e[r]||{tabstopId:i.tabstopId}}e[n]=i}return e}void 0===n&&(n={});var r=t.getCursorPosition(),o=t.session.getLine(r.row),s=t.session.getTabString(),a=o.match(/^\s*/)[0];r.column<a.length&&(a=a.slice(0,r.column)),e=e.replace(/\r/g,"");var l=this.tokenizeTmSnippet(e);l=this.resolveVariables(l,t),l=l.map((function(t){return"\n"!=t||n.excludeExtraIndent?"string"==typeof t?t.replace(/\t/g,s):t:t+a}));var c=[];l.forEach((function(t,e){if("object"==typeof t){var n=t.tabstopId,i=c[n];if(i||(i=c[n]=[],i.index=n,i.value="",i.parents={}),-1===i.indexOf(t)){t.choices&&!i.choices&&(i.choices=t.choices),i.push(t);var r=l.indexOf(t,e+1);if(-1!==r){var o=l.slice(e+1,r),s=o.some((function(t){return"object"==typeof t}));s&&!i.value?i.value=o:o.length&&(!i.value||"string"!=typeof i.value)&&(i.value=o.join(""))}}}})),c.forEach((function(t){t.length=0}));for(var u={},h=0;h<l.length;h++){var d=l[h];if("object"==typeof d){var f=d.tabstopId,p=c[f],g=l.indexOf(d,h+1);if(u[f])u[f]===d&&(delete u[f],Object.keys(u).forEach((function(t){p.parents[t]=!0})));else{u[f]=d;var m=p.value;"string"!=typeof m?m=i(m):d.fmt&&(m=this.tmStrFormat(m,d,t)),l.splice.apply(l,[h+1,Math.max(0,g-h)].concat(m,d)),-1===p.indexOf(d)&&p.push(d)}}}var v=0,y=0,w="";return l.forEach((function(t){if("string"==typeof t){var e=t.split("\n");e.length>1?(y=e[e.length-1].length,v+=e.length-1):y+=t.length,w+=t}else t&&(t.start?t.end={row:v,column:y}:t.start={row:v,column:y})})),{text:w,tabstops:c,tokens:l}},m=function(){function t(t){if(this.index=0,this.ranges=[],this.tabstops=[],t.tabstopManager)return t.tabstopManager;t.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)}return t.prototype.attach=function(t){this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.session=t.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},t.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},t.prototype.onChange=function(t){for(var e="r"==t.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=this.tabstops.slice(),o=0;o<r.length;o++){var s=r[o],a=s==n||i[s.index];if(s.rangeList.$bias=a?0:1,"remove"==t.action&&s!==n){var l=s.parents&&s.parents[n.index],c=s.rangeList.pointIndex(t.start,l);c=c<0?-c-1:c+1;var u=s.rangeList.pointIndex(t.end,l);u=u<0?-u-1:u-1;for(var h=s.rangeList.ranges.slice(c,u),d=0;d<h.length;d++)this.removeRange(h[d])}s.rangeList.$onChange(t)}var f=this.session;!this.$inChange&&e&&1==f.getLength()&&!f.getValue()&&this.detach()},t.prototype.updateLinkedFields=function(){var t=this.selectedTabstop;if(t&&t.hasLinkedRanges&&t.firstNonLinked){this.$inChange=!0;for(var n=this.session,i=n.getTextRange(t.firstNonLinked),r=0;r<t.length;r++){var o=t[r];if(o.linked){var s=o.original,a=e.snippetManager.tmStrFormat(i,s,this.editor);n.replace(o,a)}}this.$inChange=!1}},t.prototype.onAfterExec=function(t){t.command&&!t.command.readOnly&&this.updateLinkedFields()},t.prototype.onChangeSelection=function(){if(this.editor){for(var t=this.editor.selection.lead,e=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(t.row,t.column),o=n||this.ranges[i].contains(e.row,e.column);if(r&&o)return}this.detach()}},t.prototype.onChangeSession=function(){this.detach()},t.prototype.tabNext=function(t){var e=this.tabstops.length,n=this.index+(t||1);n=Math.min(Math.max(n,1),e),n==e&&(n=0),this.selectTabstop(n),0===n&&this.detach()},t.prototype.selectTabstop=function(t){this.$openTabstops=null;var e=this.tabstops[this.index];if(e&&this.addTabstopMarkers(e),this.index=t,e=this.tabstops[this.index],e&&e.length){this.selectedTabstop=e;var n=e.firstNonLinked||e;if(e.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var i=this.editor.multiSelect;i.toSingleRange(n);for(var r=0;r<e.length;r++)e.hasLinkedRanges&&e[r].linked||i.addRange(e[r].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},t.prototype.addTabstops=function(t,e,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!t[0]){var r=l.fromPoints(n,n);y(r.start,e),y(r.end,e),t[0]=[r],t[0].index=0}var o=this.index,s=[o+1,0],a=this.ranges;t.forEach((function(t,n){for(var r=this.$openTabstops[n]||t,o=0;o<t.length;o++){var u=t[o],h=l.fromPoints(u.start,u.end||u.start);v(h.start,e),v(h.end,e),h.original=u,h.tabstop=r,a.push(h),r!=t?r.unshift(h):r[o]=h,u.fmtString||r.firstNonLinked&&i?(h.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=h)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===t&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r),r.rangeList=r.rangeList||new c,r.rangeList.$bias=0,r.rangeList.addList(r)}),this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},t.prototype.addTabstopMarkers=function(t){var e=this.session;t.forEach((function(t){t.markerId||(t.markerId=e.addMarker(t,"ace_snippet-marker","text"))}))},t.prototype.removeTabstopMarkers=function(t){var e=this.session;t.forEach((function(t){e.removeMarker(t.markerId),t.markerId=null}))},t.prototype.removeRange=function(t){var e=t.tabstop.indexOf(t);-1!=e&&t.tabstop.splice(e,1),e=this.ranges.indexOf(t),-1!=e&&this.ranges.splice(e,1),e=t.tabstop.rangeList.ranges.indexOf(t),-1!=e&&t.tabstop.splice(e,1),this.session.removeMarker(t.markerId),t.tabstop.length||(e=this.tabstops.indexOf(t.tabstop),-1!=e&&this.tabstops.splice(e,1),this.tabstops.length||this.detach())},t}();m.prototype.keyboardHandler=new u,m.prototype.keyboardHandler.bindKeys({Tab:function(t){e.snippetManager&&e.snippetManager.expandWithTab(t)||(t.tabstopManager.tabNext(1),t.renderer.scrollCursorIntoView())},"Shift-Tab":function(t){t.tabstopManager.tabNext(-1),t.renderer.scrollCursorIntoView()},Esc:function(t){t.tabstopManager.detach()}});var v=function(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row},y=function(t,e){t.row==e.row&&(t.column-=e.column),t.row-=e.row};r.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),e.snippetManager=new p;var w=t("./editor").Editor;(function(){this.insertSnippet=function(t,n){return e.snippetManager.insertSnippet(this,t,n)},this.expandSnippet=function(t){return e.snippetManager.expandWithTab(this,t)}}).call(w.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../virtual_renderer").VirtualRenderer,r=t("../editor").Editor,o=t("../range").Range,s=t("../lib/event"),a=t("../lib/lang"),l=t("../lib/dom"),c=t("../config").nls,u=t("./../lib/useragent"),h=function(t){return"suggest-aria-id:".concat(t)},d=u.isSafari?"menu":"listbox",f=u.isSafari?"menuitem":"option",p=u.isSafari?"aria-current":"aria-selected",g=function(t){var e=new i(t);e.$maxLines=4;var n=new r(e);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(){function t(t){var e=l.createElement("div"),n=g(e);t&&t.appendChild(e),e.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",d),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(t){var e=t.getDocumentPosition();n.selection.moveToPosition(e),m.start.row=m.end.row=e.row,t.stop()}));var r,u=new o(-1,0,-1,1/0),m=new o(-1,0,-1,1/0);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(t){t?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(t){if(r){if(r.x!=t.x||r.y!=t.y){r=t,r.scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var e=r.getDocumentPosition().row;u.start.row!=e&&(u.id||n.setRow(e),y(e))}}else r=t})),n.renderer.on("beforeRender",(function(){if(r&&-1!=u.start.row){r.$pos=null;var t=r.getDocumentPosition().row;u.id||n.setRow(t),y(t,!0)}})),n.renderer.on("afterRender",(function(){var t=n.getRow(),e=n.renderer.$textLayer,i=e.element.childNodes[t-e.config.firstRow],r=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute(p),n.selectedNode.removeAttribute("id")),n.selectedNode=i,i){l.addCssClass(i,"ace_selected");var o=h(t);i.id=o,e.element.setAttribute("aria-activedescendant",o),r.setAttribute("aria-activedescendant",o),i.setAttribute("role",f),i.setAttribute("aria-roledescription",c("item")),i.setAttribute("aria-label",n.getData(t).value),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-posinset",t+1),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute(p,"true")}}));var v=function(){y(-1)},y=function(t,e){t!==u.start.row&&(u.start.row=u.end.row=t,e||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},s.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,v()})),n.on("hide",v),n.on("changeSelection",v),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(t){var e=n.data[t];return"string"==typeof e?e:e&&e.value||""};var w=n.session.bgTokenizer;return w.$tokenizeRow=function(t){function e(t,e){t&&r.push({type:(i.className||"")+(e||""),value:t})}var i=n.data[t],r=[];if(!i)return r;"string"==typeof i&&(i={value:i});for(var o=i.caption||i.value||i.name,s=o.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=a.length;u++)if(u!=c&&(i.matchMask&1<<u||u==a.length)){var h=a.slice(c,u);c=u;var d=s.indexOf(h,l);if(-1==d)continue;e(o.slice(l,d),""),l=d+h.length,e(o.slice(d,l),"completion-highlight")}return e(o.slice(l,o.length),""),r.push({type:"completion-spacer",value:" "}),i.meta&&r.push({type:"completion-meta",value:i.meta}),i.message&&r.push({type:"completion-message",value:i.message}),r},w.$updateOnChange=i,w.start=i,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.isMouseOver=!1,n.data=[],n.setData=function(t,e){n.filterText=e||"",n.setValue(a.stringRepeat("\n",t.length),-1),n.data=t||[],n.setRow(0)},n.getData=function(t){return n.data[t]},n.getRow=function(){return m.start.row},n.setRow=function(t){t=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,t)),m.start.row!=t&&(n.selection.clearSelection(),m.start.row=m.end.row=t||0,n.session._emit("changeBackMarker"),n.moveCursorTo(t||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",(function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()})),n.hide=function(){this.container.style.display="none",n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal("hide"))},n.tryShow=function(t,e,i,o){if(!o&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===t.top&&n.anchorPos.left===t.left&&n.anchor===i)return!0;var s=this.container,a=window.innerHeight,l=window.innerWidth,c=this.renderer,u=c.$maxLines*e*1.4,h={top:0,bottom:0,left:0},d=a-t.top-3*this.$borderSize-e,f=t.top-3*this.$borderSize;i||(i=f<=d||d>=u?"bottom":"top"),"top"===i?(h.bottom=t.top-this.$borderSize,h.top=h.bottom-u):"bottom"===i&&(h.top=t.top+e+this.$borderSize,h.bottom=h.top+u);var p=h.top>=0&&h.bottom<=a;if(!o&&!p)return!1;c.$maxPixelHeight=p?null:"top"===i?f:d,"top"===i?(s.style.top="",s.style.bottom=a-h.bottom+"px",n.isTopdown=!1):(s.style.top=h.top+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="";var g=t.left;return g+s.offsetWidth>l&&(g=l-s.offsetWidth),s.style.left=g+"px",s.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),r=null),n.anchorPos=t,n.anchor=i,!0},n.show=function(t,e,n){this.tryShow(t,e,n?"bottom":void 0,!0)},n.goTo=function(t){var e=this.getRow(),n=this.session.getLength()-1;switch(t){case"up":e=e<=0?n:e-1;break;case"down":e=e>=n?-1:e+1;break;case"start":e=0;break;case"end":e=n}this.setRow(e)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return t}();l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),e.AcePopup=m,e.$singleLineEditor=g,e.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(t,e,n){"use strict";var i=function(){function t(t){this.editor=t,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return t.prototype.setScreenReaderContent=function(t){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var t=this.popup.getRow(),e=this.popup.renderer.$textLayer,n=e.element.childNodes[t-e.config.firstRow];if(n){for(var i="doc-tooltip ",r=0;r<this._lines.length;r++)i+="ace-inline-screenreader-line-".concat(r," ");n.setAttribute("aria-describedby",i)}}.bind(this)));while(this.screenReaderDiv.firstChild)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=t.split(/\r\n|\r|\n/);var e=this.createCodeBlock();this.screenReaderDiv.appendChild(e)},t.prototype.destroy=function(){this.screenReaderDiv.remove()},t.prototype.createCodeBlock=function(){var t=document.createElement("pre");t.setAttribute("id","ace-inline-screenreader");for(var e=0;e<this._lines.length;e++){var n=document.createElement("code");n.setAttribute("id","ace-inline-screenreader-line-".concat(e));var i=document.createTextNode(this._lines[e]);n.appendChild(i),t.appendChild(n)}return t},t}();e.AceInlineScreenReader=i})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],(function(t,e,n){"use strict";var i=t("../snippets").snippetManager,r=t("./inline_screenreader").AceInlineScreenReader,o=function(){function t(){this.editor=null}return t.prototype.show=function(t,e,n){if(n=n||"",t&&this.editor&&this.editor!==t&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!t||!e)return!1;this.inlineScreenReader||(this.inlineScreenReader=new r(t));var o=e.snippet?i.getDisplayTextForSnippet(t,e.snippet):e.value;return!(e.hideInlinePreview||!o||!o.startsWith(n))&&(this.editor=t,this.inlineScreenReader.setScreenReaderContent(o),o=o.slice(n.length),""===o?t.removeGhostText():t.setGhostText(o),!0)},t.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},t.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},t.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},t}();e.AceInline=o})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(t,e,n){"use strict";e.parForEach=function(t,e,n){var i=0,r=t.length;0===r&&n();for(var o=0;o<r;o++)e(t[o],(function(t,e){i++,i===r&&n(t,e)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;e.retrievePrecedingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e-1;o>=0;o--){if(!n.test(t[o]))break;r.push(t[o])}return r.reverse().join("")},e.retrieveFollowingIdentifier=function(t,e,n){n=n||i;for(var r=[],o=e;o<t.length;o++){if(!n.test(t[o]))break;r.push(t[o])}return r},e.getCompletionPrefix=function(t){var e,n=t.getCursorPosition(),i=t.session.getLine(n.row);return t.completers.forEach(function(t){t.identifierRegexps&&t.identifierRegexps.forEach(function(t){!e&&t&&(e=this.retrievePrecedingIdentifier(i,n.column,t))}.bind(this))}.bind(this)),e||this.retrievePrecedingIdentifier(i,n.column)},e.triggerAutocomplete=function(t){var e=t.getCursorPosition(),n=t.session.getLine(e.row),i=0===e.column?0:e.column-1,r=n[i];return t.completers.some((function(t){if(t.triggerCharacters&&Array.isArray(t.triggerCharacters))return t.triggerCharacters.includes(r)}))}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],(function(t,e,n){"use strict";var i=t("./keyboard/hash_handler").HashHandler,r=t("./autocomplete/popup").AcePopup,o=t("./autocomplete/inline").AceInline,s=t("./autocomplete/popup").getAriaId,a=t("./autocomplete/util"),l=t("./lib/lang"),c=t("./lib/dom"),u=t("./snippets").snippetManager,h=t("./config"),d=t("./lib/event"),f=t("./lib/scroll").preventParentScroll,p=function(t,e){e.completer&&e.completer.destroy()},g=function(){function t(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=l.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=l.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=l.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=l.delayedCall(function(){var e=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!e||0===this.editor.completers.length||(this.completions=new v(t.completionsForLoading),this.openPopup(this.editor,e.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(t,"completionsForLoading",{get:function(){return[{caption:h.nls("Loading..."),value:""}]},enumerable:!1,configurable:!0}),t.prototype.$init=function(){return this.popup=new r(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(t){this.insertMatch(),t.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),d.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},t.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new o,this.inlineRenderer},t.prototype.getPopup=function(){return this.popup||this.$init()},t.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},t.prototype.$seen=function(t){!this.hasSeen.has(t)&&t&&t.completer&&t.completer.onSeen&&"function"==typeof t.completer.onSeen&&(t.completer.onSeen(this.editor,t),this.hasSeen.add(t))},t.prototype.$onPopupChange=function(t){if(this.inlineRenderer&&this.inlineEnabled){var e=t?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(e),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},t.prototype.$updateGhostText=function(t){var e=this.base.row,n=this.base.column,i=this.editor.getCursorPosition().column,r=this.editor.session.getLine(e).slice(n,i);this.inlineRenderer.show(this.editor,t,r)?this.$seen(t):this.inlineRenderer.hide()},t.prototype.$onPopupRender=function(){var t=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var e=this.popup.getFirstVisibleRow();e<=this.popup.getLastVisibleRow();e++){var n=this.popup.getData(e);n&&(!t||n.hideInlinePreview)&&this.$seen(n)}},t.prototype.$onPopupShow=function(t){this.$onPopupChange(t),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},t.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var t=this.editor.container.parentNode,e=[];while(t)e.push(t),t.addEventListener("scroll",this.onLayoutChange,{passive:!0}),t=t.parentNode;this.$elements=e}},t.prototype.unObserveLayoutChanges=function(){var t=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(e){e.removeEventListener("scroll",t.onLayoutChange,{passive:!0})})),this.$elements=null},t.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},t.prototype.$updatePopupPosition=function(){var t=this.editor,e=t.renderer,n=e.layerConfig.lineHeight,i=e.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var r=t.container.getBoundingClientRect();i.top+=r.top-e.layerConfig.offset,i.left+=r.left-t.renderer.scrollLeft,i.left+=e.gutterWidth;var o={top:i.top,left:i.left};e.$ghostText&&e.$ghostTextWidget&&this.base.row===e.$ghostText.position.row&&(o.top+=e.$ghostTextWidget.el.offsetHeight);var s=t.container.getBoundingClientRect().bottom-n,a=s<o.top?{top:s,left:o.left}:o;this.popup.tryShow(a,n,"bottom")||this.popup.tryShow(i,n,"top")||this.popup.show(i,n)},t.prototype.openPopup=function(t,e,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var i,r=this.popup.getRow(),o=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),t.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(i=this.popup.data.indexOf(o)),i&&-1!==i||(i=0),this.popup.setRow(this.autoSelect?i:-1),i===r&&o!==this.completions.filtered[i]&&this.$onPopupChange();var a=this.inlineRenderer&&this.inlineEnabled;if(i===r&&a){var l=this.popup.getData(this.popup.getRow());this.$updateGhostText(l)}n?n&&!e&&this.detach():(this.popup.setTheme(t.getTheme()),this.popup.setFontSize(t.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},t.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},t.prototype.changeListener=function(t){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},t.prototype.blurListener=function(t){var e=document.activeElement,n=this.editor.textInput.getElement(),i=t.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(t.relatedTarget),r=this.popup&&this.popup.container;e!=n&&e.parentNode!=r&&!i&&e!=this.tooltipNode&&t.relatedTarget!=n&&this.detach()},t.prototype.mousedownListener=function(t){this.detach()},t.prototype.mousewheelListener=function(t){this.popup.isMouseOver||this.detach()},t.prototype.mouseOutListener=function(t){this.popup.isOpen&&this.$updatePopupPosition()},t.prototype.goTo=function(t){this.popup.goTo(t)},t.prototype.insertMatch=function(t,e){if(t||(t=this.popup.getData(this.popup.getRow())),!t)return!1;if(""===t.value)return this.detach();var n=this.completions,i=this.getCompletionProvider().insertMatch(this.editor,t,n.filterText,e);return this.completions==n&&this.detach(),i},t.prototype.showPopup=function(t,e){this.editor&&this.detach(),this.activated=!0,this.editor=t,t.completer!=this&&(t.completer&&t.completer.detach(),t.completer=this),t.on("changeSelection",this.changeListener),t.on("blur",this.blurListener),t.on("mousedown",this.mousedownListener),t.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,e)},t.prototype.getCompletionProvider=function(t){return this.completionProvider||(this.completionProvider=new m(t)),this.completionProvider},t.prototype.gatherCompletions=function(t,e){return this.getCompletionProvider().gatherCompletions(t,e)},t.prototype.updateCompletions=function(e,n){if(e&&this.base&&this.completions){var i=this.editor.getCursorPosition(),r=this.editor.session.getTextRange({start:this.base,end:i});if(r==this.completions.filterText)return;return this.completions.setFilter(r),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=r||this.completions.filtered[0].snippet?void this.openPopup(this.editor,r,e):this.detach():this.detach()}if(n&&n.matches){i=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(i.row,i.column),this.base.$insertRight=!0,this.completions=new v(n.matches),this.openPopup(this.editor,"",e)}var o=this.editor.getSession();i=this.editor.getCursorPosition(),r=a.getCompletionPrefix(this.editor);this.base=o.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var s={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:r,pos:i}).provideCompletions(this.editor,s,function(n,i,r){var o=i.filtered,s=a.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),r){if(!o.length){var l=!this.autoShown&&this.emptyMessage;if("function"==typeof l&&(l=this.emptyMessage(s)),l){var c=[{caption:l,value:""}];return this.completions=new v(c),this.openPopup(this.editor,s,e),void this.popup.renderer.setStyle("ace_loading",!1)}return this.detach()}if(1==o.length&&o[0].value==s&&!o[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==o.length)return this.insertMatch(o[0])}this.completions=!r&&this.showLoadingState?new v(t.completionsForLoading.concat(o),i.filterText):i,this.openPopup(this.editor,s,e),this.popup.renderer.setStyle("ace_loading",!r)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},t.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},t.prototype.updateDocTooltip=function(){var t=this.popup,e=this.completions.filtered,n=e&&(e[t.getHoveredRow()]||e[t.getRow()]),i=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var r=this.editor.completers.length,o=0;o<r;o++){var s=this.editor.completers[o];if(s.getDocTooltip&&n.completerId===s.id){i=s.getDocTooltip(n);break}}if(!i&&"string"!=typeof n&&(i=n),"string"==typeof i&&(i={docText:i}),!i||!i.docHTML&&!i.docText)return this.hideDocTooltip();this.showDocTooltip(i)},t.prototype.showDocTooltip=function(t){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",f));var e=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(e.isDark?"ace_dark ":"")+(e.cssClass||"");var n=this.tooltipNode;t.docHTML?n.innerHTML=t.docHTML:t.docText&&(n.textContent=t.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var i=this.popup,r=i.container.getBoundingClientRect();n.style.top=i.container.style.top,n.style.bottom=i.container.style.bottom,n.style.display="block",window.innerWidth-r.right<320?r.left<320?i.isTopdown?(n.style.top=r.bottom+"px",n.style.left=r.left+"px",n.style.right="",n.style.bottom=""):(n.style.top=i.container.offsetTop-n.offsetHeight+"px",n.style.left=r.left+"px",n.style.right="",n.style.bottom=""):(n.style.right=window.innerWidth-r.left+"px",n.style.left=""):(n.style.left=r.right+1+"px",n.style.right="")},t.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var t=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==t&&this.editor.focus(),this.tooltipNode=null,t.parentNode&&t.parentNode.removeChild(t)}},t.prototype.onTooltipClick=function(t){var e=t.target;while(e&&e!=this.tooltipNode){if("A"==e.nodeName&&e.href){e.rel="noreferrer",e.target="_blank";break}e=e.parentNode}},t.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var t=this.popup.container;t&&t.parentNode&&t.parentNode.removeChild(t)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},t}();g.prototype.commands={Up:function(t){t.completer.goTo("up")},Down:function(t){t.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(t){t.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(t){t.completer.goTo("end")},Esc:function(t){t.completer.detach()},Return:function(t){return t.completer.insertMatch()},"Shift-Return":function(t){t.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(t){var e=t.completer.insertMatch();if(e||t.tabstopManager)return e;t.completer.goTo("down")},PageUp:function(t){t.completer.popup.gotoPageUp()},PageDown:function(t){t.completer.popup.gotoPageDown()}},g.for=function(t){return t.completer instanceof g||(t.completer&&(t.completer.destroy(),t.completer=null),h.get("sharedPopups")?(g.$sharedInstance||(g.$sharedInstance=new g),t.completer=g.$sharedInstance):(t.completer=new g,t.once("destroy",p))),t.completer},g.startCommand={name:"startAutocomplete",exec:function(t,e){var n=g.for(t);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(t,e),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var m=function(){function t(t){this.initialPosition=t,this.active=!0}return t.prototype.insertByIndex=function(t,e,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(t,this.completions.filtered[e],n)},t.prototype.insertMatch=function(t,e,n){if(!e)return!1;if(t.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(t,e);else{if(!this.completions)return!1;var i=this.completions.filterText.length,r=0;if(e.range&&e.range.start.row===e.range.end.row&&(i-=this.initialPosition.prefix.length,i+=this.initialPosition.pos.column-e.range.start.column,r+=e.range.end.column-this.initialPosition.pos.column),i||r){var o;o=t.selection.getAllRanges?t.selection.getAllRanges():[t.getSelectionRange()];for(var s,a=0;s=o[a];a++)s.start.column-=i,s.end.column+=r,t.session.remove(s)}e.snippet?u.insertSnippet(t,e.snippet):this.$insertString(t,e),e.completer&&e.completer.onInsert&&"function"==typeof e.completer.onInsert&&e.completer.onInsert(t,e),e.command&&"startAutocomplete"===e.command&&t.execCommand(e.command)}return t.endOperation(),!0},t.prototype.$insertString=function(t,e){var n=e.value||e;t.execCommand("insertstring",n)},t.prototype.gatherCompletions=function(t,e){var n=t.getSession(),i=t.getCursorPosition(),r=a.getCompletionPrefix(t),o=[];this.completers=t.completers;var s=t.completers.length;return t.completers.forEach((function(l,c){l.getCompletions(t,n,i,r,(function(n,i){l.hideInlinePreview&&(i=i.map((function(t){return Object.assign(t,{hideInlinePreview:l.hideInlinePreview})}))),!n&&i&&(o=o.concat(i)),e(null,{prefix:a.getCompletionPrefix(t),matches:o,finished:0===--s})}))})),!0},t.prototype.provideCompletions=function(t,e,n){var i=function(t){var i=t.prefix,r=t.matches;this.completions=new v(r),e.exactMatch&&(this.completions.exactMatch=!0),e.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(i),(t.finished||this.completions.filtered.length)&&n(null,this.completions,t.finished)}.bind(this),r=!0,o=null;if(this.gatherCompletions(t,function(t,e){if(this.active){t&&(n(t,[],!0),this.detach());var s=e.prefix;0===s.indexOf(e.prefix)&&(r?o=e:i(e))}}.bind(this)),r=!1,o){var s=o;o=null,i(s)}},t.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(t){"function"==typeof t.cancel&&t.cancel()}))},t}(),v=function(){function t(t,e){this.all=t,this.filtered=t,this.filterText=e||"",this.exactMatch=!1,this.ignoreCaption=!1}return t.prototype.setFilter=function(t){if(t.length>this.filterText&&0===t.lastIndexOf(this.filterText,0))var e=this.filtered;else e=this.all;this.filterText=t,e=this.filterCompletions(e,this.filterText),e=e.sort((function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)}));var n=null;e=e.filter((function(t){var e=t.snippet||t.caption||t.value;return e!==n&&(n=e,!0)})),this.filtered=e},t.prototype.filterCompletions=function(t,e){var n=[],i=e.toUpperCase(),r=e.toLowerCase();t:for(var o,s=0;o=t[s];s++){var a=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(a){var l,c,u=-1,h=0,d=0;if(this.exactMatch){if(e!==a.substr(0,e.length))continue t}else{var f=a.toLowerCase().indexOf(r);if(f>-1)d=f;else for(var p=0;p<e.length;p++){var g=a.indexOf(r[p],u+1),m=a.indexOf(i[p],u+1);if(l=g>=0&&(m<0||g<m)?g:m,l<0)continue t;c=l-u-1,c>0&&(-1===u&&(d+=10),d+=c,h|=1<<p),u=l}}o.matchMask=h,o.exactMatch=d?0:1,o.$score=(o.score||0)-d,n.push(o)}}return n},t}();e.Autocomplete=g,e.CompletionProvider=m,e.FilteredList=v})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(t,e,n){function i(t,e){var n=t.getTextRange(o.fromPoints({row:0,column:0},e));return n.split(s).length-1}function r(t,e){var n=i(t,e),r=t.getValue().split(s),o=Object.create(null),a=r[n];return r.forEach((function(t,e){if(t&&t!==a){var i=Math.abs(n-e),s=r.length-i;o[t]?o[t]=Math.max(s,o[t]):o[t]=s}})),o}var o=t("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;e.getCompletions=function(t,e,n,i,o){var s=r(e,n),a=Object.keys(s);o(null,a.map((function(t){return{caption:t,value:t,score:s[t],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(t,e,n){"use strict";var i=t("../snippets").snippetManager,r=t("../autocomplete").Autocomplete,o=t("../config"),s=t("../lib/lang"),a=t("../autocomplete/util"),l=t("../autocomplete/text_completer"),c={getCompletions:function(t,e,n,i,r){if(e.$mode.completer)return e.$mode.completer.getCompletions(t,e,n,i,r);var o=t.session.getState(n.row),s=e.$mode.getCompletions(o,e,n,i);s=s.map((function(t){return t.completerId=c.id,t})),r(null,s)},id:"keywordCompleter"},u=function(t){var e={};return t.replace(/\${(\d+)(:(.*?))?}/g,(function(t,n,i,r){return e[n]=r||""})).replace(/\$(\d+?)/g,(function(t,n){return e[n]}))},h={getCompletions:function(t,e,n,r,o){var s=[],a=e.getTokenAt(n.row,n.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=i.getActiveScopes(t);var l=i.snippetMap,c=[];s.forEach((function(t){for(var e=l[t]||[],n=e.length;n--;){var i=e[n],r=i.name||i.tabTrigger;r&&c.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",completerId:h.id})}}),this),o(null,c)},getDocTooltip:function(t){t.snippet&&!t.docHTML&&(t.docHTML=["<b>",s.escapeHTML(t.caption),"</b>","<hr></hr>",s.escapeHTML(u(t.snippet))].join(""))},id:"snippetCompleter"},d=[h,l,c];e.setCompleters=function(t){d.length=0,t&&d.push.apply(d,t)},e.addCompleter=function(t){d.push(t)},e.textCompleter=l,e.keyWordCompleter=c,e.snippetCompleter=h;var f,p={name:"expandSnippet",exec:function(t){return i.expandWithTab(t)},bindKey:"Tab"},g=function(t,e){m(e.session.$mode)},m=function(t){"string"==typeof t&&(t=o.$modes[t]),t&&(i.files||(i.files={}),v(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(m))},v=function(t,e){e&&t&&!i.files[t]&&(i.files[t]={},o.loadModule(e,(function(e){e&&(i.files[t]=e,!e.snippets&&e.snippetText&&(e.snippets=i.parseSnippetFile(e.snippetText)),i.register(e.snippets||[],e.scope),e.includeScopes&&(i.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach((function(t){m("ace/mode/"+t)}))))})))},y=function(t){var e=t.editor,n=e.completer&&e.completer.activated;if("backspace"===t.command.name)n&&!a.getCompletionPrefix(e)&&e.completer.detach();else if("insertstring"===t.command.name&&!n){f=t;var i=t.editor.$liveAutocompletionDelay;i?w.delay(i):b(t)}},w=s.delayedCall((function(){b(f)}),0),b=function(t){var e=t.editor,n=a.getCompletionPrefix(e),i=a.triggerAutocomplete(e);if(n&&n.length>=e.$liveAutocompletionThreshold||i){var o=r.for(e);o.autoShown=!0,o.showPopup(e)}},_=t("../editor").Editor;t("../config").defineOptions(_.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:d),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:d),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(t){t?(this.commands.addCommand(p),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(p),this.off("changeMode",g))},value:!1}})})),function(){ace.require(["ace/ext/language_tools"],(function(e){t&&(t.exports=e)}))}()},9946:(t,e,n)=>{t=n.nmd(t),ace.define("ace/ext/searchbox-css",["require","exports","module"],(function(t,e,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: "";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}'})),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/lang"),o=t("../lib/event"),s=t("./searchbox-css"),a=t("../keyboard/hash_handler").HashHandler,l=t("../lib/keys"),c=t("../config").nls,u=999;i.importCssString(s,"ace_searchbox",!1);var h=function(){function t(t,e,n){this.activeInput;var r=i.createElement("div");i.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("Search In Selection")},"S"]]],r),this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(t),i.importCssString(s,"ace_searchbox",t.container)}return t.prototype.setEditor=function(t){t.searchBox=this,t.renderer.scroller.appendChild(this.element),this.editor=t},t.prototype.setSession=function(t){this.searchRange=null,this.$syncOptions(!0)},t.prototype.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOption=t.querySelector("[action=searchInSelection]"),this.replaceOption=t.querySelector("[action=toggleReplace]"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=t.querySelector(".ace_search_counter")},t.prototype.$init=function(){var t=this.element;this.$initElements(t);var e=this;o.addListener(t,"mousedown",(function(t){setTimeout((function(){e.activeInput.focus()}),0),o.stopPropagation(t)})),o.addListener(t,"click",(function(t){var n=t.target||t.srcElement,i=n.getAttribute("action");i&&e[i]?e[i]():e.$searchBarKb.commands[i]&&e.$searchBarKb.commands[i].exec(e),o.stopPropagation(t)})),o.addCommandKeyListener(t,(function(t,n,i){var r=l.keyCodeToString(i),s=e.$searchBarKb.findKeyCommand(n,r);s&&s.exec&&(s.exec(e),o.stopEvent(t))})),this.$onChange=r.delayedCall((function(){e.find(!1,!1)})),o.addListener(this.searchInput,"input",(function(){e.$onChange.schedule(20)})),o.addListener(this.searchInput,"focus",(function(){e.activeInput=e.searchInput,e.searchInput.value&&e.highlight()})),o.addListener(this.replaceInput,"focus",(function(){e.activeInput=e.replaceInput,e.searchInput.value&&e.highlight()}))},t.prototype.setSearchRange=function(t){this.searchRange=t,t?this.searchRangeMarker=this.editor.session.addMarker(t,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},t.prototype.$syncOptions=function(t){i.setCssClass(this.replaceOption,"checked",this.searchRange),i.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var e=this.editor.getReadOnly();this.replaceOption.style.display=e?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!e?"":"none",this.find(!1,!1,t)},t.prototype.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},t.prototype.find=function(t,e,n){var r=this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:e,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange}),o=!r&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",o),this.editor._emit("findSearchBox",{match:!o}),this.highlight(),this.updateCounter()},t.prototype.updateCounter=function(){var t=this.editor,e=t.$search.$options.re,n=e.unicode,i=0,o=0;if(e){var s=this.searchRange?t.session.getTextRange(this.searchRange):t.getValue(),a=t.session.doc.positionToIndex(t.selection.anchor);this.searchRange&&(a-=t.session.doc.positionToIndex(this.searchRange.start));var l,h=e.lastIndex=0;while(l=e.exec(s)){if(i++,h=l.index,h<=a&&o++,i>u)break;if(!l[0]&&(e.lastIndex=h+=r.skipEmptyMatch(s,h,n),h>=s.length))break}}this.searchCounter.textContent=c("$0 of $1",[o,i>u?u+"+":i])},t.prototype.findNext=function(){this.find(!0,!1)},t.prototype.findPrev=function(){this.find(!0,!0)},t.prototype.findAll=function(){var t=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),e=!t&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},t.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},t.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},t.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},t.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},t.prototype.show=function(t,e){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=e,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},t.prototype.isFocused=function(){var t=document.activeElement;return t==this.searchInput||t==this.replaceInput},t}(),d=new a;d.bindKeys({"Ctrl-f|Command-f":function(t){var e=t.isReplace=!t.isReplace;t.replaceBox.style.display=e?"":"none",t.replaceOption.checked=!1,t.$syncOptions(),t.searchInput.focus()},"Ctrl-H|Command-Option-F":function(t){t.editor.getReadOnly()||(t.replaceOption.checked=!0,t.$syncOptions(),t.replaceInput.focus())},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout((function(){t.hide()}))},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},"Alt-Return":function(t){t.activeInput==t.replaceInput&&t.replaceAll(),t.findAll()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),d.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}},{name:"toggleReplace",exec:function(t){t.replaceOption.checked=!t.replaceOption.checked,t.$syncOptions()}},{name:"searchInSelection",exec:function(t){t.searchOption.checked=!t.searchRange,t.setSearchRange(t.searchOption.checked&&t.editor.getSelectionRange()),t.$syncOptions()}}]);var f=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]);h.prototype.$searchBarKb=d,h.prototype.$closeSearchBarKb=f,e.SearchBox=h,e.Search=function(t,e){var n=t.searchBox||new h(t);n.show(t.session.getTextRange(),e)}})),function(){ace.require(["ace/ext/searchbox"],(function(e){t&&(t.exports=e)}))}()},1136:(t,e,n)=>{t=n.nmd(t),function(){ace.require(["ace/mode/text"],(function(e){t&&(t.exports=e)}))}()},5617:(t,e,n)=>{t=n.nmd(t),ace.define("ace/theme/twilight-css",["require","exports","module"],(function(t,e,n){n.exports=".ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],(function(t,e,n){e.isDark=!0,e.cssClass="ace-twilight",e.cssText=t("./twilight-css");var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass,!1)})),function(){ace.require(["ace/theme/twilight"],(function(e){t&&(t.exports=e)}))}()},1841:(t,e,n)=>{t=n.nmd(t),function(){var t="ace",e=function(){return this}();if(e||"undefined"==typeof window||(e=window),t||"undefined"===typeof requirejs){var n=function(t,e,i){"string"===typeof t?(2==arguments.length&&(i=e),n.modules[t]||(n.payloads[t]=i,n.modules[t]=null)):n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};n.modules={},n.payloads={};var i=function(t,e,n){if("string"===typeof e){var i=s(t,e);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var o=[],a=0,l=e.length;a<l;++a){var c=s(t,e[a]);if(void 0==c&&r.original)return;o.push(c)}return n&&n.apply(null,o)||!0}},r=function(t,e){var n=i("",t,e);return void 0==n&&r.original?r.original.apply(this,arguments):n},o=function(t,e){if(-1!==e.indexOf("!")){var n=e.split("!");return o(t,n[0])+"!"+o(t,n[1])}if("."==e.charAt(0)){var i=t.split("/").slice(0,-1).join("/");e=i+"/"+e;while(-1!==e.indexOf(".")&&r!=e){var r=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return e},s=function(t,e){e=o(t,e);var r=n.modules[e];if(!r){if(r=n.payloads[e],"function"===typeof r){var s={},a={id:e,uri:"",exports:s,packaged:!0},l=function(t,n){return i(e,t,n)},c=r(l,s,a);s=c||a.exports,n.modules[e]=s,delete n.payloads[e]}r=n.modules[e]=s||r}return r};a(t)}function a(t){var i=e;t&&(e[t]||(e[t]={}),i=e[t]),i.define&&i.define.packaged||(n.original=i.define,i.define=n,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(t,e,n){function i(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(t,e){return e=e||0,this.lastIndexOf(t,e)===e})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(t,e){var n=this;(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e})),String.prototype.repeat||i(String.prototype,"repeat",(function(t){var e="",n=this;while(t>0)1&t&&(e+=n),(t>>=1)&&(n+=n);return e})),String.prototype.includes||i(String.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Object.assign||(Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];void 0!==i&&null!==i&&Object.keys(i).forEach((function(t){e[t]=i[t]}))}return e}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(e){return t[e]}))}),Array.prototype.find||i(Array.prototype,"find",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return r}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(t){for(var e=this.length,n=arguments[1],i=0;i<e;i++){var r=this[i];if(t.call(n,r,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(t,e){return-1!=this.indexOf(t,e)})),Array.prototype.fill||i(Array.prototype,"fill",(function(t){var e=this,n=e.length>>>0,i=arguments[1],r=i|0,o=r<0?Math.max(n+r,0):Math.min(r,n),s=arguments[2],a=void 0===s?n:s|0,l=a<0?Math.max(n+a,0):Math.min(a,n);while(o<l)e[o]=t,o++;return e})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(t,e,n){"use strict";t("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(t,e,n){e.deepCopy=function t(e){if("object"!==typeof e||!e)return e;var n;if(Array.isArray(e)){n=[];for(var i=0;i<e.length;i++)n[i]=t(e[i]);return n}if("[object Object]"!==Object.prototype.toString.call(e))return e;for(var i in n={},e)n[i]=t(e[i]);return n}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(t,e,n){"use strict";e.last=function(t){return t[t.length-1]},e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){var n="";while(e>0)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n]&&"object"==typeof t[n]?e[n]=this.copyObject(t[n]):e[n]=t[n];return e},e.deepCopy=t("./deep_copy").deepCopy,e.arrayToMap=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var n in t)e[n]=t[n];return e},e.arrayRemove=function(t,e){for(var n=0;n<=t.length;n++)e===t[n]&&t.splice(n,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return(""+t).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},e.getMatchOffsets=function(t,e){var n=[];return t.replace(e,(function(t){n.push({offset:arguments[arguments.length-2],length:t.length})})),n},e.deferredCall=function(t){var e=null,n=function(){e=null,t()},i=function(t){return i.cancel(),e=setTimeout(n,t||0),i};return i.schedule=i,i.call=function(){return this.cancel(),t(),i},i.cancel=function(){return clearTimeout(e),e=null,i},i.isPending=function(){return e},i},e.delayedCall=function(t,e){var n=null,i=function(){n=null,t()},r=function(t){null==n&&(n=setTimeout(i,t||e))};return r.delay=function(t){n&&clearTimeout(n),n=setTimeout(i,t||e)},r.schedule=r,r.call=function(){this.cancel(),t()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r},e.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(t){return!1}return!0},e.skipEmptyMatch=function(t,e,n){return n&&t.codePointAt(e)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,e,n){"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 i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",s=i.appName||"";e.isWin="win"==r,e.isMac="mac"==r,e.isLinux="linux"==r,e.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=o.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window["opera"]),e.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,e.isSafari=parseFloat(o.split(" Safari/")[1])&&!e.isChrome||void 0,e.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,e.isAIR=o.indexOf("AdobeAIR")>=0,e.isAndroid=o.indexOf("Android")>=0,e.isChromeOS=o.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(o)&&!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,n){"use strict";var i,r=t("./useragent"),o="http://www.w3.org/1999/xhtml";e.buildDom=function t(e,n,i){if("string"==typeof e&&e){var r=document.createTextNode(e);return n&&n.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if("string"!=typeof e[0]||!e[0]){for(var o=[],s=0;s<e.length;s++){var a=t(e[s],n,i);a&&o.push(a)}return o}var l=document.createElement(e[0]),c=e[1],u=1;c&&"object"==typeof c&&!Array.isArray(c)&&(u=2);for(s=u;s<e.length;s++)t(e[s],l,i);return 2==u&&Object.keys(c).forEach((function(t){var e=c[t];"class"===t?l.className=Array.isArray(e)?e.join(" "):e:"function"==typeof e||"value"==t||"$"==t[0]?l[t]=e:"ref"===t?i&&(i[e]=l):"style"===t?"string"==typeof e&&(l.style.cssText=e):null!=e&&l.setAttribute(t,e)})),n&&n.appendChild(l),l},e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||o,t):document.createElement(t)},e.removeChildren=function(t){t.innerHTML=""},e.createTextNode=function(t,e){var n=e?e.ownerDocument:document;return n.createTextNode(t)},e.createFragment=function(t){var e=t?t.ownerDocument:document;return e.createDocumentFragment()},e.hasCssClass=function(t,e){var n=(t.className+"").split(/\s+/g);return-1!==n.indexOf(e)},e.addCssClass=function(t,n){e.hasCssClass(t,n)||(t.className+=" "+n)},e.removeCssClass=function(t,e){var n=t.className.split(/\s+/g);while(1){var i=n.indexOf(e);if(-1==i)break;n.splice(i,1)}t.className=n.join(" ")},e.toggleCssClass=function(t,e){var n=t.className.split(/\s+/g),i=!0;while(1){var r=n.indexOf(e);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(e),t.className=n.join(" "),i},e.setCssClass=function(t,n,i){i?e.addCssClass(t,n):e.removeCssClass(t,n)},e.hasCssString=function(t,e){var n,i=0;if(e=e||document,n=e.querySelectorAll("style"))while(i<n.length)if(n[i++].id===t)return!0},e.removeElementById=function(t,e){e=e||document,e.getElementById(t)&&e.getElementById(t).remove()};var s=[];function a(){var t=s;s=null,t&&t.forEach((function(t){l(t[0],t[1])}))}function l(t,n,r){if("undefined"!=typeof document){if(s)if(r)a();else if(!1===r)return s.push([t,n]);if(!i){var o=r;r&&r.getRootNode?(o=r.getRootNode(),o&&o!=r||(o=document)):o=document;var l=o.ownerDocument||o;if(n&&e.hasCssString(n,o))return null;n&&(t+="\n/*# sourceURL=ace/css/"+n+" */");var c=e.createElement("style");c.appendChild(l.createTextNode(t)),n&&(c.id=n),o==l&&(o=e.getDocumentHead(l)),o.insertBefore(c,o.firstChild)}}}if(e.useStrictCSP=function(t){i=t,0==t?a():s||(s=[])},e.importCssString=l,e.importCssStylsheet=function(t,n){e.buildDom(["link",{rel:"stylesheet",href:t}],e.getDocumentHead(n))},e.scrollbarWidth=function(t){var n=e.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=e.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=t&&t.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),o.removeChild(i),s-a},e.computedStyle=function(t,e){return window.getComputedStyle(t,"")||{}},e.setStyle=function(t,e,n){t[e]!==n&&(t[e]=n)},e.HAS_CSS_ANIMATION=!1,e.HAS_CSS_TRANSFORMS=!1,e.HI_DPI=!r.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,r.isChromeOS&&(e.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");e.HI_DPI&&void 0!==c.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),r.isEdge||"undefined"===typeof c.style.animationName||(e.HAS_CSS_ANIMATION=!0),c=null}e.HAS_CSS_TRANSFORMS?e.translate=function(t,e,n){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:e.translate=function(t,e,n){t.style.top=Math.round(n)+"px",t.style.left=Math.round(e)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(t,e,n){
2
2
  /*
3
3
  * based on code from:
4
4
  *
@@ -37,7 +37,7 @@ For more information about SproutCore, visit http://www.sproutcore.com
37
37
 
38
38
  ==========================================================================
39
39
  @license */
40
- "use strict";var i=t("./oop"),r=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter((function(t){return e&n.KEY_MODS[t]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,r),e.default=e,e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i,r=t("./keys"),o=t("./useragent"),s=null,a=0;function l(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return i={passive:!1},!0}})}catch(t){}}function c(){return void 0==i&&l(),i}function u(t,e,n){this.elem=t,this.type=e,this.callback=n}u.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=e.addListener=function(t,e,n,i){t.addEventListener(e,n,c()),i&&i.$toDestroy.push(new u(t,e,n))},d=e.removeListener=function(t,e,n){t.removeEventListener(e,n,c())};e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},e.preventDefault=function(t){t.preventDefault&&t.preventDefault()},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||o.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},e.capture=function(t,e,n){var i=t&&t.ownerDocument||document;function r(t){e&&e(t),n&&n(t),d(i,"mousemove",e),d(i,"mouseup",r),d(i,"dragstart",r)}return h(i,"mousemove",e),h(i,"mouseup",r),h(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){h(t,"wheel",(function(t){var n=.15,i=t.deltaX||0,r=t.deltaY||0;switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=i*n,t.wheelY=r*n;break;case t.DOM_DELTA_LINE:var o=15;t.wheelX=i*o,t.wheelY=r*o;break;case t.DOM_DELTA_PAGE:var s=150;t.wheelX=i*s,t.wheelY=r*s;break}e(t)}),n)},e.addMultiMouseDownListener=function(t,n,i,r,s){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){if(0!==e.getButton(t)?u=0:t.detail>1?(u++,u>4&&(u=1)):u=1,o.isIE){var s=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=t.clientX,l=t.clientY)}if(t._clicks=u,i[r]("mousedown",t),u>4)u=0;else if(u>1)return i[r](d[u],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){h(t,"mousedown",f,s)}))};var f=function(t){return(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function p(t,e,n){var i=f(e);if(!o.isMac&&s){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in e?e.location:e.keyLocation;if(17===n&&1===l)1==s[n]&&(a=e.timeStamp);else if(18===n&&3===i&&2===l){var c=e.timeStamp-a;c<50&&(s.altGr=!0)}}}if(n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n){l="location"in e?e.location:e.keyLocation;if(3===l&&(t(e,i,-n),e.defaultPrevented))return}if(o.isChromeOS&&8&i){if(t(e,i,n),e.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&t(e,i,n)}function g(){s=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[f(t)]},e.addCommandKeyListener=function(t,n,i){var r=null;h(t,"keydown",(function(t){s[t.keyCode]=(s[t.keyCode]||0)+1;var e=p(n,t,t.keyCode);return r=t.defaultPrevented,e}),i),h(t,"keypress",(function(t){r&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),r=null)}),i),h(t,"keyup",(function(t){s[t.keyCode]=null}),i),s||(g(),h(window,"focus",g))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+m++,r=function(o){o.data==i&&(e.stopPropagation(o),d(n,"message",r),t())};h(n,"message",r),n.postMessage(i,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,n){return setTimeout((function n(){e.$idleBlocked?setTimeout(n,100):t()}),n)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout((function(){e.$idleBlocked=!1}),t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(t){setTimeout(t,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(t,e,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=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,n){"use strict";var i,r=t("../lib/event"),o=t("../config").nls,s=t("../lib/useragent"),a=t("../lib/dom"),l=t("../lib/lang"),c=t("../clipboard"),u=s.isChrome<18,h=s.isIE,d=s.isChrome>63,f=400,p=t("../lib/keys"),g=p.KEY_MODS,m=s.isIOS,v=m?/\s/:/\n/,y=s.isMobile;i=function(t,e){var n=a.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",t.insertBefore(n,t.firstChild);var i=!1,w=!1,b=!1,_=!1,x="";y||(n.style.fontSize="1px");var S=!1,A=!1,C="",k=0,$=0,T=0,L=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,E=0;try{var M=document.activeElement===n}catch(nt){}this.setNumberOfExtraLines=function(t){L=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,E=t<0?0:t},this.setAriaOptions=function(t){if(t.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",t.inline?"both":"list"),n.setAttribute("aria-activedescendant",t.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),t.role&&n.setAttribute("role",t.role),t.setLabel&&(n.setAttribute("aria-roledescription",o("editor")),e.session)){var i=e.session.selection.cursor.row;n.setAttribute("aria-label",o("Cursor at row $0",[i+1]))}},this.setAriaOptions({role:"textbox"}),r.addListener(n,"blur",(function(t){A||(e.onBlur(t),M=!1)}),e),r.addListener(n,"focus",(function(t){if(!A){if(M=!0,s.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),s.isEdge?setTimeout(I):I()}}),e),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:e.renderer.enableKeyboardAccessibility}),x||d||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var t=n.style.top;n.style.position="fixed",n.style.top="0px";try{var i=0!=n.getBoundingClientRect().top}catch(nt){return}var r=[];if(i){var o=n.parentElement;while(o&&1==o.nodeType)r.push(o),o.setAttribute("ace_nocontext","true"),o=!o.parentElement&&o.getRootNode?o.getRootNode()["host"]:o.parentElement}n.focus({preventScroll:!0}),i&&r.forEach((function(t){t.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return M},e.on("beforeEndOperation",(function(){var t=e.curOp,i=t&&t.command&&t.command.name;if("insertstring"!=i){var r=i&&(t.docChanged||t.selectionChanged);b&&r&&(C=n.value="",q()),I()}}));var D=function(t,n){for(var i=n,r=1;r<=t-L&&r<2*E+1;r++)i+=e.session.getLine(t-r).length+1;return i},I=m?function(t){if(M&&(!i||t)&&!_){t||(t="");var r="\n ab"+t+"cde fg\n";r!=n.value&&(n.value=C=r);var o=4,s=4+(t.length||(e.selection.isEmpty()?0:1));k==o&&$==s||n.setSelectionRange(o,s),k=o,$=s}}:function(){if(!b&&!_&&(M||F)){b=!0;var t=0,i=0,r="";if(e.session){var o=e.selection,s=o.getRange(),a=o.cursor.row;a===R+1?(L=R+1,R=L+2*E):a===L-1?(R=L-1,L=R-2*E):(a<L-1||a>R+1)&&(L=a>E?a-E:0,R=a>E?a+E:2*E);for(var l=[],c=L;c<=R;c++)l.push(e.session.getLine(c));if(r=l.join("\n"),t=D(s.start.row,s.start.column),i=D(s.end.row,s.end.column),s.start.row<L){var u=e.session.getLine(L-1);t=s.start.row<L-1?0:t,i+=u.length+1,r=u+"\n"+r}else if(s.end.row>R){var h=e.session.getLine(R+1);i=s.end.row>R+1?h.length:s.end.column,i+=r.length+1,r=r+"\n"+h}else y&&a>0&&(r="\n"+r,i+=1,t+=1);r.length>f&&(t<f&&i<f?r=r.slice(0,f):(r="\n",t==i?t=i=0:(t=0,i=1)));var d=r+"\n\n";d!=C&&(n.value=C=d,k=$=d.length)}if(F&&(k=n.selectionStart,$=n.selectionEnd),$!=i||k!=t||n.selectionEnd!=$)try{n.setSelectionRange(t,i),k=t,$=i}catch(nt){}b=!1}};this.resetSelection=I,M&&e.onFocus();var O=function(t){return 0===t.selectionStart&&t.selectionEnd>=C.length&&t.value===C&&C&&t.selectionEnd!==$},P=function(t){b||(i?i=!1:O(n)?(e.selectAll(),I()):y&&n.selectionStart!=k&&I())},N=null;this.setInputHandler=function(t){N=t},this.getInputHandler=function(){return N};var F=!1,W=function(t,i){if(F&&(F=!1),w)return I(),t&&e.onPaste(t),w=!1,"";var r=n.selectionStart,o=n.selectionEnd,a=k,l=C.length-$,c=t,u=t.length-r,h=t.length-o,d=0;while(a>0&&C[d]==t[d])d++,a--;c=c.slice(d),d=1;while(l>0&&C.length-d>k-1&&C[C.length-d]==t[t.length-d])d++,l--;u-=d-1,h-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!i&&!c&&!u&&!a&&!l&&!h)return"";_=!0;var p=!1;return s.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||S?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),_=!1,C=t,k=r,$=o,T=h,p?"\n":c},H=function(t){if(b)return Y();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var i=n.value,r=W(i,!0);(i.length>f+100||v.test(r)||y&&k<1&&k==$)&&I()},B=function(t,e,n){var i=t.clipboardData||window["clipboardData"];if(i&&!u){var r=h||n?"Text":"text/plain";try{return e?!1!==i.setData(r,e):i.getData(r)}catch(t){if(!n)return B(t,e,!0)}}},z=function(t,o){var s=e.getCopyText();if(!s)return r.preventDefault(t);B(t,s)?(m&&(I(s),i=s,setTimeout((function(){i=!1}),10)),o?e.onCut():e.onCopy(),r.preventDefault(t)):(i=!0,n.value=s,n.select(),setTimeout((function(){i=!1,I(),o?e.onCut():e.onCopy()})))},U=function(t){z(t,!0)},j=function(t){z(t,!1)},G=function(t){var i=B(t);c.pasteCancelled()||("string"==typeof i?(i&&e.onPaste(i,t),s.isIE&&setTimeout(I),r.preventDefault(t)):(n.value="",w=!0))};r.addCommandKeyListener(n,e.onCommandKey.bind(e),e),r.addListener(n,"select",P,e),r.addListener(n,"input",H,e),r.addListener(n,"cut",U,e),r.addListener(n,"copy",j,e),r.addListener(n,"paste",G,e),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(t,"keydown",(function(t){if((!s.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:j(t);break;case 86:G(t);break;case 88:U(t);break}}),e);var V=function(t){if(!b&&e.onCompositionStart&&!e.$readOnly&&(b={},!S)){t.data&&(b.useTextareaForIME=!1),setTimeout(Y,0),e._signal("compositionStart"),e.on("mousedown",K);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,e.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",k=0,$=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}},Y=function(){if(b&&e.onCompositionUpdate&&!e.$readOnly){if(S)return K();if(b.useTextareaForIME)e.onCompositionUpdate(n.value);else{var t=n.value;W(t),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+$-b.selectionStart+T)}}},q=function(t){e.onCompositionEnd&&!e.$readOnly&&(b=!1,e.onCompositionEnd(),e.off("mousedown",K),t&&H())};function K(){A=!0,n.blur(),n.focus(),A=!1}var X,Q=l.delayedCall(Y,50).schedule.bind(null,null);function Z(t){27==t.keyCode&&n.value.length<n.selectionStart&&(b||(C=n.value),k=$=-1,I()),Q()}function J(){clearTimeout(X),X=setTimeout((function(){x&&(n.style.cssText=x,x=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",V,e),r.addListener(n,"compositionupdate",Y,e),r.addListener(n,"keyup",Z,e),r.addListener(n,"keydown",Q,e),r.addListener(n,"compositionend",q,e),this.getElement=function(){return n},this.setCommandMode=function(t){S=t,n.readOnly=!1},this.setReadOnly=function(t){S||(n.readOnly=t)},this.setCopyWithEmptySelection=function(t){},this.onContextMenu=function(t){F=!0,I(),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,i){x||(x=n.style.cssText),n.style.cssText=(i?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+$)*e.renderer.characterWidth*.5+"px;";var o=e.container.getBoundingClientRect(),l=a.computedStyle(e.container),c=o.top+(parseInt(l.borderTopWidth)||0),u=o.left+(parseInt(o.borderLeftWidth)||0),h=o.bottom-c-n.clientHeight-2,d=function(t){a.translate(n,t.clientX-u-2,Math.min(t.clientY-c-2,h))};d(t),"mousedown"==t.type&&(e.renderer.$isMousePressed=!0,clearTimeout(X),s.isWin&&r.capture(e.container,d,J))},this.onContextMenuClose=J;var tt=function(t){e.textInput.onContextMenu(t),J()};function et(t,e,n){var r=null,o=!1;n.addEventListener("keydown",(function(t){r&&clearTimeout(r),o=!0}),!0),n.addEventListener("keyup",(function(t){r=setTimeout((function(){o=!1}),100)}),!0);var s=function(t){if(document.activeElement===n&&!(o||b||e.$mouseHandler.isMousePressed)&&!i){var r=n.selectionStart,s=n.selectionEnd,a=null,l=0;if(0==r?a=p.up:1==r?a=p.home:s>$&&"\n"==C[s]?a=p.end:r<k&&" "==C[r-1]?(a=p.left,l=g.option):r<k||r==k&&$!=k&&r==s?a=p.left:s>$&&C.slice(0,s).split("\n").length>2?a=p.down:s>$&&" "==C[s-1]?(a=p.right,l=g.option):(s>$||s==$&&$!=k&&r==s)&&(a=p.right),r!==s&&(l|=g.shift),a){var c=e.onCommandKey({},l,a);if(!c&&e.commands){a=p.keyCodeToString(a);var u=e.commands.findKeyCommand(l,a);u&&e.execCommand(u)}k=r,$=s,I("")}}};document.addEventListener("selectionchange",s),e.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}r.addListener(n,"mouseup",tt,e),r.addListener(n,"mousedown",(function(t){t.preventDefault(),J()}),e),r.addListener(e.renderer.scroller,"contextmenu",tt,e),r.addListener(n,"contextmenu",tt,e),m&&et(t,e,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},e.TextInput=i,e.$setUserAgentForTests=function(t,e){y=t,m=e}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/useragent"),r=0,o=550,s=function(){function t(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach((function(e){t[e]=this[e]}),this),t["selectByLines"]=this.extendSelectionBy.bind(t,"getLineRange"),t["selectByWords"]=this.extendSelectionBy.bind(t,"getWordRange")}return t.prototype.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,o=t.getButton();if(0!==o){var s=r.getSelectionRange(),a=s.isEmpty();return(a||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))}return this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t))},t.prototype.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},t.prototype.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=l(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},t.prototype.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==o&&s<=0)e=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==s&&o>=0)e=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==s)i=r.end,e=r.start;else{var a=l(this.$clickSelection,i);i=a.cursor,e=a.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},t.prototype.focusWait=function(){var t=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),e=Date.now();(t>r||e-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},t.prototype.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session,r=i.getBracketRange(e);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},t.prototype.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},t.prototype.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},t.prototype.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,r=i-n.t,s=r?t.wheelX/r:n.vx,a=r?t.wheelY/r:n.vy;r<o&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var l=Math.abs(s/a),c=!1;if(l>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(c=!0),l<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowed<o){var u=Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy);u?(c=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=s,n.vy=a,c?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}},t}();function a(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}function l(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else if(t.start.row!=t.end.row-1||t.start.column||t.end.column)n=2*e.row-t.start.row-t.end.row;else var n=e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,e.DefaultHandlers=s})),ace.define("ace/lib/scroll",["require","exports","module"],(function(t,e,n){e.preventParentScroll=function(t){t.stopPropagation();var e=t.currentTarget,n=e.scrollHeight>e.clientHeight;n||t.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=t("./lib/dom"),s=(t("./lib/event"),t("./range").Range),a=t("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function t(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}return t.prototype.$init=function(){return this.$element=o.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(t){this.getElement().textContent=t},t.prototype.setHtml=function(t){this.getElement().innerHTML=t},t.prototype.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},t.prototype.setClassName=function(t){o.addCssClass(this.getElement(),t)},t.prototype.setTheme=function(t){this.$element.className=l+" "+(t.isDark?"ace_dark ":"")+(t.cssClass||"")},t.prototype.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(t){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t}(),u=function(){function t(){this.popups=[]}return t.prototype.addPopup=function(t){this.popups.push(t),this.updatePopups()},t.prototype.removePopup=function(t){var e=this.popups.indexOf(t);-1!==e&&(this.popups.splice(e,1),this.updatePopups())},t.prototype.updatePopups=function(){var t,e,n,i;this.popups.sort((function(t,e){return e.priority-t.priority}));var o=[];try{for(var s=r(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var u=(n=void 0,r(o)),h=u.next();!h.done;h=u.next()){var d=h.value;if(this.doPopupsOverlap(d,l)){c=!1;break}}}catch(f){n={error:f}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(p){t={error:p}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}},t.prototype.doPopupsOverlap=function(t,e){var n=t.getElement().getBoundingClientRect(),i=e.getElement().getBoundingClientRect();return n.left<i.right&&n.right>i.left&&n.top<i.bottom&&n.bottom>i.top},t}(),h=new u;e.popupManager=h,e.Tooltip=c;var d=function(t){function e(e){void 0===e&&(e=document.body);var n=t.call(this,e)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",a),n}return i(e,t),e.prototype.addToEditor=function(t){t.on("mousemove",this.onMouseMove),t.on("mousedown",this.hide),t.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},e.prototype.removeFromEditor=function(t){t.off("mousemove",this.onMouseMove),t.off("mousedown",this.hide),t.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e.prototype.onMouseMove=function(t,e){this.lastEvent=t,this.lastT=Date.now();var n=e.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=t,this.timeout=setTimeout(this.waitForHover,this.idleTime))},e.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var t=Date.now()-this.lastT;this.idleTime-t>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-t):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},e.prototype.isOutsideOfText=function(t){var e=t.editor,n=t.getDocumentPosition(),i=e.session.getLine(n.row);if(n.column==i.length){var r=e.renderer.pixelToScreenCoordinates(t.clientX,t.clientY),o=e.session.documentToScreenPosition(n.row,n.column);if(o.column!=r.column||o.row!=r.row)return!0}return!1},e.prototype.setDataProvider=function(t){this.$gatherData=t},e.prototype.showForRange=function(t,e,n,i){var r=10;if((!i||i==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var o=t.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(e,t.session),this.range=s.fromPoints(e.start,e.end);var a=o.textToScreenCoordinates(e.start.row,e.start.column),l=o.scroller.getBoundingClientRect();a.pageX<l.left&&(a.pageX=l.left);var c=this.getElement();c.innerHTML="",c.appendChild(n),c.style.maxHeight="",c.style.display="block";var u=c.clientHeight,d=c.clientWidth,f=window.innerHeight-a.pageY-o.lineHeight,p=!0;a.pageY-u<0&&a.pageY<f&&(p=!1),c.style.maxHeight=(p?a.pageY:f)-r+"px",c.style.top=p?"":a.pageY+o.lineHeight+"px",c.style.bottom=p?window.innerHeight-a.pageY+"px":"",c.style.left=Math.min(a.pageX,window.innerWidth-d-r)+"px"}},e.prototype.addMarker=function(t,e){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=e,this.marker=e&&e.addMarker(t,"ace_highlight-marker","text")},e.prototype.hide=function(t){(t||document.activeElement!=this.getElement())&&(t&&t.target&&("keydown"!=t.type||t.ctrlKey||t.metaKey)&&this.$element.contains(t.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this))))},e.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},e.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},e.prototype.onMouseOut=function(t){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&t.relatedTarget&&!this.getElement().contains(t.relatedTarget)&&(t&&t.currentTarget.contains(t.relatedTarget)||t.relatedTarget.classList.contains("ace_content")||this.hide())},e}(c);e.HoverTooltip=d})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=t("../lib/dom"),s=t("../lib/event"),a=t("../tooltip").Tooltip,l=t("../config").nls;function c(t){var e,n,i=t.editor,r=i.renderer.$gutterLayer,a=new u(i);function l(){var e=n.getDocumentPosition().row,o=i.session.getLength();if(e==o){var s=i.renderer.pixelToScreenCoordinates(0,n.y).row,l=n.$pos;if(s>i.session.documentToScreenRow(l.row,l.column))return c()}if(a.showTooltip(e),a.isOpen)if(i.on("mousewheel",c),t.$tooltipFollowsMouse)h(n);else{var u=n.getGutterRow(),d=r.$lines.get(u);if(d){var f=d.element.querySelector(".ace_gutter_annotation"),p=f.getBoundingClientRect(),g=a.getElement().style;g.left=p.right+"px",g.top=p.bottom+"px"}else h(n)}}function c(){e&&(e=clearTimeout(e)),a.isOpen&&(a.hideTooltip(),i.off("mousewheel",c))}function h(t){a.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(e){if(i.isFocused()&&0==e.getButton()){var n=r.getRegion(e);if("foldWidgets"!=n){var o=e.getDocumentPosition().row,s=i.session.selection;if(e.getShiftKey())s.selectTo(o,0);else{if(2==e.domEvent.detail)return i.selectAll(),e.preventDefault();t.$clickSelection=i.selection.getLineRange(o)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}})),t.editor.setDefaultHandler("guttermousemove",(function(i){var r=i.domEvent.target||i.domEvent.srcElement;if(o.hasCssClass(r,"ace_fold-widget"))return c();a.isOpen&&t.$tooltipFollowsMouse&&h(i),n=i,e||(e=setTimeout((function(){e=null,n&&!t.isMousePressed?l():c()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(t){n=null,a.isOpen&&!e&&(e=setTimeout((function(){e=null,c()}),50))}),i),i.on("changeSession",c),i.on("input",c)}e.GutterHandler=c;var u=function(t){function e(e){var n=t.call(this,e.container)||this;return n.editor=e,n}return i(e,t),e.prototype.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,e+=15,t+r>n&&(t-=t+r-n),e+o>i&&(e-=20+o),a.prototype.setPosition.call(this,t,e)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(t){var n,i=this.editor.renderer.$gutterLayer,r=i.$annotations[t];n=r?{text:Array.from(r.text),type:Array.from(r.type)}:{text:[],type:[]};var o=i.session.getFoldLine(t);if(o&&i.$showFoldedAnnotations){for(var s,a={error:[],warning:[],info:[]},l=t+1;l<=o.end.row;l++)if(i.$annotations[l])for(var c=0;c<i.$annotations[l].text.length;c++){var u=i.$annotations[l].type[c];a[u].push(i.$annotations[l].text[c]),"error"!==u?"warning"!==u||(s="warning_fold"):s="error_fold"}if("error_fold"===s||"warning_fold"===s){var h="".concat(e.annotationsToSummaryString(a)," in folded code.");n.text.push(h),n.type.push(s)}}if(0===n.text.length)return this.hide();var d={error:[],warning:[],info:[]},f=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(l=0;l<n.text.length;l++){var p="<span class='ace_".concat(n.type[l]," ").concat(f,"' aria-label='").concat(e.annotationLabels[n.type[l].replace("_fold","")].singular,"' role=img> </span> ").concat(n.text[l]);d[n.type[l].replace("_fold","")].push(p)}var g=[].concat(d.error,d.warning,d.info).join("<br>");this.setHtml(g),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)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(t){var n,i,o=[],s=["error","warning","info"];try{for(var a=r(s),l=a.next();!l.done;l=a.next()){var c=l.value;if(t[c].length){var u=1===t[c].length?e.annotationLabels[c].singular:e.annotationLabels[c].plural;o.push("".concat(t[c].length," ").concat(u))}}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o.join(", ")},e}(a);e.GutterTooltip=u})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=function(){function t(t,e){this.speed,this.wheelX,this.wheelY,this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return t.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},t.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},t.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},t.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},t.prototype.getGutterRow=function(){var t=this.getDocumentPosition().row,e=this.editor.session.documentToScreenRow(t,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return e-n},t.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor,e=t.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=e.contains(n.row,n.column)}return this.$inSelection},t.prototype.getButton=function(){return i.getButton(this.domEvent)},t.prototype.getShiftKey=function(){return this.domEvent.shiftKey},t.prototype.getAccelKey=function(){return r.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},t}();e.MouseEvent=o})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/event"),o=t("../lib/useragent"),s=200,a=200,l=5;function c(t){var e=t.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(e){t[e]=this[e]}),this),e.on("mousedown",this.onMouseDown.bind(t));var h,d,f,p,g,m,v,y,w,b,_,x=e.container,S=0;function A(t,n){var i=Date.now(),r=!n||t.row!=n.row,o=!n||t.column!=n.column;if(!b||r||o)e.moveCursorToPosition(t),b=i,_={x:d,y:f};else{var s=u(_.x,_.y,d,f);s>l?b=null:i-b>=a&&(e.renderer.scrollCursorIntoView(),b=null)}}function C(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,o=e.renderer.layerConfig.characterWidth,a=e.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:f-a.top,bottom:a.bottom-f}},c=Math.min(l.x.left,l.x.right),u=Math.min(l.y.top,l.y.bottom),h={row:t.row,column:t.column};c/o<=2&&(h.column+=l.x.left<l.x.right?-3:2),u/r<=1&&(h.row+=l.y.top<l.y.bottom?-1:1);var p=t.row!=h.row,g=t.column!=h.column,m=!n||t.row!=n.row;p||g&&!m?w?i-w>=s&&e.renderer.scrollCursorIntoView(h):w=i:w=null}function k(){var t=m;m=e.renderer.screenToTextCoordinates(d,f),A(m,t),C(m,t)}function $(){g=e.selection.toOrientedRange(),h=e.session.addMarker(g,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),k(),p=setInterval(k,20),S=0,r.addListener(document,"mousemove",R)}function T(){clearInterval(p),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(g),e.isFocused()&&!y&&e.$resetCursorStyle(),g=null,m=null,S=0,w=null,b=null,r.removeListener(document,"mousemove",R)}this.onDragStart=function(t){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(t)}),0),t.preventDefault()}g=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){e.container.removeChild(n)})),r.clearData(),r.setData("Text",e.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(t){if(x.draggable=!1,y=!1,this.setState(null),!e.getReadOnly()){var n=t.dataTransfer.dropEffect;v||"move"!=n||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,h||$(),S++,t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,h||($(),S++),null!==L&&(L=null),t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragLeave=function(t){if(S--,S<=0&&h)return T(),v=null,r.preventDefault(t)},this.onDrop=function(t){if(m){var n=t.dataTransfer;if(y)switch(v){case"move":g=g.contains(m.row,m.column)?{start:m,end:m}:e.moveText(g,m);break;case"copy":g=e.moveText(g,m,!0);break}else{var i=n.getData("Text");g={start:m,end:e.session.insert(m,i)},e.focus(),v=null}return T(),r.preventDefault(t)}},r.addListener(x,"dragstart",this.onDragStart.bind(t),e),r.addListener(x,"dragend",this.onDragEnd.bind(t),e),r.addListener(x,"dragenter",this.onDragEnter.bind(t),e),r.addListener(x,"dragover",this.onDragOver.bind(t),e),r.addListener(x,"dragleave",this.onDragLeave.bind(t),e),r.addListener(x,"drop",this.onDrop.bind(t),e);var L=null;function R(){null==L&&(L=setTimeout((function(){null!=L&&h&&T()}),20))}function E(t){var e=t.types;return!e||Array.prototype.some.call(e,(function(t){return"text/plain"==t||"Text"==t}))}function M(t){var e=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=o.isMac?t.altKey:t.ctrlKey,r="uninitialized";try{r=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var s="none";return i&&e.indexOf(r)>=0?s="copy":n.indexOf(r)>=0?s="move":e.indexOf(r)>=0&&(s="copy"),s}}function u(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var n=o.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(o.isIE&&"dragReady"==this.state){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if("dragWait"===this.state){n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton(),r=t.domEvent.detail||1;if(1===r&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),e.getDragDelay()){if(o.isWebKit){this.cancelDrag=!0;var a=e.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(c.prototype),e.DragdropHandler=c})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./mouse_event").MouseEvent,r=t("../lib/event"),o=t("../lib/dom");e.addTouchListeners=function(t,e){var n,s,a,l,c,u,h,d,f,p="scroll",g=0,m=0,v=0,y=0;function w(){var t=window.navigator&&window.navigator.clipboard,n=!1,i=function(){var i=e.getCopyText(),r=e.session.getUndoManager().hasUndo();f.replaceChild(o.buildDom(n?["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"],t&&["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"]),f.firstChild)},r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,i();"paste"==o?t.readText().then((function(t){e.execCommand(o,t)})):o&&("cut"!=o&&"copy"!=o||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(o)),f.firstChild.style.display="none",n=!1,"openCommandPalette"!=o&&e.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),r(t)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container)}function b(){f||w();var t=e.selection.cursor,n=e.renderer.textToScreenCoordinates(t.row,t.column),i=e.renderer.textToScreenCoordinates(0,0).pageX,r=e.renderer.scrollLeft,o=e.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=i+r-o.left+"px"),f.style.display="",f.firstChild.style.display="none",e.on("input",_)}function _(t){f&&(f.style.display="none"),e.off("input",_)}function x(){c=null,clearTimeout(c);var t=e.selection.getRange(),n=t.contains(h.row,h.column);!t.isEmpty()&&n||(e.selection.moveToPosition(h),e.selection.selectWord()),p="wait",b()}function S(){c=null,clearTimeout(c),e.selection.moveToPosition(h);var t=m>=2?e.selection.getLineRange(h.row):e.session.getBracketRange(h);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}function A(){g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*y),t==e.session.getScrollTop()&&(g=0)}),10)}r.addListener(t,"contextmenu",(function(t){if(d){var n=e.textInput.getElement();n.focus()}}),e),r.addListener(t,"touchstart",(function(t){var r=t.touches;if(c||r.length>1)return clearTimeout(c),c=null,a=-1,void(p="zoom");d=e.$mouseHandler.isMousePressed=!0;var o=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,f=t.timeStamp;l=f;var w=r[0],b=w.clientX,_=w.clientY;Math.abs(n-b)+Math.abs(s-_)>o&&(a=-1),n=t.clientX=b,s=t.clientY=_,v=y=0;var A=new i(t,e);if(h=A.getDocumentPosition(),f-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,S();else{m=0;var C=e.selection.cursor,k=e.selection.isEmpty()?C:e.selection.anchor,$=e.renderer.$cursorLayer.getPixelPosition(C,!0),T=e.renderer.$cursorLayer.getPixelPosition(k,!0),L=e.renderer.scroller.getBoundingClientRect(),R=e.renderer.layerConfig.offset,E=e.renderer.scrollLeft,M=function(t,e){return t/=u,e=e/o-.75,t*t+e*e};if(t.clientX<L.left)return void(p="zoom");var D=M(t.clientX-L.left-$.left+E,t.clientY-L.top-$.top+R),I=M(t.clientX-L.left-T.left+E,t.clientY-L.top-T.top+R);D<3.5&&I<3.5&&(p=D>I?"cursor":"anchor"),p=I<3.5?"anchor":D<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=f}),e),r.addListener(t,"touchend",(function(t){d=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==p?(A(),_()):b(),clearTimeout(c),c=null}),e),r.addListener(t,"touchmove",(function(t){c&&(clearTimeout(c),c=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==p){if(!(a*a+u*u>4))return t.preventDefault();p="cursor"}n=o.clientX,s=o.clientY,t.clientX=o.clientX,t.clientY=o.clientY;var h=t.timeStamp,d=h-l;if(l=h,"scroll"==p){var f=new i(t,e);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(v=a/d,y=u/d),e._emit("mousewheel",f),f.propagationStopped||(v=y=0)}else{var g=new i(t,e),m=g.getDocumentPosition();"cursor"==p?e.selection.moveCursorToPosition(m):"anchor"==p&&e.selection.setSelectionAnchor(m.row,m.column),e.renderer.scrollCursorIntoView(m),t.preventDefault()}}}),e)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,a=t("./mouse_event").MouseEvent,l=t("./dragdrop_handler").DragdropHandler,c=t("./touch_handler").addTouchListeners,u=t("../config"),h=function(){function t(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var e=this;this.editor=t,new o(this),new s(this),new l(this);var n=function(e){var n=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());n&&window.focus(),t.focus(),setTimeout((function(){t.isFocused()||t.focus()}))},a=t.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),t),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),i.addMultiMouseDownListener([a,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),i.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),c(t.container,t);var u=t.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),t),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),i.addListener(a,"mousedown",n,t),i.addListener(u,"mousedown",n,t),r.isIE&&t.renderer.scrollBarV&&(i.addListener(t.renderer.scrollBarV.element,"mousedown",n,t),i.addListener(t.renderer.scrollBarH.element,"mousedown",n,t)),t.on("mousemove",(function(n){if(!e.state&&!e.$dragDelay&&e.$dragEnabled){var i=t.renderer.screenToTextCoordinates(n.x,n.y),r=t.session.selection.getRange(),o=t.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),t)}return t.prototype.onMouseEvent=function(t,e){this.editor.session&&this.editor._emit(t,new a(e,this.editor))},t.prototype.onMouseMove=function(t,e){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(t,new a(e,this.editor))},t.prototype.onMouseWheel=function(t,e){var n=new a(e,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=e.wheelX,n.wheelY=e.wheelY,this.editor._emit(t,n)},t.prototype.setState=function(t){this.state=t},t.prototype.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(t){if(t){if(r.isWebKit&&!t.which&&s.releaseMouse)return s.releaseMouse();s.x=t.clientX,s.y=t.clientY,e&&e(t),s.mouseEvent=new a(t,s.editor),s.$mouseMoved=!0}},c=function(t){n.off("beforeEndOperation",h),clearInterval(d),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](t),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,t&&s.onMouseEvent("mouseup",t),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){c(t)}));var h=function(t){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(u,20)},t.prototype.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&i.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},t.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},t}();h.prototype.releaseMouse=null,u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),e.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t){t.on("click",(function(e){var n=e.getDocumentPosition(),r=t.session,o=r.getFoldAt(n.row,n.column,1);o&&(e.getAccelKey()?r.removeFold(o):r.expandFold(o),e.stop());var s=e.domEvent&&e.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),t.renderer.scrollCursorIntoView())})),t.on("gutterclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session;r.foldWidgets&&r.foldWidgets[i]&&t.session.onFoldWidgetClick(i,e),t.isFocused()||t.focus(),e.stop()}})),t.on("gutterdblclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session,o=r.getParentFoldRangeData(i,!0),s=o.range||o.firstRange;if(s){i=s.start.row;var a=r.getFoldAt(i,r.getLine(i).length,1);a?r.removeFold(a):(r.addFold("...",s),t.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}e.stop()}}))}return t}();e.FoldHandler=r})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/event"),o=function(){function t(t){this.$editor=t,this.$data={editor:t},this.$handlers=[],this.setDefaultHandler(t.commands)}return t.prototype.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0)},t.prototype.setKeyboardHandler=function(t){var e=this.$handlers;if(e[e.length-1]!=t){while(e[e.length-1]&&e[e.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(t,1)}},t.prototype.addKeyboardHandler=function(t,e){if(t){"function"!=typeof t||t.handleKeyboard||(t.handleKeyboard=t);var n=this.$handlers.indexOf(t);-1!=n&&this.$handlers.splice(n,1),void 0==e?this.$handlers.push(t):this.$handlers.splice(e,0,t),-1==n&&t.attach&&t.attach(this.$editor)}},t.prototype.removeKeyboardHandler=function(t){var e=this.$handlers.indexOf(t);return-1!=e&&(this.$handlers.splice(e,1),t.detach&&t.detach(this.$editor),!0)},t.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},t.prototype.getStatusText=function(){var t=this.$data,e=t.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(e,t)||""})).filter(Boolean).join(" ")},t.prototype.$callKeyboardHandlers=function(t,e,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(o=this.$handlers[l].handleKeyboard(this.$data,t,e,n,i),o&&o.command&&(s="null"==o.command||a.exec(o.command,this.$editor,o.args,i),s&&i&&-1!=t&&1!=o["passEvent"]&&1!=o.command["passEvent"]&&r.stopEvent(i),s))break;return s||-1!=t||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,e)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},t.prototype.onCommandKey=function(t,e,n){var r=i.keyCodeToString(n);return this.$callKeyboardHandlers(e,r,n,t)},t.prototype.onTextInput=function(t){return this.$callKeyboardHandlers(-1,t)},t}();e.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(t,e,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,h=1,d=0,f=1,p=2,g=3,m=4,v=5,y=6,w=7,b=8,_=9,x=10,S=11,A=12,C=13,k=14,$=15,T=16,L=17,R=18,E=[R,R,R,R,R,R,R,R,R,y,v,y,b,v,R,R,R,R,R,R,R,R,R,R,R,R,R,R,v,v,v,y,b,m,m,S,S,S,m,m,m,m,m,x,_,x,_,_,p,p,p,p,p,p,p,p,p,p,_,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,R,R,R,R,R,R,v,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,_,m,S,S,S,S,m,m,m,m,d,m,m,R,m,m,S,S,p,p,m,d,m,m,m,p,d,m,m,m,m,m],M=[b,b,b,b,b,b,b,b,b,b,b,R,R,R,d,f,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,v,C,k,$,T,L,_,S,S,S,S,S,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function D(t,e,n,u){var h=i?c:l,d=null,f=null,p=null,g=0,m=null,w=null,_=-1,x=null,S=null,A=[];if(!u)for(x=0,u=[];x<n;x++)u[x]=P(t[x]);for(r=i,o=!1,!1,s=!1,a=!1,S=0;S<n;S++){if(d=g,A[S]=f=O(t,u,A,S),g=h[d][f],m=240&g,g&=15,e[S]=p=h[g][5],m>0)if(16==m){for(x=_;x<S;x++)e[x]=1;_=-1}else _=-1;if(w=h[g][6],w)-1==_&&(_=S);else if(_>-1){for(x=_;x<S;x++)e[x]=p;_=-1}u[S]==v&&(e[S]=0),r|=p}if(a)for(x=0;x<n;x++)if(u[x]==y){e[x]=i;for(var C=x-1;C>=0;C--){if(u[C]!=b)break;e[C]=i}}}function I(t,e,n){if(!(r<t))if(1!=t||i!=h||s){var o,a,l,c,u=n.length,d=0;while(d<u){if(e[d]>=t){o=d+1;while(o<u&&e[o]>=t)o++;for(a=d,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=o}d++}}else n.reverse()}function O(t,e,n,r){var l,c,u,h,E=e[r];switch(E){case d:case f:o=!1;case m:case g:return E;case p:return o?g:p;case w:return o=!0,!0,f;case b:return m;case _:return r<1||r+1>=e.length||(l=n[r-1])!=p&&l!=g||(c=e[r+1])!=p&&c!=g?m:(o&&(c=g),c==l?c:m);case x:return l=r>0?n[r-1]:v,l==p&&r+1<e.length&&e[r+1]==p?p:m;case S:if(r>0&&n[r-1]==p)return p;if(o)return m;h=r+1,u=e.length;while(h<u&&e[h]==S)h++;return h<u&&e[h]==p?p:m;case A:u=e.length,h=r+1;while(h<u&&e[h]==A)h++;if(h<u){var M=t[r],D=M>=1425&&M<=2303||64286==M;if(l=e[h],D&&(l==f||l==w))return f}return r<1||(l=e[r-1])==v?m:n[r-1];case v:return o=!1,s=!0,i;case y:return a=!0,m;case C:case k:case T:case L:case $:o=!1;case R:return m}}function P(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?d:E[e]:5==n?/[\u0591-\u05f4]/.test(t)?f:d:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?A:/[\u0660-\u0669\u066b-\u066c]/.test(t)?g:1642==e?S:/[\u06f0-\u06f9]/.test(t)?p:w:32==n&&e<=8287?M[255&e]:254==n&&e>=65136?w:m}e.L=d,e.R=f,e.EN=p,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="·",e.doBidiReorder=function(t,n,r){if(t.length<2)return{};var o=t.split(""),s=new Array(o.length),a=new Array(o.length),l=[];i=r?h:u,D(o,l,o.length,n);for(var c=0;c<s.length;s[c]=c,c++);I(2,l,s),I(1,l,s);for(c=0;c<s.length-1;c++)n[c]===g?l[c]=e.AN:l[c]===f&&(n[c]>w&&n[c]<C||n[c]===m||n[c]===R)?l[c]=e.ON_R:c>0&&"ل"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=e.R_H,c++);o[o.length-1]===e.DOT&&(l[o.length-1]=e.B),"‫"===o[0]&&(l[0]=e.RLE);for(c=0;c<s.length;c++)a[c]=l[s[c]];return{logicalFromVisual:s,bidiLevels:a}},e.hasBidiCharacters=function(t,e){for(var n=!1,i=0;i<t.length;i++)e[i]=P(t.charAt(i)),n||e[i]!=f&&e[i]!=w&&e[i]!=g||(n=!0);return n},e.getVisualFromLogicalIdx=function(t,e){for(var n=0;n<e.logicalFromVisual.length;n++)if(e.logicalFromVisual[n]==t)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(t,e,n){"use strict";var i=t("./lib/bidiutil"),r=t("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function t(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(t.getValue())}return t.prototype.isBidiRow=function(t,e,n){return!!this.seenBidi&&(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(e,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},t.prototype.onChange=function(t){this.seenBidi?this.currentRow=null:"insert"==t.action&&o.test(t.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},t.prototype.getDocumentRow=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n=this.session.$getRowCacheIndex(e,this.currentRow);n>=0&&(t=this.session.$docRowCache[n])}return t},t.prototype.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n,i=this.session.$getRowCacheIndex(e,this.currentRow);while(this.currentRow-t>0){if(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1),n!==i)break;i=n,t++}}else t=this.currentRow;return t},t.prototype.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1,o=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=e<s.length?this.line.substring(s[e-1],s[e]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[e]),e==s.length&&(this.line+=this.showInvisibles?o:i.DOT))}else this.line+=this.showInvisibles?o:i.DOT;var a,l=this.session,c=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(t,e){return"\t"===t||l.isFullWidth(t.charCodeAt(0))?(a="\t"===t?l.getScreenTabSize(e+c):2,c+=a-1,r.stringRepeat(i.DOT,a)):t})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},t.prototype.updateBidiMap=function(){var t=[];i.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},t.prototype.markAsDirty=function(){this.currentRow=null},t.prototype.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var e=this.characterWidth=t.$characterSize.width,n=t.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=e,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},t.prototype.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},t.prototype.setEolChar=function(t){this.EOL=t},t.prototype.setContentWidth=function(t){this.contentWidth=t},t.prototype.isRtlLine=function(t){return!!this.$isRtl||(void 0!=t?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir)},t.prototype.setRtlDirection=function(t,e){for(var n=t.getCursorPosition(),i=t.selection.getSelectionAnchor().row;i<=n.row;i++)e||t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE?e&&t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:i},t.session.$bidiHandler.RLE):t.session.doc.removeInLine(i,0,1)},t.prototype.getPosLeft=function(t){t-=this.wrapIndent;var e=this.line.charAt(0)===this.RLE?1:0,n=t>e?this.session.getOverwrite()?t:t-1:e,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&t<=e&&o[r]%2!==0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&t>e&&o[r]%2===0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},t.prototype.getSelections=function(t,e){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(t,e)-this.wrapIndent,l=Math.max(t,e)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f<r.length;f++)d=i.logicalFromVisual[f],n=r[f],c=d>=a&&d<l,c&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&f===r.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var p=0;p<o.length;p++)o[p].left+=this.rtlLineOffset;return o},t.prototype.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var e=0,n=(t=Math.max(t,0),0),i=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[i]];this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);while(t>n+o/2){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!==0&&r[i]%2===0?(t<n&&i--,e=this.bidiMap.logicalFromVisual[i]):i>0&&r[i-1]%2===0&&r[i]%2!==0?e=1+(t>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2===0||!this.isRtlDir&&0===i&&r[i]%2!==0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!==0&&0!==o&&i--,e=this.bidiMap.logicalFromVisual[i]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent},t}();e.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=function(){function t(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",(function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)})),this.anchor.on("change",(function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")}))}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},t.prototype.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?s.fromPoints(e,e):this.isBackwards()?s.fromPoints(e,t):s.fromPoints(t,e)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(t,e){var n=e?t.end:t.start,i=e?t.start:t.end;this.$setSelection(n.row,n.column,i.row,i.column)},t.prototype.$setSelection=function(t,e,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},t.prototype.selectTo=function(t,e){this.$moveSelection((function(){this.moveCursorTo(t,e)}))},t.prototype.selectToPosition=function(t){this.$moveSelection((function(){this.moveCursorToPosition(t)}))},t.prototype.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},t.prototype.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(t,e){if("undefined"==typeof e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},t.prototype.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===e?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},t.prototype.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();e=this.lead;this.wouldMoveIntoSoftTab(e,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},t.prototype.moveCursorLineStart=function(){var t=this.lead.row,e=this.lead.column,n=this.session.documentToScreenRow(t,e),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(t,null,i.row,i.column),o=r.match(/^\s*/);o[0].length==e||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},t.prototype.moveCursorLineEnd=function(){var t=this.lead,e=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==e.column){var n=this.session.getLine(e.row);if(e.column==n.length){var i=n.search(/\s+$/);i>0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},t.prototype.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length)return this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(e+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)}},t.prototype.moveCursorLongWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))this.moveCursorTo(t.start.row,t.start.column);else{var i=this.session.getFoldStringAt(e,n,-1);null==i&&(i=this.doc.getLine(e).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(e>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},t.prototype.$shortWordEndIndex=function(t){var e,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{while((e=t[n])&&i.test(e))n++;if(n<1){r.lastIndex=0;while((e=t[n])&&!r.test(e))if(r.lastIndex=0,n++,i.test(e)){if(n>2){n--;break}while((e=t[n])&&i.test(e))n++;if(n>2)break}}}return r.lastIndex=0,n},t.prototype.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var o=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),e=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(t,e+s)},t.prototype.moveCursorShortWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var i=this.session.getLine(e).substring(0,n);if(0===n){do{e--,i=this.doc.getLine(e)}while(e>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(e,n-s)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(t,e){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+t,i.column,n);0!==t&&0===e&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+e,0===e)},t.prototype.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},t.prototype.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},t.prototype.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return s.fromPoints(e,n)}catch(i){return s.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},t.prototype.toJSON=function(){if(this.rangeCount)var t=this.ranges.map((function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e}));else{t=this.getRange();t.isBackwards=this.isBackwards()}return t},t.prototype.fromJSON=function(t){if(void 0==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=s.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},t.prototype.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0},t}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,i.implement(a.prototype,o),e.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(t,e,n){"use strict";var i=t("./lib/report_error").reportError,r=2e3,o=function(){function t(t){for(var e in this.splitRegex,this.states=t,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[e],i=[],r=0,o=this.matchMappings[e]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(t,e){return"\\"+(parseInt(e,10)+r+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(t){t.splitRegex=this.createSplitterRegexp(t.regex,s)}),this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",s)}}return t.prototype.$setMaxTokenCount=function(t){r=0|t},t.prototype.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"===typeof n)return[{type:n,value:t}];for(var i=[],r=0,o=n.length;r<o;r++)e[r]&&(i[i.length]={type:n[r],value:e[r]});return i},t.prototype.$arrayTokens=function(t){if(!t)return[];var e=this.splitRegex.exec(t);if(!e)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)e[r+1]&&(n[n.length]={type:i[r],value:e[r+1]});return n},t.prototype.removeCapturingGroups=function(t){var e=t.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(t,e){return e?"(?:":t}));return e},t.prototype.createSplitterRegexp=function(t,e){if(-1!=t.indexOf("(?=")){var n=0,i=!1,r={};t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(t,e,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),t})),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))}return"^"!=t.charAt(0)&&(t="^"+t),"$"!=t.charAt(t.length-1)&&(t+="$"),new RegExp(t,(e||"").replace("g",""))},t.prototype.getLineTokens=function(t,e){if(e&&"string"!=typeof e){var n=e.slice(0);e=n[0],"#tmp"===e&&(n.shift(),e=n.shift())}else n=[];var i=e||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;var l,c=[],u=0,h=0,d={type:null,value:""};while(l=a.exec(t)){var f=s.defaultToken,p=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=t.substring(u,m-g.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){p=o[s[y]],f=p.onMatch?p.onMatch(g,i,n,t):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),o=this.states[i],o||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,a=this.regExps[i],a.lastIndex=m),p.consumeLineEnd&&(u=m);break}if(g)if("string"===typeof f)p&&!1===p.merge||d.type!==f?(d.type&&c.push(d),d={type:f,value:g}):d.value+=g;else if(f){d.type&&c.push(d),d={type:null,value:""};for(y=0;y<f.length;y++)c.push(f[y])}if(u==t.length)break;if(u=m,h++>r){h>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});while(u<t.length)d.type&&c.push(d),d={value:t.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},t}();o.prototype.reportError=i,e.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(t,e,n){"use strict";var i,r=t("../lib/deep_copy").deepCopy;i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(e)&&(o.next=e+o.next),o.nextState&&0!==o.nextState.indexOf(e)&&(o.nextState=e+o.nextState))}this.$rules[e+n]=i}else for(var n in t)this.$rules[n]=t[n]},this.getRules=function(){return this.$rules},this.embedRules=function(t,e,n,i,o){var s="function"==typeof t?(new t).getRules():t;if(i)for(var a=0;a<i.length;a++)i[a]=e+i[a];else for(var l in i=[],s)i.push(e+l);if(this.addRules(s,e),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],r(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var t=function(t,e){return("start"!=t||e.length)&&e.unshift(this.nextState,t),this.nextState},e=function(t,e){return e.shift(),e.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;function r(o){var s=i[o];s["processed"]=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||(h=l.token,"string"!=typeof h&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,r(h)}else"pop"==u&&(l.next=e);if(l.push&&(l.nextState=l.next||l.push,l.next=t,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var f="string"==typeof l?l:l.include;if(f&&("$self"===f&&(f="start"),c=Array.isArray(f)?f.map((function(t){return i[t]})):i[f]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter((function(t){return!t.next}))),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(r,this)},this.createKeywordMapper=function(t,e,n,i){var r=Object.create(null);return this.$keywordList=[],Object.keys(t).forEach((function(e){for(var o=t[e],s=o.split(i||"|"),a=s.length;a--;){var l=s[a];this.$keywordList.push(l),n&&(l=l.toLowerCase()),r[l]=e}}),this),t=null,n?function(t){return r[t.toLowerCase()]||e}:function(t){return r[t]||e}},this.getKeywords=function(){return this.$keywords}}.call(i.prototype),e.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(t,e,n){"use strict";var i;i=function(){this.$behaviours={}},function(){this.add=function(t,e,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][e]=n},this.addBehaviours=function(t){for(var e in t)for(var n in t[e])this.add(e,n,t[e][n])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,e){if("function"===typeof t)var n=(new t).getBehaviours(e);else n=t.getBehaviours(e);this.addBehaviours(n)},this.getBehaviours=function(t){if(t){for(var e={},n=0;n<t.length;n++)this.$behaviours[t[n]]&&(e[t[n]]=this.$behaviours[t[n]]);return e}return this.$behaviours}}.call(i.prototype),e.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=function(){function t(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var i=t.getTokenAt(e,n);this.$tokenIndex=i?i.index:-1}return t.prototype.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},t.prototype.stepForward=function(){var t;this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},t.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},t.prototype.getCurrentTokenRow=function(){return this.$row},t.prototype.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;n=0;while(e>0)e-=1,n+=t[e].value.length;return n},t.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},t.prototype.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new i(this.$row,e,this.$row,e+t.value.length)},t}();e.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(t,e,n){"use strict";var i,r,o=t("../../lib/oop"),s=t("../behaviour").Behaviour,a=t("../../token_iterator").TokenIterator,l=t("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},d={'"':'"',"'":"'"},f=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,h.rangeCount!=t.multiSelect.rangeCount&&(h={rangeCount:t.multiSelect.rangeCount})),h[e])return i=h[e];i=h[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(t,e,n,i){var r=t.end.row-t.start.row;return{text:n+e+i,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}};r=function(t){t=t||{},this.add("braces","insertion",(function(e,n,o,s,a){var c=o.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==a){f(o);var h=o.getSelectionRange(),d=s.doc.getTextRange(h);if(""!==d&&"{"!==d&&o.getWrapBehavioursEnabled())return p(h,d,"{","}");if(r.isSaneInsertion(o,s))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t.braces?(r.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}):(r.recordMaybeInsert(o,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){f(o);var g=u.substring(c.column,c.column+1);if("}"==g){var m=s.$findOpeningBracket("}",{column:c.column+1,row:c.row});if(null!==m&&r.isAutoInsertedClosing(c,u,a))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){f(o);var v="";r.isMaybeInsertedClosing(c,u)&&(v=l.stringRepeat("}",i.maybeInsertedBrackets),r.clearMaybeInsertedClosing());g=u.substring(c.column,c.column+1);if("}"===g){var y=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!y)return null;var w=this.$getIndent(s.getLine(y.row))}else{if(!v)return void r.clearMaybeInsertedClosing();w=this.$getIndent(u)}var b=w+s.getTabString();return{text:"\n"+b+"\n"+w+v,selection:[1,b.length,1,b.length]}}r.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){f(n);var a=r.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,e,n,i,o){if("("==o){f(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return p(s,a,"(",")");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){f(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),u=c.substring(l.column,l.column+1);if(")"==u){var h=i.$findOpeningBracket(")",{column:l.column+1,row:l.row});if(null!==h&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if(")"==a)return r.end.column++,r}})),this.add("brackets","insertion",(function(t,e,n,i,o){if("["==o){f(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return p(s,a,"[","]");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){f(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),u=c.substring(l.column,l.column+1);if("]"==u){var h=i.$findOpeningBracket("]",{column:l.column+1,row:l.row});if(null!==h&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if("]"==a)return r.end.column++,r}})),this.add("string_dquotes","insertion",(function(t,e,n,i,r){var o=i.$mode.$quotes||d;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;f(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),h=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==h&&m&&/escape/.test(m.type))return null;var y,w=m&&/string|escape/.test(m.type),b=!v||/string|escape/.test(v.type);if(g==s)y=w!==b,y&&/string\.end/.test(v.type)&&(y=!1);else{if(w&&!b)return null;if(w&&b)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var x=_.test(h);_.lastIndex=0;var S=_.test(g),A=i.$mode.$pairQuotesAfter,C=A&&A[s]&&A[s].test(h);if(!C&&x||S)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var k=u[c.column-2];if(h==s&&(k==s||_.test(k)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,e,n,i,r){var o=i.$mode.$quotes||d,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)){f(n);var a=i.doc.getLine(r.start.row),l=a.substring(r.start.column+1,r.start.column+2);if(l==s)return r.end.column++,r}})),!1!==t.closeDocComment&&this.add("doc comment end","insertion",(function(t,e,n,i,r){if("doc-start"===t&&("\n"===r||"\r\n"===r)&&n.selection.isEmpty()){var o=n.getCursorPosition(),s=i.doc.getLine(o.row),a=i.doc.getLine(o.row+1),l=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:r+l+"* ",selection:[1,3+l.length,1,3+l.length]}:{text:r+l+" * ",selection:[1,3+l.length,1,3+l.length]};if(/\/\*\*/.test(s.substring(0,o.column)))return{text:r+l+" * "+r+" "+l+"*/",selection:[1,4+l.length,1,4+l.length]}}}))},r.isSaneInsertion=function(t,e){var n=t.getCursorPosition(),i=new a(e,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(t.session.getLine(n.row)[n.column]))return!0;var r=new a(e,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",u)},r["$matchTokenType"]=function(t,e){return e.indexOf(t.type||t)>-1},r["recordAutoInsert"]=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this["isAutoInsertedClosing"](r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},r["recordMaybeInsert"]=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this["isMaybeInsertedClosing"](r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},r["isAutoInsertedClosing"]=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},r["isMaybeInsertedClosing"]=function(t,e){return i.maybeInsertedBrackets>0&&t.row===i.maybeInsertedRow&&e.substr(t.column)===i.maybeInsertedLineEnd&&e.substr(0,t.column)==i.maybeInsertedLineStart},r["popAutoInsertedClosing"]=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},r["clearMaybeInsertedClosing"]=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},o.inherits(r,s),e.CstyleBehaviour=r})),ace.define("ace/unicode",["require","exports","module"],(function(t,e,n){"use strict";for(var i=[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],r=0,o=[],s=0;s<i.length;s+=2)o.push(r+=i[s]),i[s+1]&&o.push(45,r+=i[s+1]);e.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i,r=t("../config"),o=t("../tokenizer").Tokenizer,s=t("./text_highlight_rules").TextHighlightRules,a=t("./behaviour/cstyle").CstyleBehaviour,l=t("../unicode"),c=t("../lib/lang"),u=t("../token_iterator").TokenIterator,h=t("../range").Range;i=function(){this.HighlightRules=s},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,e,n,i){var r=e.doc,o=!0,s=!0,a=1/0,l=e.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(c.escapeRegExp).join("|"),f=this.lineCommentStart[0];else g=c.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=e.getUseSoftTabs();y=function(t,e){var n=t.match(g);if(n){var i=n[1].length,o=n[0].length;d(t,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(e,i,o)}};var h=f+" ",d=(v=function(t,e){o&&!/\S/.test(t)||(d(t,a,a)?r.insertInLine({row:e,column:a},h):r.insertInLine({row:e,column:a},f))},w=function(t,e){return g.test(t)},function(t,e,n){var i=0;while(e--&&" "==t.charAt(e))i++;if(i%l!=0)return!1;i=0;while(" "==t.charAt(n++))i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(f)+")"),m=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(t,e){w(t,e)||o&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},p),r.insertInLine({row:e,column:a},f))},y=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(g))&&r.removeInLine(e,n[1].length,n[0].length)},w=function(t,n){if(g.test(t))return!0;for(var i=e.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function b(t){for(var e=n;e<=i;e++)t(r.getLine(e),e)}var _=1/0;b((function(t,e){var n=t.search(/\S/);-1!==n?(n<a&&(a=n),s&&!w(t,e)&&(s=!1)):_>t.length&&(_=t.length)})),a==1/0&&(a=_,o=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),b(s?y:v)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=new u(e,i.row,i.column),l=a.getCurrentToken(),c=(e.selection,e.selection.toOrientedRange());if(l&&/comment/.test(l.type)){var d,f;while(l&&/comment/.test(l.type)){var p=l.value.indexOf(r.start);if(-1!=p){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;d=new h(g,m,g,m+r.start.length);break}l=a.stepBackward()}a=new u(e,i.row,i.column),l=a.getCurrentToken();while(l&&/comment/.test(l.type)){p=l.value.indexOf(r.end);if(-1!=p){g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;f=new h(g,m,g,m+r.end.length);break}l=a.stepForward()}f&&e.remove(f),d&&(e.remove(d),o=d.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);c.start.row==o&&(c.start.column+=s),c.end.row==o&&(c.end.column+=s),e.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var n=t[e],i=n.prototype.$id,o=r.$modes[i];o||(r.$modes[i]=o=new n),r.$modes[e]||(r.$modes[e]=o),this.$embeds.push(e),this.$modes[e]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(t){(function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}})(l)},l=this;for(e=0;e<s.length;e++)a(e)},this.$delegator=function(t,e,n){var i=e[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1],o=this.$modes[r];if(o)return o[t].apply(o,[i[1]].concat([].slice.call(e,1)))}i=i[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a=i.split(this.$embeds[s]);if(!a[0]&&a[1]){e[0]=a[1];o=this.$modes[this.$embeds[s]];return o[t].apply(o,e)}}var l=n.apply(this,e);return n?l:void 0},this.transformAction=function(t,e,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][e]){var a=o[s][e].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var e=this.$tokenizer["rules"],n=[];for(var i in e)for(var r=e[i],o=0,s=r.length;o<s;o++)if("string"===typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"===typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return t?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(t,e,n,i){var r=this.$keywordList||this.$createKeywordList();return r.map((function(t){return{name:t,value:t,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}.call(i.prototype),e.Mode=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(t,e,n){"use strict";e.applyDelta=function(t,e,n){var i=e.start.row,r=e.start.column,o=t[i]||"";switch(e.action){case"insert":var s=e.lines;if(1===s.length)t[i]=o.substring(0,r)+e.lines[0]+o.substring(r);else{var a=[i,1].concat(e.lines);t.splice.apply(t,a),t[i]=o.substring(0,r)+t[i],t[i+e.lines.length-1]+=o.substring(r)}break;case"remove":var l=e.end.column,c=e.end.row;i===c?t[i]=o.substring(0,r)+o.substring(l):t.splice(i,c-i+1,o.substring(0,r)+t[c].substring(l));break}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(){function t(t,e,n){this.$onChange=this.onChange.bind(this),this.attach(t),"number"!=typeof e?this.setPosition(e.row,e.column):this.setPosition(e,n)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(t){if((t.start.row!=t.end.row||t.start.row==this.row)&&!(t.start.row>this.row)){var e=a(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},t.prototype.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n},t}();function s(t,e,n){var i=n?t.column<=e.column:t.column<e.column;return t.row<e.row||t.row==e.row&&i}function a(t,e,n){var i="insert"==t.action,r=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),a=t.start,l=i?a:t.end;return s(e,a,n)?{row:e.row,column:e.column}:s(l,e,!n)?{row:e.row+r,column:e.column+(e.row==l.row?o:0)}:{row:a.row,column:a.column}}o.prototype.$insertRight=!1,i.implement(o.prototype,r),e.Anchor=o})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./apply_delta").applyDelta,o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=t("./anchor").Anchor,l=function(){function t(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)}return t.prototype.setValue=function(t){var e=this.getLength()-1;this.remove(new s(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t||"")},t.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},t.prototype.createAnchor=function(t,e){return new a(this,t,e)},t.prototype.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},t.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},t.prototype.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},t.prototype.getNewLineMode=function(){return this.$newLineMode},t.prototype.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},t.prototype.getLine=function(t){return this.$lines[t]||""},t.prototype.getLines=function(t,e){return this.$lines.slice(t,e+1)},t.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},t.prototype.getLength=function(){return this.$lines.length},t.prototype.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},t.prototype.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{e=this.getLines(t.start.row,t.end.row),e[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column))}return e},t.prototype.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},t.prototype.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},t.prototype.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},t.prototype.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},t.prototype.insertInLine=function(t,e){var n=this.clippedPos(t.row,t.column),i=this.pos(t.row,t.column+e.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[e]},!0),this.clonePos(i)},t.prototype.clippedPos=function(t,e){var n=this.getLength();void 0===t?t=n:t<0?t=0:t>=n&&(t=n-1,e=void 0);var i=this.getLine(t);return void 0==e&&(e=i.length),e=Math.min(Math.max(e,0),i.length),{row:t,column:e}},t.prototype.clonePos=function(t){return{row:t.row,column:t.column}},t.prototype.pos=function(t,e){return{row:t,column:e}},t.prototype.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},t.prototype.insertFullLines=function(t,e){t=Math.min(Math.max(t,0),this.getLength());var n=0;t<this.getLength()?(e=e.concat([""]),n=0):(e=[""].concat(e),t--,n=this.$lines[t].length),this.insertMergedLines({row:t,column:n},e)},t.prototype.insertMergedLines=function(t,e){var n=this.clippedPos(t.row,t.column),i={row:n.row+e.length-1,column:(1==e.length?n.column:0)+e[e.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:e}),this.clonePos(i)},t.prototype.remove=function(t){var e=this.clippedPos(t.start.row,t.start.column),n=this.clippedPos(t.end.row,t.end.column);return this.applyDelta({start:e,end:n,action:"remove",lines:this.getLinesForRange({start:e,end:n})}),this.clonePos(e)},t.prototype.removeInLine=function(t,e,n){var i=this.clippedPos(t,e),r=this.clippedPos(t,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},t.prototype.removeFullLines=function(t,e){t=Math.min(Math.max(0,t),this.getLength()-1),e=Math.min(Math.max(0,e),this.getLength()-1);var n=e==this.getLength()-1&&t>0,i=e<this.getLength()-1,r=n?t-1:t,o=n?this.getLine(r).length:0,a=i?e+1:e,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(t,e+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},t.prototype.removeNewLine=function(t){t<this.getLength()-1&&t>=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},t.prototype.replace=function(t,e){return t instanceof s||(t=s.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),n=e?this.insert(t.start,e):t.start,n);var n},t.prototype.applyDeltas=function(t){for(var e=0;e<t.length;e++)this.applyDelta(t[e])},t.prototype.revertDeltas=function(t){for(var e=t.length-1;e>=0;e--)this.revertDelta(t[e])},t.prototype.applyDelta=function(t,e){var n="insert"==t.action;(n?t.lines.length<=1&&!t.lines[0]:!s.comparePoints(t.start,t.end))||(n&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},t.prototype.$safeApplyDelta=function(t){var e=this.$lines.length;("remove"==t.action&&t.start.row<e&&t.end.row<e||"insert"==t.action&&t.start.row<=e)&&this.applyDelta(t)},t.prototype.$splitAndapplyLargeDelta=function(t,e){for(var n=t.lines,i=n.length-e+1,r=t.start.row,o=t.start.column,s=0,a=0;s<i;s=a){a+=e-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:t.action,lines:l},!0)}t.lines=n.slice(s),t.start.row=r+s,t.start.column=o,this.applyDelta(t,!0)},t.prototype.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:"insert"==t.action?"remove":"insert",lines:t.lines.slice()})},t.prototype.indexToPosition=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=e||0,o=n.length;r<o;r++)if(t-=n[r].length+i,t<0)return{row:r,column:t+n[r].length+i};return{row:o-1,column:t+n[o-1].length+i}},t.prototype.positionToIndex=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(t.row,n.length),s=e||0;s<o;++s)r+=n[s].length+i;return r+t.column},t.prototype.$split=function(t){return t.split(/\r\n|\r|\n/)},t}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",i.implement(l.prototype,o),e.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(){function t(t,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var n=this;this.$worker=function(){if(n.running){var t=new Date,e=n.currentLine,i=-1,r=n.doc,o=e;while(n.lines[e])e++;var s=r.getLength(),a=0;n.running=!1;while(e<s){n.$tokenizeRow(e),i=e;do{e++}while(n.lines[e]);if(a++,a%5===0&&new Date-t>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=e,-1==i&&(i=e),o<=i&&n.fireUpdateEvent(o,i)}}}return t.prototype.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},t.prototype.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},t.prototype.fireUpdateEvent=function(t,e){var n={first:t,last:e};this._signal("update",{data:n})},t.prototype.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},t.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},t.prototype.$updateOnChange=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},t.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},t.prototype.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},t.prototype.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},t.prototype.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.states[t-1],i=this.tokenizer.getLineTokens(e,n,t);return this.states[t]+""!==i.state+""?(this.states[t]=i.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=i.tokens},t.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},t}();i.implement(o.prototype,r),e.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./range").Range,o=function(){function t(t,e,n){void 0===n&&(n="text"),this.setRegexp(t),this.clazz=e,this.type=n}return t.prototype.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},t.prototype.update=function(t,e,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&(u=i.getMatchOffsets(n.getLine(c),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(t){return new r(c,t.offset,c,t.offset+t.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var d=u[h].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,e.drawSingleLineMarker(t,d,this.clazz,o))}}},t}();o.prototype.MAX_RANGES=500,e.SearchHighlight=o})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=function(){function t(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return t.prototype.addSession=function(t){this.$session=t},t.prototype.add=function(t,e,n){if(!this.$fromUndo&&t!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===e||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev}"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t)}},t.prototype.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},t.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},t.prototype.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=t)break;r.id<e&&(r.ignore=!0)}this.lastDeltas=null},t.prototype.getSelection=function(t,e){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<t)return e&&(r=n[i+1]),r}},t.prototype.getRevision=function(){return this.$rev},t.prototype.getDeltas=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,o=n.length;o--;){var s=n[o][0];if(s.id<e&&!i&&(i=o+1),s.id<=t){r=o+1;break}}return n.slice(r,i)},t.prototype.getChangedRanges=function(t,e){null==e&&(e=this.$rev+1)},t.prototype.getChangedLines=function(t,e){null==e&&(e=this.$rev+1)},t.prototype.undo=function(t,e){this.lastDeltas=null;var n=this.$undoStack;if(r(n,n.length)){t||(t=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),o=null;return i&&(o=t.undoChanges(i,e),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o}},t.prototype.redo=function(t,e){if(this.lastDeltas=null,t||(t=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);y(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(t){t[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),r=null;return i&&(r=t.redoChanges(i,e),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r},t.prototype.$syncRev=function(){var t=this.$undoStack,e=t[t.length-1],n=e&&e[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},t.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},t.prototype.canUndo=function(){return this.$undoStack.length>0},t.prototype.canRedo=function(){return this.$redoStack.length>0},t.prototype.bookmark=function(t){void 0==t&&(t=this.$rev),this.mark=t},t.prototype.isAtBookmark=function(){return this.$rev===this.mark},t.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},t.prototype.fromJSON=function(t){this.reset(),this.$undoStack=t.$undoStack,this.$redoStack=t.$redoStack},t.prototype.$prettyPrint=function(t){return t?c(t):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)},t}();function r(t,e){for(var n=e;n--;){var i=t[n];if(i&&!i[0].ignore){while(n<e-1){var r=d(t[n],t[n+1]);t[n]=r[0],t[n+1]=r[1],n++}return!0}}}i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var o=t("./range").Range,s=o.comparePoints;o.comparePoints;function a(t){return{row:t.row,column:t.column}}function l(t){return{start:a(t.start),end:a(t.end),action:t.action,lines:t.lines.slice()}}function c(t){if(t=t||this,Array.isArray(t))return t.map(c).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(u).join("\n"):u(t.value)),t.start&&(e+=u(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function u(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function h(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}return[e,t]}function d(t,e){for(var n=t.length;n--;)for(var i=0;i<e.length;i++)if(!h(t[n],e[i])){while(n<t.length){while(i--)h(e[i],t[n]);i=e.length,n++}return[t,e]}return t.selectionBefore=e.selectionBefore=t.selectionAfter=e.selectionAfter=null,[e,t]}function f(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)s(t.start,e.start)<0?p(e,t,1):p(t,e,1);else if(n&&!i)s(t.start,e.end)>=0?p(t,e,-1):(s(t.start,e.start)<=0||p(t,o.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?p(e,t,-1):(s(e.start,t.start)<=0||p(e,o.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{var r,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(r=t,t=m(t,e.start)),s(t.end,e.end)>0&&(a=m(t,e.end)),g(e.end,t.start,t.end,-1),a&&!r&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,r,a].filter(Boolean);p(t,e,-1)}return[e,t]}function p(t,e,n){g(t.start,e.start,e.end,n),g(t.end,e.start,e.end,n)}function g(t,e,n,i){t.row==(1==i?e:n).row&&(t.column+=i*(n.column-e.column)),t.row+=i*(n.row-e.row)}function m(t,e){var n=t.lines,i=t.end;t.end=a(e);var r=t.end.row-t.start.row,o=n.splice(r,n.length),s=r?e.column:e.column-t.start.column;n.push(o[0].substring(0,s)),o[0]=o[0].substr(s);var l={start:a(e),end:i,lines:o,action:t.action};return l}function v(t,e){e=l(e);for(var n=t.length;n--;){for(var i=t[n],r=0;r<i.length;r++){var o=i[r],s=f(o,e);e=s[0],2!=s.length&&(s[2]?(i.splice(r+1,1,s[1],s[2]),r++):s[1]||(i.splice(r,1),r--))}i.length||t.splice(n,1)}return t}function y(t,e){for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.length;r++)v(t,i[r])}e.UndoManager=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../range").Range,r=function(){function t(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new i(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(t){t.setFoldLine(this)}),this)}return t.prototype.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach((function(e){e.start.row+=t,e.end.row+=t}))},t.prototype.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort((function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)})),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},t.prototype.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},t.prototype.walk=function(t,e,n){var i,r,o,s=0,a=this.folds,l=!0;null==e&&(e=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],r=i.range.compareStart(e,n),-1==r)return void t(null,e,n,s,l);if(o=t(null,i.start.row,i.start.column,s,l),o=!o&&t(i.placeholder,i.start.row,i.start.column,s),o||0===r)return;l=!i.sameRow,s=i.end.column}t(null,e,n,s,l)},t.prototype.getNextFoldTo=function(t,e){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],i=n.range.compareEnd(t,e),-1==i)return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},t.prototype.addRemoveChars=function(t,e,n){var i,r,o=this.getNextFoldTo(t,e);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=e&&i.start.row!=t)window.console&&window.console.log(t,e,i);else if(i.start.row==t){r=this.folds;var s=r.indexOf(i);for(0===s&&(this.start.column+=n),s;s<r.length;s++){if(i=r[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},t.prototype.split=function(e,n){var i=this.getNextFoldTo(e,n);if(!i||"inside"==i.kind)return null;var r=i.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(a,o.length-a);var c=new t(s,o);return s.splice(s.indexOf(this)+1,0,c),c},t.prototype.merge=function(t){for(var e=t.folds,n=0;n<e.length;n++)this.addFold(e[n]);var i=this.foldData;i.splice(i.indexOf(t),1)},t.prototype.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach((function(e){t.push(" "+e.toString())})),t.push("]"),t.join("\n")},t.prototype.idxToPosition=function(t){for(var e=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if(t-=i.start.column-e,t<0)return{row:i.start.row,column:i.start.column+t};if(t-=i.placeholder.length,t<0)return i.start;e=i.end.column}return{row:this.end.row,column:this.end.column+t}},t}();e.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=i.comparePoints,o=function(){function t(){this.ranges=[],this.$bias=1}return t.prototype.pointIndex=function(t,e,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(t,s.end);if(!(a>0)){var l=r(t,s.start);return 0===a?e&&0!==l?-o-2:o:l>0||0===l&&!e?o:-o-1}}return-o-1},t.prototype.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);n<0&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,t)},t.prototype.addList=function(t){for(var e=[],n=t.length;n--;)e.push.apply(e,this.add(t[n]));return e},t.prototype.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},t.prototype.merge=function(){var t=[],e=this.ranges;e=e.sort((function(t,e){return r(t.start,e.start)}));for(var n,i=e[0],o=1;o<e.length;o++){n=i,i=e[o];var s=r(n.end,i.start);s<0||(0!=s||n.isEmpty()||i.isEmpty())&&(r(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),e.splice(o,1),t.push(i),i=n,o--)}return this.ranges=e,t},t.prototype.contains=function(t,e){return this.pointIndex({row:t,column:e})>=0},t.prototype.containsPoint=function(t){return this.pointIndex(t)>=0},t.prototype.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},t.prototype.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row<t)return[];var i=this.pointIndex({row:t,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:e,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},t.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},t.prototype.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},t.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},t.prototype.$onChange=function(t){for(var e=t.start,n=t.end,i=e.row,r=n.row,o=this.ranges,s=0,a=o.length;s<a;s++){var l=o[s];if(l.end.row>=i)break}if("insert"==t.action)for(var c=r-i,u=-e.column+n.column;s<a;s++){l=o[s];if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=e.column&&(l.start.column==e.column&&this.$bias<=0||(l.start.column+=u,l.start.row+=c)),l.end.row==i&&l.end.column>=e.column){if(l.end.column==e.column&&this.$bias<0)continue;l.end.column==e.column&&u>0&&s<a-1&&l.end.column>l.start.column&&l.end.column==o[s+1].start.column&&(l.end.column-=u),l.end.column+=u,l.end.row+=c}}else for(c=i-r,u=e.column-n.column;s<a;s++){l=o[s];if(l.start.row>r)break;l.end.row<r&&(i<l.end.row||i==l.end.row&&e.column<l.end.column)?(l.end.row=i,l.end.column=e.column):l.end.row==r?l.end.column<=n.column?(c||l.end.column>e.column)&&(l.end.column=e.column,l.end.row=e.row):(l.end.column+=u,l.end.row+=c):l.end.row>r&&(l.end.row+=c),l.start.row<r&&(i<l.start.row||i==l.start.row&&e.column<l.start.column)?(l.start.row=i,l.start.column=e.column):l.start.row==r?l.start.column<=n.column?(c||l.start.column>e.column)&&(l.start.column=e.column,l.start.row=e.row):(l.start.column+=u,l.start.row+=c):l.start.row>r&&(l.start.row+=c)}if(0!=c&&s<a)for(;s<a;s++){l=o[s];l.start.row+=c,l.end.row+=c}},t}();o.prototype.comparePoints=r,e.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../range_list").RangeList,o=function(t){function e(e,n){var i=t.call(this)||this;return i.foldLine=null,i.placeholder=n,i.range=e,i.start=e.start,i.end=e.end,i.sameRow=e.start.row==e.end.row,i.subFolds=i.ranges=[],i}return i(e,t),e.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},e.prototype.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach((function(e){e.setFoldLine(t)}))},e.prototype.clone=function(){var t=this.range.clone(),n=new e(t,this.placeholder);return this.subFolds.forEach((function(t){n.subFolds.push(t.clone())})),n.collapseChildren=this.collapseChildren,n},e.prototype.addSubFold=function(t){if(!this.range.isEqual(t)){a(t,this.start);for(var e=t.start.row,n=t.start.column,i=0,r=-1;i<this.subFolds.length;i++)if(r=this.subFolds[i].range.compare(e,n),1!=r)break;var o=this.subFolds[i],s=0;if(0==r){if(o.range.containsRange(t))return o.addSubFold(t);s=1}e=t.range.end.row,n=t.range.end.column;var l=i;for(r=-1;l<this.subFolds.length;l++)if(r=this.subFolds[l].range.compare(e,n),1!=r)break;0==r&&l++;for(var c=this.subFolds.splice(i,l-i,t),u=0==r?c.length-1:c.length,h=s;h<u;h++)t.addSubFold(c[h]);return t.setFoldLine(this.foldLine),t}},e.prototype.restoreRange=function(t){return c(t,this.start)},e}(r);function s(t,e){t.row-=e.row,0==t.row&&(t.column-=e.column)}function a(t,e){s(t.start,e),s(t.end,e)}function l(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row}function c(t,e){l(t.start,e),l(t.end,e)}e.Fold=o})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("./fold_line").FoldLine,o=t("./fold").Fold,s=t("../token_iterator").TokenIterator,a=t("../mouse/mouse_event").MouseEvent;function l(){this.getFoldAt=function(t,e,n){var i=this.getFoldLine(t);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(t,e)){if(1==n&&s.isEnd(t,e)&&!s.isEmpty())continue;if(-1==n&&s.isStart(t,e)&&!s.isEmpty())continue;return r[o]}}},this.getFoldsInRange=function(t){var e=t.start,n=t.end,i=this.$foldData,r=[];e.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(t);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(s=c.range.compareRange(t),-2==s)break;if(2!=s){if(42==s)break;r.push(c)}}}}return e.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var e=[];t.forEach((function(t){e=e.concat(this.getFoldsInRange(t))}),this)}else e=this.getFoldsInRange(t);return e},this.getAllFolds=function(){for(var t=[],e=this.$foldData,n=0;n<e.length;n++)for(var i=0;i<e[n].folds.length;i++)t.push(e[n].folds[i]);return t},this.getFoldStringAt=function(t,e,n,i){if(i=i||this.getFoldLine(t),!i)return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){o=i.folds[a];var l=o.range.compareEnd(t,e);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,e-s.end.column):1==n?r.substring(e-s.end.column):r},this.getFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=e){a<e&&(a>=t?i-=e-a:i=0);break}s>=t&&(i-=a>=t?s-a:s-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort((function(t,e){return t.start.row-e.start.row})),t},this.addFold=function(t,e){var n,i=this.$foldData,s=!1;t instanceof o?n=t:(n=new o(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(t){n.addSubFold(t)})));for(var p=0;p<i.length;p++){var g=i[p];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(t){t.forEach((function(t){this.addFold(t)}),this)},this.removeFold=function(t){var e=t.foldLine,n=e.start.row,i=e.end.row,r=this.$foldData,o=e.folds;if(1==o.length)r.splice(r.indexOf(e),1);else if(e.range.isEnd(t.end.row,t.end.column))o.pop(),e.end.row=o[o.length-1].end.row,e.end.column=o[o.length-1].end.column;else if(e.range.isStart(t.start.row,t.start.column))o.shift(),e.start.row=o[0].start.row,e.start.column=o[0].start.column;else if(t.sameRow)o.splice(o.indexOf(t),1);else{var s=e.split(t.start.row,t.start.column);o=s.folds,o.shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);e.forEach((function(t){this.removeFold(t)}),this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach((function(e){t.restoreRange(e),this.addFold(e)}),this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach((function(t){this.expandFold(t)}),this)},this.unfold=function(t,e){var n,r;if(null==t)n=new i(0,0,this.getLength(),0),null==e&&(e=!0);else if("number"==typeof t)n=new i(t,0,t,this.getLine(t).length);else if("row"in t)n=i.fromPoints(t,t);else{if(Array.isArray(t))return r=[],t.forEach((function(t){r=r.concat(this.unfold(t))}),this),r;n=t}r=this.getFoldsInRangeList(n);var o=r;while(1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=e?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var o=this.doc,s="";return t.walk((function(t,e,n,a){if(!(e<i)){if(e==i){if(n<r)return;a=Math.max(r,a)}s+=null!=t?t:o.getLine(e).substring(a,n)}}),e,n),s},this.getDisplayLine=function(t,e,n,i){var r,o=this.getFoldLine(t);return o?this.getFoldDisplayLine(o,t,e,n,i):(r=this.doc.getLine(t),r.substring(i||0,e||r.length))},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map((function(e){var n=e.folds.map((function(t){return t.clone()}));return new r(t,n)})),t},this.toggleFold=function(t){var e,n,i=this.selection,r=i.getRange();if(r.isEmpty()){var o=r.start;if(e=this.getFoldAt(o.row,o.column),e)return void this.expandFold(e);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var s=this.getFoldsInRange(r);if(t&&s.length)return void this.expandFolds(s);1==s.length&&(e=s[0])}if(e||(e=this.getFoldAt(r.start.row,r.start.column)),e&&e.range.toString()==r.toString())this.expandFold(e);else{var a="...";if(!r.isMultiLine()){if(a=this.getTextRange(r),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,r)}},this.getCommentFoldRange=function(t,e,n){var r=new s(this,t,e),o=r.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],"comment"==a&&(a+="|doc-start|\\.doc");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new s(this,t,e),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(t,e,n,i){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){e=e||this.getLength(),t=t||0;for(var o=t;o<e;o++)if(null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"==r[o]&&(!i||i(o))){var s=this.getFoldWidgetRange(o);s&&s.isMultiLine()&&s.end.row<=e&&s.start.row>=t&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(t){this.foldAll();while(t-- >0)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,(function(e){for(var n=t.getTokens(e),i=0;i<n.length;i++){var r=n[i];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(t,e){var n=this.foldWidgets;if(!n||e&&n[t])return{};var i,r=t-1;while(r>=0){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=t)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(t,e){e instanceof a&&(e=e.domEvent);var n={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},i=this.$toggleFoldWidget(t,n);if(!i){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,o=this.getFoldAt(t,-1===r?0:i.length,r);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(t,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1),o&&s.isEqual(o.range)))return this.removeFold(o),o;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=s?s.end.row:this.getLength(),this.foldAll(t+1,c,e.all?1e4:0)):s&&(e.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange,n){e=n.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}e.Folding=l})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i=t("../token_iterator").TokenIterator,r=t("../range").Range;function o(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,o=n.charAt(t.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],t);if(!a)return null;e=r.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{a=this.$findOpeningBracket(s[2],t);if(!a)return null;e=r.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(t,e){var n=this.getLine(t.row),i=/([\(\[\{])|([\)\]\}])/,o=!e&&n.charAt(t.column-1),s=o&&o.match(i);if(s||(o=(void 0===e||e)&&n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(i)),!s)return null;var a=new r(t.row,t.column-1,t.row,t.column),l=s[1]?this.$findClosingBracket(s[1],t):this.$findOpeningBracket(s[2],t);if(!l)return[a];var c=new r(l.row,l.column,l.row,l.column+1);return[a,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));var l=e.column-s.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var u=c.charAt(l);if(u==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==t&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));var l=e.column-s.getCurrentTokenColumn();while(1){var c=a.value,u=c.length;while(l<u){var h=c.charAt(l);if(h==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==t&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(t){var e=new i(this,t.row,t.column),n=this.$findTagName(e);if(n){var r=e.stepBackward();return"<"===r.value?this.$findClosingTag(e,n):this.$findOpeningTag(e,n)}},this.$findTagName=function(t){var e=t.getCurrentToken(),n=!1,i=!1;if(e&&-1===e.type.indexOf("tag-name"))do{e=i?t.stepBackward():t.stepForward(),e&&("/>"===e.value?i=!0:-1!==e.type.indexOf("tag-name")&&(n=!0))}while(e&&!n);return e},this.$findClosingTag=function(t,e){var n,i=e.value,o=e.value,s=0,a=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);e=t.stepForward();var l=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length),c=!1;do{if(n=e,e=t.stepForward(),e){if(">"===e.value&&!c){var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);c=!0}if(-1!==e.type.indexOf("tag-name")){if(i=e.value,o===i)if("<"===n.value)s++;else if("</"===n.value&&(s--,s<0)){t.stepBackward();var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2);e=t.stepForward();var d=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),!e||">"!==e.value)return;var f=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===e.value&&(s--,s<0))h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2),d=h,f=d,u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(e&&s>=0);if(a&&u&&h&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(h.start.row,h.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(t,e){var n=t.getCurrentToken(),i=e.value,o=0,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);t.stepForward();var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),e&&">"===e.value){var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);t.stepBackward(),t.stepBackward();do{if(e=n,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+e.value.length,n=t.stepBackward(),e)if(-1!==e.type.indexOf("tag-name")){if(i===e.value)if("<"===n.value){if(o++,o>0){var d=new r(s,a,s,l),f=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);do{e=t.stepForward()}while(e&&">"!==e.value);var p=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===e.value){var g=0,m=n;while(m){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=t.stepBackward(),g++}for(var v=0;v<g;v++)t.stepForward()}}while(n&&o<=0);return f&&p&&c&&h&&d&&u?{openTag:new r(f.start.row,f.start.column,p.end.row,p.end.column),closeTag:new r(c.start.row,c.start.column,h.end.row,h.end.column),openTagName:d,closeTagName:u}:void 0}}}e.BracketMatch=o})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./bidihandler").BidiHandler,s=t("./config"),a=t("./lib/event_emitter").EventEmitter,l=t("./selection").Selection,c=t("./mode/text").Mode,u=t("./range").Range,h=t("./document").Document,d=t("./background_tokenizer").BackgroundTokenizer,f=t("./search_highlight").SearchHighlight,p=t("./undomanager").UndoManager,g=function(){function t(e,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++t.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((new c).getTokenizer(),this);var i=this;this.bgTokenizer.on("update",(function(t){i._signal("tokenizerUpdate",t)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(n),s._signal("session",this),this.destroyed=!1}return t.prototype.setDocument=function(t){this.doc&&this.doc.off("change",this.$onChange),this.doc=t,t.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},t.prototype.getDocument=function(){return this.doc},t.prototype.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var e=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,t)+1;e>n&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},t.prototype.$getRowCacheIndex=function(t,e){var n=0,i=t.length-1;while(n<=i){var r=n+i>>1,o=t[r];if(e>o)n=r+1;else{if(!(e<o))return r;i=r-1}}return n-1},t.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},t.prototype.onChangeFold=function(t){var e=t.data;this.$resetRowCache(e.start.row)},t.prototype.onChange=function(t){this.$modified=!0,this.$bidiHandler.onChange(t),this.$resetRowCache(t.start.row);var e=this.$updateInternalDataOnChange(t);!this.$fromUndo&&this.$undoManager&&(e&&e.length&&(this.$undoManager.add({action:"removeFolds",folds:e},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(t,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._signal("change",t)},t.prototype.setValue=function(t){this.doc.setValue(t),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},t.fromJSON=function(e){"string"==typeof e&&(e=JSON.parse(e));var n=new p;n.$undoStack=e.history.undo,n.$redoStack=e.history.redo,n.mark=e.history.mark,n.$rev=e.history.rev;var i=new t(e.value);return e.folds.forEach((function(t){i.addFold("...",u.fromPoints(t.start,t.end))})),i.setAnnotations(e.annotations),i.setBreakpoints(e.breakpoints),i.setMode(e.mode),i.setScrollLeft(e.scrollLeft),i.setScrollTop(e.scrollTop),i.setUndoManager(n),i.selection.fromJSON(e.selection),i},t.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map((function(t){return t.range})),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},t.prototype.toString=function(){return this.doc.getValue()},t.prototype.getSelection=function(){return this.selection},t.prototype.getState=function(t){return this.bgTokenizer.getState(t)},t.prototype.getTokens=function(t){return this.bgTokenizer.getTokens(t)},t.prototype.getTokenAt=function(t,e){var n,i=this.bgTokenizer.getTokens(t),r=0;if(null==e){var o=i.length-1;r=this.getLine(t).length}else for(o=0;o<i.length;o++)if(r+=i[o].value.length,r>=e)break;return n=i[o],n?(n.index=o,n.start=r-n.value.length,n):null},t.prototype.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},t.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},t.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},t.prototype.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},t.prototype.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},t.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},t.prototype.setTabSize=function(t){this.setOption("tabSize",t)},t.prototype.getTabSize=function(){return this.$tabSize},t.prototype.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize===0},t.prototype.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},t.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},t.prototype.setOverwrite=function(t){this.setOption("overwrite",t)},t.prototype.getOverwrite=function(){return this.$overwrite},t.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},t.prototype.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},t.prototype.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},t.prototype.getBreakpoints=function(){return this.$breakpoints},t.prototype.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e<t.length;e++)this.$breakpoints[t[e]]="ace_breakpoint";this._signal("changeBreakpoint",{})},t.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},t.prototype.setBreakpoint=function(t,e){void 0===e&&(e="ace_breakpoint"),e?this.$breakpoints[t]=e:delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},t.prototype.clearBreakpoint=function(t){delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},t.prototype.addMarker=function(t,e,n,i){var r=this.$markerId++,o={range:t,type:n||"line",renderer:"function"==typeof n?n:null,clazz:e,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},t.prototype.addDynamicMarker=function(t,e){if(t.update){var n=this.$markerId++;return t.id=n,t.inFront=!!e,e?(this.$frontMarkers[n]=t,this._signal("changeFrontMarker")):(this.$backMarkers[n]=t,this._signal("changeBackMarker")),t}},t.prototype.removeMarker=function(t){var e=this.$frontMarkers[t]||this.$backMarkers[t];if(e){var n=e.inFront?this.$frontMarkers:this.$backMarkers;delete n[t],this._signal(e.inFront?"changeFrontMarker":"changeBackMarker")}},t.prototype.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},t.prototype.highlight=function(t){if(!this.$searchHighlight){var e=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(e)}this.$searchHighlight.setRegexp(t)},t.prototype.highlightLines=function(t,e,n,i){"number"!=typeof e&&(n=e,e=t),n||(n="ace_step");var r=new u(t,0,e,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},t.prototype.setAnnotations=function(t){this.$annotations=t,this._signal("changeAnnotation",{})},t.prototype.getAnnotations=function(){return this.$annotations||[]},t.prototype.clearAnnotations=function(){this.setAnnotations([])},t.prototype.$detectNewLine=function(t){var e=t.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},t.prototype.getWordRange=function(t,e){var n=this.getLine(t),i=!1;if(e>0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(e-1,e+1)))r=/\s/;else r=this.nonTokenRe;var o=e;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}var s=e;while(s<n.length&&n.charAt(s).match(r))s++;return new u(t,o,t,s)},t.prototype.getAWordRange=function(t,e){var n=this.getWordRange(t,e),i=this.getLine(n.end.row);while(i.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},t.prototype.setNewLineMode=function(t){this.doc.setNewLineMode(t)},t.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},t.prototype.setUseWorker=function(t){this.setOption("useWorker",t)},t.prototype.getUseWorker=function(){return this.$useWorker},t.prototype.onReloadTokenizer=function(t){var e=t.data;this.bgTokenizer.start(e.first),this._signal("tokenizerUpdate",t)},t.prototype.setMode=function(t,e){if(t&&"object"===typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var n=t,i=n.path}else i=t||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(e&&e());this.$modeId=i,s.loadModule(["mode",i],function(t){if(this.$modeId!==i)return e&&e();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):t&&t.Mode&&(t=new t.Mode(n),n||(this.$modes[i]=t,t.$id=i),this.$onChangeMode(t)),e&&e()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},t.prototype.$onChangeMode=function(t,e){if(e||(this.$modeId=t.$id),this.$mode!==t){var n=this.$mode;this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=t.getTokenizer();if(void 0!==i.on){var r=this.onReloadTokenizer.bind(this);i.on("update",r)}this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,e||(t.attachToSession&&t.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:t}))}},t.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},t.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(t){s.warn("Could not load worker",t),this.$worker=null}},t.prototype.getMode=function(){return this.$mode},t.prototype.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},t.prototype.getScrollTop=function(){return this.$scrollTop},t.prototype.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},t.prototype.getScrollLeft=function(){return this.$scrollLeft},t.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},t.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach((function(e){e&&e.screenWidth>t&&(t=e.screenWidth)})),this.lineWidgetWidth=t},t.prototype.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=e.length,l=0;l<a;l++){if(l>s){if(l=o.end.row+1,l>=a)break;o=this.$foldData[r++],s=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},t.prototype.getLine=function(t){return this.doc.getLine(t)},t.prototype.getLines=function(t,e){return this.doc.getLines(t,e)},t.prototype.getLength=function(){return this.doc.getLength()},t.prototype.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},t.prototype.insert=function(t,e){return this.doc.insert(t,e)},t.prototype.remove=function(t){return this.doc.remove(t)},t.prototype.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},t.prototype.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=t.length-1;-1!=n;n--){var i=t[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},t.prototype.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=0;n<t.length;n++){var i=t[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!e&&this.$undoSelect&&(t.selectionAfter?this.selection.fromJSON(t.selectionAfter):this.selection.setRange(this.$getUndoSelection(t,!1))),this.$fromUndo=!1}},t.prototype.setUndoSelect=function(t){this.$undoSelect=t},t.prototype.$getUndoSelection=function(t,e){function n(t){return e?"insert"!==t.action:"insert"===t.action}for(var i,r,o=0;o<t.length;o++){var s=t[o];s.start&&(i?n(s)?(r=s.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=s.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=s.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},t.prototype.replace=function(t,e){return this.doc.replace(t,e)},t.prototype.moveText=function(t,e,n){var i=this.getTextRange(t),r=this.getFoldsInRange(t),o=u.fromPoints(e,e);if(!n){this.remove(t);var s=t.start.row-t.end.row,a=s?-t.end.column:t.start.column-t.end.column;a&&(o.start.row==t.end.row&&o.start.column>t.end.column&&(o.start.column+=a),o.end.row==t.end.row&&o.end.column>t.end.column&&(o.end.column+=a)),s&&o.start.row>=t.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var l=t.start,c=o.start;s=c.row-l.row,a=c.column-l.column;this.addFolds(r.map((function(t){return t=t.clone(),t.start.row==l.row&&(t.start.column+=a),t.end.row==l.row&&(t.end.column+=a),t.start.row+=s,t.end.row+=s,t})))}return o},t.prototype.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;i<=e;i++)this.doc.insertInLine({row:i,column:0},n)},t.prototype.outdentRows=function(t){for(var e=t.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i;++s)if(" "!=o.charAt(s))break;s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},t.prototype.$moveLines=function(t,e,n){if(t=this.getRowFoldStart(t),e=this.getRowFoldEnd(e),n<0){var i=this.getRowFoldStart(t+n);if(i<0)return 0;var r=i-t}else if(n>0){i=this.getRowFoldEnd(e+n);if(i>this.doc.getLength()-1)return 0;r=i-e}else{t=this.$clipRowToDocument(t),e=this.$clipRowToDocument(e);r=e-t+1}var o=new u(t,0,e,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(t){return t=t.clone(),t.start.row+=r,t.end.row+=r,t})),a=0==n?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+r,a),s.length&&this.addFolds(s),r},t.prototype.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},t.prototype.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},t.prototype.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},t.prototype.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},t.prototype.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},t.prototype.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},t.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 e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},t.prototype.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},t.prototype.getUseWrapMode=function(){return this.$useWrapMode},t.prototype.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},t.prototype.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},t.prototype.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},t.prototype.getWrapLimit=function(){return this.$wrapLimit},t.prototype.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},t.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},t.prototype.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,n=t.action,i=t.start,r=t.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(t),this.removeFolds(l);var u=this.getFoldLine(r.row),h=0;if(u){u.addRemoveChars(r.row,r.column,i.column-r.column),u.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==u&&(d.merge(u),u=d),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=r.row&&u.shiftRow(-a)}s=o}else{var f=Array(a);f.unshift(o,0);var p=e?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,f);c=this.$foldData,u=this.getFoldLine(o),h=0;if(u){var g=u.range.compareInside(i.row,i.column);0==g?(u=u.split(i.row,i.column),u&&(u.shiftRow(a),u.addRemoveChars(s,0,r.column-i.column))):-1==g&&(u.addRemoveChars(o,0,r.column-i.column),u.shiftRow(a)),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=o&&u.shiftRow(a)}}else{a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a);u=this.getFoldLine(o);u&&u.addRemoveChars(o,i.column,a)}return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},t.prototype.$updateRowLengthCache=function(t,e){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},t.prototype.$updateWrapData=function(t,e){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=t;e=Math.min(e,r.length-1);while(l<=e)i=this.getFoldLine(l,i),i?(n=[],i.walk(function(t,e,i,o){var s;if(null!=t){s=this.$getDisplayTokens(t,n.length),s[0]=y;for(var a=1;a<s.length;a++)s[a]=w}else s=this.$getDisplayTokens(r[e].substring(o,i),n.length);n=n.concat(s)}.bind(this),i.end.row,r[i.end.row].length+1),s[i.start.row]=this.$computeWrapSplits(n,a,o),l=i.end.row+1):(n=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(n,a,o),l++)},t.prototype.$computeWrapSplits=function(t,e,n){if(0==t.length)return[];var i=[],r=t.length,o=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=e<=Math.max(2*n,8)||!1===l?0:Math.floor(e/2);function u(){var e=0;if(0===c)return e;if(l)for(var i=0;i<t.length;i++){var r=t[i];if(r==_)e+=1;else{if(r!=x){if(r==S)continue;break}e+=n}}return a&&!1!==l&&(e+=n),Math.min(e,c)}function h(e){for(var n=e-o,r=o;r<e;r++){var a=t[r];12!==a&&2!==a||(n-=1)}i.length||(d=u(),i.indent=d),s+=n,i.push(s),o=e}var d=0;while(r-o>e-d){var f=o+e-d;if(t[f-1]>=_&&t[f]>=_)h(f);else if(t[f]!=y&&t[f]!=w){var p=Math.max(f-(e-(e>>2)),o-1);while(f>p&&t[f]<y)f--;if(a){while(f>p&&t[f]<y)f--;while(f>p&&t[f]==b)f--}else while(f>p&&t[f]<_)f--;f>p?h(++f):(f=o+e,t[f]==v&&f--,h(f-d))}else{for(f;f!=o-1;f--)if(t[f]==y)break;if(f>o){h(f);continue}for(f=o+e,f;f<t.length;f++)if(t[f]!=w)break;if(f==t.length)break;h(f)}}return i},t.prototype.$getDisplayTokens=function(t,e){var n,i=[];e=e||0;for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(9==o){n=this.getScreenTabSize(i.length+e),i.push(x);for(var s=1;s<n;s++)i.push(S)}else 32==o?i.push(_):o>39&&o<48||o>57&&o<64?i.push(b):o>=4352&&A(o)?i.push(m,v):i.push(m)}return i},t.prototype.$getStringScreenWidth=function(t,e,n){if(0==e)return[0,0];var i,r;for(null==e&&(e=1/0),n=n||0,r=0;r<t.length;r++)if(i=t.charCodeAt(r),9==i?n+=this.getScreenTabSize(n):i>=4352&&A(i)?n+=2:n+=1,n>e)break;return[n,r]},t.prototype.getRowLength=function(t){var e=1;return this.lineWidgets&&(e+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+e:e},t.prototype.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},t.prototype.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),n=this.$wrapData[e.row];return n.length&&n[0]<e.column?n.indent:0}return 0},t.prototype.getScreenLastRowColumn=function(t){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},t.prototype.getDocumentLastRowColumn=function(t,e){var n=this.documentToScreenRow(t,e);return this.getScreenLastRowColumn(n)},t.prototype.getDocumentLastRowColumnPosition=function(t,e){var n=this.documentToScreenRow(t,e);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},t.prototype.getRowSplitData=function(t){return this.$useWrapMode?this.$wrapData[t]:void 0},t.prototype.getScreenTabSize=function(t){return this.$tabSize-(t%this.$tabSize|0)},t.prototype.screenToDocumentRow=function(t,e){return this.screenToDocumentPosition(t,e).row},t.prototype.screenToDocumentColumn=function(t,e){return this.screenToDocumentPosition(t,e).column},t.prototype.screenToDocumentPosition=function(t,e,n){if(t<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,t),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var d=t>c[h-1]}else d=!h;var f=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;while(a<=t){if(l=this.getRowLength(o),a+l>t||o>=f)break;a+=l,o++,o>g&&(o=p.end.row+1,p=this.getNextFoldLine(o,p),g=p?p.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=t||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[o];y&&(r=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(e=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,e-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},t.prototype.documentToScreenPosition=function(t,e){if("undefined"===typeof e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);t=n.row,e=n.column;var i=0,r=null,o=null;o=this.getFoldAt(t,e,1),o&&(t=o.start.row,e=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=t>l[u-1]}else h=!u;var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;while(a<t){if(a>=f){if(s=d.end.row+1,s>t)break;d=this.getNextFoldLine(s,d),f=d?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,t,e),r=d.start.row):(p=this.getLine(t).substring(0,e),r=t);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){var v=0;while(p.length>=m[v])i++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:g+this.$getStringScreenWidth(p)[0]}},t.prototype.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},t.prototype.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},t.prototype.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode){var n=this.$wrapData.length,i=0,r=(a=0,e=this.$foldData[a++],e?e.start.row:1/0);while(i<n){var o=this.$wrapData[i];t+=o?o.length+1:1,i++,i>r&&(i=e.end.row+1,e=this.$foldData[a++],r=e?e.start.row:1/0)}}else{t=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e=s[a],t-=e.end.row-e.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t},t.prototype.$setFontMetrics=function(t){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<e.length;o++)if(r=e.charAt(o),i+="\t"===r?this.getScreenTabSize(i):t.getCharacterWidth(r),i>n)break;return[i,o]})},t.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()},t}();g.$uid=0,g.prototype.$modes=s.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=A,i.implement(g.prototype,a);var m=1,v=2,y=3,w=4,b=9,_=10,x=11,S=12;function A(t){return!(t<4352)&&(t>=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}t("./edit_session/folding").Folding.call(g.prototype),t("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){t="auto"==t?"text"!=this.$mode.type:"text"!=t,t!=this.$wrapAsCode&&(this.$wrapAsCode=t,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(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){t=parseInt(t),t>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./lib/oop"),o=t("./range").Range,s=function(){function t(){this.$options={}}return t.prototype.set=function(t){return r.mixin(this.$options,t),this},t.prototype.getOptions=function(){return i.copyObject(this.$options)},t.prototype.setOptions=function(t){this.$options=t},t.prototype.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach((function(t,n,r,s){return i=new o(t,n,r,s),!(n==s&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start))||(i=null,!1)})),i},t.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),s=[],a=e.re;if(e.$isMultiLine){var l,c=a.length,u=r.length-c;t:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue t;var f=r[h],p=r[h+c-1],g=f.length-f.match(a[0])[0].length,m=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new o(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<r.length;v++){var y=i.getMatchOffsets(r[v],a);for(d=0;d<y.length;d++){var w=y[d];s.push(new o(v,w.offset,v,w.offset+w.length))}}if(n){var b=n.start.column,_=n.end.column;v=0,d=s.length-1;while(v<d&&s[v].start.column<b&&0==s[v].start.row)v++;var x=n.end.row-n.start.row;while(v<d&&s[d].end.column>_&&s[d].end.row==x)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},t.prototype.replace=function(t,e){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(i){var r=i.exec(t);if(!r||r[0].length!=t.length)return null;if(e=t.replace(i,e),n.preserveCase){e=e.split("");for(var o=Math.min(t.length,t.length);o--;){var s=t[o];s&&s.toLowerCase()!=s?e[o]=e[o].toUpperCase():e[o]=e[o].toLowerCase()}e=e.join("")}return e}},t.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=i.escapeRegExp(n));var r=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,r+="u"}catch(s){t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(n=a(n,t)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(s){o=!1}return t.re=o},t.prototype.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],e))}catch(o){return!1}return i},t.prototype.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var r=1==e.backwards,o=0!=e.skipCurrent,s=n.unicode,a=e.range,l=e.start;l||(l=a?a[r?"end":"start"]:t.selection.getRange()),l.start&&(l=l[o!=r?"end":"start"]);var c=a?a.start.row:0,u=a?a.end.row:t.getLength()-1;if(r)var h=function(t){var n=l.row;if(!f(n,l.column,t)){for(n--;n>=c;n--)if(f(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=u,c=l.row;n>=c;n--)if(f(n,Number.MAX_VALUE,t))return}};else h=function(t){var n=l.row;if(!f(n,l.column,t)){for(n+=1;n<=u;n++)if(f(n,0,t))return;if(0!=e.wrap)for(n=c,u=l.row;n<=u;n++)if(f(n,0,t))return}};if(e.$isMultiLine)var d=n.length,f=function(e,i,o){var s=r?e-d+1:e;if(!(s<0||s+d>t.getLength())){var a=t.getLine(s),l=a.search(n[0]);if(!(!r&&l<i||-1===l)){for(var c=1;c<d;c++)if(a=t.getLine(s+c),-1==a.search(n[c]))return;var u=a.match(n[d-1])[0].length;if(!(r&&u>i))return!!o(s,l,s+d-1,u)||void 0}}};else if(r)f=function(e,r,o){var a,l=t.getLine(e),c=[],u=0;n.lastIndex=0;while(a=n.exec(l)){var h=a[0].length;if(u=a.index,!h){if(u>=l.length)break;n.lastIndex=u+=i.skipEmptyMatch(l,u,s)}if(a.index+h>r)break;c.push(a.index,h)}for(var d=c.length-1;d>=0;d-=2){var f=c[d-1];h=c[d];if(o(e,f,e,f+h))return!0}};else f=function(e,r,o){var a,l,c=t.getLine(e);n.lastIndex=r;while(l=n.exec(c)){var u=l[0].length;if(a=l.index,o(e,a,e,a+u))return!0;if(!u&&(n.lastIndex=a+=i.skipEmptyMatch(c,a,s),a>=c.length))return!1}};return{forEach:h}},t}();function a(t,e){var n=i.supportsLookbehind();function r(t,i){void 0===i&&(i=!0);var r=n&&e.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return r.test(t)||e.regExp?n&&e.$supportsUnicodeFlag?i?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(t),s=o[0],a=o[o.length-1];return r(s)+t+r(a,!1)}e.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../lib/keys"),o=t("../lib/useragent"),s=r.KEY_MODS,a=function(){function t(t,e){this.$init(t,e,!1)}return t.prototype.$init=function(t,e,n){this.platform=e||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},t.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},t.prototype.removeCommand=function(t,e){var n=t&&("string"===typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==t)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(t);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},t.prototype.bindKey=function(t,e,n){if("object"==typeof t&&t&&(void 0==n&&(n=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach((function(t){var i="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach((function(t){var e=this.parseKeys(t),n=s[e.hashId]+e.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var o=this.parseKeys(t),a=s[o.hashId]+o.key;this._addCommandToBinding(i+a,e,n)}),this)},t.prototype._addCommandToBinding=function(t,e,n){var i,r=this.commandKeyBinding;if(e)if(!r[t]||this.$singleCommand)r[t]=e;else{Array.isArray(r[t])?-1!=(i=r[t].indexOf(e))&&r[t].splice(i,1):r[t]=[r[t]],"number"!=typeof n&&(n=l(e));var o=r[t];for(i=0;i<o.length;i++){var s=o[i],a=l(s);if(a>n)break}o.splice(i,0,e)}else delete r[t]},t.prototype.addCommands=function(t){t&&Object.keys(t).forEach((function(e){var n=t[e];if(n){if("string"===typeof n)return this.bindKey(n,e);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=e),this.addCommand(n))}}),this)},t.prototype.removeCommands=function(t){Object.keys(t).forEach((function(e){this.removeCommand(t[e])}),this)},t.prototype.bindKeys=function(t){Object.keys(t).forEach((function(e){this.bindKey(e,t[e])}),this)},t.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},t.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(t){return t})),n=e.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=e.length;s--;){var a=r.KEY_MODS[e[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[s]+" in "+t),!1;o|=a}return{key:n,hashId:o}},t.prototype.findKeyCommand=function(t,e){var n=s[t]+e;return this.commandKeyBinding[n]},t.prototype.handleKeyboard=function(t,e,n,i){if(!(i<0)){var r=s[e]+n,o=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,o=this.commandKeyBinding[t.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||i>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:o}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},t.prototype.getStatusText=function(t,e){return e.$keyChain||""},t}();function l(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}var c=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.$singleCommand=!0,i}return i(e,t),e}(a);c.call=function(t,e,n){a.prototype.$init.call(t,e,n,!0)},a.call=function(t,e,n){a.prototype.$init.call(t,e,n,!1)},e.HashHandler=c,e.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../lib/oop"),o=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,a=function(t){function e(e,n){var i=t.call(this,n,e)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)})),i}return i(e,t),e.prototype.exec=function(t,e,n){if(Array.isArray(t)){for(var i=t.length;i--;)if(this.exec(t[i],e,n))return!0;return!1}if("string"===typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},e.prototype.toggleRecording=function(t){if(!this.$inReplay)return t&&t._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(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},e.prototype.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach((function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])}),this)}finally{this.$inReplay=!1}}},e.prototype.trimMacro=function(t){return t.map((function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t}))},e}(o);r.implement(a.prototype,s),e.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(t,e,n){"use strict";var i=t("../lib/lang"),r=t("../config"),o=t("../range").Range;function s(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",(function(e){e.init(t),t.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(t){r.loadModule("ace/ext/error_marker",(function(e){e.showErrorMarker(t,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("ace/ext/error_marker",(function(e){e.showErrorMarker(t,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(t,e){"number"!==typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),n=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(i.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),s=t.session.doc.getLine(n.row).length,a=t.session.doc.getTextRange(t.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=t.session.doc.getLine(n.row),u=n.row+1;u<=r.row+1;u++){var h=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(u)));0!==h.length&&(h=" "+h),c+=h}r.row+1<t.session.doc.getLength()-1&&(c+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new o(n.row,0,r.row+2,0),c),l>0?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+l)):(s=t.session.doc.getLine(n.row).length>s?s+1:s,t.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===e&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,e,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));t.exitMultiSelectMode(),t.clearSelection();for(s=0;s<r.length;s++)t.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var e=t.getCursorPosition();t.selection.moveTo(e.row-1,Number.MAX_VALUE),t.insert("\n"),0===e.row&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(t){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),t.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)e.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./lib/dom"),r=function(){function t(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return t.prototype.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this["$useWrapMode"]&&this["$wrapData"][t]?this["$wrapData"][t].length+1+e:1+e},t.prototype.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach((function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)})),t},t.prototype.$onChangeEditor=function(t){this.attach(t.editor)},t.prototype.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},t.prototype.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))}))}},t.prototype.updateOnFold=function(t,e){var n=e.lineWidgets;if(n&&t.action){for(var i=t.data,r=i.start.row,o=i.end.row,s="add"==t.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},t.prototype.updateOnChange=function(t){var e=this.session.lineWidgets;if(e){var n=t.start.row,i=t.end.row-n;if(0===i);else if("remove"==t.action){var r=e.splice(n+1,i);!e[n]&&r[r.length-1]&&(e[n]=r.pop()),r.forEach((function(t){t&&this.removeLineWidget(t)}),this),this.$updateRows()}else{var o=new Array(i);e[n]&&null!=e[n].column&&t.start.column>e[n].column&&n++,o.unshift(n,0),e.splice.apply(e,o),this.$updateRows()}}},t.prototype.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach((function(t,n){if(t){e=!1,t.row=n;while(t.$oldWidget)t.$oldWidget.row=n,t=t.$oldWidget}})),e&&(this.session.lineWidgets=null)}},t.prototype.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];return e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t},t.prototype.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var e=this.editor.renderer;t.html&&!t.el&&(t.el=i.createElement("div"),t.el.innerHTML=t.html),t.text&&!t.el&&(t.el=i.createElement("div"),t.el.textContent=t.text),t.el&&(i.addCssClass(t.el,"ace_lineWidgetContainer"),t.className&&i.addCssClass(t.el,t.className),t.el.style.position="absolute",t.el.style.zIndex="5",e.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex="3"),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight);var n=this.session.getFoldAt(t.row,0);if(t.$fold=n,n){var r=this.session.lineWidgets;t.row!=n.end.row||r[n.start.row]?t.hidden=!0:r[n.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),this.onWidgetChanged(t),t},t.prototype.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(n){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else while(e){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},t.prototype.getWidgetsAtRow=function(t){var e=this.session.lineWidgets,n=e&&e[t],i=[];while(n)i.push(n),n=n.$oldWidget;return i},t.prototype.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},t.prototype.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,e.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row),a<0&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},t.prototype.renderWidgets=function(t,e){var n=e.layerConfig,i=this.session.lineWidgets;if(i){var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);while(r>0&&!i[r])r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=e.scrollBar.getWidth()+"px":a.el.style.right=""}}}},t}();e.LineWidgets=r})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../mouse/default_gutter_handler").GutterTooltip,o=function(){function t(t){this.editor=t,this.gutterLayer=t.renderer.$gutterLayer,this.element=t.renderer.$gutter,this.lines=t.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new r(this.editor)}return t.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))},t.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))},t.prototype.$onGutterKeyDown=function(t){if(this.annotationTooltip.isOpen)return t.preventDefault(),void(t.keyCode===i["escape"]&&this.annotationTooltip.hideTooltip());if(t.target===this.element){if(t.keyCode!=i["enter"])return;t.preventDefault();var e=this.editor.getCursorPosition().row;return this.editor.isRowVisible(e)||this.editor.scrollToLine(e,!0,!0),void setTimeout(function(){var t=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),e=this.$findNearestFoldWidget(t),n=this.$findNearestAnnotation(t);if(null!==e||null!==n)return null===e&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==e&&null===n?(this.activeRowIndex=e,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-t)<Math.abs(e-t)?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=e,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(t),setTimeout(function(){this.editor._signal("gutterkeydown",new s(t,this))}.bind(this),10)},t.prototype.$handleGutterKeyboardInteraction=function(t){if(t.keyCode!==i["tab"]){if(t.keyCode===i["escape"])return t.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(t.keyCode!==i["up"])if(t.keyCode!==i["down"]){if(t.keyCode===i["left"])return t.preventDefault(),void this.$switchLane("annotation");if(t.keyCode===i["right"])return t.preventDefault(),void this.$switchLane("fold");if(t.keyCode!==i["enter"]&&t.keyCode!==i["space"]);else switch(t.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var e=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),t),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==e&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(e),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],r=n.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=r.right+"px",o.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}}else switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}else switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}}else t.preventDefault()},t.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},t.prototype.$isFoldWidgetVisible=function(t){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),n="none"!==this.$getFoldWidget(t).style.display;return e&&n},t.prototype.$isAnnotationVisible=function(t){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),n="none"!==this.$getAnnotation(t).style.display;return e&&n},t.prototype.$getFoldWidget=function(t){var e=this.lines.get(t),n=e.element;return n.childNodes[1]},t.prototype.$getAnnotation=function(t){var e=this.lines.get(t),n=e.element;return n.childNodes[2]},t.prototype.$findNearestFoldWidget=function(t){if(this.$isFoldWidgetVisible(t))return t;var e=0;while(t-e>0||t+e<this.lines.getLength()-1){if(e++,t-e>=0&&this.$isFoldWidgetVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(t+e))return t+e}return null},t.prototype.$findNearestAnnotation=function(t){if(this.$isAnnotationVisible(t))return t;var e=0;while(t-e>0||t+e<this.lines.getLength()-1){if(e++,t-e>=0&&this.$isAnnotationVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isAnnotationVisible(t+e))return t+e}return null},t.prototype.$focusFoldWidget=function(t){if(null!=t){var e=this.$getFoldWidget(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},t.prototype.$focusAnnotation=function(t){if(null!=t){var e=this.$getAnnotation(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},t.prototype.$blurFoldWidget=function(t){var e=this.$getFoldWidget(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},t.prototype.$blurAnnotation=function(t){var e=this.$getAnnotation(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},t.prototype.$moveFoldWidgetUp=function(){var t=this.activeRowIndex;while(t>0)if(t--,this.$isFoldWidgetVisible(t))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,void this.$focusFoldWidget(this.activeRowIndex)},t.prototype.$moveFoldWidgetDown=function(){var t=this.activeRowIndex;while(t<this.lines.getLength()-1)if(t++,this.$isFoldWidgetVisible(t))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,void this.$focusFoldWidget(this.activeRowIndex)},t.prototype.$moveAnnotationUp=function(){var t=this.activeRowIndex;while(t>0)if(t--,this.$isAnnotationVisible(t))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,void this.$focusAnnotation(this.activeRowIndex)},t.prototype.$moveAnnotationDown=function(){var t=this.activeRowIndex;while(t<this.lines.getLength()-1)if(t++,this.$isAnnotationVisible(t))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,void this.$focusAnnotation(this.activeRowIndex)},t.prototype.$switchLane=function(t){switch(t){case"annotation":if("annotation"===this.activeLane)break;var e=this.$findNearestAnnotation(this.activeRowIndex);if(null==e)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(null==n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);break}},t.prototype.$rowIndexToRow=function(t){var e=this.lines.get(t);return e?e.row:null},t.prototype.$rowToRowIndex=function(t){for(var e=0;e<this.lines.getLength();e++){var n=this.lines.get(e);if(n.row==t)return e}return null},t}();e.GutterKeyboardHandler=o;var s=function(){function t(t,e){this.gutterKeyboardHandler=e,this.domEvent=t}return t.prototype.getKey=function(){return i.keyCodeToString(this.domEvent.keyCode)},t.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},t.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},t.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},t}();e.GutterKeyboardEvent=s})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],(function(t,e,n){"use strict";var i=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/lang"),a=t("./lib/useragent"),l=t("./keyboard/textinput").TextInput,c=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,h=t("./keyboard/keybinding").KeyBinding,d=t("./edit_session").EditSession,f=t("./search").Search,p=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,m=t("./commands/command_manager").CommandManager,v=t("./commands/default_commands").commands,y=t("./config"),w=t("./token_iterator").TokenIterator,b=t("./line_widgets").LineWidgets,_=t("./keyboard/gutter_handler").GutterKeyboardHandler,x=t("./config").nls,S=t("./clipboard"),A=t("./lib/keys"),C=function(){function t(e,n,i){this.session,this.$toDestroy=[];var r=e.getContainerElement();this.container=r,this.renderer=e,this.id="editor"+ ++t.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(t,e){e._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new d("")),y.resetOptions(this),i&&this.setOptions(i),y._signal("editor",this)}return t.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.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)},t.prototype.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},t.prototype.endOperation=function(t){if(this.curOp&&this.session){if(t&&!1===t.returnValue||!this.session)return this.curOp=null;if(1==t&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var e=this.curOp.command,n=e&&e.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},t.prototype.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=this.$mergeableCommands,i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},t.prototype.setKeyboardHandler=function(t,e){if(t&&"string"===typeof t&&"ace"!=t){this.$keybindingId=t;var n=this;y.loadModule(["keybinding",t],(function(i){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(i&&i.handler),e&&e()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},t.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},t.prototype.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){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 n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.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=t.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(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&!t.destroyed&&t.bgTokenizer.scheduleStart()}},t.prototype.getSession=function(){return this.session},t.prototype.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},t.prototype.getValue=function(){return this.session.getValue()},t.prototype.getSelection=function(){return this.selection},t.prototype.resize=function(t){this.renderer.onResize(t)},t.prototype.setTheme=function(t,e){this.renderer.setTheme(t,e)},t.prototype.getTheme=function(){return this.renderer.getTheme()},t.prototype.setStyle=function(t){this.renderer.setStyle(t)},t.prototype.unsetStyle=function(t){this.renderer.unsetStyle(t)},t.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},t.prototype.setFontSize=function(t){this.setOption("fontSize",t)},t.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout((function(){t.$highlightPending=!1;var e=t.session;if(e&&!e.destroyed){e.$bracketHighlight&&(e.$bracketHighlight.markerIds.forEach((function(t){e.removeMarker(t)})),e.$bracketHighlight=null);var n=t.getCursorPosition(),i=t.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(t),o=e.getMatchingBracketRanges(n,r);if(!o){var s=new w(e,n.row,n.column),a=s.getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var l=e.getMatchingTags(n);l&&(o=[l.openTagName,l.closeTagName])}}if(!o&&e.$mode.getMatching&&(o=e.$mode.getMatching(t.session)),o){var c="ace_bracket";Array.isArray(o)?1==o.length&&(c="ace_error_bracket"):o=[o],2==o.length&&(0==p.comparePoints(o[0].end,o[1].start)?o=[p.fromPoints(o[0].start,o[1].end)]:0==p.comparePoints(o[0].start,o[1].end)&&(o=[p.fromPoints(o[1].start,o[0].end)])),e.$bracketHighlight={ranges:o,markerIds:o.map((function(t){return e.addMarker(t,c,"text")}))},t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}else t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}}),50)}},t.prototype.focus=function(){this.textInput.focus()},t.prototype.isFocused=function(){return this.textInput.isFocused()},t.prototype.blur=function(){this.textInput.blur()},t.prototype.onFocus=function(t){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",t))},t.prototype.onBlur=function(t){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",t))},t.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},t.prototype.onDocumentChange=function(t){var e=this.session.$useWrapMode,n=t.start.row==t.end.row?t.end.row:1/0;this.renderer.updateLines(t.start.row,n,e),this._signal("change",t),this.$cursorChange()},t.prototype.onTokenizerUpdate=function(t){var e=t.data;this.renderer.updateLines(e.first,e.last)},t.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},t.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},t.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},t.prototype.$updateHighlightActiveLine=function(){var t,e=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},t.prototype.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},t.prototype.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column,i=e.end.column,r=t.getLine(e.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},t.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},t.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},t.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},t.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},t.prototype.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},t.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},t.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},t.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},t.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},t.prototype.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),n=!1;if(!t&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;r<i.length;r++){var o=i[r];r&&i[r-1].start.row==o.start.row||(t+=this.session.getLine(o.start.row)+e)}}var s={text:t};return this._signal("copy",s),S.lineMode=!!n&&s.text,s.text},t.prototype.onCopy=function(){this.commands.exec("copy",this)},t.prototype.onCut=function(){this.commands.exec("cut",this)},t.prototype.onPaste=function(t,e){var n={text:t,event:e};this.commands.exec("paste",this,n)},t.prototype.$handlePaste=function(t){"string"==typeof t&&(t={text:t}),this._signal("paste",t);var e=t.text,n=e===S.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},e):this.insert(e);else if(n)this.selection.rangeList.ranges.forEach((function(t){i.insert({row:t.start.row,column:0},e)}));else{var r=e.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=2==r.length&&(!r[0]||!r[1]);if(r.length!=o.length||s)return this.commands.exec("insertstring",this,e);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||i.remove(l),i.insert(l.start,r[a])}}},t.prototype.execCommand=function(t,e){return this.commands.exec(t,this,e)},t.prototype.insert=function(t,e){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!e){var o=i.transformAction(n.getState(r.row),"insertion",this,n,t);o&&(t!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),t=o.text)}if("\t"==t&&(t=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==t.indexOf("\n")){s=p.fromPoints(r,r);s.end.column+=t.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==t||"\r\n"==t){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,t));if(n.insert(r,t),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)}},t.prototype.autoIndent=function(){var t,e,n=this.session,i=n.getMode();if(this.selection.isEmpty())t=0,e=n.doc.getLength()-1;else{var r=this.getSelectionRange();t=r.start.row,e=r.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),d=t;d<=e;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),o=n.getLine(d),s=i.$getIndent(o),u!==s&&(s.length>0&&(a=new p(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},t.prototype.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},t.prototype.applyComposition=function(t,e){if(e.extendLeft||e.extendRight){var n=this.selection.getRange();n.start.column-=e.extendLeft,n.end.column+=e.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),t||n.isEmpty()||this.remove()}if(!t&&this.selection.isEmpty()||this.insert(t,!0),e.restoreStart||e.restoreEnd){n=this.selection.getRange();n.start.column-=e.restoreStart,n.end.column-=e.restoreEnd,this.selection.setRange(n)}},t.prototype.onCommandKey=function(t,e,n){return this.keyBinding.onCommandKey(t,e,n)},t.prototype.setOverwrite=function(t){this.session.setOverwrite(t)},t.prototype.getOverwrite=function(){return this.session.getOverwrite()},t.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},t.prototype.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},t.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},t.prototype.setDragDelay=function(t){this.setOption("dragDelay",t)},t.prototype.getDragDelay=function(){return this.getOption("dragDelay")},t.prototype.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},t.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},t.prototype.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},t.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},t.prototype.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},t.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},t.prototype.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},t.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},t.prototype.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},t.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},t.prototype.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},t.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},t.prototype.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},t.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},t.prototype.setHighlightIndentGuides=function(t){this.renderer.setHighlightIndentGuides(t)},t.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},t.prototype.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},t.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},t.prototype.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},t.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},t.prototype.setReadOnly=function(t){this.setOption("readOnly",t)},t.prototype.getReadOnly=function(){return this.getOption("readOnly")},t.prototype.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},t.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},t.prototype.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},t.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},t.prototype.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},t.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},t.prototype.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},t.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},t.prototype.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var o=n.getTextRange(e);if("\n"==o[o.length-1]){var s=n.getLine(e.end.row);/^\s+$/.test(s)&&(e.end.column=s.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},t.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},t.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},t.prototype.setGhostText=function(t,e){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(t,e)},t.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},t.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);e<r.length?(n=r.charAt(e)+r.charAt(e-1),i=new p(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new p(t.row,e-2,t.row,e)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},t.prototype.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toLowerCase()),this.selection.setSelectionRange(t)},t.prototype.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toUpperCase()),this.selection.setSelectionRange(t)},t.prototype.indent=function(){var t=this.session,e=this.getSelectionRange();if(!(e.start.row<e.end.row)){if(e.start.column<e.end.column){var n=t.getTextRange(e);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void t.indentRows(u.first,u.last,"\t")}}var i=t.getLine(e.start.row),r=e.start,o=t.getTabSize(),a=t.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{l=a%o;while(" "==i[e.start.column-1]&&l)e.start.column--,l--;this.selection.setSelectionRange(e),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();t.indentRows(u.first,u.last,"\t")},t.prototype.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"\t")},t.prototype.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},t.prototype.sortLines=function(){for(var t=this.$getSelectedRows(),e=this.session,n=[],i=t.first;i<=t.last;i++)n.push(e.getLine(i));n.sort((function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:t.toLowerCase()>e.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(i=t.first;i<=t.last;i++){var o=e.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,e.replace(r,n[i-t.first])}},t.prototype.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},t.prototype.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},t.prototype.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var i=this.session.getLine(t);while(n.lastIndex<e){var r=n.exec(i);if(r.index<=e&&r.index+r[0].length>=e){var o={value:r[0],start:r.index,end:r.index+r[0].length};return o}}return null},t.prototype.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(e,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?t*=Math.pow(10,o.end-n-1):t*=Math.pow(10,o.end-n),l+=t,l/=Math.pow(10,a);var c=l.toFixed(a),u=new p(e,o.start,e,o.end);this.session.replace(u,c),this.moveCursorTo(e,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},t.prototype.toggleWord=function(){var t=this.selection.getCursor().row,e=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,r=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-i-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach((function(e,r){l=a+e.length,o>=a&&o<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l}));for(var u,h=this.$toggleWordPairs,d=0;d<h.length;d++)for(var f=h[d],p=0;p<=1;p++){var g=+!p,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(f[p])+")\\s?$","i"));if(m){var v=n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"));v&&(u=n.replace(new RegExp(s.escapeRegExp(f[p]),"i"),(function(t){var e=f[g];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+f[g].charAt(0).toUpperCase()+e.substr(1)),e})),this.insert(u),u="")}}},t.prototype.findLinkAt=function(t,e){var n,r,o=this.session.getLine(t),s=o.split(/((?:https?|ftp):\/\/[\S]+)/),a=e;a<0&&(a=0);var l,c=0,u=0;try{for(var h=i(s),d=h.next();!d.done;d=h.next()){var f=d.value;if(u=c+f.length,a>=c&&a<=u&&f.match(/((?:https?|ftp):\/\/[\S]+)/)){l=f.replace(/[\s:.,'";}\]]+$/,"");break}c=u}}catch(p){n={error:p}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return l},t.prototype.openLink=function(){var t=this.selection.getCursor(),e=this.findLinkAt(t.row,t.column);return e&&window.open(e,"_blank"),null!=e},t.prototype.removeLines=function(){var t=this.$getSelectedRows();this.session.removeFullLines(t.first,t.last),this.clearSelection()},t.prototype.duplicateSelection=function(){var t=this.selection,e=this.session,n=t.getRange(),i=t.isBackwards();if(n.isEmpty()){var r=n.start.row;e.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=e.insert(o,e.getTextRange(n));n.start=o,n.end=s,t.setSelectionRange(n,i)}},t.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},t.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},t.prototype.moveText=function(t,e,n){return this.session.moveText(t,e,n)},t.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},t.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},t.prototype.$moveLines=function(t,e){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,e?0:t),e&&-1==t&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0),n=this.$getSelectedRows(s[u]);var d=n.first,f=n.last;while(++u<c){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(e&&p.first!=f)break;if(!e&&p.first>f+1)break;f=p.last}u--,a=this.session.$moveLines(d,f,e?0:t),e&&-1==t&&(h=u+1);while(h<=u)s[h].moveBy(a,0),h++;e||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},t.prototype.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},t.prototype.onCompositionStart=function(t){this.renderer.showComposition(t)},t.prototype.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},t.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},t.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},t.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},t.prototype.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},t.prototype.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},t.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},t.prototype.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);!0===e?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},t.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},t.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},t.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},t.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},t.prototype.scrollPageDown=function(){this.$moveByPage(1)},t.prototype.scrollPageUp=function(){this.$moveByPage(-1)},t.prototype.scrollToRow=function(t){this.renderer.scrollToRow(t)},t.prototype.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},t.prototype.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},t.prototype.getCursorPosition=function(){return this.selection.getCursor()},t.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},t.prototype.getSelectionRange=function(){return this.selection.getRange()},t.prototype.selectAll=function(){this.selection.selectAll()},t.prototype.clearSelection=function(){this.selection.clearSelection()},t.prototype.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},t.prototype.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},t.prototype.jumpToMatching=function(t,e){var n=this.getCursorPosition(),i=new w(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h<s.value.length&&!c;h++)if(d[s.value[h]])switch(l=d[s.value[h]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[h]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0);break}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&o>1?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(r=s,o++,s=i.stepForward(),h=0)}while(s&&!c);if(a){var f,g;if("bracket"===a)f=this.session.getBracketRange(n),f||(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1),g=f.start,(e||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(f=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===f.compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?(f=m.closeTag,g=f.start):(f=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?f.end:f.start))}g=g||f.start}g=f&&f.cursor||g,g&&(t?f&&e?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},t.prototype.gotoLine=function(t,e,n){this.selection.clearSelection(),this.session.unfold({row:t-1,column:e||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,e||0),this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,n)},t.prototype.navigateTo=function(t,e){this.selection.moveTo(t,e)},t.prototype.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(-t||-1,0)},t.prototype.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(t||1,0)},t.prototype.navigateLeft=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorLeft()}else{var e=this.getSelectionRange().start;this.moveCursorToPosition(e)}this.clearSelection()},t.prototype.navigateRight=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorRight()}else{var e=this.getSelectionRange().end;this.moveCursorToPosition(e)}this.clearSelection()},t.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},t.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},t.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},t.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},t.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},t.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},t.prototype.replace=function(t,e){e&&this.$search.set(e);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,t)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},t.prototype.replaceAll=function(t,e){e&&this.$search.set(e);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],t)&&i++;return this.selection.setSelectionRange(r),i},t.prototype.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return e=this.$search.replace(n,e),null!==e?(t.end=this.session.replace(t,e),t):null},t.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},t.prototype.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&r.mixin(e,t);var i=this.selection.getRange();null==e.needle&&(t=this.session.getTextRange(i)||this.$search.$options.needle,t||(i=this.session.getWordRange(i.start.row,i.start.column),t=this.session.getTextRange(i)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:i});var o=this.$search.find(this.session);return e.preventScroll?o:o?(this.revealRange(o,n),o):(e.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},t.prototype.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},t.prototype.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},t.prototype.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(n)},t.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},t.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},t.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(t){t.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()},t.prototype.setAutoScrollEditorIntoView=function(t){if(t){var e,n=this,i=!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 o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(e=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&e&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var t=n.renderer,o=t.$cursorLayer.$pixelPos,s=t.layerConfig,a=o.top-s.offset;i=o.top>=0&&a+e.top<0||!(o.top<s.height&&o.top+e.top+s.lineHeight>window.innerHeight)&&null,null!=i&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=e=null}}));this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},t.prototype.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,o.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},t.prototype.prompt=function(t,e,n){var i=this;y.loadModule("ace/ext/prompt",(function(r){r.prompt(i,t,e,n)}))},t}();C.$uid=0,C.prototype.curOp=null,C.prototype.prevOp={},C.prototype.$mergeableCommands=["backspace","del","insertstring"],C.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"],["&&","||"],["==","!="]],r.implement(C.prototype,g),y.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){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(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?k.attach(this):k.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var t=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(t||this.renderer.placeholderNode)!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var e=o.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(t){var e,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(t){t.blur(),t.renderer.scroller.focus()},readOnly:!0},i=function(t){if(t.target==this.renderer.scroller&&t.keyCode===A["enter"]){t.preventDefault();var e=this.getCursorPosition().row;this.isRowVisible(e)||this.scrollToLine(e,!0,!0),this.focus()}};t?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),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",x("editor")),this.renderer.$gutter.setAttribute("aria-label",x("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),e||(e=new _(this)),e.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",i.bind(this)),this.commands.removeCommand(n),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),e&&e.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 k={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"·":""))+""},getWidth:function(t,e,n){return Math.max(e.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=C})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t,e){this.element=t,this.canvasHeight=e||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return t.prototype.moveContainer=function(t){i.translate(this.element,0,-t.firstRowScreen*t.lineHeight%this.canvasHeight-t.offset*this.$offsetCoefficient)},t.prototype.pageChanged=function(t,e){return Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)!==Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)},t.prototype.computeLineTop=function(t,e,n){var i=e.firstRowScreen*e.lineHeight,r=Math.floor(i/this.canvasHeight),o=n.documentToScreenRow(t,0)*e.lineHeight;return o-r*this.canvasHeight},t.prototype.computeLineHeight=function(t,e,n){return e.lineHeight*n.getRowLineCount(t)},t.prototype.getLength=function(){return this.cells.length},t.prototype.get=function(t){return this.cells[t]},t.prototype.shift=function(){this.$cacheCell(this.cells.shift())},t.prototype.pop=function(){this.$cacheCell(this.cells.pop())},t.prototype.push=function(t){if(Array.isArray(t)){this.cells.push.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.appendChild(e)}else this.cells.push(t),this.element.appendChild(t.element)},t.prototype.unshift=function(t){if(Array.isArray(t)){this.cells.unshift.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.firstChild?this.element.insertBefore(e,this.element.firstChild):this.element.appendChild(e)}else this.cells.unshift(t),this.element.insertAdjacentElement("afterbegin",t.element)},t.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},t.prototype.$cacheCell=function(t){t&&(t.element.remove(),this.cellCache.push(t))},t.prototype.createCell=function(t,e,n,r){var o=this.cellCache.pop();if(!o){var s=i.createElement("div");r&&r(s),this.element.appendChild(s),o={element:s,text:"",row:t}}return o.row=t,o},t}();e.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,a=t("./lines").Lines,l=t("../config").nls,c=function(){function t(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(t){this.session&&this.session.off("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},t.prototype.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},t.prototype.setAnnotations=function(t){this.$annotations=[];for(var e=0;e<t.length;e++){var n=t[e],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[],type:[]});var s=n.text,a=n.type;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&(r.text.push(s),r.type.push(a));var l=n.className;l?r.className=l:"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},t.prototype.$updateAnnotations=function(t){if(this.$annotations.length){var e=t.start.row,n=t.end.row-e;if(0===n);else if("remove"==t.action)this.$annotations.splice(e,n+1,null);else{var i=new Array(n+1);i.unshift(e,1),this.$annotations.splice.apply(this.$annotations,i)}}},t.prototype.update=function(t){this.config=t;var e=this.session,n=t.firstRow,i=Math.min(t.lastRow+t.gutterOffset,e.getLength()-1);this.oldLastRow=i,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();var r=e.getNextFoldLine(n),o=r?r.start.row:1/0,s=null,a=-1,l=n;while(1){if(l>o&&(l=r.end.row+1,r=e.getNextFoldLine(l,r),o=r?r.start.row:1/0),l>i){while(this.$lines.getLength()>a+1)this.$lines.pop();break}s=this.$lines.get(++a),s?s.row=l:(s=this.$lines.createCell(l,t,this.session,u),this.$lines.push(s)),this.$renderCell(s,t,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(t)},t.prototype.$updateGutterWidth=function(t){var e=this.session,n=e.gutterRenderer||this.$renderer,i=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+i-1);var o=n?n.getWidth(e,r,t):r.toString().length*t.characterWidth,s=this.$padding||this.$computePadding();o+=s.left+s.right,o===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<e.length;n++){var i=e[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==e[n-1].row))break;i=e[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},t.prototype.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,e.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(t,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},t.prototype.$renderLines=function(t,e,n){var i=[],r=e,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;while(1){if(r>s&&(r=o.end.row+1,o=this.session.getNextFoldLine(r,o),s=o?o.start.row:1/0),r>n)break;var a=this.$lines.createCell(r,t,this.session,u);this.$renderCell(a,t,o,r),i.push(a),r++}return i},t.prototype.$renderCell=function(t,e,n,r){var o=t.element,s=this.session,a=o.childNodes[0],c=o.childNodes[1],u=o.childNodes[2],h=u.firstChild,d=s.$firstLineNumber,f=s.$breakpoints,p=s.$decorations,g=s.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&s.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=e.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",b=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",_=(g?g.getText(s,r):r+d).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),f[r]&&(w+=f[r]),p[r]&&(w+=p[r]),this.$annotations[r]&&r!==v&&(w+=this.$annotations[r].className),m){var x=m[r];null==x&&(x=m[r]=s.getFoldWidget(r))}if(x){var S="ace_fold-widget ace_"+x,A="start"==x&&r==v&&r<n.end.row;if(A){S+=" ace_closed";for(var C="",k=!1,$=r+1;$<=n.end.row;$++)if(this.$annotations[$]){if(" ace_error"===this.$annotations[$].className){k=!0,C=" ace_error_fold";break}" ace_warning"!==this.$annotations[$].className||(k=!0,C=" ace_warning_fold")}w+=C}else S+=" ace_open";c.className!=S&&(c.className=S),i.setStyle(c.style,"height",y),i.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var T=s.getFoldWidgetRange(r);T?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[T.start.row+1,T.end.row+1])):n?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("Toggle code folding, row $0",[r+1])),A?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("Fold code")))}else c&&(i.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));return k&&this.$showFoldedAnnotations?(u.className="ace_gutter_annotation",h.className=b,h.className+=C,i.setStyle(h.style,"height",y),i.setStyle(u.style,"display","block"),i.setStyle(u.style,"height",y),u.setAttribute("aria-label",l("Read annotations row $0",[_])),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")):this.$annotations[r]?(u.className="ace_gutter_annotation",h.className=b,this.$useSvgGutterIcons?h.className+=this.$annotations[r].className:o.classList.add(this.$annotations[r].className.replace(" ","")),i.setStyle(h.style,"height",y),i.setStyle(u.style,"display","block"),i.setStyle(u.style,"height",y),u.setAttribute("aria-label",l("Read annotations row $0",[_])),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")):(i.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0")),_!==a.data&&(a.data=_),o.className!=w&&(o.className=w),i.setStyle(t.element.style,"height",this.$lines.computeLineHeight(r,e,s)+"px"),i.setStyle(t.element.style,"top",this.$lines.computeLineTop(r,e,s)+"px"),t.text=_,"none"===u.style.display&&"none"===c.style.display?t.element.setAttribute("aria-hidden",!0):t.element.setAttribute("aria-hidden",!1),t},t.prototype.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},t.prototype.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(t){t?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},t.prototype.getRegion=function(t){var e=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return t.x<e.left+n.left?"markers":this.$showFoldWidgets&&t.x>n.right-e.right?"foldWidgets":void 0},t}();function u(t){var e=document.createTextNode("");t.appendChild(e);var n=i.createElement("span");t.appendChild(n);var r=i.createElement("span");t.appendChild(r);var o=i.createElement("span");return r.appendChild(o),t}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,r.implement(c.prototype,s),e.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("../lib/dom"),o=function(){function t(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return t.prototype.setPadding=function(t){this.$padding=t},t.prototype.setSession=function(t){this.session=t},t.prototype.setMarkers=function(t){this.markers=t},t.prototype.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},t.prototype.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,t),s=this.$padding+r.start.column*t.characterWidth;i.renderer(e,r,s,o,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)while(this.i<this.element.childElementCount)this.element.removeChild(this.element.lastChild)}},t.prototype.$getTop=function(t,e){return(t-e.firstRowScreen)*e.lineHeight},t.prototype.drawTextMarker=function(t,e,n,r,o){for(var a=this.session,l=e.start.row,c=e.end.row,u=l,h=0,d=0,f=a.getScreenLastRowColumn(u),p=new i(u,e.start.column,u,d);u<=c;u++)p.start.row=p.end.row=u,p.start.column=u==l?e.start.column:a.getRowWrapIndent(u),p.end.column=f,h=d,d=f,f=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:e.end.column,this.drawSingleLineMarker(t,p,n+(u==l?" ace_start":"")+" ace_br"+s(u==l||u==l+1&&e.start.column,h<d,d>f,u==c),r,u==c?0:1,o)},t.prototype.drawMultiLineMarker=function(t,e,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(e.start.row,i),l=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)){var c=e.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(t,c,n+" ace_br1 ace_start",i,null,r)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(e.end.row)){c=e.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(t,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(e.end.row,i);var u=e.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(s=(e.end.row-e.start.row-1)*i.lineHeight,!(s<=0)){a=this.$getTop(e.start.row+1,i);var h=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},t.prototype.drawSingleLineMarker=function(t,e,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,o);var s=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i),c=this.$padding+e.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},t.prototype.drawBidiSingleLineMarker=function(t,e,n,i,r,o){var s=i.lineHeight,a=this.$getTop(e.start.row,i),l=this.$padding,c=this.session.$bidiHandler.getSelections(e.start.column,e.end.column);c.forEach((function(t){this.elt(n,"height:"+s+"px;width:"+(t.width+(r||0))+"px;top:"+a+"px;left:"+(l+t.left)+"px;"+(o||""))}),this)},t.prototype.drawFullLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;e.start.row!=e.end.row&&(s+=this.$getTop(e.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},t.prototype.drawScreenLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},t}();function s(t,e,n,i){return(t?1:0)|(e?2:0)|(n?4:0)|(i?8:0)}o.prototype.$padding=0,e.Marker=o})),ace.define("ace/layer/text_util",["require","exports","module"],(function(t,e,n){var i=new Set(["text","rparen","lparen"]);e.isTextToken=function(t){return i.has(t)}})),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,n){"use strict";var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,l=t("../config").nls,c=t("./text_util").isTextToken,u=function(){function t(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return t.prototype.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode(),n=e?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},t.prototype.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(t){this.session=t,t&&this.$computeTabString()},t.prototype.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,"string"==typeof t?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(t){return this.$highlightIndentGuides!==t&&(this.$highlightIndentGuides=t,t)},t.prototype.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;n<t+1;n++)if(this.showTabs){var i=this.dom.createElement("span");i.className="ace_invisible ace_invisible_tab",i.textContent=o.stringRepeat(this.TAB_CHAR,n),e.push(i)}else e.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):a;i=this.dom.createElement("span");i.className=r+s,i.textContent=a,this.$tabStrings[" "]=i;i=this.dom.createElement("span");i.className=r+l,i.textContent=c,this.$tabStrings["\t"]=i}},t.prototype.updateLines=function(t,e,n){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var i=Math.max(e,t.firstRow),r=Math.min(n,t.lastRow),o=this.element.childNodes,s=0,a=t.firstRow;a<i;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}var c=!1,u=(a=i,l=this.session.getNextFoldLine(a),l?l.start.row:1/0);while(1){if(a>u&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),u=l?l.start.row:1/0),a>r)break;var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)while(s<this.$lines.cells.length){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.row,t,this.session)+"px"}},t.prototype.scrollLines=function(t){var e=this.config;if(this.config=t,this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=t.lastRow,i=e?e.lastRow:-1;if(!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(e.lastRow>t.lastRow)for(r=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,e.firstRow-1)),t.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(t,e,n){var i=[],o=e,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;while(1){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:1/0),o>n)break;var l=this.$lines.createCell(o,t,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,t,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,t,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},t.prototype.update=function(t){this.$lines.moveContainer(t),this.config=t;var e=t.firstRow,n=t.lastRow,i=this.$lines;while(i.getLength())i.pop();i.push(this.$renderLinesFragment(t,e,n))},t.prototype.$renderToken=function(t,e,n,i){var r,s=this,a=/(\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,u=this.dom.createFragment(this.element),h=0;while(r=a.exec(i)){var d=r[1],f=r[2],p=r[3],g=r[4],m=r[5];if(s.showSpaces||!f){var v=h!=r.index?i.slice(h,r.index):"";if(h=r.index+r[0].length,v&&u.appendChild(this.dom.createTextNode(v,this.element)),d){var y=s.session.getScreenTabSize(e+r.index);u.appendChild(s.$tabStrings[y].cloneNode(!0)),e+=y-1}else if(f)if(s.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(s.SPACE_CHAR,f.length),u.appendChild(w)}else u.appendChild(this.dom.createTextNode(f,this.element));else if(p){w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(s.SPACE_CHAR,p.length),u.appendChild(w)}else if(g){e+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:g,u.appendChild(w)}else if(m){e+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=m,u.appendChild(w)}}}if(u.appendChild(this.dom.createTextNode(h?i.slice(h):i,this.element)),c(n.type))t.appendChild(u);else{var b="ace_"+n.type.replace(/\./g," ace_");w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("Unfold code"))),w.className=b,w.appendChild(u),t.appendChild(w)}return e+i.length},t.prototype.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);if(i<=0||i>=n)return e;if(" "==e[0]){i-=i%this.tabSize;for(var r=i/this.tabSize,o=0;o<r;o++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}if("\t"==e[0]){for(o=0;o<i;o++)t.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}return this.$highlightIndentGuide(),e},t.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var t=this.session.doc.$lines;if(t){var e=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(e.row))[0].length,i=Math.floor(n/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:i,start:e.row};var r=this.session.$bracketHighlight;if(r)for(var o=this.session.$bracketHighlight.ranges,s=0;s<o.length;s++)if(e.row!==o[s].start.row){this.$highlightIndentGuideMarker.end=o[s].start.row,e.row>o[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==t[e.row]&&e.column===t[e.row].length){this.$highlightIndentGuideMarker.dir=1;for(s=e.row+1;s<t.length;s++){var a=t[s],l=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,l<=n))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var t=this.$lines.cells,e=0;e<t.length;e++){var n=t[e],i=n.element.childNodes;if(i.length>0)for(var r=0;r<i.length;r++)if(i[r].classList&&i[r].classList.contains("ace_indent-guide-active")){i[r].classList.remove("ace_indent-guide-active");break}}},t.prototype.$setIndentGuideActive=function(t,e){var n=this.session.doc.getLine(t.row);if(""!==n){var i=t.element.childNodes;if(i){var r=i[e-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var t=this.$lines.cells;this.$clearActiveIndentGuide();var e=this.$highlightIndentGuideMarker.indentLevel;if(0!==e)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<t.length;n++){var i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}else for(n=t.length-1;n>=0;n--){i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}}},t.prototype.$createLineElement=function(t){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},t.prototype.$renderWrappedLine=function(t,e,n){var i=0,r=0,s=n[0],a=0,l=this.$createLineElement();t.appendChild(l);for(var c=0;c<e.length;c++){var u=e[c],h=u.value;if(0==c&&this.displayIndentGuides){if(i=h.length,h=this.renderIndentGuide(l,h,s),!h)continue;i-=h.length}if(i+h.length<s)a=this.$renderToken(l,a,u,h),i+=h.length;else{while(i+h.length>=s)a=this.$renderToken(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),t.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),r++,a=0,s=n[r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},t.prototype.$renderSimpleLine=function(t,e){for(var n=0,i=0;i<e.length;i++){var r=e[i],o=r.value;if(0!=i||!this.displayIndentGuides||(o=this.renderIndentGuide(t,o),o)){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,n,r,o);n=this.$renderToken(t,n,r,o)}}},t.prototype.$renderOverflowMessage=function(t,e,n,i,r){n&&this.$renderToken(t,e,n,i.slice(0,this.MAX_LINE_LENGTH-e));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"<hide>":"<click to see more...>",t.appendChild(o)},t.prototype.$renderLine=function(t,e,n){if(n||0==n||(n=this.session.getFoldLine(e)),n)var i=this.$getFoldLineTokens(e,n);else i=this.session.getTokens(e);var r=t;if(i.length){var o=this.session.getRowSplitData(e);if(o&&o.length){this.$renderWrappedLine(t,i,o);r=t.lastChild}else{r=t;this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showEOL&&r){n&&(e=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},t.prototype.$getFoldLineTokens=function(t,e){var n=this.session,i=[];function r(t,e,n){var r=0,o=0;while(o+t[r].value.length<e)if(o+=t[r].value.length,r++,r==t.length)return;if(o!=e){var s=t[r].value.substring(e-o);s.length>n-e&&(s=s.substring(0,n-e)),i.push({type:t[r].type,value:s}),o=e+s.length,r+=1}while(o<n&&r<t.length){s=t[r].value;s.length+o>n?i.push({type:t[r].type,value:s.substring(0,n-o)}):i.push(t[r]),o+=s.length,r+=1}}var o=n.getTokens(t);return e.walk((function(t,e,s,a,l){null!=t?i.push({type:"fold",value:t}):(l&&(o=n.getTokens(e)),o.length&&r(o,a,s))}),e.end.row,this.session.getLine(e.end.row).length),i},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,i.implement(u.prototype,a),e.Text=u})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return t.prototype.$updateOpacity=function(t){for(var e=this.cursors,n=e.length;n--;)i.setStyle(e[n].style,"opacity",t?"":"0")},t.prototype.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},t.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},t.prototype.setPadding=function(t){this.$padding=t},t.prototype.setSession=function(t){this.session=t},t.prototype.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},t.prototype.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},t.prototype.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,i.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},t.prototype.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},t.prototype.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},t.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},t.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},t.prototype.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=function(){this.timeoutId=setTimeout((function(){t(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){t(!0),e()}),this.blinkInterval),e()}else this.$stopCssAnimation()},t.prototype.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},t.prototype.isCursorInView=function(t,e){return t.top>=0&&t.top<e.maxHeight},t.prototype.update=function(t){this.config=t;var e=this.session.$selectionMarkers,n=0,r=0;void 0!==e&&0!==e.length||(e=[{cursor:null}]);n=0;for(var o=e.length;n<o;n++){var s=this.getPixelPosition(e[n].cursor,!0);if(!((s.top>t.height+t.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,t,e[n],this.session):this.isCursorInView(s,t)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(t.characterWidth)+"px"),i.setStyle(l,"height",t.lineHeight+"px")):i.setStyle(l,"display","none")}}while(this.cursors.length>r)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},t.prototype.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},t.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},t}();r.prototype.$padding=0,r.prototype.drawCursor=null,e.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/event"),a=t("./lib/event_emitter").EventEmitter,l=32768,c=function(){function t(t,e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+e,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return t.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},t}();r.implement(c.prototype,a);var u=function(t){function e(e,n){var i=t.call(this,e,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=o.scrollbarWidth(e.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return i(e,t),e.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.element.style.height=t+"px"},e.prototype.setScrollHeight=function(t){this.scrollHeight=t,t>l?(this.coeff=l/t,t=l):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},e.prototype.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)},e}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var h=function(t){function e(e,n){var i=t.call(this,e,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return i(e,t),e.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.setWidth=function(t){this.element.style.width=t+"px"},e.prototype.setInnerWidth=function(t){this.inner.style.width=t+"px"},e.prototype.setScrollWidth=function(t){this.inner.style.width=t+"px"},e.prototype.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)},e}(c);e.ScrollBar=u,e.ScrollBarV=u,e.ScrollBarH=h,e.VScrollBar=u,e.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/event"),a=t("./lib/event_emitter").EventEmitter;o.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var l=function(){function t(t,e){this.element=o.createElement("div"),this.element.className="ace_sb"+e,this.inner=o.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},t}();r.implement(l.prototype,a);var c=function(t){function e(e,n){var i=t.call(this,e,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=e,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return i(e,t),e.prototype.onMouseDown=function(t,e){if("mousedown"===t&&0===s.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientY,r=function(t){i=t.clientY},o=function(){clearInterval(u)},a=e.clientY,l=this.thumbTop,c=function(){if(void 0!==i){var t=n.scrollTopFromThumbTop(l+i-a);t!==n.scrollTop&&n._emit("scroll",{data:t})}};s.capture(this.inner,r,o);var u=setInterval(c,20);return s.preventDefault(e)}var h=e.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(h)}),s.preventDefault(e)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var e=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return e|=0,e<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,e){(this.pageHeight!==t||e)&&(this.pageHeight=t,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})))},e.prototype.setScrollTop=function(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var u=function(t){function e(e,n){var i=t.call(this,e,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return i(e,t),e.prototype.onMouseDown=function(t,e){if("mousedown"===t&&0===s.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientX,r=function(t){i=t.clientX},o=function(){clearInterval(u)},a=e.clientX,l=this.thumbLeft,c=function(){if(void 0!==i){var t=n.scrollLeftFromThumbLeft(l+i-a);t!==n.scrollLeft&&n._emit("scroll",{data:t})}};s.capture(this.inner,r,o);var u=setInterval(c,20);return s.preventDefault(e)}var h=e.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(h)}),s.preventDefault(e)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var e=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return e|=0,e<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},e.prototype.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,e){(this.pageWidth!==t||e)&&(this.pageWidth=t,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})))},e.prototype.setScrollLeft=function(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(l);u.prototype.setInnerWidth=u.prototype.setScrollWidth,e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=u,e.VScrollBar=c,e.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(t,e,n){"use strict";var i=t("./lib/event"),r=function(){function t(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var n=this;this._flush=function(t){n.pending=!1;var e=n.changes;if(e&&(i.blockIdle(100),n.changes=0,n.onRender(e)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return t.prototype.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},t.prototype.clear=function(t){var e=this.changes;return this.changes=0,e},t}();e.RenderLoop=r})),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,n){var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("../lib/event"),a=t("../lib/useragent"),l=t("../lib/event_emitter").EventEmitter,c=512,u="function"==typeof ResizeObserver,h=200,d=function(){function t(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},t.prototype.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},t.prototype.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver((function(e){t.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},t.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=s.onIdle((function e(){t.checkForSizeChanges(),s.onIdle(e,500)}),500)},t.prototype.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/c};return 0===e.width||0===e.height?null:e},t.prototype.$measureCharWidth=function(t){this.$main.textContent=o.stringRepeat(t,c);var e=this.$main.getBoundingClientRect();return e.width/c},t.prototype.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(t){return t&&t.parentElement?(window.getComputedStyle(t)["zoom"]||1)*this.$getZoom(t.parentElement):1},t.prototype.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(h,0),t(0,h),t(h,h)],this.el)},t.prototype.transformCoordinates=function(t,e){if(t){var n=this.$getZoom(this.el);t=s(1/n,t)}function i(t,e,n){var i=t[1]*e[0]-t[0]*e[1];return[(-e[1]*n[0]+e[0]*n[1])/i,(+t[1]*n[0]-t[0]*n[1])/i]}function r(t,e){return[t[0]-e[0],t[1]-e[1]]}function o(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function a(t){var e=t.getBoundingClientRect();return[e.left,e.top]}this.els||this.$initTransformMeasureNodes();var l=a(this.els[0]),c=a(this.els[1]),u=a(this.els[2]),d=a(this.els[3]),f=i(r(d,c),r(d,u),r(o(c,u),o(d,l))),p=s(1+f[0],r(c,l)),g=s(1+f[1],r(u,l));if(e){var m=e,v=f[0]*m[0]/h+f[1]*m[1]/h+1,y=o(s(m[0],p),s(m[1],g));return o(s(1/v/h,y),l)}var w=r(t,l),b=i(r(p,s(f[0],w)),r(g,s(f[1],w)),w);return s(h,b)},t}();d.prototype.$characterSize={width:0,height:0},i.implement(d.prototype,l),e.FontMetrics=d})),ace.define("ace/css/editor-css",["require","exports","module"],(function(t,e,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts &nbsp; instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n white-space: pre;\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/event_emitter").EventEmitter,s=function(){function t(t,e){this.canvas=i.createElement("canvas"),this.renderer=e,this.pixelRatio=1,this.maxHeight=e.layerConfig.maxHeight,this.lineHeight=e.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.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)"},t.element.appendChild(this.canvas)}return t.prototype.$updateDecorators=function(t){var e=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;if(t){this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height;var n=(t.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var i=this.canvas.getContext("2d");function r(t,e){return t.priority<e.priority?-1:t.priority>e.priority?1:0}var o=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach((function(t){t.priority=s[t.type]||null})),o=o.sort(r);for(var a=this.renderer.session.$foldData,l=0;l<o.length;l++){var c=o[l].row,u=this.compensateFoldRows(c,a),h=Math.round((c-u)*this.lineHeight*this.heightRatio),d=Math.round((c-u)*this.lineHeight*this.heightRatio),f=Math.round(((c-u)*this.lineHeight+this.lineHeight)*this.heightRatio),p=f-d;if(p<this.minDecorationHeight){var g=(d+f)/2|0;g<this.halfMinDecorationHeight?g=this.halfMinDecorationHeight:g+this.halfMinDecorationHeight>this.canvasHeight&&(g=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(g-this.halfMinDecorationHeight),f=Math.round(g+this.halfMinDecorationHeight)}i.fillStyle=e[o[l].type]||null,i.fillRect(0,h,this.canvasWidth,f-d)}}var m=this.renderer.session.selection.getCursor();if(m){u=this.compensateFoldRows(m.row,a),h=Math.round((m.row-u)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,h,this.canvasWidth,2)}},t.prototype.compensateFoldRows=function(t,e){var n=0;if(e&&e.length>0)for(var i=0;i<e.length;i++)t>e[i].start.row&&t<e[i].end.row?n+=t-e[i].start.row:t>=e[i].end.row&&(n+=e[i].end.row-e[i].start.row);return n},t}();r.implement(s.prototype,o),e.Decorator=s})),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,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/lang"),s=t("./config"),a=t("./layer/gutter").Gutter,l=t("./layer/marker").Marker,c=t("./layer/text").Text,u=t("./layer/cursor").Cursor,h=t("./scrollbar").HScrollBar,d=t("./scrollbar").VScrollBar,f=t("./scrollbar_custom").HScrollBar,p=t("./scrollbar_custom").VScrollBar,g=t("./renderloop").RenderLoop,m=t("./layer/font_metrics").FontMetrics,v=t("./lib/event_emitter").EventEmitter,y=t("./css/editor-css"),w=t("./layer/decorators").Decorator,b=t("./lib/useragent");r.importCssString(y,"ace_editor.css",!1);var _=function(){function t(t,e){var n=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(t){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",t)})),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=!b.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return t.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(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},t.prototype.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(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))},t.prototype.updateLines=function(t,e,n){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<e&&(this.$changedLines.lastRow=e)):this.$changedLines={firstRow:t,lastRow:e},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},t.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},t.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},t.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},t.prototype.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},t.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},t.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},t.prototype.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(t,e,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},t.prototype.$updateCachedSize=function(t,e,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(t||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(t||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},t.prototype.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},t.prototype.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(t/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},t.prototype.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},t.prototype.getAnimatedScroll=function(){return this.$animatedScroll},t.prototype.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},t.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},t.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},t.prototype.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},t.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},t.prototype.setHighlightIndentGuides=function(t){this.setOption("highlightIndentGuides",t)},t.prototype.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},t.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},t.prototype.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},t.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},t.prototype.getShowGutter=function(){return this.getOption("showGutter")},t.prototype.setShowGutter=function(t){return this.setOption("showGutter",t)},t.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},t.prototype.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},t.prototype.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},t.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},t.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},t.prototype.getContainerElement=function(){return this.container},t.prototype.getMouseEventTarget=function(){return this.scroller},t.prototype.getTextAreaContainer=function(){return this.container},t.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var n=this.$cursorLayer.$pixelPos;if(n){e&&e.markerRange&&(n=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=e&&e.useTextareaForIME||b.isMobile?this.lineHeight:1;if(o<0||o>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(e)if(e.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;s-=this.scrollLeft,s>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else r.translate(this.textarea,-100,0)}},t.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},t.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},t.prototype.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow,n=this.session.documentToScreenRow(e,0)*t.lineHeight;return n-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},t.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},t.prototype.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},t.prototype.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},t.prototype.setMargin=function(t,e,n,i){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},t.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},t.prototype.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},t.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},t.prototype.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},t.prototype.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(t-=(e-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>t-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},t.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},t.prototype.freeze=function(){this.$frozen=!0},t.prototype.unfreeze=function(){this.$frozen=!1},t.prototype.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_LINES?((this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",t)}else this.$changes|=t},t.prototype.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=n<=2*this.lineHeight,r=!i&&t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},t.prototype.$computeLayerConfig=function(){var t=this.session,e=this.$size,n=e.height<=2*this.lineHeight,i=this.session.getScreenLength(),r=i*this.lineHeight,o=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=e.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,r-e.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-e.scrollerWidth+h.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-r+u<0||this.scrollTop>h.top),f=l!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,g,m=this.scrollTop%this.lineHeight,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),w=y+v,b=this.lineHeight;y=t.screenToDocumentRow(y,0);var _=t.getFoldLine(y);_&&(y=_.start.row),p=t.documentToScreenRow(y,0),g=t.getRowLength(y)*b,w=Math.min(t.screenToDocumentRow(w,0),t.getLength()-1),c=e.scrollerHeight+t.getRowLength(w)*b+g,m=this.scrollTop-p*b;var x=0;return(this.layerConfig.width!=o||a)&&(x=this.CHANGE_H_SCROLL),(a||f)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:p,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+e.height-e.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},t.prototype.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(t>n.lastRow+1)&&!(e<n.firstRow))return e===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,t,e),!0)}},t.prototype.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),this.$textLayer&&t>this.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},t.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},t.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},t.prototype.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},t.prototype.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},t.prototype.updateBreakpoints=function(t){this._rows=t,this.$loop.schedule(this.CHANGE_GUTTER)},t.prototype.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},t.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},t.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},t.prototype.showCursor=function(){this.$cursorLayer.showCursor()},t.prototype.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},t.prototype.scrollCursorIntoView=function(t,e,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(t),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(e&&l+s>o+this.lineHeight&&(o-=e*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(e&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=e*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft,u=2*this.layerConfig.characterWidth;r-u<c?(r-=u,r<this.$padding+u&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):(r+=u,c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0))}},t.prototype.getScrollTop=function(){return this.session.getScrollTop()},t.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},t.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},t.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},t.prototype.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},t.prototype.alignCursor=function(t,e){"number"==typeof t&&(t={row:t,column:0});var n=this.$cursorLayer.getPixelPosition(t),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(e||0);return this.session.setScrollTop(r),r},t.prototype.$calcSteps=function(t,e){var n=0,i=this.STEPS,r=[],o=function(t,e,n){return n*(Math.pow(t-1,3)+1)+e};for(n=0;n<i;++n)r.push(o(n/this.STEPS,t,e-t));return r},t.prototype.scrollToLine=function(t,e,n,i){var r=this.$cursorLayer.getPixelPosition({row:t,column:0}),o=r.top;e&&(o-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(o),!1!==n&&this.animateScrolling(s,i)},t.prototype.animateScrolling=function(t,e){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(t!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0],t==n))return}var o=i.$calcSteps(t,n);this.$scrollAnimation={from:t,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,e&&e()}},t.prototype.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},t.prototype.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},t.prototype.scrollTo=function(t,e){this.session.setScrollTop(e),this.session.setScrollLeft(t)},t.prototype.scrollBy=function(t,e){e&&this.session.setScrollTop(this.session.getScrollTop()+e),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},t.prototype.isScrollableBy=function(t,e){return e<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},t.prototype.pixelToScreenCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},t.prototype.screenToTextCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((e+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},t.prototype.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},t.prototype.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},t.prototype.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},t.prototype.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),void 0==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},t.prototype.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},t.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var t=this.session.selection.cursor;this.removeExtraToken(t.row,t.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},t.prototype.setGhostText=function(t,e){var n=this.session.selection.cursor,i=e||{row:n.row,column:n.column};this.removeGhostText();var r=t.split("\n");if(this.addToken(r[0],"ghost_text",i.row,i.column),this.$ghostText={text:t,position:{row:i.row,column:i.column}},r.length>1){this.$ghostTextWidget={text:r.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var o=this.$cursorLayer.getPixelPosition(i,!0),s=this.container,a=s.getBoundingClientRect().height,l=r.length*this.lineHeight,c=l<a-o.top;if(c)return;l<a?this.scrollBy(0,(r.length-1)*this.lineHeight):this.scrollBy(0,o.top)}},t.prototype.removeGhostText=function(){if(this.$ghostText){var t=this.$ghostText.position;this.removeExtraToken(t.row,t.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},t.prototype.addToken=function(t,e,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:e,value:t},s=r.getTokens(n);if(null!=i&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(a+=c.value.length,i<=a){var u=c.value.length-(a-i),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:d});break}}else s.push(o);this.updateLines(n,n)},t.prototype.removeExtraToken=function(t,e){this.session.bgTokenizer.lines[t]=null,this.updateLines(t,t)},t.prototype.setTheme=function(t,e){var n=this;if(this.$themeId=t,n._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t)o(t);else{var i=t||this.$options.theme.initialValue;s.loadModule(["theme",i],o)}function o(i){if(n.$themeId!=t)return e&&e();if(!i||!i.cssClass)throw new Error("couldn't load module "+t+" or it didn't call define");i.$id&&(n.$themeId=i.$id),r.importCssString(i.cssText,i.cssClass,n.container),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),e&&e()}},t.prototype.getTheme=function(){return this.$themeId},t.prototype.setStyle=function(t,e){r.setCssClass(this.container,t,!1!==e)},t.prototype.unsetStyle=function(t){r.removeCssClass(this.container,t)},t.prototype.setCursorStyle=function(t){r.setStyle(this.scroller.style,"cursor",t)},t.prototype.setMouseCursor=function(t){r.setStyle(this.scroller.style,"cursor",t)},t.prototype.attachToShadowRoot=function(){r.importCssString(y,"ace_editor.css",this.container)},t.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},t.prototype.$updateCustomScrollbar=function(t){var e=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===t?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})))},t.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var t=this;this.$resizeTimer=o.delayedCall((function(){t.destroyed||t.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(e){var n=e[0].contentRect.width,i=e[0].contentRect.height;Math.abs(t.$size.width-n)>1||Math.abs(t.$size.height-i)>1?t.$resizeTimer.delay():t.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},t}();_.prototype.CHANGE_CURSOR=1,_.prototype.CHANGE_MARKER=2,_.prototype.CHANGE_GUTTER=4,_.prototype.CHANGE_SCROLL=8,_.prototype.CHANGE_LINES=16,_.prototype.CHANGE_TEXT=32,_.prototype.CHANGE_SIZE=64,_.prototype.CHANGE_MARKER_BACK=128,_.prototype.CHANGE_MARKER_FRONT=256,_.prototype.CHANGE_FULL=512,_.prototype.CHANGE_H_SCROLL=1024,_.prototype.$changes=0,_.prototype.$padding=null,_.prototype.$frozen=!1,_.prototype.STEPS=8,i.implement(_.prototype,v),s.defineOptions(_.prototype,"renderer",{useResizeObserver:{set:function(t){!t&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):t&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&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(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(t){this.$gutterLayer.$useSvgGutterIcons=t},initialValue:!1},showFoldedAnnotations:{set:function(t){this.$gutterLayer.$showFoldedAnnotations=t},initialValue:!1},fadeFoldWidgets:{set:function(t){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(t){1==this.$textLayer.setHighlightIndentGuides(t)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(t){this.$gutterLayer.setHighlightGutterLine(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(t){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(t){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(t){this.updateFull()}},minLines:{set:function(t){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(t){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(t){t=+t||0,this.$scrollPastEnd!=t&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(t){this.$updateCustomScrollbar(t)},initialValue:!1},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),e.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/net"),o=t("../lib/event_emitter").EventEmitter,s=t("../config");function a(t){var e="importScripts('"+r.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(o){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new n;return i.append(e),i.getBlob("application/javascript")}}function l(t){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=a(t),n=window.URL||window.webkitURL,i=n.createObjectURL(e);return new Worker(i)}return new Worker(t)}var c=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){i.implement(this,o),this.$createWorkerFromOldConfig=function(e,n,i,r,o){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),s.get("packaged")||!t.toUrl)r=r||s.moduleUrl(n,"worker");else{var a=this.$normalizePath;r=r||a(t.toUrl("ace/worker/worker.js",null,"_"));var c={};e.forEach((function(e){c[e]=a(t.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=l(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return r.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,e.push(i)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==t.action?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(c.prototype);var u=function(t,e,n){var i=null,r=!1,a=Object.create(o),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(t){l.push(t),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(t){r=t};var h=function(){var t=l.shift();t.command?i[t.command].apply(i,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},s.loadModule(["worker",e],(function(t){i=new t[n](a);while(l.length)h()})),u};e.UIWorkerClient=u,e.WorkerClient=c,e.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(t,e,n){"use strict";var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,o=t("./lib/oop"),s=function(){function t(t,e,n,i,r,o){var s=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager()["$undostack"]||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return t.prototype.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=e.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),t.others.push(i)})),n.setUndoSelect(!1)},t.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)}))}},t.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},t.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var e=t;if(e.start.row===e.end.row&&e.start.row===this.pos.row){this.$updating=!0;var n="insert"===t.action?e.end.column-e.start.column:e.start.column-e.end.column,r=e.start.column>=this.pos.column&&e.start.column<=this.pos.column+this.length+1,o=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};this.doc.insertMergedLines(l,t.lines)}else if("remove"===t.action)for(s=this.others.length-1;s>=0;s--){a=this.others[s],l={row:a.row,column:a.column+o};this.doc.remove(new i(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},t.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},t.prototype.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(n,r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},t.prototype.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},t.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},t.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t["$undostack"]).length-this.$undoStackDepth,n=0;n<e;n++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},t}();o.implement(s.prototype,r),e.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent");function o(t,e){return t.row==e.row&&t.column==e.column}function s(t){var e=t.domEvent,n=e.altKey,s=e.shiftKey,a=e.ctrlKey,l=t.getAccelKey(),c=t.getButton();if(a&&r.isMac&&(c=e.button),t.editor.inMultiSelectMode&&2==c)t.editor.textInput.onContextMenu(t.domEvent);else if(a||n||l){if(0===c){var u,h=t.editor,d=h.selection,f=h.inMultiSelectMode,p=t.getDocumentPosition(),g=d.getCursor(),m=t.inSelection()||d.isEmpty()&&o(p,g),v=t.x,y=t.y,w=function(t){v=t.clientX,y=t.clientY},b=h.session,_=h.renderer.pixelToScreenCoordinates(v,y),x=_;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!f&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&e.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!f&&m)return;if(!f){var S=d.toOrientedRange();h.addSelectionMarker(S)}var A=d.rangeList.rangeAtPoint(p);h.inVirtualSelectionMode=!0,s&&(A=null,S=d.ranges[0]||S,h.removeSelectionMarker(S)),h.once("mouseup",(function(){var t=d.toOrientedRange();A&&t.isEmpty()&&o(A.cursor,t.cursor)?d.substractPoint(t.cursor):(s?d.substractPoint(S.cursor):S&&(h.removeSelectionMarker(S),d.addRange(S)),d.addRange(t)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var C;t.stop(),h.inVirtualSelectionMode=!0;var k=[],$=function(){var t=h.renderer.pixelToScreenCoordinates(v,y),e=b.screenToDocumentPosition(t.row,t.column,t.offsetX);o(x,t)&&o(e,d.lead)||(x=t,h.selection.moveToPosition(e),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(k),k=d.rectangularRangeBlock(x,_),h.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=h.$mouseHandler.$clickSelection.clone()),k.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};f&&!l?d.toSingleRange():!f&&l&&(C=d.toOrientedRange(),h.addSelectionMarker(C)),s?_=b.documentToScreenPosition(d.lead):d.moveToPosition(p),x={row:-1,column:-1};var T=function(t){$(),clearInterval(R),h.removeSelectionMarkers(k),k.length||(k=[d.toOrientedRange()]),C&&(h.removeSelectionMarker(C),d.toSingleRange(C));for(var e=0;e<k.length;e++)d.addRange(k[e]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},L=$;i.capture(h.container,w,T);var R=setInterval((function(){L()}),20);return t.preventDefault()}}}else 0===c&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode()}e.onMouseDown=s})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(t,e,n){e.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(t){t.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(t){t.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(t){t.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(t){t.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(t){t.multiSelect.rangeCount>1?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.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(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(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,n){var i=t("./range_list").RangeList,r=t("./range").Range,o=t("./selection").Selection,s=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),l=t("./lib/lang"),c=t("./commands/multi_select_commands");e.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=t("./search").Search,h=new u;function d(t,e,n){return h.$options.wrap=!0,h.$options.needle=e,h.$options.backwards=-1==n,h.find(t)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),e=e||this.ranges[0],e&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],n=0;n<t.length;n++){var i=t[n],o=i.start.row,s=i.end.row;if(o===s)e.push(i.clone());else{e.push(new r(o,i.start.column,o,this.session.getLine(o).length));while(++o<s)e.push(this.getLineRange(o,!0));e.push(new r(s,0,s,i.end.column))}0!=n||this.isBackwards()||(e=e.reverse())}this.toSingleRange();for(n=e.length;n--;)this.addRange(e[n])},this.joinSelections=function(){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor),s=this.rectangularRangeBlock(i,o);s.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],o=t.column<e.column;if(o)var s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;else s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;var u,h=t.row<e.row;if(h)var d=t.row,f=e.row;else d=e.row,f=t.row;s<0&&(s=0),d<0&&(d=0),d==f&&(n=!0);for(var p=d;p<=f;p++){var m=r.fromPoints(this.session.screenToDocumentPosition(p,s,l),this.session.screenToDocumentPosition(p,a,c));if(m.isEmpty()){if(u&&g(m.end,u))break;u=m.end}m.cursor=o?m.start:m.end,i.push(m)}if(h&&i.reverse(),!n){var v=i.length-1;while(i[v].isEmpty()&&v>0)v--;if(v>0){var y=0;while(i[y].isEmpty())y++}for(var w=v;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var p=t("./editor").Editor;function g(t,e){return t.row==e.row&&t.column==e.column}function m(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",s),t.commands.addCommands(c.defaultCommands),v(t))}function v(t){if(t.textInput){var e=t.textInput.getElement(),n=!1;a.addListener(e,"keydown",(function(e){var r=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&r?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),t),a.addListener(e,"keyup",i,t),a.addListener(e,"blur",i,t)}function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)while(f>0&&u[f].start.row==u[f-1].end.row)f--;d.fromOrientedRange(u[f]),d.index=f,this.selection=a.selection=d;var p=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===p||(i=p),d.toOrientedRange(u[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;i<e.length;i++)n.push(this.session.getTextRange(e[i]));var r=this.session.getDocument().getNewLineCharacter();t=n.join(r),t.length==(n.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,e){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&e==this.multiSelect.anchor)return;var i=e==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=e.row||this.session.$clipPositionToDocument(i.row,i.column).column!=e.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(t,e,n){if(e=e||{},e.needle=t||e.needle,void 0==e.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();e.needle=this.session.getTextRange(i)}this.$search.set(e);var r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),r.length},this.selectMoreLines=function(t,e){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s=this.session.screenToDocumentPosition(o.row+t,o.column);if(n.isEmpty())l=s;else var a=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(a.row+t,a.column);if(i){var c=r.fromPoints(s,l);c.cursor=c.start}else{c=r.fromPoints(l,s);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(e)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(t){for(var e=this.session,n=e.multiSelect,i=n.ranges,r=i.length;r--;){var o=i[r];if(o.isEmpty()){var s=e.getWordRange(o.start.row,o.start.column);o.start.row=s.start.row,o.start.column=s.start.column,o.end.row=s.end.row,o.end.column=s.end.column}}n.mergeOverlappingRanges();var a=[];for(r=i.length;r--;){o=i[r];a.unshift(e.getTextRange(o))}t<0?a.unshift(a.pop()):a.push(a.shift());for(r=i.length;r--;){o=i[r];var l=o.clone();e.replace(o,a[r]),o.start.row=l.start.row,o.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(t,e,n){var i=this.session,r=i.multiSelect,o=r.toOrientedRange();if(!o.isEmpty()||(o=i.getWordRange(o.start.row,o.start.column),o.cursor=-1==t?o.start:o.end,this.multiSelect.addRange(o),!n)){var s=i.getTextRange(o),a=d(i,s,t);a&&(a.cursor=-1==t?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(o.cursor)}},this.alignCursors=function(){var t=this.session,e=t.multiSelect,n=e.ranges,i=-1,o=n.filter((function(t){if(t.cursor.row==i)return!0;i=t.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(t){e.substractPoint(t.cursor)}));var s=0,a=1/0,c=n.map((function(e){var n=e.cursor,i=t.getLine(n.row),r=i.substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r}));n.forEach((function(e,n){var i=e.cursor,o=s-i.column,u=c[n]-a;o>u?t.insert(i,l.stringRepeat(" ",o-u)):t.remove(new r(i.row,i.column,i.row,i.column-o+u)),e.start.column=e.end.column=s,e.start.row=e.end.row=i.row,e.cursor=e.end})),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<g);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var n,i,r,o=!0,s=!0;return t.map((function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==n?(n=e[1].length,i=e[2].length,r=e[3].length,e):(n+i+r!=e[1].length+e[2].length+e[3].length&&(s=!1),n!=e[1].length&&(o=!1),n>e[1].length&&(n=e[1].length),i<e[2].length&&(i=e[2].length),r>e[3].length&&(r=e[3].length),e):[t]})).map(e?c:o?s?u:c:h);function a(t){return l.stringRepeat(" ",t)}function c(t){return t[2]?a(n)+t[2]+a(i-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function u(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function h(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(p.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=m,t("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(t){m(this),t?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,o=t.getLine(e),s=o.search(r);if(-1!=s){var a=n||o.length,l=t.getLength(),c=e,u=e;while(++e<l){var h=t.getLine(e).search(r);if(-1!=h){if(h<=s){var d=t.getTokenAt(e,0);if(!d||"string"!==d.type)break}u=e}}if(u>c){var f=t.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r+1},a=t.$findClosingBracket(e,s,o);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r},a=t.$findOpeningBracket(e,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(t,e,n){"use strict";var i=t("../line_widgets").LineWidgets,r=t("../lib/dom"),o=t("../range").Range,s=t("../config").nls;function a(t,e,n){var i=0,r=t.length-1;while(i<=r){var o=i+r>>1,s=n(e,t[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}function l(t,e,n){var i=t.getAnnotations().sort(o.comparePoints);if(i.length){var r=a(i,{row:e,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===e){do{s=i[r+=n]}while(s&&s.row===e);if(!s)return i.slice()}var l=[];e=s.row;do{l[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==e);return l.length&&l}}}e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(t));var o=t.getCursorPosition(),a=o.row,c=n.widgetManager.getWidgetsAtRow(a).filter((function(t){return"errorMarker"==t.type}))[0];c?c.destroy():a-=e;var u,h=l(n,a,e);if(h){var d=h[0];o.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,o.row=d.row,u=t.renderer.$gutterLayer.$annotations[o.row]}else{if(c)return;u={text:[s("Looks good!")],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var f={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=f.el.appendChild(r.createElement("div")),g=f.el.appendChild(r.createElement("div"));g.className="error_widget_arrow "+u.className;var m=t.renderer.$cursorLayer.getPixelPosition(o).left;g.style.left=m+t.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",p.className="error_widget "+u.className,p.innerHTML=u.text.join("<br>"),p.appendChild(r.createElement("div"));var v=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(f),t.off("changeSelection",f.destroy),t.off("changeSession",f.destroy),t.off("mouseup",f.destroy),t.off("change",f.destroy))},t.keyBinding.addKeyboardHandler(v),t.on("changeSelection",f.destroy),t.on("changeSession",f.destroy),t.on("mouseup",f.destroy),t.on("change",f.destroy),t.session.widgetManager.addLineWidget(f),f.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","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,n){"use strict";t("./loader_build")(e);var i=t("./lib/dom"),r=t("./range").Range,o=t("./editor").Editor,s=t("./edit_session").EditSession,a=t("./undomanager").UndoManager,l=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(t,n){if("string"==typeof t){var r=t;if(t=document.getElementById(r),!t)throw new Error("ace.edit can't find div #"+r)}if(t&&t.env&&t.env.editor instanceof o)return t.env.editor;var s="";if(t&&/input|textarea/i.test(t.tagName)){var a=t;s=a.value,t=i.createElement("pre"),a.parentNode.replaceChild(t,a)}else t&&(s=t.textContent,t.innerHTML="");var c=e.createEditSession(s),u=new o(new l(t),c,n),h={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(h.textarea=a),u.on("destroy",(function(){h.editor.container.env=null})),u.container.env=u.env=h,u},e.createEditSession=function(t,e){var n=new s(t,e);return n.setUndoManager(new a),n},e.Range=r,e.Editor=o,e.EditSession=s,e.UndoManager=a,e.VirtualRenderer=l,e.version=e.config.version})),function(){ace.require(["ace/ace"],(function(e){e&&(e.config.init(!0),e.define=ace.define);var n=function(){return this}();for(var i in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=e),e)e.hasOwnProperty(i)&&(n.ace[i]=e[i]);n.ace["default"]=n.ace,t&&(t.exports=n.ace)}))}()},5914:t=>{t.exports=function(t,e,n,i,r){var o,s;if(void 0===i)i=0;else if(i|=0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(void 0===r)r=t.length-1;else if(r|=0,r<i||r>=t.length)throw new RangeError("invalid upper bound");while(i<=r)if(o=i+(r-i>>>1),s=+n(t[o],e,o,t),s<0)i=o+1;else{if(!(s>0))return o;r=o-1}return~i}},5859:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var i=n(6758),r=n.n(i),o=n(935),s=n.n(o),a=s()(r());a.push([t.id,'.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-moz-min-content;width:min-content}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;position:relative;width:100%;height:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{position:absolute;pointer-events:none}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{height:100%;border-right:1px dashed #607d8b}.u-hz .u-cursor-y,.u-vt .u-cursor-x{width:100%;border-bottom:1px dashed #607d8b}.u-cursor-pt{position:absolute;top:0;left:0;border-radius:50%;border:0 solid;pointer-events:none;will-change:transform;background-clip:padding-box!important}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}',""]);const l=a},3605:(t,e,n)=>{"use strict";n.d(e,{A:()=>G});var i={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(t,e,n){var r,o=i[t];return r="string"===typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const o=r;function s(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}var a={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},c={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u={date:s({formats:a,defaultWidth:"full"}),time:s({formats:l,defaultWidth:"full"}),dateTime:s({formats:c,defaultWidth:"full"})};const h=u;var d={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},f=function(t,e,n,i){return d[t]};const p=f;function g(t){return function(e,n){var i,r=null!==n&&void 0!==n&&n.context?String(n.context):"standalone";if("formatting"===r&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[a]}var c=t.argumentCallback?t.argumentCallback(e):e;return i[c]}}var m={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},v={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},w={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},b={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},x=function(t,e){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},S={ordinalNumber:x,era:g({values:m,defaultWidth:"wide"}),quarter:g({values:v,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:y,defaultWidth:"wide"}),day:g({values:w,defaultWidth:"wide"}),dayPeriod:g({values:b,defaultWidth:"wide",formattingValues:_,defaultFormattingWidth:"wide"})};const A=S;function C(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var s,a=o[0],l=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?$(l,(function(t){return t.test(a)})):k(l,(function(t){return t.test(a)}));s=t.valueCallback?t.valueCallback(c):c,s=n.valueCallback?n.valueCallback(s):s;var u=e.slice(a.length);return{value:s,rest:u}}}function k(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function $(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function T(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(t.matchPattern);if(!i)return null;var r=i[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=e.slice(r.length);return{value:s,rest:a}}}var L=/^(\d+)(th|st|nd|rd)?/i,R=/\d+/i,E={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},M={any:[/^b/i,/^(a|c)/i]},D={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I={any:[/1/i,/2/i,/3/i,/4/i]},O={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},P={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},N={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},W={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},H={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},B={ordinalNumber:T({matchPattern:L,parsePattern:R,valueCallback:function(t){return parseInt(t,10)}}),era:C({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:M,defaultParseWidth:"any"}),quarter:C({matchPatterns:D,defaultMatchWidth:"wide",parsePatterns:I,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:C({matchPatterns:O,defaultMatchWidth:"wide",parsePatterns:P,defaultParseWidth:"any"}),day:C({matchPatterns:N,defaultMatchWidth:"wide",parsePatterns:F,defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:W,defaultMatchWidth:"any",parsePatterns:H,defaultParseWidth:"any"})};const z=B;var U={code:"en-US",formatDistance:o,formatLong:h,formatRelative:p,localize:A,match:z,options:{weekStartsOn:0,firstWeekContainsDate:1}};const j=U,G=j},6017:(t,e,n)=>{"use strict";n.d(e,{q:()=>r});var i={};function r(){return i}},8681:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},r=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},o=function(t,e){var n,o=t.match(/(P+)(p+)?/)||[],s=o[1],a=o[2];if(!a)return i(t,e);switch(s){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"});break}return n.replace("{{date}}",i(s,e)).replace("{{time}}",r(a,e))},s={p:r,P:o};const a=s},7641:(t,e,n)=>{"use strict";function i(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}n.d(e,{A:()=>i})},9591:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(5286),r=n(3378),o=n(1262),s=n(1092);function a(t){(0,s.A)(1,arguments);var e=(0,o.A)(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var i=(0,r.A)(n);return i}var l=6048e5;function c(t){(0,s.A)(1,arguments);var e=(0,i.A)(t),n=(0,r.A)(e).getTime()-a(e).getTime();return Math.round(n/l)+1}},1262:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(5286),r=n(1092),o=n(3378);function s(t){(0,r.A)(1,arguments);var e=(0,i.A)(t),n=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(n+1,0,4),s.setUTCHours(0,0,0,0);var a=(0,o.A)(s),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=(0,o.A)(l);return e.getTime()>=a.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},5287:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var i=n(5286),r=n(8033),o=n(443),s=n(1092),a=n(3733),l=n(6017);function c(t,e){var n,i,c,u,h,d,f,p;(0,s.A)(1,arguments);var g=(0,l.q)(),m=(0,a.A)(null!==(n=null!==(i=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==i?i:null===(f=g.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,o.A)(t,e),y=new Date(0);y.setUTCFullYear(v,0,m),y.setUTCHours(0,0,0,0);var w=(0,r.A)(y,e);return w}var u=6048e5;function h(t,e){(0,s.A)(1,arguments);var n=(0,i.A)(t),o=(0,r.A)(n,e).getTime()-c(n,e).getTime();return Math.round(o/u)+1}},443:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var i=n(5286),r=n(1092),o=n(8033),s=n(3733),a=n(6017);function l(t,e){var n,l,c,u,h,d,f,p;(0,r.A)(1,arguments);var g=(0,i.A)(t),m=g.getUTCFullYear(),v=(0,a.q)(),y=(0,s.A)(null!==(n=null!==(l=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==l?l:null===(f=v.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(m+1,0,y),w.setUTCHours(0,0,0,0);var b=(0,o.A)(w,e),_=new Date(0);_.setUTCFullYear(m,0,y),_.setUTCHours(0,0,0,0);var x=(0,o.A)(_,e);return g.getTime()>=b.getTime()?m+1:g.getTime()>=x.getTime()?m:m-1}},5044:(t,e,n)=>{"use strict";n.d(e,{ef:()=>o,lJ:()=>a,xM:()=>s});var i=["D","DD"],r=["YY","YYYY"];function o(t){return-1!==i.indexOf(t)}function s(t){return-1!==r.indexOf(t)}function a(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},1092:(t,e,n)=>{"use strict";function i(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}n.d(e,{A:()=>i})},3378:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(5286),r=n(1092);function o(t){(0,r.A)(1,arguments);var e=1,n=(0,i.A)(t),o=n.getUTCDay(),s=(o<e?7:0)+o-e;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}},8033:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(5286),r=n(1092),o=n(3733),s=n(6017);function a(t,e){var n,a,l,c,u,h,d,f;(0,r.A)(1,arguments);var p=(0,s.q)(),g=(0,o.A)(null!==(n=null!==(a=null!==(l=null!==(c=null===e||void 0===e?void 0:e.weekStartsOn)&&void 0!==c?c:null===e||void 0===e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==l?l:p.weekStartsOn)&&void 0!==a?a:null===(d=p.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,i.A)(t),v=m.getUTCDay(),y=(v<g?7:0)+v-g;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}},3733:(t,e,n)=>{"use strict";function i(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,{A:()=>i})},8593:(t,e,n)=>{"use strict";n.d(e,{A:()=>D});var i=n(4523),r=n(5409),o=n(5286),s=n(1092),a=864e5;function l(t){(0,s.A)(1,arguments);var e=(0,o.A)(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),r=n-i;return Math.floor(r/a)+1}var c=n(9591),u=n(1262),h=n(5287),d=n(443);function f(t,e){var n=t<0?"-":"",i=Math.abs(t).toString();while(i.length<e)i="0"+i;return n+i}var p={y:function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return f("yy"===e?i%100:i,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):f(n+1,2)},d:function(t,e){return f(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return f(t.getUTCHours()%12||12,e.length)},H:function(t,e){return f(t.getUTCHours(),e.length)},m:function(t,e){return f(t.getUTCMinutes(),e.length)},s:function(t,e){return f(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,i=t.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return f(r,e.length)}};const g=p;var m={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},v={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return g.y(t,e)},Y:function(t,e,n,i){var r=(0,d.A)(t,i),o=r>0?r:1-r;if("YY"===e){var s=o%100;return f(s,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):f(o,e.length)},R:function(t,e){var n=(0,u.A)(t);return f(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return f(n,e.length)},Q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return f(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return f(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){var i=t.getUTCMonth();switch(e){case"M":case"MM":return g.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return f(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var r=(0,h.A)(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):f(r,e.length)},I:function(t,e,n){var i=(0,c.A)(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):f(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):g.d(t,e)},D:function(t,e,n){var i=l(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):f(i,e.length)},E:function(t,e,n){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return f(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return f(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var i=t.getUTCDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return f(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours(),r=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,r=t.getUTCHours();switch(i=12===r?m.noon:0===r?m.midnight:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,r=t.getUTCHours();switch(i=r>=17?m.evening:r>=12?m.afternoon:r>=4?m.morning:m.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var i=t.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return g.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):g.H(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):g.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):g.s(t,e)},S:function(t,e){return g.S(t,e)},X:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return w(o);case"XXXX":case"XX":return b(o);case"XXXXX":case"XXX":default:return b(o,":")}},x:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"x":return w(o);case"xxxx":case"xx":return b(o);case"xxxxx":case"xxx":default:return b(o,":")}},O:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+y(o,":");case"OOOO":default:return"GMT"+b(o,":")}},z:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+y(o,":");case"zzzz":default:return"GMT"+b(o,":")}},t:function(t,e,n,i){var r=i._originalDate||t,o=Math.floor(r.getTime()/1e3);return f(o,e.length)},T:function(t,e,n,i){var r=i._originalDate||t,o=r.getTime();return f(o,e.length)}};function y(t,e){var n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var s=e||"";return n+String(r)+s+f(o,2)}function w(t,e){if(t%60===0){var n=t>0?"-":"+";return n+f(Math.abs(t)/60,2)}return b(t,e)}function b(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t),o=f(Math.floor(r/60),2),s=f(r%60,2);return i+o+n+s}const _=v;var x=n(8681),S=n(7641),A=n(5044),C=n(3733),k=n(6017),$=n(3605),T=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,R=/^'([^]*?)'?$/,E=/''/g,M=/[a-zA-Z]/;function D(t,e,n){var a,l,c,u,h,d,f,p,g,m,v,y,w,b,R,E,D,O;(0,s.A)(2,arguments);var P=String(e),N=(0,k.q)(),F=null!==(a=null!==(l=null===n||void 0===n?void 0:n.locale)&&void 0!==l?l:N.locale)&&void 0!==a?a:$.A,W=(0,C.A)(null!==(c=null!==(u=null!==(h=null!==(d=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==d?d:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==h?h:N.firstWeekContainsDate)&&void 0!==u?u:null===(g=N.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==c?c:1);if(!(W>=1&&W<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=(0,C.A)(null!==(v=null!==(y=null!==(w=null!==(b=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==b?b:null===n||void 0===n||null===(R=n.locale)||void 0===R||null===(E=R.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==w?w:N.weekStartsOn)&&void 0!==y?y:null===(D=N.locale)||void 0===D||null===(O=D.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==v?v:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var B=(0,o.A)(t);if(!(0,i.A)(B))throw new RangeError("Invalid time value");var z=(0,S.A)(B),U=(0,r.A)(B,z),j={firstWeekContainsDate:W,weekStartsOn:H,locale:F,_originalDate:B},G=P.match(L).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=x.A[e];return n(t,F.formatLong)}return t})).join("").match(T).map((function(i){if("''"===i)return"'";var r=i[0];if("'"===r)return I(i);var o=_[r];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,A.xM)(i)||(0,A.lJ)(i,e,String(t)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,A.ef)(i)||(0,A.lJ)(i,e,String(t)),o(U,i,F.localize,j);if(r.match(M))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return i})).join("");return G}function I(t){var e=t.match(R);return e?e[1].replace(E,"'"):t}},4523:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(8169),r=n(1092);function o(t){return(0,r.A)(1,arguments),t instanceof Date||"object"===(0,i.A)(t)&&"[object Date]"===Object.prototype.toString.call(t)}var s=n(5286);function a(t){if((0,r.A)(1,arguments),!o(t)&&"number"!==typeof t)return!1;var e=(0,s.A)(t);return!isNaN(Number(e))}},8328:(t,e,n)=>{"use strict";n.d(e,{A:()=>Ut});var i=n(8169);n(7107),n(7010);function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function s(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(l)throw s}}}}var a=n(3605),l=n(5409),c=n(5286);function u(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var h=n(8681),d=n(7641),f=n(5044),p=n(3733),g=n(1092);function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}n(7087);function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}function _(t,e){if(e&&("object"===(0,i.A)(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function x(t){var e=b();return function(){var n,i=w(t);if(e){var r=w(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _(this,n)}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var A=n(2423);function C(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(0,A.A)(i.key),i)}}function k(t,e,n){return e&&C(t.prototype,e),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var $=n(237),T=10,L=function(){function t(){S(this,t),(0,$.A)(this,"priority",void 0),(0,$.A)(this,"subPriority",0)}return k(t,[{key:"validate",value:function(t,e){return!0}}]),t}(),R=function(t){y(n,t);var e=x(n);function n(t,i,r,o,s){var a;return S(this,n),a=e.call(this),a.value=t,a.validateValue=i,a.setValue=r,a.priority=o,s&&(a.subPriority=s),a}return k(n,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,n){return this.setValue(t,e,this.value,n)}}]),n}(L),E=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",T),(0,$.A)(m(t),"subPriority",-1),t}return k(n,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var n=new Date(0);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}}]),n}(L),M=function(){function t(){S(this,t),(0,$.A)(this,"incompatibleTokens",void 0),(0,$.A)(this,"priority",void 0),(0,$.A)(this,"subPriority",void 0)}return k(t,[{key:"run",value:function(t,e,n,i){var r=this.parse(t,e,n,i);return r?{setter:new R(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(t,e,n){return!0}}]),t}(),D=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",140),(0,$.A)(m(t),"incompatibleTokens",["R","u","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,n){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),I=(Math.pow(10,8),6e4),O=36e5,P=1e3,N={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},F={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function W(t,e){return t?{value:e(t.value),rest:t.rest}:t}function H(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function B(t,e){var n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};var i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*O+o*I+s*P),rest:e.slice(n[0].length)}}function z(t){return H(N.anyDigitsSigned,t)}function U(t,e){switch(t){case 1:return H(N.singleDigit,e);case 2:return H(N.twoDigits,e);case 3:return H(N.threeDigits,e);case 4:return H(N.fourDigits,e);default:return H(new RegExp("^\\d{1,"+t+"}"),e)}}function j(t,e){switch(t){case 1:return H(N.singleDigitSigned,e);case 2:return H(N.twoDigitsSigned,e);case 3:return H(N.threeDigitsSigned,e);case 4:return H(N.fourDigitsSigned,e);default:return H(new RegExp("^-?\\d{1,"+t+"}"),e)}}function G(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function V(t,e){var n,i=e>0,r=i?e:1-e;if(r<=50)n=t||100;else{var o=r+50,s=100*Math.floor(o/100),a=t>=o%100;n=t+s-(a?100:0)}return i?n:1-n}function Y(t){return t%400===0||t%4===0&&t%100!==0}var q=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return W(U(4,t),i);case"yo":return W(n.ordinalNumber(t,{unit:"year"}),i);default:return W(U(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var r=V(n.year,i);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}var o="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),K=n(443),X=n(8033),Q=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return W(U(4,t),i);case"Yo":return W(n.ordinalNumber(t,{unit:"year"}),i);default:return W(U(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n,i){var r=(0,K.A)(t,i);if(n.isTwoDigitYear){var o=V(n.year,r);return t.setUTCFullYear(o,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,X.A)(t,i)}var s="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(s,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,X.A)(t,i)}}]),n}(M),Z=n(3378),J=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e){return j("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),(0,Z.A)(i)}}]),n}(M),tt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e){return j("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),et=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",120),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"Q":case"QQ":return U(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(M),nt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",120),(0,$.A)(m(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"q":case"qq":return U(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(M),it=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,$.A)(m(t),"priority",110),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"M":return W(H(N.month,t),i);case"MM":return W(U(2,t),i);case"Mo":return W(n.ordinalNumber(t,{unit:"month"}),i);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),rt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",110),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"L":return W(H(N.month,t),i);case"LL":return W(U(2,t),i);case"Lo":return W(n.ordinalNumber(t,{unit:"month"}),i);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),ot=n(5287);function st(t,e,n){(0,g.A)(2,arguments);var i=(0,c.A)(t),r=(0,p.A)(e),o=(0,ot.A)(i,n)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}var at=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",100),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"w":return H(N.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n,i){return(0,X.A)(st(t,n,i),i)}}]),n}(M),lt=n(9591);function ct(t,e){(0,g.A)(2,arguments);var n=(0,c.A)(t),i=(0,p.A)(e),r=(0,lt.A)(n)-i;return n.setUTCDate(n.getUTCDate()-7*r),n}var ut=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",100),(0,$.A)(m(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"I":return H(N.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n){return(0,Z.A)(ct(t,n))}}]),n}(M),ht=[31,28,31,30,31,30,31,31,30,31,30,31],dt=[31,29,31,30,31,30,31,31,30,31,30,31],ft=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"subPriority",1),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"d":return H(N.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=Y(n),r=t.getUTCMonth();return i?e>=1&&e<=dt[r]:e>=1&&e<=ht[r]}},{key:"set",value:function(t,e,n){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t}}]),n}(M),pt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"subpriority",1),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"D":case"DD":return H(N.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=Y(n);return i?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,n){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t}}]),n}(M),gt=n(6017);function mt(t,e,n){var i,r,o,s,a,l,u,h;(0,g.A)(2,arguments);var d=(0,gt.q)(),f=(0,p.A)(null!==(i=null!==(r=null!==(o=null!==(s=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==s?s:null===n||void 0===n||null===(a=n.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==r?r:null===(u=d.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,c.A)(t),v=(0,p.A)(e),y=m.getUTCDay(),w=v%7,b=(w+7)%7,_=(b<f?7:0)+v-y;return m.setUTCDate(m.getUTCDate()+_),m}var vt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M),yt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return W(U(e.length,t),r);case"eo":return W(n.ordinalNumber(t,{unit:"day"}),r);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M),wt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return W(U(e.length,t),r);case"co":return W(n.ordinalNumber(t,{unit:"day"}),r);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M);function bt(t,e){(0,g.A)(2,arguments);var n=(0,p.A)(e);n%7===0&&(n-=7);var i=1,r=(0,c.A)(t),o=r.getUTCDay(),s=n%7,a=(s+7)%7,l=(a<i?7:0)+n-o;return r.setUTCDate(r.getUTCDate()+l),r}var _t=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return U(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return W(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return W(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return W(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return W(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,n){return t=bt(t,n),t.setUTCHours(0,0,0,0),t}}]),n}(M),xt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["b","B","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),St=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["a","B","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),At=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["a","b","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),Ct=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["H","K","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"h":return H(N.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):i||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t}}]),n}(M),kt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["a","b","h","K","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"H":return H(N.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,n){return t.setUTCHours(n,0,0,0),t}}]),n}(M),$t=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["h","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"K":return H(N.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t}}]),n}(M),Tt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["a","b","h","H","K","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"k":return H(N.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,n){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t}}]),n}(M),Lt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",60),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"m":return H(N.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCMinutes(n,0,0),t}}]),n}(M),Rt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",50),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"s":return H(N.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCSeconds(n,0),t}}]),n}(M),Et=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",30),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e){var n=function(t){return Math.floor(t*Math.pow(10,3-e.length))};return W(U(e.length,t),n)}},{key:"set",value:function(t,e,n){return t.setUTCMilliseconds(n),t}}]),n}(M),Mt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",10),(0,$.A)(m(t),"incompatibleTokens",["t","T","x"]),t}return k(n,[{key:"parse",value:function(t,e){switch(e){case"X":return B(F.basicOptionalMinutes,t);case"XX":return B(F.basic,t);case"XXXX":return B(F.basicOptionalSeconds,t);case"XXXXX":return B(F.extendedOptionalSeconds,t);case"XXX":default:return B(F.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(M),Dt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",10),(0,$.A)(m(t),"incompatibleTokens",["t","T","X"]),t}return k(n,[{key:"parse",value:function(t,e){switch(e){case"x":return B(F.basicOptionalMinutes,t);case"xx":return B(F.basic,t);case"xxxx":return B(F.basicOptionalSeconds,t);case"xxxxx":return B(F.extendedOptionalSeconds,t);case"xxx":default:return B(F.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(M),It=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",40),(0,$.A)(m(t),"incompatibleTokens","*"),t}return k(n,[{key:"parse",value:function(t){return z(t)}},{key:"set",value:function(t,e,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(M),Ot=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",20),(0,$.A)(m(t),"incompatibleTokens","*"),t}return k(n,[{key:"parse",value:function(t){return z(t)}},{key:"set",value:function(t,e,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(M),Pt={G:new D,y:new q,Y:new Q,R:new J,u:new tt,Q:new et,q:new nt,M:new it,L:new rt,w:new at,I:new ut,d:new ft,D:new pt,E:new vt,e:new yt,c:new wt,i:new _t,a:new xt,b:new St,B:new At,h:new Ct,H:new kt,K:new $t,k:new Tt,m:new Lt,s:new Rt,S:new Et,X:new Mt,x:new Dt,t:new It,T:new Ot},Nt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wt=/^'([^]*?)'?$/,Ht=/''/g,Bt=/\S/,zt=/[a-zA-Z]/;function Ut(t,e,n,r){var o,m,v,y,w,b,_,x,S,A,C,k,$,T,L,R,M,D;(0,g.A)(3,arguments);var I=String(t),O=String(e),P=(0,gt.q)(),N=null!==(o=null!==(m=null===r||void 0===r?void 0:r.locale)&&void 0!==m?m:P.locale)&&void 0!==o?o:a.A;if(!N.match)throw new RangeError("locale must contain match property");var F=(0,p.A)(null!==(v=null!==(y=null!==(w=null!==(b=null===r||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==b?b:null===r||void 0===r||null===(_=r.locale)||void 0===_||null===(x=_.options)||void 0===x?void 0:x.firstWeekContainsDate)&&void 0!==w?w:P.firstWeekContainsDate)&&void 0!==y?y:null===(S=P.locale)||void 0===S||null===(A=S.options)||void 0===A?void 0:A.firstWeekContainsDate)&&void 0!==v?v:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=(0,p.A)(null!==(C=null!==(k=null!==($=null!==(T=null===r||void 0===r?void 0:r.weekStartsOn)&&void 0!==T?T:null===r||void 0===r||null===(L=r.locale)||void 0===L||null===(R=L.options)||void 0===R?void 0:R.weekStartsOn)&&void 0!==$?$:P.weekStartsOn)&&void 0!==k?k:null===(M=P.locale)||void 0===M||null===(D=M.options)||void 0===D?void 0:D.weekStartsOn)&&void 0!==C?C:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===I?(0,c.A)(n):new Date(NaN);var H,B={firstWeekContainsDate:F,weekStartsOn:W,locale:N},z=[new E],U=O.match(Ft).map((function(t){var e=t[0];if(e in h.A){var n=h.A[e];return n(t,N.formatLong)}return t})).join("").match(Nt),j=[],G=s(U);try{var V=function(){var e=H.value;null!==r&&void 0!==r&&r.useAdditionalWeekYearTokens||!(0,f.xM)(e)||(0,f.lJ)(e,O,t),null!==r&&void 0!==r&&r.useAdditionalDayOfYearTokens||!(0,f.ef)(e)||(0,f.lJ)(e,O,t);var n=e[0],i=Pt[n];if(i){var o=i.incompatibleTokens;if(Array.isArray(o)){var s=j.find((function(t){return o.includes(t.token)||t.token===n}));if(s)throw new RangeError("The format string mustn't contain `".concat(s.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===i.incompatibleTokens&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));j.push({token:n,fullToken:e});var a=i.run(I,e,N.match,B);if(!a)return{v:new Date(NaN)};z.push(a.setter),I=a.rest}else{if(n.match(zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===e?e="'":"'"===n&&(e=jt(e)),0!==I.indexOf(e))return{v:new Date(NaN)};I=I.slice(e.length)}};for(G.s();!(H=G.n()).done;){var Y=V();if("object"===(0,i.A)(Y))return Y.v}}catch(nt){G.e(nt)}finally{G.f()}if(I.length>0&&Bt.test(I))return new Date(NaN);var q=z.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return z.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),K=(0,c.A)(n);if(isNaN(K.getTime()))return new Date(NaN);var X,Q=(0,l.A)(K,(0,d.A)(K)),Z={},J=s(q);try{for(J.s();!(X=J.n()).done;){var tt=X.value;if(!tt.validate(Q,B))return new Date(NaN);var et=tt.set(Q,Z,B);Array.isArray(et)?(Q=et[0],u(Z,et[1])):Q=et}}catch(nt){J.e(nt)}finally{J.f()}return Q}function jt(t){return t.match(Wt)[1].replace(Ht,"'")}},7014:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var i=n(8169),r=n(3733),o=n(5286),s=n(1092);function a(t,e){(0,s.A)(2,arguments);var n=(0,o.A)(t),i=(0,r.A)(e);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}function l(t,e){(0,s.A)(2,arguments);var n=(0,r.A)(e);return a(t,-n)}function c(t,e){(0,s.A)(2,arguments);var n=(0,o.A)(t),i=(0,r.A)(e);if(isNaN(i))return new Date(NaN);if(!i)return n;var a=n.getDate(),l=new Date(n.getTime());l.setMonth(n.getMonth()+i+1,0);var c=l.getDate();return a>=c?l:(n.setFullYear(l.getFullYear(),l.getMonth(),a),n)}function u(t,e){(0,s.A)(2,arguments);var n=(0,r.A)(e);return c(t,-n)}function h(t,e){if((0,s.A)(2,arguments),!e||"object"!==(0,i.A)(e))return new Date(NaN);var n=e.years?(0,r.A)(e.years):0,o=e.months?(0,r.A)(e.months):0,a=e.weeks?(0,r.A)(e.weeks):0,c=e.days?(0,r.A)(e.days):0,h=e.hours?(0,r.A)(e.hours):0,d=e.minutes?(0,r.A)(e.minutes):0,f=e.seconds?(0,r.A)(e.seconds):0,p=u(t,o+12*n),g=l(p,c+7*a),m=d+60*h,v=f+60*m,y=1e3*v,w=new Date(g.getTime()-y);return w}},5409:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(3733),r=n(5286),o=n(1092);function s(t,e){(0,o.A)(2,arguments);var n=(0,r.A)(t).getTime(),s=(0,i.A)(e);return new Date(n+s)}function a(t,e){(0,o.A)(2,arguments);var n=(0,i.A)(e);return s(t,-n)}},5286:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(8169),r=n(1092);function o(t){(0,r.A)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===(0,i.A)(t)&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},5650:(t,e,n)=>{var i=n(8942),r=i.Symbol;t.exports=r},5111:t=>{function e(t,e){var n=-1,i=null==t?0:t.length,r=Array(i);while(++n<i)r[n]=e(t[n],n,t);return r}t.exports=e},4187:t=>{function e(t,e,n,i){var r=-1,o=null==t?0:t.length;i&&o&&(n=t[++r]);while(++r<o)n=e(n,t[r],r,t);return n}t.exports=e},2837:t=>{function e(t){return t.split("")}t.exports=e},9546:t=>{var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}t.exports=n},7379:(t,e,n)=>{var i=n(5650),r=n(8870),o=n(9005),s="[object Null]",a="[object Undefined]",l=i?i.toStringTag:void 0;function c(t){return null==t?void 0===t?a:s:l&&l in Object(t)?r(t):o(t)}t.exports=c},1035:t=>{function e(t){return function(e){return null==t?void 0:t[e]}}t.exports=e},3501:t=>{function e(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;var o=Array(r);while(++i<r)o[i]=t[i+e];return o}t.exports=e},2291:(t,e,n)=>{var i=n(5650),r=n(5111),o=n(3142),s=n(1187),a=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;function u(t){if("string"==typeof t)return t;if(o(t))return r(t,u)+"";if(s(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}t.exports=u},8931:(t,e,n)=>{var i=n(3501);function r(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:i(t,e,n)}t.exports=r},4326:(t,e,n)=>{var i=n(8931),r=n(3417),o=n(2237),s=n(5243);function a(t){return function(e){e=s(e);var n=r(e)?o(e):void 0,a=n?n[0]:e.charAt(0),l=n?i(n,1).join(""):e.slice(1);return a[t]()+l}}t.exports=a},3640:(t,e,n)=>{var i=n(4187),r=n(5881),o=n(9850),s="['’]",a=RegExp(s,"g");function l(t){return function(e){return i(o(r(e).replace(a,"")),t,"")}}t.exports=l},9968:(t,e,n)=>{var i=n(1035),r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},o=i(r);t.exports=o},4967:(t,e,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},8870:(t,e,n)=>{var i=n(5650),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;function l(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r}t.exports=l},3417:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="\\u200d",l=RegExp("["+a+e+o+s+"]");function c(t){return l.test(t)}t.exports=c},5813:t=>{var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}t.exports=n},9005:t=>{var e=Object.prototype,n=e.toString;function i(t){return n.call(t)}t.exports=i},8942:(t,e,n)=>{var i=n(4967),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();t.exports=o},2237:(t,e,n)=>{var i=n(2837),r=n(3417),o=n(2013);function s(t){return r(t)?o(t):i(t)}t.exports=s},2013:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="["+e+"]",l="["+o+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",m="["+s+"]?",v="(?:"+p+"(?:"+[h,d,f].join("|")+")"+m+g+")*",y=m+g+v,w="(?:"+[h+l+"?",l,d,f,a].join("|")+")",b=RegExp(c+"(?="+c+")|"+w+y,"g");function _(t){return t.match(b)||[]}t.exports=_},482:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",u="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",p=l+c+u+h,g="['’]",m="["+p+"]",v="["+o+"]",y="\\d+",w="["+s+"]",b="["+a+"]",_="[^"+e+p+y+s+a+d+"]",x="\\ud83c[\\udffb-\\udfff]",S="(?:"+v+"|"+x+")",A="[^"+e+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+d+"]",T="\\u200d",L="(?:"+b+"|"+_+")",R="(?:"+$+"|"+_+")",E="(?:"+g+"(?:d|ll|m|re|s|t|ve))?",M="(?:"+g+"(?:D|LL|M|RE|S|T|VE))?",D=S+"?",I="["+f+"]?",O="(?:"+T+"(?:"+[A,C,k].join("|")+")"+I+D+")*",P="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F=I+D+O,W="(?:"+[w,C,k].join("|")+")"+F,H=RegExp([$+"?"+b+"+"+E+"(?="+[m,$,"$"].join("|")+")",R+"+"+M+"(?="+[m,$+L,"$"].join("|")+")",$+"?"+L+"+"+E,$+"+"+M,N,P,y,W].join("|"),"g");function B(t){return t.match(H)||[]}t.exports=B},9677:(t,e,n)=>{var i=n(6005),r=n(3640),o=r((function(t,e,n){return e=e.toLowerCase(),t+(n?i(e):e)}));t.exports=o},6005:(t,e,n)=>{var i=n(5243),r=n(5485);function o(t){return r(i(t).toLowerCase())}t.exports=o},5881:(t,e,n)=>{var i=n(9968),r=n(5243),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",c=s+a+l,u="["+c+"]",h=RegExp(u,"g");function d(t){return t=r(t),t&&t.replace(o,i).replace(h,"")}t.exports=d},3142:t=>{var e=Array.isArray;t.exports=e},547:t=>{function e(t){return null!=t&&"object"==typeof t}t.exports=e},1187:(t,e,n)=>{var i=n(7379),r=n(547),o="[object Symbol]";function s(t){return"symbol"==typeof t||r(t)&&i(t)==o}t.exports=s},5250:function(t,e,n){var i;
40
+ "use strict";var i=t("./oop"),r=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter((function(t){return e&n.KEY_MODS[t]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,r),e.default=e,e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i,r=t("./keys"),o=t("./useragent"),s=null,a=0;function l(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return i={passive:!1},!0}})}catch(t){}}function c(){return void 0==i&&l(),i}function u(t,e,n){this.elem=t,this.type=e,this.callback=n}u.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=e.addListener=function(t,e,n,i){t.addEventListener(e,n,c()),i&&i.$toDestroy.push(new u(t,e,n))},d=e.removeListener=function(t,e,n){t.removeEventListener(e,n,c())};e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},e.preventDefault=function(t){t.preventDefault&&t.preventDefault()},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||o.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},e.capture=function(t,e,n){var i=t&&t.ownerDocument||document;function r(t){e&&e(t),n&&n(t),d(i,"mousemove",e),d(i,"mouseup",r),d(i,"dragstart",r)}return h(i,"mousemove",e),h(i,"mouseup",r),h(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){h(t,"wheel",(function(t){var n=.15,i=t.deltaX||0,r=t.deltaY||0;switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=i*n,t.wheelY=r*n;break;case t.DOM_DELTA_LINE:var o=15;t.wheelX=i*o,t.wheelY=r*o;break;case t.DOM_DELTA_PAGE:var s=150;t.wheelX=i*s,t.wheelY=r*s;break}e(t)}),n)},e.addMultiMouseDownListener=function(t,n,i,r,s){var a,l,c,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){if(0!==e.getButton(t)?u=0:t.detail>1?(u++,u>4&&(u=1)):u=1,o.isIE){var s=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(a=t.clientX,l=t.clientY)}if(t._clicks=u,i[r]("mousedown",t),u>4)u=0;else if(u>1)return i[r](d[u],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){h(t,"mousedown",f,s)}))};var f=function(t){return(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function p(t,e,n){var i=f(e);if(!o.isMac&&s){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in e?e.location:e.keyLocation;if(17===n&&1===l)1==s[n]&&(a=e.timeStamp);else if(18===n&&3===i&&2===l){var c=e.timeStamp-a;c<50&&(s.altGr=!0)}}}if(n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n){l="location"in e?e.location:e.keyLocation;if(3===l&&(t(e,i,-n),e.defaultPrevented))return}if(o.isChromeOS&&8&i){if(t(e,i,n),e.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&t(e,i,n)}function g(){s=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[f(t)]},e.addCommandKeyListener=function(t,n,i){var r=null;h(t,"keydown",(function(t){s[t.keyCode]=(s[t.keyCode]||0)+1;var e=p(n,t,t.keyCode);return r=t.defaultPrevented,e}),i),h(t,"keypress",(function(t){r&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),r=null)}),i),h(t,"keyup",(function(t){s[t.keyCode]=null}),i),s||(g(),h(window,"focus",g))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+m++,r=function(o){o.data==i&&(e.stopPropagation(o),d(n,"message",r),t())};h(n,"message",r),n.postMessage(i,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,n){return setTimeout((function n(){e.$idleBlocked?setTimeout(n,100):t()}),n)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout((function(){e.$idleBlocked=!1}),t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(t){setTimeout(t,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(t,e,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=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,n){"use strict";var i,r=t("../lib/event"),o=t("../config").nls,s=t("../lib/useragent"),a=t("../lib/dom"),l=t("../lib/lang"),c=t("../clipboard"),u=s.isChrome<18,h=s.isIE,d=s.isChrome>63,f=400,p=t("../lib/keys"),g=p.KEY_MODS,m=s.isIOS,v=m?/\s/:/\n/,y=s.isMobile;i=function(t,e){var n=a.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",t.insertBefore(n,t.firstChild);var i=!1,w=!1,b=!1,_=!1,x="";y||(n.style.fontSize="1px");var S=!1,A=!1,C="",k=0,$=0,T=0,L=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,E=0;try{var M=document.activeElement===n}catch(nt){}this.setNumberOfExtraLines=function(t){L=Number.MAX_SAFE_INTEGER,R=Number.MIN_SAFE_INTEGER,E=t<0?0:t},this.setAriaOptions=function(t){if(t.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",t.inline?"both":"list"),n.setAttribute("aria-activedescendant",t.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),t.role&&n.setAttribute("role",t.role),t.setLabel&&(n.setAttribute("aria-roledescription",o("editor")),e.session)){var i=e.session.selection.cursor.row;n.setAttribute("aria-label",o("Cursor at row $0",[i+1]))}},this.setAriaOptions({role:"textbox"}),r.addListener(n,"blur",(function(t){A||(e.onBlur(t),M=!1)}),e),r.addListener(n,"focus",(function(t){if(!A){if(M=!0,s.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),s.isEdge?setTimeout(I):I()}}),e),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:e.renderer.enableKeyboardAccessibility}),x||d||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var t=n.style.top;n.style.position="fixed",n.style.top="0px";try{var i=0!=n.getBoundingClientRect().top}catch(nt){return}var r=[];if(i){var o=n.parentElement;while(o&&1==o.nodeType)r.push(o),o.setAttribute("ace_nocontext","true"),o=!o.parentElement&&o.getRootNode?o.getRootNode()["host"]:o.parentElement}n.focus({preventScroll:!0}),i&&r.forEach((function(t){t.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return M},e.on("beforeEndOperation",(function(){var t=e.curOp,i=t&&t.command&&t.command.name;if("insertstring"!=i){var r=i&&(t.docChanged||t.selectionChanged);b&&r&&(C=n.value="",q()),I()}}));var D=function(t,n){for(var i=n,r=1;r<=t-L&&r<2*E+1;r++)i+=e.session.getLine(t-r).length+1;return i},I=m?function(t){if(M&&(!i||t)&&!_){t||(t="");var r="\n ab"+t+"cde fg\n";r!=n.value&&(n.value=C=r);var o=4,s=4+(t.length||(e.selection.isEmpty()?0:1));k==o&&$==s||n.setSelectionRange(o,s),k=o,$=s}}:function(){if(!b&&!_&&(M||F)){b=!0;var t=0,i=0,r="";if(e.session){var o=e.selection,s=o.getRange(),a=o.cursor.row;a===R+1?(L=R+1,R=L+2*E):a===L-1?(R=L-1,L=R-2*E):(a<L-1||a>R+1)&&(L=a>E?a-E:0,R=a>E?a+E:2*E);for(var l=[],c=L;c<=R;c++)l.push(e.session.getLine(c));if(r=l.join("\n"),t=D(s.start.row,s.start.column),i=D(s.end.row,s.end.column),s.start.row<L){var u=e.session.getLine(L-1);t=s.start.row<L-1?0:t,i+=u.length+1,r=u+"\n"+r}else if(s.end.row>R){var h=e.session.getLine(R+1);i=s.end.row>R+1?h.length:s.end.column,i+=r.length+1,r=r+"\n"+h}else y&&a>0&&(r="\n"+r,i+=1,t+=1);r.length>f&&(t<f&&i<f?r=r.slice(0,f):(r="\n",t==i?t=i=0:(t=0,i=1)));var d=r+"\n\n";d!=C&&(n.value=C=d,k=$=d.length)}if(F&&(k=n.selectionStart,$=n.selectionEnd),$!=i||k!=t||n.selectionEnd!=$)try{n.setSelectionRange(t,i),k=t,$=i}catch(nt){}b=!1}};this.resetSelection=I,M&&e.onFocus();var O=function(t){return 0===t.selectionStart&&t.selectionEnd>=C.length&&t.value===C&&C&&t.selectionEnd!==$},P=function(t){b||(i?i=!1:O(n)?(e.selectAll(),I()):y&&n.selectionStart!=k&&I())},N=null;this.setInputHandler=function(t){N=t},this.getInputHandler=function(){return N};var F=!1,W=function(t,i){if(F&&(F=!1),w)return I(),t&&e.onPaste(t),w=!1,"";var r=n.selectionStart,o=n.selectionEnd,a=k,l=C.length-$,c=t,u=t.length-r,h=t.length-o,d=0;while(a>0&&C[d]==t[d])d++,a--;c=c.slice(d),d=1;while(l>0&&C.length-d>k-1&&C[C.length-d]==t[t.length-d])d++,l--;u-=d-1,h-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!i&&!c&&!u&&!a&&!l&&!h)return"";_=!0;var p=!1;return s.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||S?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),_=!1,C=t,k=r,$=o,T=h,p?"\n":c},H=function(t){if(b)return Y();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var i=n.value,r=W(i,!0);(i.length>f+100||v.test(r)||y&&k<1&&k==$)&&I()},B=function(t,e,n){var i=t.clipboardData||window["clipboardData"];if(i&&!u){var r=h||n?"Text":"text/plain";try{return e?!1!==i.setData(r,e):i.getData(r)}catch(t){if(!n)return B(t,e,!0)}}},z=function(t,o){var s=e.getCopyText();if(!s)return r.preventDefault(t);B(t,s)?(m&&(I(s),i=s,setTimeout((function(){i=!1}),10)),o?e.onCut():e.onCopy(),r.preventDefault(t)):(i=!0,n.value=s,n.select(),setTimeout((function(){i=!1,I(),o?e.onCut():e.onCopy()})))},U=function(t){z(t,!0)},j=function(t){z(t,!1)},G=function(t){var i=B(t);c.pasteCancelled()||("string"==typeof i?(i&&e.onPaste(i,t),s.isIE&&setTimeout(I),r.preventDefault(t)):(n.value="",w=!0))};r.addCommandKeyListener(n,e.onCommandKey.bind(e),e),r.addListener(n,"select",P,e),r.addListener(n,"input",H,e),r.addListener(n,"cut",U,e),r.addListener(n,"copy",j,e),r.addListener(n,"paste",G,e),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(t,"keydown",(function(t){if((!s.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:j(t);break;case 86:G(t);break;case 88:U(t);break}}),e);var V=function(t){if(!b&&e.onCompositionStart&&!e.$readOnly&&(b={},!S)){t.data&&(b.useTextareaForIME=!1),setTimeout(Y,0),e._signal("compositionStart"),e.on("mousedown",K);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,e.onCompositionStart(b),b.useTextareaForIME?(C=n.value="",k=0,$=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}},Y=function(){if(b&&e.onCompositionUpdate&&!e.$readOnly){if(S)return K();if(b.useTextareaForIME)e.onCompositionUpdate(n.value);else{var t=n.value;W(t),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+$-b.selectionStart+T)}}},q=function(t){e.onCompositionEnd&&!e.$readOnly&&(b=!1,e.onCompositionEnd(),e.off("mousedown",K),t&&H())};function K(){A=!0,n.blur(),n.focus(),A=!1}var X,Q=l.delayedCall(Y,50).schedule.bind(null,null);function Z(t){27==t.keyCode&&n.value.length<n.selectionStart&&(b||(C=n.value),k=$=-1,I()),Q()}function J(){clearTimeout(X),X=setTimeout((function(){x&&(n.style.cssText=x,x=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",V,e),r.addListener(n,"compositionupdate",Y,e),r.addListener(n,"keyup",Z,e),r.addListener(n,"keydown",Q,e),r.addListener(n,"compositionend",q,e),this.getElement=function(){return n},this.setCommandMode=function(t){S=t,n.readOnly=!1},this.setReadOnly=function(t){S||(n.readOnly=t)},this.setCopyWithEmptySelection=function(t){},this.onContextMenu=function(t){F=!0,I(),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,i){x||(x=n.style.cssText),n.style.cssText=(i?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+$)*e.renderer.characterWidth*.5+"px;";var o=e.container.getBoundingClientRect(),l=a.computedStyle(e.container),c=o.top+(parseInt(l.borderTopWidth)||0),u=o.left+(parseInt(o.borderLeftWidth)||0),h=o.bottom-c-n.clientHeight-2,d=function(t){a.translate(n,t.clientX-u-2,Math.min(t.clientY-c-2,h))};d(t),"mousedown"==t.type&&(e.renderer.$isMousePressed=!0,clearTimeout(X),s.isWin&&r.capture(e.container,d,J))},this.onContextMenuClose=J;var tt=function(t){e.textInput.onContextMenu(t),J()};function et(t,e,n){var r=null,o=!1;n.addEventListener("keydown",(function(t){r&&clearTimeout(r),o=!0}),!0),n.addEventListener("keyup",(function(t){r=setTimeout((function(){o=!1}),100)}),!0);var s=function(t){if(document.activeElement===n&&!(o||b||e.$mouseHandler.isMousePressed)&&!i){var r=n.selectionStart,s=n.selectionEnd,a=null,l=0;if(0==r?a=p.up:1==r?a=p.home:s>$&&"\n"==C[s]?a=p.end:r<k&&" "==C[r-1]?(a=p.left,l=g.option):r<k||r==k&&$!=k&&r==s?a=p.left:s>$&&C.slice(0,s).split("\n").length>2?a=p.down:s>$&&" "==C[s-1]?(a=p.right,l=g.option):(s>$||s==$&&$!=k&&r==s)&&(a=p.right),r!==s&&(l|=g.shift),a){var c=e.onCommandKey({},l,a);if(!c&&e.commands){a=p.keyCodeToString(a);var u=e.commands.findKeyCommand(l,a);u&&e.execCommand(u)}k=r,$=s,I("")}}};document.addEventListener("selectionchange",s),e.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}r.addListener(n,"mouseup",tt,e),r.addListener(n,"mousedown",(function(t){t.preventDefault(),J()}),e),r.addListener(e.renderer.scroller,"contextmenu",tt,e),r.addListener(n,"contextmenu",tt,e),m&&et(t,e,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},e.TextInput=i,e.$setUserAgentForTests=function(t,e){y=t,m=e}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/useragent"),r=0,o=550,s=function(){function t(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach((function(e){t[e]=this[e]}),this),t["selectByLines"]=this.extendSelectionBy.bind(t,"getLineRange"),t["selectByWords"]=this.extendSelectionBy.bind(t,"getWordRange")}return t.prototype.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,o=t.getButton();if(0!==o){var s=r.getSelectionRange(),a=s.isEmpty();return(a||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))}return this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t))},t.prototype.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},t.prototype.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=l(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},t.prototype.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==o&&s<=0)e=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==s&&o>=0)e=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==s)i=r.end,e=r.start;else{var a=l(this.$clickSelection,i);i=a.cursor,e=a.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},t.prototype.focusWait=function(){var t=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),e=Date.now();(t>r||e-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},t.prototype.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session,r=i.getBracketRange(e);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},t.prototype.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},t.prototype.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},t.prototype.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,r=i-n.t,s=r?t.wheelX/r:n.vx,a=r?t.wheelY/r:n.vy;r<o&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var l=Math.abs(s/a),c=!1;if(l>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(c=!0),l<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowed<o){var u=Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy);u?(c=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=s,n.vy=a,c?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}},t}();function a(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}function l(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else if(t.start.row!=t.end.row-1||t.start.column||t.end.column)n=2*e.row-t.start.row-t.end.row;else var n=e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,e.DefaultHandlers=s})),ace.define("ace/lib/scroll",["require","exports","module"],(function(t,e,n){e.preventParentScroll=function(t){t.stopPropagation();var e=t.currentTarget,n=e.scrollHeight>e.clientHeight;n||t.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=t("./lib/dom"),s=(t("./lib/event"),t("./range").Range),a=t("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function t(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}return t.prototype.$init=function(){return this.$element=o.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(t){this.getElement().textContent=t},t.prototype.setHtml=function(t){this.getElement().innerHTML=t},t.prototype.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},t.prototype.setClassName=function(t){o.addCssClass(this.getElement(),t)},t.prototype.setTheme=function(t){this.$element.className=l+" "+(t.isDark?"ace_dark ":"")+(t.cssClass||"")},t.prototype.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(t){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t}(),u=function(){function t(){this.popups=[]}return t.prototype.addPopup=function(t){this.popups.push(t),this.updatePopups()},t.prototype.removePopup=function(t){var e=this.popups.indexOf(t);-1!==e&&(this.popups.splice(e,1),this.updatePopups())},t.prototype.updatePopups=function(){var t,e,n,i;this.popups.sort((function(t,e){return e.priority-t.priority}));var o=[];try{for(var s=r(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var u=(n=void 0,r(o)),h=u.next();!h.done;h=u.next()){var d=h.value;if(this.doPopupsOverlap(d,l)){c=!1;break}}}catch(f){n={error:f}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(p){t={error:p}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}},t.prototype.doPopupsOverlap=function(t,e){var n=t.getElement().getBoundingClientRect(),i=e.getElement().getBoundingClientRect();return n.left<i.right&&n.right>i.left&&n.top<i.bottom&&n.bottom>i.top},t}(),h=new u;e.popupManager=h,e.Tooltip=c;var d=function(t){function e(e){void 0===e&&(e=document.body);var n=t.call(this,e)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",a),n}return i(e,t),e.prototype.addToEditor=function(t){t.on("mousemove",this.onMouseMove),t.on("mousedown",this.hide),t.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},e.prototype.removeFromEditor=function(t){t.off("mousemove",this.onMouseMove),t.off("mousedown",this.hide),t.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e.prototype.onMouseMove=function(t,e){this.lastEvent=t,this.lastT=Date.now();var n=e.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=t,this.timeout=setTimeout(this.waitForHover,this.idleTime))},e.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var t=Date.now()-this.lastT;this.idleTime-t>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-t):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},e.prototype.isOutsideOfText=function(t){var e=t.editor,n=t.getDocumentPosition(),i=e.session.getLine(n.row);if(n.column==i.length){var r=e.renderer.pixelToScreenCoordinates(t.clientX,t.clientY),o=e.session.documentToScreenPosition(n.row,n.column);if(o.column!=r.column||o.row!=r.row)return!0}return!1},e.prototype.setDataProvider=function(t){this.$gatherData=t},e.prototype.showForRange=function(t,e,n,i){var r=10;if((!i||i==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var o=t.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(e,t.session),this.range=s.fromPoints(e.start,e.end);var a=o.textToScreenCoordinates(e.start.row,e.start.column),l=o.scroller.getBoundingClientRect();a.pageX<l.left&&(a.pageX=l.left);var c=this.getElement();c.innerHTML="",c.appendChild(n),c.style.maxHeight="",c.style.display="block";var u=c.clientHeight,d=c.clientWidth,f=window.innerHeight-a.pageY-o.lineHeight,p=!0;a.pageY-u<0&&a.pageY<f&&(p=!1),c.style.maxHeight=(p?a.pageY:f)-r+"px",c.style.top=p?"":a.pageY+o.lineHeight+"px",c.style.bottom=p?window.innerHeight-a.pageY+"px":"",c.style.left=Math.min(a.pageX,window.innerWidth-d-r)+"px"}},e.prototype.addMarker=function(t,e){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=e,this.marker=e&&e.addMarker(t,"ace_highlight-marker","text")},e.prototype.hide=function(t){(t||document.activeElement!=this.getElement())&&(t&&t.target&&("keydown"!=t.type||t.ctrlKey||t.metaKey)&&this.$element.contains(t.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this))))},e.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},e.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},e.prototype.onMouseOut=function(t){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&t.relatedTarget&&!this.getElement().contains(t.relatedTarget)&&(t&&t.currentTarget.contains(t.relatedTarget)||t.relatedTarget.classList.contains("ace_content")||this.hide())},e}(c);e.HoverTooltip=d})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o=t("../lib/dom"),s=t("../lib/event"),a=t("../tooltip").Tooltip,l=t("../config").nls;function c(t){var e,n,i=t.editor,r=i.renderer.$gutterLayer,a=new u(i);function l(){var e=n.getDocumentPosition().row,o=i.session.getLength();if(e==o){var s=i.renderer.pixelToScreenCoordinates(0,n.y).row,l=n.$pos;if(s>i.session.documentToScreenRow(l.row,l.column))return c()}if(a.showTooltip(e),a.isOpen)if(i.on("mousewheel",c),t.$tooltipFollowsMouse)h(n);else{var u=n.getGutterRow(),d=r.$lines.get(u);if(d){var f=d.element.querySelector(".ace_gutter_annotation"),p=f.getBoundingClientRect(),g=a.getElement().style;g.left=p.right+"px",g.top=p.bottom+"px"}else h(n)}}function c(){e&&(e=clearTimeout(e)),a.isOpen&&(a.hideTooltip(),i.off("mousewheel",c))}function h(t){a.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(e){if(i.isFocused()&&0==e.getButton()){var n=r.getRegion(e);if("foldWidgets"!=n){var o=e.getDocumentPosition().row,s=i.session.selection;if(e.getShiftKey())s.selectTo(o,0);else{if(2==e.domEvent.detail)return i.selectAll(),e.preventDefault();t.$clickSelection=i.selection.getLineRange(o)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}})),t.editor.setDefaultHandler("guttermousemove",(function(i){var r=i.domEvent.target||i.domEvent.srcElement;if(o.hasCssClass(r,"ace_fold-widget"))return c();a.isOpen&&t.$tooltipFollowsMouse&&h(i),n=i,e||(e=setTimeout((function(){e=null,n&&!t.isMousePressed?l():c()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(t){n=null,a.isOpen&&!e&&(e=setTimeout((function(){e=null,c()}),50))}),i),i.on("changeSession",c),i.on("input",c)}e.GutterHandler=c;var u=function(t){function e(e){var n=t.call(this,e.container)||this;return n.editor=e,n}return i(e,t),e.prototype.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,e+=15,t+r>n&&(t-=t+r-n),e+o>i&&(e-=20+o),a.prototype.setPosition.call(this,t,e)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(t){var n,i=this.editor.renderer.$gutterLayer,r=i.$annotations[t];n=r?{text:Array.from(r.text),type:Array.from(r.type)}:{text:[],type:[]};var o=i.session.getFoldLine(t);if(o&&i.$showFoldedAnnotations){for(var s,a={error:[],warning:[],info:[]},l=t+1;l<=o.end.row;l++)if(i.$annotations[l])for(var c=0;c<i.$annotations[l].text.length;c++){var u=i.$annotations[l].type[c];a[u].push(i.$annotations[l].text[c]),"error"!==u?"warning"!==u||(s="warning_fold"):s="error_fold"}if("error_fold"===s||"warning_fold"===s){var h="".concat(e.annotationsToSummaryString(a)," in folded code.");n.text.push(h),n.type.push(s)}}if(0===n.text.length)return this.hide();var d={error:[],warning:[],info:[]},f=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(l=0;l<n.text.length;l++){var p="<span class='ace_".concat(n.type[l]," ").concat(f,"' aria-label='").concat(e.annotationLabels[n.type[l].replace("_fold","")].singular,"' role=img> </span> ").concat(n.text[l]);d[n.type[l].replace("_fold","")].push(p)}var g=[].concat(d.error,d.warning,d.info).join("<br>");this.setHtml(g),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)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(t){var n,i,o=[],s=["error","warning","info"];try{for(var a=r(s),l=a.next();!l.done;l=a.next()){var c=l.value;if(t[c].length){var u=1===t[c].length?e.annotationLabels[c].singular:e.annotationLabels[c].plural;o.push("".concat(t[c].length," ").concat(u))}}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o.join(", ")},e}(a);e.GutterTooltip=u})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=function(){function t(t,e){this.speed,this.wheelX,this.wheelY,this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return t.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},t.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},t.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},t.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},t.prototype.getGutterRow=function(){var t=this.getDocumentPosition().row,e=this.editor.session.documentToScreenRow(t,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return e-n},t.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor,e=t.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=e.contains(n.row,n.column)}return this.$inSelection},t.prototype.getButton=function(){return i.getButton(this.domEvent)},t.prototype.getShiftKey=function(){return this.domEvent.shiftKey},t.prototype.getAccelKey=function(){return r.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},t}();e.MouseEvent=o})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/event"),o=t("../lib/useragent"),s=200,a=200,l=5;function c(t){var e=t.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(e){t[e]=this[e]}),this),e.on("mousedown",this.onMouseDown.bind(t));var h,d,f,p,g,m,v,y,w,b,_,x=e.container,S=0;function A(t,n){var i=Date.now(),r=!n||t.row!=n.row,o=!n||t.column!=n.column;if(!b||r||o)e.moveCursorToPosition(t),b=i,_={x:d,y:f};else{var s=u(_.x,_.y,d,f);s>l?b=null:i-b>=a&&(e.renderer.scrollCursorIntoView(),b=null)}}function C(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,o=e.renderer.layerConfig.characterWidth,a=e.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:f-a.top,bottom:a.bottom-f}},c=Math.min(l.x.left,l.x.right),u=Math.min(l.y.top,l.y.bottom),h={row:t.row,column:t.column};c/o<=2&&(h.column+=l.x.left<l.x.right?-3:2),u/r<=1&&(h.row+=l.y.top<l.y.bottom?-1:1);var p=t.row!=h.row,g=t.column!=h.column,m=!n||t.row!=n.row;p||g&&!m?w?i-w>=s&&e.renderer.scrollCursorIntoView(h):w=i:w=null}function k(){var t=m;m=e.renderer.screenToTextCoordinates(d,f),A(m,t),C(m,t)}function $(){g=e.selection.toOrientedRange(),h=e.session.addMarker(g,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(p),k(),p=setInterval(k,20),S=0,r.addListener(document,"mousemove",R)}function T(){clearInterval(p),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(g),e.isFocused()&&!y&&e.$resetCursorStyle(),g=null,m=null,S=0,w=null,b=null,r.removeListener(document,"mousemove",R)}this.onDragStart=function(t){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(t)}),0),t.preventDefault()}g=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){e.container.removeChild(n)})),r.clearData(),r.setData("Text",e.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(t){if(x.draggable=!1,y=!1,this.setState(null),!e.getReadOnly()){var n=t.dataTransfer.dropEffect;v||"move"!=n||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,h||$(),S++,t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,f=t.clientY,h||($(),S++),null!==L&&(L=null),t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragLeave=function(t){if(S--,S<=0&&h)return T(),v=null,r.preventDefault(t)},this.onDrop=function(t){if(m){var n=t.dataTransfer;if(y)switch(v){case"move":g=g.contains(m.row,m.column)?{start:m,end:m}:e.moveText(g,m);break;case"copy":g=e.moveText(g,m,!0);break}else{var i=n.getData("Text");g={start:m,end:e.session.insert(m,i)},e.focus(),v=null}return T(),r.preventDefault(t)}},r.addListener(x,"dragstart",this.onDragStart.bind(t),e),r.addListener(x,"dragend",this.onDragEnd.bind(t),e),r.addListener(x,"dragenter",this.onDragEnter.bind(t),e),r.addListener(x,"dragover",this.onDragOver.bind(t),e),r.addListener(x,"dragleave",this.onDragLeave.bind(t),e),r.addListener(x,"drop",this.onDrop.bind(t),e);var L=null;function R(){null==L&&(L=setTimeout((function(){null!=L&&h&&T()}),20))}function E(t){var e=t.types;return!e||Array.prototype.some.call(e,(function(t){return"text/plain"==t||"Text"==t}))}function M(t){var e=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=o.isMac?t.altKey:t.ctrlKey,r="uninitialized";try{r=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var s="none";return i&&e.indexOf(r)>=0?s="copy":n.indexOf(r)>=0?s="move":e.indexOf(r)>=0&&(s="copy"),s}}function u(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var n=o.isWin?"default":"move";t.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(o.isIE&&"dragReady"==this.state){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if("dragWait"===this.state){n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton(),r=t.domEvent.detail||1;if(1===r&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),e.getDragDelay()){if(o.isWebKit){this.cancelDrag=!0;var a=e.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(c.prototype),e.DragdropHandler=c})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./mouse_event").MouseEvent,r=t("../lib/event"),o=t("../lib/dom");e.addTouchListeners=function(t,e){var n,s,a,l,c,u,h,d,f,p="scroll",g=0,m=0,v=0,y=0;function w(){var t=window.navigator&&window.navigator.clipboard,n=!1,i=function(){var i=e.getCopyText(),r=e.session.getUndoManager().hasUndo();f.replaceChild(o.buildDom(n?["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"],t&&["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"]),f.firstChild)},r=function(r){var o=r.target.getAttribute("action");if("more"==o||!n)return n=!n,i();"paste"==o?t.readText().then((function(t){e.execCommand(o,t)})):o&&("cut"!=o&&"copy"!=o||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(o)),f.firstChild.style.display="none",n=!1,"openCommandPalette"!=o&&e.focus()};f=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),r(t)},onclick:r},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container)}function b(){f||w();var t=e.selection.cursor,n=e.renderer.textToScreenCoordinates(t.row,t.column),i=e.renderer.textToScreenCoordinates(0,0).pageX,r=e.renderer.scrollLeft,o=e.container.getBoundingClientRect();f.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(f.style.left="",f.style.right="10px"):(f.style.right="",f.style.left=i+r-o.left+"px"),f.style.display="",f.firstChild.style.display="none",e.on("input",_)}function _(t){f&&(f.style.display="none"),e.off("input",_)}function x(){c=null,clearTimeout(c);var t=e.selection.getRange(),n=t.contains(h.row,h.column);!t.isEmpty()&&n||(e.selection.moveToPosition(h),e.selection.selectWord()),p="wait",b()}function S(){c=null,clearTimeout(c),e.selection.moveToPosition(h);var t=m>=2?e.selection.getLineRange(h.row):e.session.getBracketRange(h);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}function A(){g+=60,u=setInterval((function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*y),t==e.session.getScrollTop()&&(g=0)}),10)}r.addListener(t,"contextmenu",(function(t){if(d){var n=e.textInput.getElement();n.focus()}}),e),r.addListener(t,"touchstart",(function(t){var r=t.touches;if(c||r.length>1)return clearTimeout(c),c=null,a=-1,void(p="zoom");d=e.$mouseHandler.isMousePressed=!0;var o=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,f=t.timeStamp;l=f;var w=r[0],b=w.clientX,_=w.clientY;Math.abs(n-b)+Math.abs(s-_)>o&&(a=-1),n=t.clientX=b,s=t.clientY=_,v=y=0;var A=new i(t,e);if(h=A.getDocumentPosition(),f-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,S();else{m=0;var C=e.selection.cursor,k=e.selection.isEmpty()?C:e.selection.anchor,$=e.renderer.$cursorLayer.getPixelPosition(C,!0),T=e.renderer.$cursorLayer.getPixelPosition(k,!0),L=e.renderer.scroller.getBoundingClientRect(),R=e.renderer.layerConfig.offset,E=e.renderer.scrollLeft,M=function(t,e){return t/=u,e=e/o-.75,t*t+e*e};if(t.clientX<L.left)return void(p="zoom");var D=M(t.clientX-L.left-$.left+E,t.clientY-L.top-$.top+R),I=M(t.clientX-L.left-T.left+E,t.clientY-L.top-T.top+R);D<3.5&&I<3.5&&(p=D>I?"cursor":"anchor"),p=I<3.5?"anchor":D<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=f}),e),r.addListener(t,"touchend",(function(t){d=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==p?(A(),_()):b(),clearTimeout(c),c=null}),e),r.addListener(t,"touchmove",(function(t){c&&(clearTimeout(c),c=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==p){if(!(a*a+u*u>4))return t.preventDefault();p="cursor"}n=o.clientX,s=o.clientY,t.clientX=o.clientX,t.clientY=o.clientY;var h=t.timeStamp,d=h-l;if(l=h,"scroll"==p){var f=new i(t,e);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)<Math.abs(u)&&(a=0),10*Math.abs(u)<Math.abs(a)&&(u=0),0!=d&&(v=a/d,y=u/d),e._emit("mousewheel",f),f.propagationStopped||(v=y=0)}else{var g=new i(t,e),m=g.getDocumentPosition();"cursor"==p?e.selection.moveCursorToPosition(m):"anchor"==p&&e.selection.setSelectionAnchor(m.row,m.column),e.renderer.scrollCursorIntoView(m),t.preventDefault()}}}),e)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),o=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,a=t("./mouse_event").MouseEvent,l=t("./dragdrop_handler").DragdropHandler,c=t("./touch_handler").addTouchListeners,u=t("../config"),h=function(){function t(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var e=this;this.editor=t,new o(this),new s(this),new l(this);var n=function(e){var n=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());n&&window.focus(),t.focus(),setTimeout((function(){t.isFocused()||t.focus()}))},a=t.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),t),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),i.addMultiMouseDownListener([a,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),i.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),c(t.container,t);var u=t.renderer.$gutter;i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),t),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),i.addListener(a,"mousedown",n,t),i.addListener(u,"mousedown",n,t),r.isIE&&t.renderer.scrollBarV&&(i.addListener(t.renderer.scrollBarV.element,"mousedown",n,t),i.addListener(t.renderer.scrollBarH.element,"mousedown",n,t)),t.on("mousemove",(function(n){if(!e.state&&!e.$dragDelay&&e.$dragEnabled){var i=t.renderer.screenToTextCoordinates(n.x,n.y),r=t.session.selection.getRange(),o=t.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}),t)}return t.prototype.onMouseEvent=function(t,e){this.editor.session&&this.editor._emit(t,new a(e,this.editor))},t.prototype.onMouseMove=function(t,e){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(t,new a(e,this.editor))},t.prototype.onMouseWheel=function(t,e){var n=new a(e,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=e.wheelX,n.wheelY=e.wheelY,this.editor._emit(t,n)},t.prototype.setState=function(t){this.state=t},t.prototype.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var s=this,l=function(t){if(t){if(r.isWebKit&&!t.which&&s.releaseMouse)return s.releaseMouse();s.x=t.clientX,s.y=t.clientY,e&&e(t),s.mouseEvent=new a(t,s.editor),s.$mouseMoved=!0}},c=function(t){n.off("beforeEndOperation",h),clearInterval(d),n.session&&u(),s[s.state+"End"]&&s[s.state+"End"](t),s.state="",s.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,t&&s.onMouseEvent("mouseup",t),n.endOperation()},u=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){c(t)}));var h=function(t){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(u,20)},t.prototype.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&i.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},t.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},t}();h.prototype.releaseMouse=null,u.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),e.MouseHandler=h})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t){t.on("click",(function(e){var n=e.getDocumentPosition(),r=t.session,o=r.getFoldAt(n.row,n.column,1);o&&(e.getAccelKey()?r.removeFold(o):r.expandFold(o),e.stop());var s=e.domEvent&&e.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),t.renderer.scrollCursorIntoView())})),t.on("gutterclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session;r.foldWidgets&&r.foldWidgets[i]&&t.session.onFoldWidgetClick(i,e),t.isFocused()||t.focus(),e.stop()}})),t.on("gutterdblclick",(function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session,o=r.getParentFoldRangeData(i,!0),s=o.range||o.firstRange;if(s){i=s.start.row;var a=r.getFoldAt(i,r.getLine(i).length,1);a?r.removeFold(a):(r.addFold("...",s),t.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}e.stop()}}))}return t}();e.FoldHandler=r})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/event"),o=function(){function t(t){this.$editor=t,this.$data={editor:t},this.$handlers=[],this.setDefaultHandler(t.commands)}return t.prototype.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0)},t.prototype.setKeyboardHandler=function(t){var e=this.$handlers;if(e[e.length-1]!=t){while(e[e.length-1]&&e[e.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(t,1)}},t.prototype.addKeyboardHandler=function(t,e){if(t){"function"!=typeof t||t.handleKeyboard||(t.handleKeyboard=t);var n=this.$handlers.indexOf(t);-1!=n&&this.$handlers.splice(n,1),void 0==e?this.$handlers.push(t):this.$handlers.splice(e,0,t),-1==n&&t.attach&&t.attach(this.$editor)}},t.prototype.removeKeyboardHandler=function(t){var e=this.$handlers.indexOf(t);return-1!=e&&(this.$handlers.splice(e,1),t.detach&&t.detach(this.$editor),!0)},t.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},t.prototype.getStatusText=function(){var t=this.$data,e=t.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(e,t)||""})).filter(Boolean).join(" ")},t.prototype.$callKeyboardHandlers=function(t,e,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(o=this.$handlers[l].handleKeyboard(this.$data,t,e,n,i),o&&o.command&&(s="null"==o.command||a.exec(o.command,this.$editor,o.args,i),s&&i&&-1!=t&&1!=o["passEvent"]&&1!=o.command["passEvent"]&&r.stopEvent(i),s))break;return s||-1!=t||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,e)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},t.prototype.onCommandKey=function(t,e,n){var r=i.keyCodeToString(n);return this.$callKeyboardHandlers(e,r,n,t)},t.prototype.onTextInput=function(t){return this.$callKeyboardHandlers(-1,t)},t}();e.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(t,e,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,h=1,d=0,f=1,p=2,g=3,m=4,v=5,y=6,w=7,b=8,_=9,x=10,S=11,A=12,C=13,k=14,$=15,T=16,L=17,R=18,E=[R,R,R,R,R,R,R,R,R,y,v,y,b,v,R,R,R,R,R,R,R,R,R,R,R,R,R,R,v,v,v,y,b,m,m,S,S,S,m,m,m,m,m,x,_,x,_,_,p,p,p,p,p,p,p,p,p,p,_,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,R,R,R,R,R,R,v,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,_,m,S,S,S,S,m,m,m,m,d,m,m,R,m,m,S,S,p,p,m,d,m,m,m,p,d,m,m,m,m,m],M=[b,b,b,b,b,b,b,b,b,b,b,R,R,R,d,f,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,v,C,k,$,T,L,_,S,S,S,S,S,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,_,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function D(t,e,n,u){var h=i?c:l,d=null,f=null,p=null,g=0,m=null,w=null,_=-1,x=null,S=null,A=[];if(!u)for(x=0,u=[];x<n;x++)u[x]=P(t[x]);for(r=i,o=!1,!1,s=!1,a=!1,S=0;S<n;S++){if(d=g,A[S]=f=O(t,u,A,S),g=h[d][f],m=240&g,g&=15,e[S]=p=h[g][5],m>0)if(16==m){for(x=_;x<S;x++)e[x]=1;_=-1}else _=-1;if(w=h[g][6],w)-1==_&&(_=S);else if(_>-1){for(x=_;x<S;x++)e[x]=p;_=-1}u[S]==v&&(e[S]=0),r|=p}if(a)for(x=0;x<n;x++)if(u[x]==y){e[x]=i;for(var C=x-1;C>=0;C--){if(u[C]!=b)break;e[C]=i}}}function I(t,e,n){if(!(r<t))if(1!=t||i!=h||s){var o,a,l,c,u=n.length,d=0;while(d<u){if(e[d]>=t){o=d+1;while(o<u&&e[o]>=t)o++;for(a=d,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=o}d++}}else n.reverse()}function O(t,e,n,r){var l,c,u,h,E=e[r];switch(E){case d:case f:o=!1;case m:case g:return E;case p:return o?g:p;case w:return o=!0,!0,f;case b:return m;case _:return r<1||r+1>=e.length||(l=n[r-1])!=p&&l!=g||(c=e[r+1])!=p&&c!=g?m:(o&&(c=g),c==l?c:m);case x:return l=r>0?n[r-1]:v,l==p&&r+1<e.length&&e[r+1]==p?p:m;case S:if(r>0&&n[r-1]==p)return p;if(o)return m;h=r+1,u=e.length;while(h<u&&e[h]==S)h++;return h<u&&e[h]==p?p:m;case A:u=e.length,h=r+1;while(h<u&&e[h]==A)h++;if(h<u){var M=t[r],D=M>=1425&&M<=2303||64286==M;if(l=e[h],D&&(l==f||l==w))return f}return r<1||(l=e[r-1])==v?m:n[r-1];case v:return o=!1,s=!0,i;case y:return a=!0,m;case C:case k:case T:case L:case $:o=!1;case R:return m}}function P(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?d:E[e]:5==n?/[\u0591-\u05f4]/.test(t)?f:d:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?A:/[\u0660-\u0669\u066b-\u066c]/.test(t)?g:1642==e?S:/[\u06f0-\u06f9]/.test(t)?p:w:32==n&&e<=8287?M[255&e]:254==n&&e>=65136?w:m}e.L=d,e.R=f,e.EN=p,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="·",e.doBidiReorder=function(t,n,r){if(t.length<2)return{};var o=t.split(""),s=new Array(o.length),a=new Array(o.length),l=[];i=r?h:u,D(o,l,o.length,n);for(var c=0;c<s.length;s[c]=c,c++);I(2,l,s),I(1,l,s);for(c=0;c<s.length-1;c++)n[c]===g?l[c]=e.AN:l[c]===f&&(n[c]>w&&n[c]<C||n[c]===m||n[c]===R)?l[c]=e.ON_R:c>0&&"ل"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=e.R_H,c++);o[o.length-1]===e.DOT&&(l[o.length-1]=e.B),"‫"===o[0]&&(l[0]=e.RLE);for(c=0;c<s.length;c++)a[c]=l[s[c]];return{logicalFromVisual:s,bidiLevels:a}},e.hasBidiCharacters=function(t,e){for(var n=!1,i=0;i<t.length;i++)e[i]=P(t.charAt(i)),n||e[i]!=f&&e[i]!=w&&e[i]!=g||(n=!0);return n},e.getVisualFromLogicalIdx=function(t,e){for(var n=0;n<e.logicalFromVisual.length;n++)if(e.logicalFromVisual[n]==t)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(t,e,n){"use strict";var i=t("./lib/bidiutil"),r=t("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function t(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(t.getValue())}return t.prototype.isBidiRow=function(t,e,n){return!!this.seenBidi&&(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(e,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},t.prototype.onChange=function(t){this.seenBidi?this.currentRow=null:"insert"==t.action&&o.test(t.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},t.prototype.getDocumentRow=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n=this.session.$getRowCacheIndex(e,this.currentRow);n>=0&&(t=this.session.$docRowCache[n])}return t},t.prototype.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var n,i=this.session.$getRowCacheIndex(e,this.currentRow);while(this.currentRow-t>0){if(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1),n!==i)break;i=n,t++}}else t=this.currentRow;return t},t.prototype.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1,o=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=e<s.length?this.line.substring(s[e-1],s[e]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[e]),e==s.length&&(this.line+=this.showInvisibles?o:i.DOT))}else this.line+=this.showInvisibles?o:i.DOT;var a,l=this.session,c=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(t,e){return"\t"===t||l.isFullWidth(t.charCodeAt(0))?(a="\t"===t?l.getScreenTabSize(e+c):2,c+=a-1,r.stringRepeat(i.DOT,a)):t})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},t.prototype.updateBidiMap=function(){var t=[];i.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},t.prototype.markAsDirty=function(){this.currentRow=null},t.prototype.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var e=this.characterWidth=t.$characterSize.width,n=t.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=e,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},t.prototype.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},t.prototype.setEolChar=function(t){this.EOL=t},t.prototype.setContentWidth=function(t){this.contentWidth=t},t.prototype.isRtlLine=function(t){return!!this.$isRtl||(void 0!=t?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir)},t.prototype.setRtlDirection=function(t,e){for(var n=t.getCursorPosition(),i=t.selection.getSelectionAnchor().row;i<=n.row;i++)e||t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE?e&&t.session.getLine(i).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:i},t.session.$bidiHandler.RLE):t.session.doc.removeInLine(i,0,1)},t.prototype.getPosLeft=function(t){t-=this.wrapIndent;var e=this.line.charAt(0)===this.RLE?1:0,n=t>e?this.session.getOverwrite()?t:t-1:e,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&t<=e&&o[r]%2!==0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&t>e&&o[r]%2===0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},t.prototype.getSelections=function(t,e){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(t,e)-this.wrapIndent,l=Math.max(t,e)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f<r.length;f++)d=i.logicalFromVisual[f],n=r[f],c=d>=a&&d<l,c&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&f===r.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var p=0;p<o.length;p++)o[p].left+=this.rtlLineOffset;return o},t.prototype.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var e=0,n=(t=Math.max(t,0),0),i=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[i]];this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);while(t>n+o/2){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!==0&&r[i]%2===0?(t<n&&i--,e=this.bidiMap.logicalFromVisual[i]):i>0&&r[i-1]%2===0&&r[i]%2!==0?e=1+(t>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2===0||!this.isRtlDir&&0===i&&r[i]%2!==0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!==0&&0!==o&&i--,e=this.bidiMap.logicalFromVisual[i]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent},t}();e.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=function(){function t(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",(function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)})),this.anchor.on("change",(function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")}))}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},t.prototype.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?s.fromPoints(e,e):this.isBackwards()?s.fromPoints(e,t):s.fromPoints(t,e)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(t,e){var n=e?t.end:t.start,i=e?t.start:t.end;this.$setSelection(n.row,n.column,i.row,i.column)},t.prototype.$setSelection=function(t,e,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},t.prototype.selectTo=function(t,e){this.$moveSelection((function(){this.moveCursorTo(t,e)}))},t.prototype.selectToPosition=function(t){this.$moveSelection((function(){this.moveCursorToPosition(t)}))},t.prototype.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},t.prototype.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(t,e){if("undefined"==typeof e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},t.prototype.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===e?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},t.prototype.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();e=this.lead;this.wouldMoveIntoSoftTab(e,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},t.prototype.moveCursorLineStart=function(){var t=this.lead.row,e=this.lead.column,n=this.session.documentToScreenRow(t,e),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(t,null,i.row,i.column),o=r.match(/^\s*/);o[0].length==e||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},t.prototype.moveCursorLineEnd=function(){var t=this.lead,e=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==e.column){var n=this.session.getLine(e.row);if(e.column==n.length){var i=n.search(/\s+$/);i>0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},t.prototype.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length)return this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(e+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)}},t.prototype.moveCursorLongWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))this.moveCursorTo(t.start.row,t.start.column);else{var i=this.session.getFoldStringAt(e,n,-1);null==i&&(i=this.doc.getLine(e).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(e>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},t.prototype.$shortWordEndIndex=function(t){var e,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{while((e=t[n])&&i.test(e))n++;if(n<1){r.lastIndex=0;while((e=t[n])&&!r.test(e))if(r.lastIndex=0,n++,i.test(e)){if(n>2){n--;break}while((e=t[n])&&i.test(e))n++;if(n>2)break}}}return r.lastIndex=0,n},t.prototype.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var o=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),e=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(t,e+s)},t.prototype.moveCursorShortWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var i=this.session.getLine(e).substring(0,n);if(0===n){do{e--,i=this.doc.getLine(e)}while(e>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(e,n-s)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(t,e){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+t,i.column,n);0!==t&&0===e&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+e,0===e)},t.prototype.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},t.prototype.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},t.prototype.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return s.fromPoints(e,n)}catch(i){return s.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},t.prototype.toJSON=function(){if(this.rangeCount)var t=this.ranges.map((function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e}));else{t=this.getRange();t.isBackwards=this.isBackwards()}return t},t.prototype.fromJSON=function(t){if(void 0==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=s.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},t.prototype.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0},t}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,i.implement(a.prototype,o),e.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(t,e,n){"use strict";var i=t("./lib/report_error").reportError,r=2e3,o=function(){function t(t){for(var e in this.splitRegex,this.states=t,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[e],i=[],r=0,o=this.matchMappings[e]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var u=c.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==h?c.token=c.token[0]:h-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:h-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=h>1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(t,e){return"\\"+(parseInt(e,10)+r+1)})):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach((function(t){t.splitRegex=this.createSplitterRegexp(t.regex,s)}),this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",s)}}return t.prototype.$setMaxTokenCount=function(t){r=0|t},t.prototype.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"===typeof n)return[{type:n,value:t}];for(var i=[],r=0,o=n.length;r<o;r++)e[r]&&(i[i.length]={type:n[r],value:e[r]});return i},t.prototype.$arrayTokens=function(t){if(!t)return[];var e=this.splitRegex.exec(t);if(!e)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)e[r+1]&&(n[n.length]={type:i[r],value:e[r+1]});return n},t.prototype.removeCapturingGroups=function(t){var e=t.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(t,e){return e?"(?:":t}));return e},t.prototype.createSplitterRegexp=function(t,e){if(-1!=t.indexOf("(?=")){var n=0,i=!1,r={};t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(t,e,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),t})),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))}return"^"!=t.charAt(0)&&(t="^"+t),"$"!=t.charAt(t.length-1)&&(t+="$"),new RegExp(t,(e||"").replace("g",""))},t.prototype.getLineTokens=function(t,e){if(e&&"string"!=typeof e){var n=e.slice(0);e=n[0],"#tmp"===e&&(n.shift(),e=n.shift())}else n=[];var i=e||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;var l,c=[],u=0,h=0,d={type:null,value:""};while(l=a.exec(t)){var f=s.defaultToken,p=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=t.substring(u,m-g.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){p=o[s[y]],f=p.onMatch?p.onMatch(g,i,n,t):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),o=this.states[i],o||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,a=this.regExps[i],a.lastIndex=m),p.consumeLineEnd&&(u=m);break}if(g)if("string"===typeof f)p&&!1===p.merge||d.type!==f?(d.type&&c.push(d),d={type:f,value:g}):d.value+=g;else if(f){d.type&&c.push(d),d={type:null,value:""};for(y=0;y<f.length;y++)c.push(f[y])}if(u==t.length)break;if(u=m,h++>r){h>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});while(u<t.length)d.type&&c.push(d),d={value:t.substring(u,u+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},t}();o.prototype.reportError=i,e.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(t,e,n){"use strict";var i,r=t("../lib/deep_copy").deepCopy;i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(e)&&(o.next=e+o.next),o.nextState&&0!==o.nextState.indexOf(e)&&(o.nextState=e+o.nextState))}this.$rules[e+n]=i}else for(var n in t)this.$rules[n]=t[n]},this.getRules=function(){return this.$rules},this.embedRules=function(t,e,n,i,o){var s="function"==typeof t?(new t).getRules():t;if(i)for(var a=0;a<i.length;a++)i[a]=e+i[a];else for(var l in i=[],s)i.push(e+l);if(this.addRules(s,e),n){var c=Array.prototype[o?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],r(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var t=function(t,e){return("start"!=t||e.length)&&e.unshift(this.nextState,t),this.nextState},e=function(t,e){return e.shift(),e.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;function r(o){var s=i[o];s["processed"]=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var u=l.next||l.push;if(u&&Array.isArray(u)){var h=l.stateName;h||(h=l.token,"string"!=typeof h&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,l.next=h,r(h)}else"pop"==u&&(l.next=e);if(l.push&&(l.nextState=l.next||l.push,l.next=t,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var f="string"==typeof l?l:l.include;if(f&&("$self"===f&&(f="start"),c=Array.isArray(f)?f.map((function(t){return i[t]})):i[f]),c){var p=[a,1].concat(c);l.noEscape&&(p=p.filter((function(t){return!t.next}))),s.splice.apply(s,p),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(r,this)},this.createKeywordMapper=function(t,e,n,i){var r=Object.create(null);return this.$keywordList=[],Object.keys(t).forEach((function(e){for(var o=t[e],s=o.split(i||"|"),a=s.length;a--;){var l=s[a];this.$keywordList.push(l),n&&(l=l.toLowerCase()),r[l]=e}}),this),t=null,n?function(t){return r[t.toLowerCase()]||e}:function(t){return r[t]||e}},this.getKeywords=function(){return this.$keywords}}.call(i.prototype),e.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(t,e,n){"use strict";var i;i=function(){this.$behaviours={}},function(){this.add=function(t,e,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][e]=n},this.addBehaviours=function(t){for(var e in t)for(var n in t[e])this.add(e,n,t[e][n])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,e){if("function"===typeof t)var n=(new t).getBehaviours(e);else n=t.getBehaviours(e);this.addBehaviours(n)},this.getBehaviours=function(t){if(t){for(var e={},n=0;n<t.length;n++)this.$behaviours[t[n]]&&(e[t[n]]=this.$behaviours[t[n]]);return e}return this.$behaviours}}.call(i.prototype),e.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=function(){function t(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var i=t.getTokenAt(e,n);this.$tokenIndex=i?i.index:-1}return t.prototype.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},t.prototype.stepForward=function(){var t;this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},t.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},t.prototype.getCurrentTokenRow=function(){return this.$row},t.prototype.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;n=0;while(e>0)e-=1,n+=t[e].value.length;return n},t.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},t.prototype.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new i(this.$row,e,this.$row,e+t.value.length)},t}();e.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(t,e,n){"use strict";var i,r,o=t("../../lib/oop"),s=t("../behaviour").Behaviour,a=t("../../token_iterator").TokenIterator,l=t("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},d={'"':'"',"'":"'"},f=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,h.rangeCount!=t.multiSelect.rangeCount&&(h={rangeCount:t.multiSelect.rangeCount})),h[e])return i=h[e];i=h[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(t,e,n,i){var r=t.end.row-t.start.row;return{text:n+e+i,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}};r=function(t){t=t||{},this.add("braces","insertion",(function(e,n,o,s,a){var c=o.getCursorPosition(),u=s.doc.getLine(c.row);if("{"==a){f(o);var h=o.getSelectionRange(),d=s.doc.getTextRange(h);if(""!==d&&"{"!==d&&o.getWrapBehavioursEnabled())return p(h,d,"{","}");if(r.isSaneInsertion(o,s))return/[\]\}\)]/.test(u[c.column])||o.inMultiSelectMode||t.braces?(r.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}):(r.recordMaybeInsert(o,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){f(o);var g=u.substring(c.column,c.column+1);if("}"==g){var m=s.$findOpeningBracket("}",{column:c.column+1,row:c.row});if(null!==m&&r.isAutoInsertedClosing(c,u,a))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){f(o);var v="";r.isMaybeInsertedClosing(c,u)&&(v=l.stringRepeat("}",i.maybeInsertedBrackets),r.clearMaybeInsertedClosing());g=u.substring(c.column,c.column+1);if("}"===g){var y=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!y)return null;var w=this.$getIndent(s.getLine(y.row))}else{if(!v)return void r.clearMaybeInsertedClosing();w=this.$getIndent(u)}var b=w+s.getTabString();return{text:"\n"+b+"\n"+w+v,selection:[1,b.length,1,b.length]}}r.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){f(n);var a=r.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,e,n,i,o){if("("==o){f(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return p(s,a,"(",")");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){f(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),u=c.substring(l.column,l.column+1);if(")"==u){var h=i.$findOpeningBracket(")",{column:l.column+1,row:l.row});if(null!==h&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if(")"==a)return r.end.column++,r}})),this.add("brackets","insertion",(function(t,e,n,i,o){if("["==o){f(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return p(s,a,"[","]");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){f(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),u=c.substring(l.column,l.column+1);if("]"==u){var h=i.$findOpeningBracket("]",{column:l.column+1,row:l.row});if(null!==h&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(t,e,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o){f(n);var s=i.doc.getLine(r.start.row),a=s.substring(r.start.column+1,r.start.column+2);if("]"==a)return r.end.column++,r}})),this.add("string_dquotes","insertion",(function(t,e,n,i,r){var o=i.$mode.$quotes||d;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;f(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return p(a,l,s,s);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),h=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==h&&m&&/escape/.test(m.type))return null;var y,w=m&&/string|escape/.test(m.type),b=!v||/string|escape/.test(v.type);if(g==s)y=w!==b,y&&/string\.end/.test(v.type)&&(y=!1);else{if(w&&!b)return null;if(w&&b)return null;var _=i.$mode.tokenRe;_.lastIndex=0;var x=_.test(h);_.lastIndex=0;var S=_.test(g),A=i.$mode.$pairQuotesAfter,C=A&&A[s]&&A[s].test(h);if(!C&&x||S)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var k=u[c.column-2];if(h==s&&(k==s||_.test(k)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,e,n,i,r){var o=i.$mode.$quotes||d,s=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(s)){f(n);var a=i.doc.getLine(r.start.row),l=a.substring(r.start.column+1,r.start.column+2);if(l==s)return r.end.column++,r}})),!1!==t.closeDocComment&&this.add("doc comment end","insertion",(function(t,e,n,i,r){if("doc-start"===t&&("\n"===r||"\r\n"===r)&&n.selection.isEmpty()){var o=n.getCursorPosition(),s=i.doc.getLine(o.row),a=i.doc.getLine(o.row+1),l=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:r+l+"* ",selection:[1,3+l.length,1,3+l.length]}:{text:r+l+" * ",selection:[1,3+l.length,1,3+l.length]};if(/\/\*\*/.test(s.substring(0,o.column)))return{text:r+l+" * "+r+" "+l+"*/",selection:[1,4+l.length,1,4+l.length]}}}))},r.isSaneInsertion=function(t,e){var n=t.getCursorPosition(),i=new a(e,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(t.session.getLine(n.row)[n.column]))return!0;var r=new a(e,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",u)},r["$matchTokenType"]=function(t,e){return e.indexOf(t.type||t)>-1},r["recordAutoInsert"]=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this["isAutoInsertedClosing"](r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},r["recordMaybeInsert"]=function(t,e,n){var r=t.getCursorPosition(),o=e.doc.getLine(r.row);this["isMaybeInsertedClosing"](r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},r["isAutoInsertedClosing"]=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},r["isMaybeInsertedClosing"]=function(t,e){return i.maybeInsertedBrackets>0&&t.row===i.maybeInsertedRow&&e.substr(t.column)===i.maybeInsertedLineEnd&&e.substr(0,t.column)==i.maybeInsertedLineStart},r["popAutoInsertedClosing"]=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},r["clearMaybeInsertedClosing"]=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},o.inherits(r,s),e.CstyleBehaviour=r})),ace.define("ace/unicode",["require","exports","module"],(function(t,e,n){"use strict";for(var i=[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],r=0,o=[],s=0;s<i.length;s+=2)o.push(r+=i[s]),i[s+1]&&o.push(45,r+=i[s+1]);e.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i,r=t("../config"),o=t("../tokenizer").Tokenizer,s=t("./text_highlight_rules").TextHighlightRules,a=t("./behaviour/cstyle").CstyleBehaviour,l=t("../unicode"),c=t("../lib/lang"),u=t("../token_iterator").TokenIterator,h=t("../range").Range;i=function(){this.HighlightRules=s},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,e,n,i){var r=e.doc,o=!0,s=!0,a=1/0,l=e.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(c.escapeRegExp).join("|"),f=this.lineCommentStart[0];else g=c.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=e.getUseSoftTabs();y=function(t,e){var n=t.match(g);if(n){var i=n[1].length,o=n[0].length;d(t,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(e,i,o)}};var h=f+" ",d=(v=function(t,e){o&&!/\S/.test(t)||(d(t,a,a)?r.insertInLine({row:e,column:a},h):r.insertInLine({row:e,column:a},f))},w=function(t,e){return g.test(t)},function(t,e,n){var i=0;while(e--&&" "==t.charAt(e))i++;if(i%l!=0)return!1;i=0;while(" "==t.charAt(n++))i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(f)+")"),m=new RegExp("(?:"+c.escapeRegExp(p)+")\\s*$"),v=function(t,e){w(t,e)||o&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},p),r.insertInLine({row:e,column:a},f))},y=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(g))&&r.removeInLine(e,n[1].length,n[0].length)},w=function(t,n){if(g.test(t))return!0;for(var i=e.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function b(t){for(var e=n;e<=i;e++)t(r.getLine(e),e)}var _=1/0;b((function(t,e){var n=t.search(/\S/);-1!==n?(n<a&&(a=n),s&&!w(t,e)&&(s=!1)):_>t.length&&(_=t.length)})),a==1/0&&(a=_,o=!1,s=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),b(s?y:v)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=new u(e,i.row,i.column),l=a.getCurrentToken(),c=(e.selection,e.selection.toOrientedRange());if(l&&/comment/.test(l.type)){var d,f;while(l&&/comment/.test(l.type)){var p=l.value.indexOf(r.start);if(-1!=p){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;d=new h(g,m,g,m+r.start.length);break}l=a.stepBackward()}a=new u(e,i.row,i.column),l=a.getCurrentToken();while(l&&/comment/.test(l.type)){p=l.value.indexOf(r.end);if(-1!=p){g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;f=new h(g,m,g,m+r.end.length);break}l=a.stepForward()}f&&e.remove(f),d&&(e.remove(d),o=d.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);c.start.row==o&&(c.start.column+=s),c.end.row==o&&(c.end.column+=s),e.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var n=t[e],i=n.prototype.$id,o=r.$modes[i];o||(r.$modes[i]=o=new n),r.$modes[e]||(r.$modes[e]=o),this.$embeds.push(e),this.$modes[e]=o}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(t){(function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}})(l)},l=this;for(e=0;e<s.length;e++)a(e)},this.$delegator=function(t,e,n){var i=e[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1],o=this.$modes[r];if(o)return o[t].apply(o,[i[1]].concat([].slice.call(e,1)))}i=i[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a=i.split(this.$embeds[s]);if(!a[0]&&a[1]){e[0]=a[1];o=this.$modes[this.$embeds[s]];return o[t].apply(o,e)}}var l=n.apply(this,e);return n?l:void 0},this.transformAction=function(t,e,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][e]){var a=o[s][e].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var e=this.$tokenizer["rules"],n=[];for(var i in e)for(var r=e[i],o=0,s=r.length;o<s;o++)if("string"===typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"===typeof r[o].token)for(var a=0,l=r[o].token.length;a<l;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return t?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(t,e,n,i){var r=this.$keywordList||this.$createKeywordList();return r.map((function(t){return{name:t,value:t,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}.call(i.prototype),e.Mode=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(t,e,n){"use strict";e.applyDelta=function(t,e,n){var i=e.start.row,r=e.start.column,o=t[i]||"";switch(e.action){case"insert":var s=e.lines;if(1===s.length)t[i]=o.substring(0,r)+e.lines[0]+o.substring(r);else{var a=[i,1].concat(e.lines);t.splice.apply(t,a),t[i]=o.substring(0,r)+t[i],t[i+e.lines.length-1]+=o.substring(r)}break;case"remove":var l=e.end.column,c=e.end.row;i===c?t[i]=o.substring(0,r)+o.substring(l):t.splice(i,c-i+1,o.substring(0,r)+t[c].substring(l));break}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(){function t(t,e,n){this.$onChange=this.onChange.bind(this),this.attach(t),"number"!=typeof e?this.setPosition(e.row,e.column):this.setPosition(e,n)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(t){if((t.start.row!=t.end.row||t.start.row==this.row)&&!(t.start.row>this.row)){var e=a(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},t.prototype.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n},t}();function s(t,e,n){var i=n?t.column<=e.column:t.column<e.column;return t.row<e.row||t.row==e.row&&i}function a(t,e,n){var i="insert"==t.action,r=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),a=t.start,l=i?a:t.end;return s(e,a,n)?{row:e.row,column:e.column}:s(l,e,!n)?{row:e.row+r,column:e.column+(e.row==l.row?o:0)}:{row:a.row,column:a.column}}o.prototype.$insertRight=!1,i.implement(o.prototype,r),e.Anchor=o})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./apply_delta").applyDelta,o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=t("./anchor").Anchor,l=function(){function t(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)}return t.prototype.setValue=function(t){var e=this.getLength()-1;this.remove(new s(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t||"")},t.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},t.prototype.createAnchor=function(t,e){return new a(this,t,e)},t.prototype.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},t.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},t.prototype.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},t.prototype.getNewLineMode=function(){return this.$newLineMode},t.prototype.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},t.prototype.getLine=function(t){return this.$lines[t]||""},t.prototype.getLines=function(t,e){return this.$lines.slice(t,e+1)},t.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},t.prototype.getLength=function(){return this.$lines.length},t.prototype.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},t.prototype.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{e=this.getLines(t.start.row,t.end.row),e[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column))}return e},t.prototype.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},t.prototype.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},t.prototype.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},t.prototype.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},t.prototype.insertInLine=function(t,e){var n=this.clippedPos(t.row,t.column),i=this.pos(t.row,t.column+e.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[e]},!0),this.clonePos(i)},t.prototype.clippedPos=function(t,e){var n=this.getLength();void 0===t?t=n:t<0?t=0:t>=n&&(t=n-1,e=void 0);var i=this.getLine(t);return void 0==e&&(e=i.length),e=Math.min(Math.max(e,0),i.length),{row:t,column:e}},t.prototype.clonePos=function(t){return{row:t.row,column:t.column}},t.prototype.pos=function(t,e){return{row:t,column:e}},t.prototype.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},t.prototype.insertFullLines=function(t,e){t=Math.min(Math.max(t,0),this.getLength());var n=0;t<this.getLength()?(e=e.concat([""]),n=0):(e=[""].concat(e),t--,n=this.$lines[t].length),this.insertMergedLines({row:t,column:n},e)},t.prototype.insertMergedLines=function(t,e){var n=this.clippedPos(t.row,t.column),i={row:n.row+e.length-1,column:(1==e.length?n.column:0)+e[e.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:e}),this.clonePos(i)},t.prototype.remove=function(t){var e=this.clippedPos(t.start.row,t.start.column),n=this.clippedPos(t.end.row,t.end.column);return this.applyDelta({start:e,end:n,action:"remove",lines:this.getLinesForRange({start:e,end:n})}),this.clonePos(e)},t.prototype.removeInLine=function(t,e,n){var i=this.clippedPos(t,e),r=this.clippedPos(t,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},t.prototype.removeFullLines=function(t,e){t=Math.min(Math.max(0,t),this.getLength()-1),e=Math.min(Math.max(0,e),this.getLength()-1);var n=e==this.getLength()-1&&t>0,i=e<this.getLength()-1,r=n?t-1:t,o=n?this.getLine(r).length:0,a=i?e+1:e,l=i?0:this.getLine(a).length,c=new s(r,o,a,l),u=this.$lines.slice(t,e+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),u},t.prototype.removeNewLine=function(t){t<this.getLength()-1&&t>=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},t.prototype.replace=function(t,e){return t instanceof s||(t=s.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),n=e?this.insert(t.start,e):t.start,n);var n},t.prototype.applyDeltas=function(t){for(var e=0;e<t.length;e++)this.applyDelta(t[e])},t.prototype.revertDeltas=function(t){for(var e=t.length-1;e>=0;e--)this.revertDelta(t[e])},t.prototype.applyDelta=function(t,e){var n="insert"==t.action;(n?t.lines.length<=1&&!t.lines[0]:!s.comparePoints(t.start,t.end))||(n&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},t.prototype.$safeApplyDelta=function(t){var e=this.$lines.length;("remove"==t.action&&t.start.row<e&&t.end.row<e||"insert"==t.action&&t.start.row<=e)&&this.applyDelta(t)},t.prototype.$splitAndapplyLargeDelta=function(t,e){for(var n=t.lines,i=n.length-e+1,r=t.start.row,o=t.start.column,s=0,a=0;s<i;s=a){a+=e-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:t.action,lines:l},!0)}t.lines=n.slice(s),t.start.row=r+s,t.start.column=o,this.applyDelta(t,!0)},t.prototype.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:"insert"==t.action?"remove":"insert",lines:t.lines.slice()})},t.prototype.indexToPosition=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=e||0,o=n.length;r<o;r++)if(t-=n[r].length+i,t<0)return{row:r,column:t+n[r].length+i};return{row:o-1,column:t+n[o-1].length+i}},t.prototype.positionToIndex=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(t.row,n.length),s=e||0;s<o;++s)r+=n[s].length+i;return r+t.column},t.prototype.$split=function(t){return t.split(/\r\n|\r|\n/)},t}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",i.implement(l.prototype,o),e.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(){function t(t,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var n=this;this.$worker=function(){if(n.running){var t=new Date,e=n.currentLine,i=-1,r=n.doc,o=e;while(n.lines[e])e++;var s=r.getLength(),a=0;n.running=!1;while(e<s){n.$tokenizeRow(e),i=e;do{e++}while(n.lines[e]);if(a++,a%5===0&&new Date-t>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=e,-1==i&&(i=e),o<=i&&n.fireUpdateEvent(o,i)}}}return t.prototype.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},t.prototype.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},t.prototype.fireUpdateEvent=function(t,e){var n={first:t,last:e};this._signal("update",{data:n})},t.prototype.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},t.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},t.prototype.$updateOnChange=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},t.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},t.prototype.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},t.prototype.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},t.prototype.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.states[t-1],i=this.tokenizer.getLineTokens(e,n,t);return this.states[t]+""!==i.state+""?(this.states[t]=i.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=i.tokens},t.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},t}();i.implement(o.prototype,r),e.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./range").Range,o=function(){function t(t,e,n){void 0===n&&(n="text"),this.setRegexp(t),this.clazz=e,this.type=n}return t.prototype.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},t.prototype.update=function(t,e,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&(u=i.getMatchOffsets(n.getLine(c),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map((function(t){return new r(c,t.offset,c,t.offset+t.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var d=u[h].toScreenRange(n),f=d.toString();l[f]||(l[f]=!0,e.drawSingleLineMarker(t,d,this.clazz,o))}}},t}();o.prototype.MAX_RANGES=500,e.SearchHighlight=o})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=function(){function t(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return t.prototype.addSession=function(t){this.$session=t},t.prototype.add=function(t,e,n){if(!this.$fromUndo&&t!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===e||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev}"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t)}},t.prototype.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},t.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},t.prototype.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=t)break;r.id<e&&(r.ignore=!0)}this.lastDeltas=null},t.prototype.getSelection=function(t,e){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<t)return e&&(r=n[i+1]),r}},t.prototype.getRevision=function(){return this.$rev},t.prototype.getDeltas=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,o=n.length;o--;){var s=n[o][0];if(s.id<e&&!i&&(i=o+1),s.id<=t){r=o+1;break}}return n.slice(r,i)},t.prototype.getChangedRanges=function(t,e){null==e&&(e=this.$rev+1)},t.prototype.getChangedLines=function(t,e){null==e&&(e=this.$rev+1)},t.prototype.undo=function(t,e){this.lastDeltas=null;var n=this.$undoStack;if(r(n,n.length)){t||(t=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),o=null;return i&&(o=t.undoChanges(i,e),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o}},t.prototype.redo=function(t,e){if(this.lastDeltas=null,t||(t=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);y(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(t){t[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),r=null;return i&&(r=t.redoChanges(i,e),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r},t.prototype.$syncRev=function(){var t=this.$undoStack,e=t[t.length-1],n=e&&e[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},t.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},t.prototype.canUndo=function(){return this.$undoStack.length>0},t.prototype.canRedo=function(){return this.$redoStack.length>0},t.prototype.bookmark=function(t){void 0==t&&(t=this.$rev),this.mark=t},t.prototype.isAtBookmark=function(){return this.$rev===this.mark},t.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},t.prototype.fromJSON=function(t){this.reset(),this.$undoStack=t.$undoStack,this.$redoStack=t.$redoStack},t.prototype.$prettyPrint=function(t){return t?c(t):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)},t}();function r(t,e){for(var n=e;n--;){var i=t[n];if(i&&!i[0].ignore){while(n<e-1){var r=d(t[n],t[n+1]);t[n]=r[0],t[n+1]=r[1],n++}return!0}}}i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var o=t("./range").Range,s=o.comparePoints;o.comparePoints;function a(t){return{row:t.row,column:t.column}}function l(t){return{start:a(t.start),end:a(t.end),action:t.action,lines:t.lines.slice()}}function c(t){if(t=t||this,Array.isArray(t))return t.map(c).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(u).join("\n"):u(t.value)),t.start&&(e+=u(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function u(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function h(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;p(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)p(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;p(t,e,-1)}return[e,t]}function d(t,e){for(var n=t.length;n--;)for(var i=0;i<e.length;i++)if(!h(t[n],e[i])){while(n<t.length){while(i--)h(e[i],t[n]);i=e.length,n++}return[t,e]}return t.selectionBefore=e.selectionBefore=t.selectionAfter=e.selectionAfter=null,[e,t]}function f(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)s(t.start,e.start)<0?p(e,t,1):p(t,e,1);else if(n&&!i)s(t.start,e.end)>=0?p(t,e,-1):(s(t.start,e.start)<=0||p(t,o.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?p(e,t,-1):(s(e.start,t.start)<=0||p(e,o.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)p(e,t,-1);else{var r,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(r=t,t=m(t,e.start)),s(t.end,e.end)>0&&(a=m(t,e.end)),g(e.end,t.start,t.end,-1),a&&!r&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,r,a].filter(Boolean);p(t,e,-1)}return[e,t]}function p(t,e,n){g(t.start,e.start,e.end,n),g(t.end,e.start,e.end,n)}function g(t,e,n,i){t.row==(1==i?e:n).row&&(t.column+=i*(n.column-e.column)),t.row+=i*(n.row-e.row)}function m(t,e){var n=t.lines,i=t.end;t.end=a(e);var r=t.end.row-t.start.row,o=n.splice(r,n.length),s=r?e.column:e.column-t.start.column;n.push(o[0].substring(0,s)),o[0]=o[0].substr(s);var l={start:a(e),end:i,lines:o,action:t.action};return l}function v(t,e){e=l(e);for(var n=t.length;n--;){for(var i=t[n],r=0;r<i.length;r++){var o=i[r],s=f(o,e);e=s[0],2!=s.length&&(s[2]?(i.splice(r+1,1,s[1],s[2]),r++):s[1]||(i.splice(r,1),r--))}i.length||t.splice(n,1)}return t}function y(t,e){for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.length;r++)v(t,i[r])}e.UndoManager=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../range").Range,r=function(){function t(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new i(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(t){t.setFoldLine(this)}),this)}return t.prototype.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach((function(e){e.start.row+=t,e.end.row+=t}))},t.prototype.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort((function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)})),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},t.prototype.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},t.prototype.walk=function(t,e,n){var i,r,o,s=0,a=this.folds,l=!0;null==e&&(e=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],r=i.range.compareStart(e,n),-1==r)return void t(null,e,n,s,l);if(o=t(null,i.start.row,i.start.column,s,l),o=!o&&t(i.placeholder,i.start.row,i.start.column,s),o||0===r)return;l=!i.sameRow,s=i.end.column}t(null,e,n,s,l)},t.prototype.getNextFoldTo=function(t,e){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],i=n.range.compareEnd(t,e),-1==i)return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},t.prototype.addRemoveChars=function(t,e,n){var i,r,o=this.getNextFoldTo(t,e);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=e&&i.start.row!=t)window.console&&window.console.log(t,e,i);else if(i.start.row==t){r=this.folds;var s=r.indexOf(i);for(0===s&&(this.start.column+=n),s;s<r.length;s++){if(i=r[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},t.prototype.split=function(e,n){var i=this.getNextFoldTo(e,n);if(!i||"inside"==i.kind)return null;var r=i.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(a,o.length-a);var c=new t(s,o);return s.splice(s.indexOf(this)+1,0,c),c},t.prototype.merge=function(t){for(var e=t.folds,n=0;n<e.length;n++)this.addFold(e[n]);var i=this.foldData;i.splice(i.indexOf(t),1)},t.prototype.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach((function(e){t.push(" "+e.toString())})),t.push("]"),t.join("\n")},t.prototype.idxToPosition=function(t){for(var e=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if(t-=i.start.column-e,t<0)return{row:i.start.row,column:i.start.column+t};if(t-=i.placeholder.length,t<0)return i.start;e=i.end.column}return{row:this.end.row,column:this.end.column+t}},t}();e.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("./range").Range,r=i.comparePoints,o=function(){function t(){this.ranges=[],this.$bias=1}return t.prototype.pointIndex=function(t,e,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(t,s.end);if(!(a>0)){var l=r(t,s.start);return 0===a?e&&0!==l?-o-2:o:l>0||0===l&&!e?o:-o-1}}return-o-1},t.prototype.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);n<0&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,t)},t.prototype.addList=function(t){for(var e=[],n=t.length;n--;)e.push.apply(e,this.add(t[n]));return e},t.prototype.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},t.prototype.merge=function(){var t=[],e=this.ranges;e=e.sort((function(t,e){return r(t.start,e.start)}));for(var n,i=e[0],o=1;o<e.length;o++){n=i,i=e[o];var s=r(n.end,i.start);s<0||(0!=s||n.isEmpty()||i.isEmpty())&&(r(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),e.splice(o,1),t.push(i),i=n,o--)}return this.ranges=e,t},t.prototype.contains=function(t,e){return this.pointIndex({row:t,column:e})>=0},t.prototype.containsPoint=function(t){return this.pointIndex(t)>=0},t.prototype.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},t.prototype.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row<t)return[];var i=this.pointIndex({row:t,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:e,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},t.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},t.prototype.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},t.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},t.prototype.$onChange=function(t){for(var e=t.start,n=t.end,i=e.row,r=n.row,o=this.ranges,s=0,a=o.length;s<a;s++){var l=o[s];if(l.end.row>=i)break}if("insert"==t.action)for(var c=r-i,u=-e.column+n.column;s<a;s++){l=o[s];if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=e.column&&(l.start.column==e.column&&this.$bias<=0||(l.start.column+=u,l.start.row+=c)),l.end.row==i&&l.end.column>=e.column){if(l.end.column==e.column&&this.$bias<0)continue;l.end.column==e.column&&u>0&&s<a-1&&l.end.column>l.start.column&&l.end.column==o[s+1].start.column&&(l.end.column-=u),l.end.column+=u,l.end.row+=c}}else for(c=i-r,u=e.column-n.column;s<a;s++){l=o[s];if(l.start.row>r)break;l.end.row<r&&(i<l.end.row||i==l.end.row&&e.column<l.end.column)?(l.end.row=i,l.end.column=e.column):l.end.row==r?l.end.column<=n.column?(c||l.end.column>e.column)&&(l.end.column=e.column,l.end.row=e.row):(l.end.column+=u,l.end.row+=c):l.end.row>r&&(l.end.row+=c),l.start.row<r&&(i<l.start.row||i==l.start.row&&e.column<l.start.column)?(l.start.row=i,l.start.column=e.column):l.start.row==r?l.start.column<=n.column?(c||l.start.column>e.column)&&(l.start.column=e.column,l.start.row=e.row):(l.start.column+=u,l.start.row+=c):l.start.row>r&&(l.start.row+=c)}if(0!=c&&s<a)for(;s<a;s++){l=o[s];l.start.row+=c,l.end.row+=c}},t}();o.prototype.comparePoints=r,e.RangeList=o})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../range_list").RangeList,o=function(t){function e(e,n){var i=t.call(this)||this;return i.foldLine=null,i.placeholder=n,i.range=e,i.start=e.start,i.end=e.end,i.sameRow=e.start.row==e.end.row,i.subFolds=i.ranges=[],i}return i(e,t),e.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},e.prototype.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach((function(e){e.setFoldLine(t)}))},e.prototype.clone=function(){var t=this.range.clone(),n=new e(t,this.placeholder);return this.subFolds.forEach((function(t){n.subFolds.push(t.clone())})),n.collapseChildren=this.collapseChildren,n},e.prototype.addSubFold=function(t){if(!this.range.isEqual(t)){a(t,this.start);for(var e=t.start.row,n=t.start.column,i=0,r=-1;i<this.subFolds.length;i++)if(r=this.subFolds[i].range.compare(e,n),1!=r)break;var o=this.subFolds[i],s=0;if(0==r){if(o.range.containsRange(t))return o.addSubFold(t);s=1}e=t.range.end.row,n=t.range.end.column;var l=i;for(r=-1;l<this.subFolds.length;l++)if(r=this.subFolds[l].range.compare(e,n),1!=r)break;0==r&&l++;for(var c=this.subFolds.splice(i,l-i,t),u=0==r?c.length-1:c.length,h=s;h<u;h++)t.addSubFold(c[h]);return t.setFoldLine(this.foldLine),t}},e.prototype.restoreRange=function(t){return c(t,this.start)},e}(r);function s(t,e){t.row-=e.row,0==t.row&&(t.column-=e.column)}function a(t,e){s(t.start,e),s(t.end,e)}function l(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row}function c(t,e){l(t.start,e),l(t.end,e)}e.Fold=o})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("./fold_line").FoldLine,o=t("./fold").Fold,s=t("../token_iterator").TokenIterator,a=t("../mouse/mouse_event").MouseEvent;function l(){this.getFoldAt=function(t,e,n){var i=this.getFoldLine(t);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(t,e)){if(1==n&&s.isEnd(t,e)&&!s.isEmpty())continue;if(-1==n&&s.isStart(t,e)&&!s.isEmpty())continue;return r[o]}}},this.getFoldsInRange=function(t){var e=t.start,n=t.end,i=this.$foldData,r=[];e.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(t);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(s=c.range.compareRange(t),-2==s)break;if(2!=s){if(42==s)break;r.push(c)}}}}return e.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var e=[];t.forEach((function(t){e=e.concat(this.getFoldsInRange(t))}),this)}else e=this.getFoldsInRange(t);return e},this.getAllFolds=function(){for(var t=[],e=this.$foldData,n=0;n<e.length;n++)for(var i=0;i<e[n].folds.length;i++)t.push(e[n].folds[i]);return t},this.getFoldStringAt=function(t,e,n,i){if(i=i||this.getFoldLine(t),!i)return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){o=i.folds[a];var l=o.range.compareEnd(t,e);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,e-s.end.column):1==n?r.substring(e-s.end.column):r},this.getFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=e){a<e&&(a>=t?i-=e-a:i=0);break}s>=t&&(i-=a>=t?s-a:s-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort((function(t,e){return t.start.row-e.start.row})),t},this.addFold=function(t,e){var n,i=this.$foldData,s=!1;t instanceof o?n=t:(n=new o(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach((function(t){n.addSubFold(t)})));for(var p=0;p<i.length;p++){var g=i[p];if(c==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return s||(g=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(t){t.forEach((function(t){this.addFold(t)}),this)},this.removeFold=function(t){var e=t.foldLine,n=e.start.row,i=e.end.row,r=this.$foldData,o=e.folds;if(1==o.length)r.splice(r.indexOf(e),1);else if(e.range.isEnd(t.end.row,t.end.column))o.pop(),e.end.row=o[o.length-1].end.row,e.end.column=o[o.length-1].end.column;else if(e.range.isStart(t.start.row,t.start.column))o.shift(),e.start.row=o[0].start.row,e.start.column=o[0].start.column;else if(t.sameRow)o.splice(o.indexOf(t),1);else{var s=e.split(t.start.row,t.start.column);o=s.folds,o.shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);e.forEach((function(t){this.removeFold(t)}),this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach((function(e){t.restoreRange(e),this.addFold(e)}),this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach((function(t){this.expandFold(t)}),this)},this.unfold=function(t,e){var n,r;if(null==t)n=new i(0,0,this.getLength(),0),null==e&&(e=!0);else if("number"==typeof t)n=new i(t,0,t,this.getLine(t).length);else if("row"in t)n=i.fromPoints(t,t);else{if(Array.isArray(t))return r=[],t.forEach((function(t){r=r.concat(this.unfold(t))}),this),r;n=t}r=this.getFoldsInRangeList(n);var o=r;while(1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=e?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var o=this.doc,s="";return t.walk((function(t,e,n,a){if(!(e<i)){if(e==i){if(n<r)return;a=Math.max(r,a)}s+=null!=t?t:o.getLine(e).substring(a,n)}}),e,n),s},this.getDisplayLine=function(t,e,n,i){var r,o=this.getFoldLine(t);return o?this.getFoldDisplayLine(o,t,e,n,i):(r=this.doc.getLine(t),r.substring(i||0,e||r.length))},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map((function(e){var n=e.folds.map((function(t){return t.clone()}));return new r(t,n)})),t},this.toggleFold=function(t){var e,n,i=this.selection,r=i.getRange();if(r.isEmpty()){var o=r.start;if(e=this.getFoldAt(o.row,o.column),e)return void this.expandFold(e);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var s=this.getFoldsInRange(r);if(t&&s.length)return void this.expandFolds(s);1==s.length&&(e=s[0])}if(e||(e=this.getFoldAt(r.start.row,r.start.column)),e&&e.range.toString()==r.toString())this.expandFold(e);else{var a="...";if(!r.isMultiLine()){if(a=this.getTextRange(r),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,r)}},this.getCommentFoldRange=function(t,e,n){var r=new s(this,t,e),o=r.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],"comment"==a&&(a+="|doc-start|\\.doc");var l=new RegExp(a),c=new i;if(1!=n){do{o=r.stepBackward()}while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=r.stepForward()}if(c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new s(this,t,e),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);l.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(c.end.column+=o.value.length-2),c}},this.foldAll=function(t,e,n,i){void 0==n&&(n=1e5);var r=this.foldWidgets;if(r){e=e||this.getLength(),t=t||0;for(var o=t;o<e;o++)if(null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"==r[o]&&(!i||i(o))){var s=this.getFoldWidgetRange(o);s&&s.isMultiLine()&&s.end.row<=e&&s.start.row>=t&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(t){this.foldAll();while(t-- >0)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,(function(e){for(var n=t.getTokens(e),i=0;i<n.length;i++){var r=n[i];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(t,e){var n=this.foldWidgets;if(!n||e&&n[t])return{};var i,r=t-1;while(r>=0){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=t)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(t,e){e instanceof a&&(e=e.domEvent);var n={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},i=this.$toggleFoldWidget(t,n);if(!i){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,o=this.getFoldAt(t,-1===r?0:i.length,r);if(o)return e.children||e.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(t,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1),o&&s.isEqual(o.range)))return this.removeFold(o),o;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=s?s.end.row:this.getLength(),this.foldAll(t+1,c,e.all?1e4:0)):s&&(e.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange,n){e=n.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}e.Folding=l})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(t,e,n){"use strict";var i=t("../token_iterator").TokenIterator,r=t("../range").Range;function o(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,o=n.charAt(t.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],t);if(!a)return null;e=r.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{a=this.$findOpeningBracket(s[2],t);if(!a)return null;e=r.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(t,e){var n=this.getLine(t.row),i=/([\(\[\{])|([\)\]\}])/,o=!e&&n.charAt(t.column-1),s=o&&o.match(i);if(s||(o=(void 0===e||e)&&n.charAt(t.column),t={row:t.row,column:t.column+1},s=o&&o.match(i)),!s)return null;var a=new r(t.row,t.column-1,t.row,t.column),l=s[1]?this.$findClosingBracket(s[1],t):this.$findOpeningBracket(s[2],t);if(!l)return[a];var c=new r(l.row,l.column,l.row,l.column+1);return[a,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));var l=e.column-s.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var u=c.charAt(l);if(u==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==t&&(o+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(t,e,n){var r=this.$brackets[t],o=1,s=new i(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));var l=e.column-s.getCurrentTokenColumn();while(1){var c=a.value,u=c.length;while(l<u){var h=c.charAt(l);if(h==r){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==t&&(o+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(t){var e=new i(this,t.row,t.column),n=this.$findTagName(e);if(n){var r=e.stepBackward();return"<"===r.value?this.$findClosingTag(e,n):this.$findOpeningTag(e,n)}},this.$findTagName=function(t){var e=t.getCurrentToken(),n=!1,i=!1;if(e&&-1===e.type.indexOf("tag-name"))do{e=i?t.stepBackward():t.stepForward(),e&&("/>"===e.value?i=!0:-1!==e.type.indexOf("tag-name")&&(n=!0))}while(e&&!n);return e},this.$findClosingTag=function(t,e){var n,i=e.value,o=e.value,s=0,a=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);e=t.stepForward();var l=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length),c=!1;do{if(n=e,e=t.stepForward(),e){if(">"===e.value&&!c){var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);c=!0}if(-1!==e.type.indexOf("tag-name")){if(i=e.value,o===i)if("<"===n.value)s++;else if("</"===n.value&&(s--,s<0)){t.stepBackward();var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2);e=t.stepForward();var d=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),!e||">"!==e.value)return;var f=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else if(o===i&&"/>"===e.value&&(s--,s<0))h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+2),d=h,f=d,u=new r(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(e&&s>=0);if(a&&u&&h&&f&&l&&d)return{openTag:new r(a.start.row,a.start.column,u.end.row,u.end.column),closeTag:new r(h.start.row,h.start.column,f.end.row,f.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(t,e){var n=t.getCurrentToken(),i=e.value,o=0,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+2,c=new r(s,a,s,l);t.stepForward();var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+e.value.length);if(e=t.stepForward(),e&&">"===e.value){var h=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);t.stepBackward(),t.stepBackward();do{if(e=n,s=t.getCurrentTokenRow(),a=t.getCurrentTokenColumn(),l=a+e.value.length,n=t.stepBackward(),e)if(-1!==e.type.indexOf("tag-name")){if(i===e.value)if("<"===n.value){if(o++,o>0){var d=new r(s,a,s,l),f=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);do{e=t.stepForward()}while(e&&">"!==e.value);var p=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===e.value){var g=0,m=n;while(m){if(-1!==m.type.indexOf("tag-name")&&m.value===i){o--;break}if("<"===m.value)break;m=t.stepBackward(),g++}for(var v=0;v<g;v++)t.stepForward()}}while(n&&o<=0);return f&&p&&c&&h&&d&&u?{openTag:new r(f.start.row,f.start.column,p.end.row,p.end.column),closeTag:new r(c.start.row,c.start.column,h.end.row,h.end.column),openTagName:d,closeTagName:u}:void 0}}}e.BracketMatch=o})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./bidihandler").BidiHandler,s=t("./config"),a=t("./lib/event_emitter").EventEmitter,l=t("./selection").Selection,c=t("./mode/text").Mode,u=t("./range").Range,h=t("./document").Document,d=t("./background_tokenizer").BackgroundTokenizer,f=t("./search_highlight").SearchHighlight,p=t("./undomanager").UndoManager,g=function(){function t(e,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++t.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((new c).getTokenizer(),this);var i=this;this.bgTokenizer.on("update",(function(t){i._signal("tokenizerUpdate",t)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(n),s._signal("session",this),this.destroyed=!1}return t.prototype.setDocument=function(t){this.doc&&this.doc.off("change",this.$onChange),this.doc=t,t.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},t.prototype.getDocument=function(){return this.doc},t.prototype.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var e=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,t)+1;e>n&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},t.prototype.$getRowCacheIndex=function(t,e){var n=0,i=t.length-1;while(n<=i){var r=n+i>>1,o=t[r];if(e>o)n=r+1;else{if(!(e<o))return r;i=r-1}}return n-1},t.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},t.prototype.onChangeFold=function(t){var e=t.data;this.$resetRowCache(e.start.row)},t.prototype.onChange=function(t){this.$modified=!0,this.$bidiHandler.onChange(t),this.$resetRowCache(t.start.row);var e=this.$updateInternalDataOnChange(t);!this.$fromUndo&&this.$undoManager&&(e&&e.length&&(this.$undoManager.add({action:"removeFolds",folds:e},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(t,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._signal("change",t)},t.prototype.setValue=function(t){this.doc.setValue(t),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},t.fromJSON=function(e){"string"==typeof e&&(e=JSON.parse(e));var n=new p;n.$undoStack=e.history.undo,n.$redoStack=e.history.redo,n.mark=e.history.mark,n.$rev=e.history.rev;var i=new t(e.value);return e.folds.forEach((function(t){i.addFold("...",u.fromPoints(t.start,t.end))})),i.setAnnotations(e.annotations),i.setBreakpoints(e.breakpoints),i.setMode(e.mode),i.setScrollLeft(e.scrollLeft),i.setScrollTop(e.scrollTop),i.setUndoManager(n),i.selection.fromJSON(e.selection),i},t.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map((function(t){return t.range})),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},t.prototype.toString=function(){return this.doc.getValue()},t.prototype.getSelection=function(){return this.selection},t.prototype.getState=function(t){return this.bgTokenizer.getState(t)},t.prototype.getTokens=function(t){return this.bgTokenizer.getTokens(t)},t.prototype.getTokenAt=function(t,e){var n,i=this.bgTokenizer.getTokens(t),r=0;if(null==e){var o=i.length-1;r=this.getLine(t).length}else for(o=0;o<i.length;o++)if(r+=i[o].value.length,r>=e)break;return n=i[o],n?(n.index=o,n.start=r-n.value.length,n):null},t.prototype.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},t.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},t.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},t.prototype.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},t.prototype.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},t.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},t.prototype.setTabSize=function(t){this.setOption("tabSize",t)},t.prototype.getTabSize=function(){return this.$tabSize},t.prototype.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize===0},t.prototype.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},t.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},t.prototype.setOverwrite=function(t){this.setOption("overwrite",t)},t.prototype.getOverwrite=function(){return this.$overwrite},t.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},t.prototype.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},t.prototype.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},t.prototype.getBreakpoints=function(){return this.$breakpoints},t.prototype.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e<t.length;e++)this.$breakpoints[t[e]]="ace_breakpoint";this._signal("changeBreakpoint",{})},t.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},t.prototype.setBreakpoint=function(t,e){void 0===e&&(e="ace_breakpoint"),e?this.$breakpoints[t]=e:delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},t.prototype.clearBreakpoint=function(t){delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},t.prototype.addMarker=function(t,e,n,i){var r=this.$markerId++,o={range:t,type:n||"line",renderer:"function"==typeof n?n:null,clazz:e,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},t.prototype.addDynamicMarker=function(t,e){if(t.update){var n=this.$markerId++;return t.id=n,t.inFront=!!e,e?(this.$frontMarkers[n]=t,this._signal("changeFrontMarker")):(this.$backMarkers[n]=t,this._signal("changeBackMarker")),t}},t.prototype.removeMarker=function(t){var e=this.$frontMarkers[t]||this.$backMarkers[t];if(e){var n=e.inFront?this.$frontMarkers:this.$backMarkers;delete n[t],this._signal(e.inFront?"changeFrontMarker":"changeBackMarker")}},t.prototype.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},t.prototype.highlight=function(t){if(!this.$searchHighlight){var e=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(e)}this.$searchHighlight.setRegexp(t)},t.prototype.highlightLines=function(t,e,n,i){"number"!=typeof e&&(n=e,e=t),n||(n="ace_step");var r=new u(t,0,e,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},t.prototype.setAnnotations=function(t){this.$annotations=t,this._signal("changeAnnotation",{})},t.prototype.getAnnotations=function(){return this.$annotations||[]},t.prototype.clearAnnotations=function(){this.setAnnotations([])},t.prototype.$detectNewLine=function(t){var e=t.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},t.prototype.getWordRange=function(t,e){var n=this.getLine(t),i=!1;if(e>0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(e-1,e+1)))r=/\s/;else r=this.nonTokenRe;var o=e;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}var s=e;while(s<n.length&&n.charAt(s).match(r))s++;return new u(t,o,t,s)},t.prototype.getAWordRange=function(t,e){var n=this.getWordRange(t,e),i=this.getLine(n.end.row);while(i.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},t.prototype.setNewLineMode=function(t){this.doc.setNewLineMode(t)},t.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},t.prototype.setUseWorker=function(t){this.setOption("useWorker",t)},t.prototype.getUseWorker=function(){return this.$useWorker},t.prototype.onReloadTokenizer=function(t){var e=t.data;this.bgTokenizer.start(e.first),this._signal("tokenizerUpdate",t)},t.prototype.setMode=function(t,e){if(t&&"object"===typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var n=t,i=n.path}else i=t||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(e&&e());this.$modeId=i,s.loadModule(["mode",i],function(t){if(this.$modeId!==i)return e&&e();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):t&&t.Mode&&(t=new t.Mode(n),n||(this.$modes[i]=t,t.$id=i),this.$onChangeMode(t)),e&&e()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},t.prototype.$onChangeMode=function(t,e){if(e||(this.$modeId=t.$id),this.$mode!==t){var n=this.$mode;this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=t.getTokenizer();if(void 0!==i.on){var r=this.onReloadTokenizer.bind(this);i.on("update",r)}this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,e||(t.attachToSession&&t.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:t}))}},t.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},t.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(t){s.warn("Could not load worker",t),this.$worker=null}},t.prototype.getMode=function(){return this.$mode},t.prototype.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},t.prototype.getScrollTop=function(){return this.$scrollTop},t.prototype.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},t.prototype.getScrollLeft=function(){return this.$scrollLeft},t.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},t.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach((function(e){e&&e.screenWidth>t&&(t=e.screenWidth)})),this.lineWidgetWidth=t},t.prototype.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=e.length,l=0;l<a;l++){if(l>s){if(l=o.end.row+1,l>=a)break;o=this.$foldData[r++],s=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},t.prototype.getLine=function(t){return this.doc.getLine(t)},t.prototype.getLines=function(t,e){return this.doc.getLines(t,e)},t.prototype.getLength=function(){return this.doc.getLength()},t.prototype.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},t.prototype.insert=function(t,e){return this.doc.insert(t,e)},t.prototype.remove=function(t){return this.doc.remove(t)},t.prototype.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},t.prototype.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=t.length-1;-1!=n;n--){var i=t[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},t.prototype.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=0;n<t.length;n++){var i=t[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!e&&this.$undoSelect&&(t.selectionAfter?this.selection.fromJSON(t.selectionAfter):this.selection.setRange(this.$getUndoSelection(t,!1))),this.$fromUndo=!1}},t.prototype.setUndoSelect=function(t){this.$undoSelect=t},t.prototype.$getUndoSelection=function(t,e){function n(t){return e?"insert"!==t.action:"insert"===t.action}for(var i,r,o=0;o<t.length;o++){var s=t[o];s.start&&(i?n(s)?(r=s.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=s.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=s.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},t.prototype.replace=function(t,e){return this.doc.replace(t,e)},t.prototype.moveText=function(t,e,n){var i=this.getTextRange(t),r=this.getFoldsInRange(t),o=u.fromPoints(e,e);if(!n){this.remove(t);var s=t.start.row-t.end.row,a=s?-t.end.column:t.start.column-t.end.column;a&&(o.start.row==t.end.row&&o.start.column>t.end.column&&(o.start.column+=a),o.end.row==t.end.row&&o.end.column>t.end.column&&(o.end.column+=a)),s&&o.start.row>=t.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var l=t.start,c=o.start;s=c.row-l.row,a=c.column-l.column;this.addFolds(r.map((function(t){return t=t.clone(),t.start.row==l.row&&(t.start.column+=a),t.end.row==l.row&&(t.end.column+=a),t.start.row+=s,t.end.row+=s,t})))}return o},t.prototype.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;i<=e;i++)this.doc.insertInLine({row:i,column:0},n)},t.prototype.outdentRows=function(t){for(var e=t.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i;++s)if(" "!=o.charAt(s))break;s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},t.prototype.$moveLines=function(t,e,n){if(t=this.getRowFoldStart(t),e=this.getRowFoldEnd(e),n<0){var i=this.getRowFoldStart(t+n);if(i<0)return 0;var r=i-t}else if(n>0){i=this.getRowFoldEnd(e+n);if(i>this.doc.getLength()-1)return 0;r=i-e}else{t=this.$clipRowToDocument(t),e=this.$clipRowToDocument(e);r=e-t+1}var o=new u(t,0,e,Number.MAX_VALUE),s=this.getFoldsInRange(o).map((function(t){return t=t.clone(),t.start.row+=r,t.end.row+=r,t})),a=0==n?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+r,a),s.length&&this.addFolds(s),r},t.prototype.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},t.prototype.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},t.prototype.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},t.prototype.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},t.prototype.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},t.prototype.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},t.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 e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},t.prototype.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},t.prototype.getUseWrapMode=function(){return this.$useWrapMode},t.prototype.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},t.prototype.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},t.prototype.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},t.prototype.getWrapLimit=function(){return this.$wrapLimit},t.prototype.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},t.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},t.prototype.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,n=t.action,i=t.start,r=t.end,o=i.row,s=r.row,a=s-o,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(o,a);var c=this.$foldData;l=this.getFoldsInRange(t),this.removeFolds(l);var u=this.getFoldLine(r.row),h=0;if(u){u.addRemoveChars(r.row,r.column,i.column-r.column),u.shiftRow(-a);var d=this.getFoldLine(o);d&&d!==u&&(d.merge(u),u=d),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=r.row&&u.shiftRow(-a)}s=o}else{var f=Array(a);f.unshift(o,0);var p=e?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,f);c=this.$foldData,u=this.getFoldLine(o),h=0;if(u){var g=u.range.compareInside(i.row,i.column);0==g?(u=u.split(i.row,i.column),u&&(u.shiftRow(a),u.addRemoveChars(s,0,r.column-i.column))):-1==g&&(u.addRemoveChars(o,0,r.column-i.column),u.shiftRow(a)),h=c.indexOf(u)+1}for(h;h<c.length;h++){u=c[h];u.start.row>=o&&u.shiftRow(a)}}else{a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a);u=this.getFoldLine(o);u&&u.addRemoveChars(o,i.column,a)}return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),l},t.prototype.$updateRowLengthCache=function(t,e){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},t.prototype.$updateWrapData=function(t,e){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=t;e=Math.min(e,r.length-1);while(l<=e)i=this.getFoldLine(l,i),i?(n=[],i.walk(function(t,e,i,o){var s;if(null!=t){s=this.$getDisplayTokens(t,n.length),s[0]=y;for(var a=1;a<s.length;a++)s[a]=w}else s=this.$getDisplayTokens(r[e].substring(o,i),n.length);n=n.concat(s)}.bind(this),i.end.row,r[i.end.row].length+1),s[i.start.row]=this.$computeWrapSplits(n,a,o),l=i.end.row+1):(n=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(n,a,o),l++)},t.prototype.$computeWrapSplits=function(t,e,n){if(0==t.length)return[];var i=[],r=t.length,o=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=e<=Math.max(2*n,8)||!1===l?0:Math.floor(e/2);function u(){var e=0;if(0===c)return e;if(l)for(var i=0;i<t.length;i++){var r=t[i];if(r==_)e+=1;else{if(r!=x){if(r==S)continue;break}e+=n}}return a&&!1!==l&&(e+=n),Math.min(e,c)}function h(e){for(var n=e-o,r=o;r<e;r++){var a=t[r];12!==a&&2!==a||(n-=1)}i.length||(d=u(),i.indent=d),s+=n,i.push(s),o=e}var d=0;while(r-o>e-d){var f=o+e-d;if(t[f-1]>=_&&t[f]>=_)h(f);else if(t[f]!=y&&t[f]!=w){var p=Math.max(f-(e-(e>>2)),o-1);while(f>p&&t[f]<y)f--;if(a){while(f>p&&t[f]<y)f--;while(f>p&&t[f]==b)f--}else while(f>p&&t[f]<_)f--;f>p?h(++f):(f=o+e,t[f]==v&&f--,h(f-d))}else{for(f;f!=o-1;f--)if(t[f]==y)break;if(f>o){h(f);continue}for(f=o+e,f;f<t.length;f++)if(t[f]!=w)break;if(f==t.length)break;h(f)}}return i},t.prototype.$getDisplayTokens=function(t,e){var n,i=[];e=e||0;for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(9==o){n=this.getScreenTabSize(i.length+e),i.push(x);for(var s=1;s<n;s++)i.push(S)}else 32==o?i.push(_):o>39&&o<48||o>57&&o<64?i.push(b):o>=4352&&A(o)?i.push(m,v):i.push(m)}return i},t.prototype.$getStringScreenWidth=function(t,e,n){if(0==e)return[0,0];var i,r;for(null==e&&(e=1/0),n=n||0,r=0;r<t.length;r++)if(i=t.charCodeAt(r),9==i?n+=this.getScreenTabSize(n):i>=4352&&A(i)?n+=2:n+=1,n>e)break;return[n,r]},t.prototype.getRowLength=function(t){var e=1;return this.lineWidgets&&(e+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+e:e},t.prototype.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},t.prototype.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),n=this.$wrapData[e.row];return n.length&&n[0]<e.column?n.indent:0}return 0},t.prototype.getScreenLastRowColumn=function(t){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},t.prototype.getDocumentLastRowColumn=function(t,e){var n=this.documentToScreenRow(t,e);return this.getScreenLastRowColumn(n)},t.prototype.getDocumentLastRowColumnPosition=function(t,e){var n=this.documentToScreenRow(t,e);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},t.prototype.getRowSplitData=function(t){return this.$useWrapMode?this.$wrapData[t]:void 0},t.prototype.getScreenTabSize=function(t){return this.$tabSize-(t%this.$tabSize|0)},t.prototype.screenToDocumentRow=function(t,e){return this.screenToDocumentPosition(t,e).row},t.prototype.screenToDocumentColumn=function(t,e){return this.screenToDocumentPosition(t,e).column},t.prototype.screenToDocumentPosition=function(t,e,n){if(t<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,l=0,c=this.$screenRowCache,u=this.$getRowCacheIndex(c,t),h=c.length;if(h&&u>=0){a=c[u],o=this.$docRowCache[u];var d=t>c[h-1]}else d=!h;var f=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;while(a<=t){if(l=this.getRowLength(o),a+l>t||o>=f)break;a+=l,o++,o>g&&(o=p.end.row+1,p=this.getNextFoldLine(o,p),g=p?p.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+l<=t||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[o];y&&(r=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(e=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,e-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},t.prototype.documentToScreenPosition=function(t,e){if("undefined"===typeof e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);t=n.row,e=n.column;var i=0,r=null,o=null;o=this.getFoldAt(t,e,1),o&&(t=o.start.row,e=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),u=l.length;if(u&&c>=0){a=l[c],i=this.$screenRowCache[c];var h=t>l[u-1]}else h=!u;var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;while(a<t){if(a>=f){if(s=d.end.row+1,s>t)break;d=this.getNextFoldLine(s,d),f=d?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,t,e),r=d.start.row):(p=this.getLine(t).substring(0,e),r=t);var g=0;if(this.$useWrapMode){var m=this.$wrapData[r];if(m){var v=0;while(p.length>=m[v])i++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:g+this.$getStringScreenWidth(p)[0]}},t.prototype.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},t.prototype.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},t.prototype.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode){var n=this.$wrapData.length,i=0,r=(a=0,e=this.$foldData[a++],e?e.start.row:1/0);while(i<n){var o=this.$wrapData[i];t+=o?o.length+1:1,i++,i>r&&(i=e.end.row+1,e=this.$foldData[a++],r=e?e.start.row:1/0)}}else{t=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e=s[a],t-=e.end.row-e.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t},t.prototype.$setFontMetrics=function(t){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<e.length;o++)if(r=e.charAt(o),i+="\t"===r?this.getScreenTabSize(i):t.getCharacterWidth(r),i>n)break;return[i,o]})},t.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()},t}();g.$uid=0,g.prototype.$modes=s.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=A,i.implement(g.prototype,a);var m=1,v=2,y=3,w=4,b=9,_=10,x=11,S=12;function A(t){return!(t<4352)&&(t>=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}t("./edit_session/folding").Folding.call(g.prototype),t("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){t="auto"==t?"text"!=this.$mode.type:"text"!=t,t!=this.$wrapAsCode&&(this.$wrapAsCode=t,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(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){t=parseInt(t),t>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./lib/oop"),o=t("./range").Range,s=function(){function t(){this.$options={}}return t.prototype.set=function(t){return r.mixin(this.$options,t),this},t.prototype.getOptions=function(){return i.copyObject(this.$options)},t.prototype.setOptions=function(t){this.$options=t},t.prototype.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach((function(t,n,r,s){return i=new o(t,n,r,s),!(n==s&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start))||(i=null,!1)})),i},t.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),s=[],a=e.re;if(e.$isMultiLine){var l,c=a.length,u=r.length-c;t:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue t;var f=r[h],p=r[h+c-1],g=f.length-f.match(a[0])[0].length,m=p.match(a[c-1])[0].length;l&&l.end.row===h&&l.end.column>g||(s.push(l=new o(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;v<r.length;v++){var y=i.getMatchOffsets(r[v],a);for(d=0;d<y.length;d++){var w=y[d];s.push(new o(v,w.offset,v,w.offset+w.length))}}if(n){var b=n.start.column,_=n.end.column;v=0,d=s.length-1;while(v<d&&s[v].start.column<b&&0==s[v].start.row)v++;var x=n.end.row-n.start.row;while(v<d&&s[d].end.column>_&&s[d].end.row==x)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},t.prototype.replace=function(t,e){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(i){var r=i.exec(t);if(!r||r[0].length!=t.length)return null;if(e=t.replace(i,e),n.preserveCase){e=e.split("");for(var o=Math.min(t.length,t.length);o--;){var s=t[o];s&&s.toLowerCase()!=s?e[o]=e[o].toUpperCase():e[o]=e[o].toLowerCase()}e=e.join("")}return e}},t.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=i.escapeRegExp(n));var r=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,r+="u"}catch(s){t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(n=a(n,t)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(s){o=!1}return t.re=o},t.prototype.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],e))}catch(o){return!1}return i},t.prototype.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var r=1==e.backwards,o=0!=e.skipCurrent,s=n.unicode,a=e.range,l=e.start;l||(l=a?a[r?"end":"start"]:t.selection.getRange()),l.start&&(l=l[o!=r?"end":"start"]);var c=a?a.start.row:0,u=a?a.end.row:t.getLength()-1;if(r)var h=function(t){var n=l.row;if(!f(n,l.column,t)){for(n--;n>=c;n--)if(f(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=u,c=l.row;n>=c;n--)if(f(n,Number.MAX_VALUE,t))return}};else h=function(t){var n=l.row;if(!f(n,l.column,t)){for(n+=1;n<=u;n++)if(f(n,0,t))return;if(0!=e.wrap)for(n=c,u=l.row;n<=u;n++)if(f(n,0,t))return}};if(e.$isMultiLine)var d=n.length,f=function(e,i,o){var s=r?e-d+1:e;if(!(s<0||s+d>t.getLength())){var a=t.getLine(s),l=a.search(n[0]);if(!(!r&&l<i||-1===l)){for(var c=1;c<d;c++)if(a=t.getLine(s+c),-1==a.search(n[c]))return;var u=a.match(n[d-1])[0].length;if(!(r&&u>i))return!!o(s,l,s+d-1,u)||void 0}}};else if(r)f=function(e,r,o){var a,l=t.getLine(e),c=[],u=0;n.lastIndex=0;while(a=n.exec(l)){var h=a[0].length;if(u=a.index,!h){if(u>=l.length)break;n.lastIndex=u+=i.skipEmptyMatch(l,u,s)}if(a.index+h>r)break;c.push(a.index,h)}for(var d=c.length-1;d>=0;d-=2){var f=c[d-1];h=c[d];if(o(e,f,e,f+h))return!0}};else f=function(e,r,o){var a,l,c=t.getLine(e);n.lastIndex=r;while(l=n.exec(c)){var u=l[0].length;if(a=l.index,o(e,a,e,a+u))return!0;if(!u&&(n.lastIndex=a+=i.skipEmptyMatch(c,a,s),a>=c.length))return!1}};return{forEach:h}},t}();function a(t,e){var n=i.supportsLookbehind();function r(t,i){void 0===i&&(i=!0);var r=n&&e.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return r.test(t)||e.regExp?n&&e.$supportsUnicodeFlag?i?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(t),s=o[0],a=o[o.length-1];return r(s)+t+r(a,!1)}e.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../lib/keys"),o=t("../lib/useragent"),s=r.KEY_MODS,a=function(){function t(t,e){this.$init(t,e,!1)}return t.prototype.$init=function(t,e,n){this.platform=e||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},t.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},t.prototype.removeCommand=function(t,e){var n=t&&("string"===typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==t)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(t);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},t.prototype.bindKey=function(t,e,n){if("object"==typeof t&&t&&(void 0==n&&(n=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach((function(t){var i="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach((function(t){var e=this.parseKeys(t),n=s[e.hashId]+e.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var o=this.parseKeys(t),a=s[o.hashId]+o.key;this._addCommandToBinding(i+a,e,n)}),this)},t.prototype._addCommandToBinding=function(t,e,n){var i,r=this.commandKeyBinding;if(e)if(!r[t]||this.$singleCommand)r[t]=e;else{Array.isArray(r[t])?-1!=(i=r[t].indexOf(e))&&r[t].splice(i,1):r[t]=[r[t]],"number"!=typeof n&&(n=l(e));var o=r[t];for(i=0;i<o.length;i++){var s=o[i],a=l(s);if(a>n)break}o.splice(i,0,e)}else delete r[t]},t.prototype.addCommands=function(t){t&&Object.keys(t).forEach((function(e){var n=t[e];if(n){if("string"===typeof n)return this.bindKey(n,e);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=e),this.addCommand(n))}}),this)},t.prototype.removeCommands=function(t){Object.keys(t).forEach((function(e){this.removeCommand(t[e])}),this)},t.prototype.bindKeys=function(t){Object.keys(t).forEach((function(e){this.bindKey(e,t[e])}),this)},t.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},t.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(t){return t})),n=e.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=e.length;s--;){var a=r.KEY_MODS[e[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[s]+" in "+t),!1;o|=a}return{key:n,hashId:o}},t.prototype.findKeyCommand=function(t,e){var n=s[t]+e;return this.commandKeyBinding[n]},t.prototype.handleKeyboard=function(t,e,n,i){if(!(i<0)){var r=s[e]+n,o=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,o=this.commandKeyBinding[t.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||i>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:o}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},t.prototype.getStatusText=function(t,e){return e.$keyChain||""},t}();function l(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}var c=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.$singleCommand=!0,i}return i(e,t),e}(a);c.call=function(t,e,n){a.prototype.$init.call(t,e,n,!0)},a.call=function(t,e,n){a.prototype.$init.call(t,e,n,!1)},e.HashHandler=c,e.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("../lib/oop"),o=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,a=function(t){function e(e,n){var i=t.call(this,n,e)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)})),i}return i(e,t),e.prototype.exec=function(t,e,n){if(Array.isArray(t)){for(var i=t.length;i--;)if(this.exec(t[i],e,n))return!0;return!1}if("string"===typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},e.prototype.toggleRecording=function(t){if(!this.$inReplay)return t&&t._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(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},e.prototype.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach((function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])}),this)}finally{this.$inReplay=!1}}},e.prototype.trimMacro=function(t){return t.map((function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t}))},e}(o);r.implement(a.prototype,s),e.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(t,e,n){"use strict";var i=t("../lib/lang"),r=t("../config"),o=t("../range").Range;function s(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",(function(e){e.init(t),t.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(t){r.loadModule("ace/ext/error_marker",(function(e){e.showErrorMarker(t,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("ace/ext/error_marker",(function(e){e.showErrorMarker(t,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(t,e){"number"!==typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),n=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(i.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),s=t.session.doc.getLine(n.row).length,a=t.session.doc.getTextRange(t.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=t.session.doc.getLine(n.row),u=n.row+1;u<=r.row+1;u++){var h=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(u)));0!==h.length&&(h=" "+h),c+=h}r.row+1<t.session.doc.getLength()-1&&(c+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new o(n.row,0,r.row+2,0),c),l>0?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+l)):(s=t.session.doc.getLine(n.row).length>s?s+1:s,t.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===e&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,e,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));t.exitMultiSelectMode(),t.clearSelection();for(s=0;s<r.length;s++)t.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var e=t.getCursorPosition();t.selection.moveTo(e.row-1,Number.MAX_VALUE),t.insert("\n"),0===e.row&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(t){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),t.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)e.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("./lib/dom"),r=function(){function t(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return t.prototype.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this["$useWrapMode"]&&this["$wrapData"][t]?this["$wrapData"][t].length+1+e:1+e},t.prototype.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach((function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)})),t},t.prototype.$onChangeEditor=function(t){this.attach(t.editor)},t.prototype.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},t.prototype.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))}))}},t.prototype.updateOnFold=function(t,e){var n=e.lineWidgets;if(n&&t.action){for(var i=t.data,r=i.start.row,o=i.end.row,s="add"==t.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},t.prototype.updateOnChange=function(t){var e=this.session.lineWidgets;if(e){var n=t.start.row,i=t.end.row-n;if(0===i);else if("remove"==t.action){var r=e.splice(n+1,i);!e[n]&&r[r.length-1]&&(e[n]=r.pop()),r.forEach((function(t){t&&this.removeLineWidget(t)}),this),this.$updateRows()}else{var o=new Array(i);e[n]&&null!=e[n].column&&t.start.column>e[n].column&&n++,o.unshift(n,0),e.splice.apply(e,o),this.$updateRows()}}},t.prototype.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach((function(t,n){if(t){e=!1,t.row=n;while(t.$oldWidget)t.$oldWidget.row=n,t=t.$oldWidget}})),e&&(this.session.lineWidgets=null)}},t.prototype.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];return e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t},t.prototype.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var e=this.editor.renderer;t.html&&!t.el&&(t.el=i.createElement("div"),t.el.innerHTML=t.html),t.text&&!t.el&&(t.el=i.createElement("div"),t.el.textContent=t.text),t.el&&(i.addCssClass(t.el,"ace_lineWidgetContainer"),t.className&&i.addCssClass(t.el,t.className),t.el.style.position="absolute",t.el.style.zIndex="5",e.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex="3"),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight);var n=this.session.getFoldAt(t.row,0);if(t.$fold=n,n){var r=this.session.lineWidgets;t.row!=n.end.row||r[n.start.row]?t.hidden=!0:r[n.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),this.onWidgetChanged(t),t},t.prototype.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(n){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else while(e){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},t.prototype.getWidgetsAtRow=function(t){var e=this.session.lineWidgets,n=e&&e[t],i=[];while(n)i.push(n),n=n.$oldWidget;return i},t.prototype.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},t.prototype.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,e.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row),a<0&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},t.prototype.renderWidgets=function(t,e){var n=e.layerConfig,i=this.session.lineWidgets;if(i){var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);while(r>0&&!i[r])r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=e.scrollBar.getWidth()+"px":a.el.style.right=""}}}},t}();e.LineWidgets=r})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../mouse/default_gutter_handler").GutterTooltip,o=function(){function t(t){this.editor=t,this.gutterLayer=t.renderer.$gutterLayer,this.element=t.renderer.$gutter,this.lines=t.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new r(this.editor)}return t.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))},t.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))},t.prototype.$onGutterKeyDown=function(t){if(this.annotationTooltip.isOpen)return t.preventDefault(),void(t.keyCode===i["escape"]&&this.annotationTooltip.hideTooltip());if(t.target===this.element){if(t.keyCode!=i["enter"])return;t.preventDefault();var e=this.editor.getCursorPosition().row;return this.editor.isRowVisible(e)||this.editor.scrollToLine(e,!0,!0),void setTimeout(function(){var t=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),e=this.$findNearestFoldWidget(t),n=this.$findNearestAnnotation(t);if(null!==e||null!==n)return null===e&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==e&&null===n?(this.activeRowIndex=e,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-t)<Math.abs(e-t)?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=e,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(t),setTimeout(function(){this.editor._signal("gutterkeydown",new s(t,this))}.bind(this),10)},t.prototype.$handleGutterKeyboardInteraction=function(t){if(t.keyCode!==i["tab"]){if(t.keyCode===i["escape"])return t.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(t.keyCode!==i["up"])if(t.keyCode!==i["down"]){if(t.keyCode===i["left"])return t.preventDefault(),void this.$switchLane("annotation");if(t.keyCode===i["right"])return t.preventDefault(),void this.$switchLane("fold");if(t.keyCode!==i["enter"]&&t.keyCode!==i["space"]);else switch(t.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var e=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),t),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==e&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(e),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],r=n.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=r.right+"px",o.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}}else switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}else switch(t.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}}else t.preventDefault()},t.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},t.prototype.$isFoldWidgetVisible=function(t){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),n="none"!==this.$getFoldWidget(t).style.display;return e&&n},t.prototype.$isAnnotationVisible=function(t){var e=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),n="none"!==this.$getAnnotation(t).style.display;return e&&n},t.prototype.$getFoldWidget=function(t){var e=this.lines.get(t),n=e.element;return n.childNodes[1]},t.prototype.$getAnnotation=function(t){var e=this.lines.get(t),n=e.element;return n.childNodes[2]},t.prototype.$findNearestFoldWidget=function(t){if(this.$isFoldWidgetVisible(t))return t;var e=0;while(t-e>0||t+e<this.lines.getLength()-1){if(e++,t-e>=0&&this.$isFoldWidgetVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(t+e))return t+e}return null},t.prototype.$findNearestAnnotation=function(t){if(this.$isAnnotationVisible(t))return t;var e=0;while(t-e>0||t+e<this.lines.getLength()-1){if(e++,t-e>=0&&this.$isAnnotationVisible(t-e))return t-e;if(t+e<=this.lines.getLength()-1&&this.$isAnnotationVisible(t+e))return t+e}return null},t.prototype.$focusFoldWidget=function(t){if(null!=t){var e=this.$getFoldWidget(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},t.prototype.$focusAnnotation=function(t){if(null!=t){var e=this.$getAnnotation(t);e.classList.add(this.editor.renderer.keyboardFocusClassName),e.focus()}},t.prototype.$blurFoldWidget=function(t){var e=this.$getFoldWidget(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},t.prototype.$blurAnnotation=function(t){var e=this.$getAnnotation(t);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},t.prototype.$moveFoldWidgetUp=function(){var t=this.activeRowIndex;while(t>0)if(t--,this.$isFoldWidgetVisible(t))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,void this.$focusFoldWidget(this.activeRowIndex)},t.prototype.$moveFoldWidgetDown=function(){var t=this.activeRowIndex;while(t<this.lines.getLength()-1)if(t++,this.$isFoldWidgetVisible(t))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,void this.$focusFoldWidget(this.activeRowIndex)},t.prototype.$moveAnnotationUp=function(){var t=this.activeRowIndex;while(t>0)if(t--,this.$isAnnotationVisible(t))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,void this.$focusAnnotation(this.activeRowIndex)},t.prototype.$moveAnnotationDown=function(){var t=this.activeRowIndex;while(t<this.lines.getLength()-1)if(t++,this.$isAnnotationVisible(t))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,void this.$focusAnnotation(this.activeRowIndex)},t.prototype.$switchLane=function(t){switch(t){case"annotation":if("annotation"===this.activeLane)break;var e=this.$findNearestAnnotation(this.activeRowIndex);if(null==e)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(null==n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);break}},t.prototype.$rowIndexToRow=function(t){var e=this.lines.get(t);return e?e.row:null},t.prototype.$rowToRowIndex=function(t){for(var e=0;e<this.lines.getLength();e++){var n=this.lines.get(e);if(n.row==t)return e}return null},t}();e.GutterKeyboardHandler=o;var s=function(){function t(t,e){this.gutterKeyboardHandler=e,this.domEvent=t}return t.prototype.getKey=function(){return i.keyCodeToString(this.domEvent.keyCode)},t.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},t.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},t.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},t}();e.GutterKeyboardEvent=s})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],(function(t,e,n){"use strict";var i=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/lang"),a=t("./lib/useragent"),l=t("./keyboard/textinput").TextInput,c=t("./mouse/mouse_handler").MouseHandler,u=t("./mouse/fold_handler").FoldHandler,h=t("./keyboard/keybinding").KeyBinding,d=t("./edit_session").EditSession,f=t("./search").Search,p=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,m=t("./commands/command_manager").CommandManager,v=t("./commands/default_commands").commands,y=t("./config"),w=t("./token_iterator").TokenIterator,b=t("./line_widgets").LineWidgets,_=t("./keyboard/gutter_handler").GutterKeyboardHandler,x=t("./config").nls,S=t("./clipboard"),A=t("./lib/keys"),C=function(){function t(e,n,i){this.session,this.$toDestroy=[];var r=e.getContainerElement();this.container=r,this.renderer=e,this.id="editor"+ ++t.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new f).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(t,e){e._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new d("")),y.resetOptions(this),i&&this.setOptions(i),y._signal("editor",this)}return t.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.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)},t.prototype.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},t.prototype.endOperation=function(t){if(this.curOp&&this.session){if(t&&!1===t.returnValue||!this.session)return this.curOp=null;if(1==t&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var e=this.curOp.command,n=e&&e.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},t.prototype.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=this.$mergeableCommands,i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},t.prototype.setKeyboardHandler=function(t,e){if(t&&"string"===typeof t&&"ace"!=t){this.$keybindingId=t;var n=this;y.loadModule(["keybinding",t],(function(i){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(i&&i.handler),e&&e()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},t.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},t.prototype.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){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 n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.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=t.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(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&!t.destroyed&&t.bgTokenizer.scheduleStart()}},t.prototype.getSession=function(){return this.session},t.prototype.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},t.prototype.getValue=function(){return this.session.getValue()},t.prototype.getSelection=function(){return this.selection},t.prototype.resize=function(t){this.renderer.onResize(t)},t.prototype.setTheme=function(t,e){this.renderer.setTheme(t,e)},t.prototype.getTheme=function(){return this.renderer.getTheme()},t.prototype.setStyle=function(t){this.renderer.setStyle(t)},t.prototype.unsetStyle=function(t){this.renderer.unsetStyle(t)},t.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},t.prototype.setFontSize=function(t){this.setOption("fontSize",t)},t.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout((function(){t.$highlightPending=!1;var e=t.session;if(e&&!e.destroyed){e.$bracketHighlight&&(e.$bracketHighlight.markerIds.forEach((function(t){e.removeMarker(t)})),e.$bracketHighlight=null);var n=t.getCursorPosition(),i=t.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(t),o=e.getMatchingBracketRanges(n,r);if(!o){var s=new w(e,n.row,n.column),a=s.getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var l=e.getMatchingTags(n);l&&(o=[l.openTagName,l.closeTagName])}}if(!o&&e.$mode.getMatching&&(o=e.$mode.getMatching(t.session)),o){var c="ace_bracket";Array.isArray(o)?1==o.length&&(c="ace_error_bracket"):o=[o],2==o.length&&(0==p.comparePoints(o[0].end,o[1].start)?o=[p.fromPoints(o[0].start,o[1].end)]:0==p.comparePoints(o[0].start,o[1].end)&&(o=[p.fromPoints(o[1].start,o[0].end)])),e.$bracketHighlight={ranges:o,markerIds:o.map((function(t){return e.addMarker(t,c,"text")}))},t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}else t.getHighlightIndentGuides()&&t.renderer.$textLayer.$highlightIndentGuide()}}),50)}},t.prototype.focus=function(){this.textInput.focus()},t.prototype.isFocused=function(){return this.textInput.isFocused()},t.prototype.blur=function(){this.textInput.blur()},t.prototype.onFocus=function(t){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",t))},t.prototype.onBlur=function(t){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",t))},t.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},t.prototype.onDocumentChange=function(t){var e=this.session.$useWrapMode,n=t.start.row==t.end.row?t.end.row:1/0;this.renderer.updateLines(t.start.row,n,e),this._signal("change",t),this.$cursorChange()},t.prototype.onTokenizerUpdate=function(t){var e=t.data;this.renderer.updateLines(e.first,e.last)},t.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},t.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},t.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},t.prototype.$updateHighlightActiveLine=function(){var t,e=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},t.prototype.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},t.prototype.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column,i=e.end.column,r=t.getLine(e.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=r.substring(n-1,i+1);if(s.test(a))return s}}},t.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},t.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},t.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},t.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},t.prototype.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},t.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},t.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},t.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},t.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},t.prototype.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),n=!1;if(!t&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;r<i.length;r++){var o=i[r];r&&i[r-1].start.row==o.start.row||(t+=this.session.getLine(o.start.row)+e)}}var s={text:t};return this._signal("copy",s),S.lineMode=!!n&&s.text,s.text},t.prototype.onCopy=function(){this.commands.exec("copy",this)},t.prototype.onCut=function(){this.commands.exec("cut",this)},t.prototype.onPaste=function(t,e){var n={text:t,event:e};this.commands.exec("paste",this,n)},t.prototype.$handlePaste=function(t){"string"==typeof t&&(t={text:t}),this._signal("paste",t);var e=t.text,n=e===S.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},e):this.insert(e);else if(n)this.selection.rangeList.ranges.forEach((function(t){i.insert({row:t.start.row,column:0},e)}));else{var r=e.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,s=2==r.length&&(!r[0]||!r[1]);if(r.length!=o.length||s)return this.commands.exec("insertstring",this,e);for(var a=o.length;a--;){var l=o[a];l.isEmpty()||i.remove(l),i.insert(l.start,r[a])}}},t.prototype.execCommand=function(t,e){return this.commands.exec(t,this,e)},t.prototype.insert=function(t,e){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!e){var o=i.transformAction(n.getState(r.row),"insertion",this,n,t);o&&(t!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),t=o.text)}if("\t"==t&&(t=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==t.indexOf("\n")){s=p.fromPoints(r,r);s.end.column+=t.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==t||"\r\n"==t){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,t));if(n.insert(r,t),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)}},t.prototype.autoIndent=function(){var t,e,n=this.session,i=n.getMode();if(this.selection.isEmpty())t=0,e=n.doc.getLength()-1;else{var r=this.getSelectionRange();t=r.start.row,e=r.end.row}for(var o,s,a,l="",c="",u="",h=n.getTabString(),d=t;d<=e;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),o=n.getLine(d),s=i.$getIndent(o),u!==s&&(s.length>0&&(a=new p(d,0,d,s.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},t.prototype.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},t.prototype.applyComposition=function(t,e){if(e.extendLeft||e.extendRight){var n=this.selection.getRange();n.start.column-=e.extendLeft,n.end.column+=e.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),t||n.isEmpty()||this.remove()}if(!t&&this.selection.isEmpty()||this.insert(t,!0),e.restoreStart||e.restoreEnd){n=this.selection.getRange();n.start.column-=e.restoreStart,n.end.column-=e.restoreEnd,this.selection.setRange(n)}},t.prototype.onCommandKey=function(t,e,n){return this.keyBinding.onCommandKey(t,e,n)},t.prototype.setOverwrite=function(t){this.session.setOverwrite(t)},t.prototype.getOverwrite=function(){return this.session.getOverwrite()},t.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},t.prototype.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},t.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},t.prototype.setDragDelay=function(t){this.setOption("dragDelay",t)},t.prototype.getDragDelay=function(){return this.getOption("dragDelay")},t.prototype.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},t.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},t.prototype.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},t.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},t.prototype.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},t.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},t.prototype.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},t.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},t.prototype.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},t.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},t.prototype.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},t.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},t.prototype.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},t.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},t.prototype.setHighlightIndentGuides=function(t){this.renderer.setHighlightIndentGuides(t)},t.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},t.prototype.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},t.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},t.prototype.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},t.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},t.prototype.setReadOnly=function(t){this.setOption("readOnly",t)},t.prototype.getReadOnly=function(){return this.getOption("readOnly")},t.prototype.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},t.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},t.prototype.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},t.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},t.prototype.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},t.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},t.prototype.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},t.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},t.prototype.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var o=n.getTextRange(e);if("\n"==o[o.length-1]){var s=n.getLine(e.end.row);/^\s+$/.test(s)&&(e.end.column=s.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},t.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},t.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},t.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},t.prototype.setGhostText=function(t,e){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(t,e)},t.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},t.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);e<r.length?(n=r.charAt(e)+r.charAt(e-1),i=new p(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new p(t.row,e-2,t.row,e)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},t.prototype.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toLowerCase()),this.selection.setSelectionRange(t)},t.prototype.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toUpperCase()),this.selection.setSelectionRange(t)},t.prototype.indent=function(){var t=this.session,e=this.getSelectionRange();if(!(e.start.row<e.end.row)){if(e.start.column<e.end.column){var n=t.getTextRange(e);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void t.indentRows(u.first,u.last,"\t")}}var i=t.getLine(e.start.row),r=e.start,o=t.getTabSize(),a=t.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var l=o-a%o,c=s.stringRepeat(" ",l);else{l=a%o;while(" "==i[e.start.column-1]&&l)e.start.column--,l--;this.selection.setSelectionRange(e),c="\t"}return this.insert(c)}var u=this.$getSelectedRows();t.indentRows(u.first,u.last,"\t")},t.prototype.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"\t")},t.prototype.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},t.prototype.sortLines=function(){for(var t=this.$getSelectedRows(),e=this.session,n=[],i=t.first;i<=t.last;i++)n.push(e.getLine(i));n.sort((function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:t.toLowerCase()>e.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(i=t.first;i<=t.last;i++){var o=e.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,e.replace(r,n[i-t.first])}},t.prototype.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},t.prototype.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},t.prototype.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var i=this.session.getLine(t);while(n.lastIndex<e){var r=n.exec(i);if(r.index<=e&&r.index+r[0].length>=e){var o={value:r[0],start:r.index,end:r.index+r[0].length};return o}}return null},t.prototype.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new p(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(e,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),s!==o.end&&n<s?t*=Math.pow(10,o.end-n-1):t*=Math.pow(10,o.end-n),l+=t,l/=Math.pow(10,a);var c=l.toFixed(a),u=new p(e,o.start,e,o.end);this.session.replace(u,c),this.moveCursorTo(e,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},t.prototype.toggleWord=function(){var t=this.selection.getCursor().row,e=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,r=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-i-1;o<0&&(o=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&r.forEach((function(e,r){l=a+e.length,o>=a&&o<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l}));for(var u,h=this.$toggleWordPairs,d=0;d<h.length;d++)for(var f=h[d],p=0;p<=1;p++){var g=+!p,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(f[p])+")\\s?$","i"));if(m){var v=n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"));v&&(u=n.replace(new RegExp(s.escapeRegExp(f[p]),"i"),(function(t){var e=f[g];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+f[g].charAt(0).toUpperCase()+e.substr(1)),e})),this.insert(u),u="")}}},t.prototype.findLinkAt=function(t,e){var n,r,o=this.session.getLine(t),s=o.split(/((?:https?|ftp):\/\/[\S]+)/),a=e;a<0&&(a=0);var l,c=0,u=0;try{for(var h=i(s),d=h.next();!d.done;d=h.next()){var f=d.value;if(u=c+f.length,a>=c&&a<=u&&f.match(/((?:https?|ftp):\/\/[\S]+)/)){l=f.replace(/[\s:.,'";}\]]+$/,"");break}c=u}}catch(p){n={error:p}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return l},t.prototype.openLink=function(){var t=this.selection.getCursor(),e=this.findLinkAt(t.row,t.column);return e&&window.open(e,"_blank"),null!=e},t.prototype.removeLines=function(){var t=this.$getSelectedRows();this.session.removeFullLines(t.first,t.last),this.clearSelection()},t.prototype.duplicateSelection=function(){var t=this.selection,e=this.session,n=t.getRange(),i=t.isBackwards();if(n.isEmpty()){var r=n.start.row;e.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=e.insert(o,e.getTextRange(n));n.start=o,n.end=s,t.setSelectionRange(n,i)}},t.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},t.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},t.prototype.moveText=function(t,e,n){return this.session.moveText(t,e,n)},t.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},t.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},t.prototype.$moveLines=function(t,e){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,e?0:t),e&&-1==t&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,u=0;u<c;u++){var h=u;s[u].moveBy(a,0),n=this.$getSelectedRows(s[u]);var d=n.first,f=n.last;while(++u<c){l&&s[u].moveBy(l,0);var p=this.$getSelectedRows(s[u]);if(e&&p.first!=f)break;if(!e&&p.first>f+1)break;f=p.last}u--,a=this.session.$moveLines(d,f,e?0:t),e&&-1==t&&(h=u+1);while(h<=u)s[h].moveBy(a,0),h++;e||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},t.prototype.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},t.prototype.onCompositionStart=function(t){this.renderer.showComposition(t)},t.prototype.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},t.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},t.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},t.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},t.prototype.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},t.prototype.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},t.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},t.prototype.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);!0===e?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},t.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},t.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},t.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},t.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},t.prototype.scrollPageDown=function(){this.$moveByPage(1)},t.prototype.scrollPageUp=function(){this.$moveByPage(-1)},t.prototype.scrollToRow=function(t){this.renderer.scrollToRow(t)},t.prototype.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},t.prototype.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},t.prototype.getCursorPosition=function(){return this.selection.getCursor()},t.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},t.prototype.getSelectionRange=function(){return this.selection.getRange()},t.prototype.selectAll=function(){this.selection.selectAll()},t.prototype.clearSelection=function(){this.selection.clearSelection()},t.prototype.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},t.prototype.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},t.prototype.jumpToMatching=function(t,e){var n=this.getCursorPosition(),i=new w(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var s=r||i.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h<s.value.length&&!c;h++)if(d[s.value[h]])switch(l=d[s.value[h]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[h]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0);break}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&o>1?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value]&&(a="tag",c=!0));c||(r=s,o++,s=i.stepForward(),h=0)}while(s&&!c);if(a){var f,g;if("bracket"===a)f=this.session.getBracketRange(n),f||(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1),g=f.start,(e||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(f=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(f=new p(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===f.compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?(f=m.closeTag,g=f.start):(f=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?f.end:f.start))}g=g||f.start}g=f&&f.cursor||g,g&&(t?f&&e?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(g.row,g.column):this.selection.moveTo(g.row,g.column))}}},t.prototype.gotoLine=function(t,e,n){this.selection.clearSelection(),this.session.unfold({row:t-1,column:e||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,e||0),this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,n)},t.prototype.navigateTo=function(t,e){this.selection.moveTo(t,e)},t.prototype.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(-t||-1,0)},t.prototype.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(t||1,0)},t.prototype.navigateLeft=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorLeft()}else{var e=this.getSelectionRange().start;this.moveCursorToPosition(e)}this.clearSelection()},t.prototype.navigateRight=function(t){if(this.selection.isEmpty()){t=t||1;while(t--)this.selection.moveCursorRight()}else{var e=this.getSelectionRange().end;this.moveCursorToPosition(e)}this.clearSelection()},t.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},t.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},t.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},t.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},t.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},t.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},t.prototype.replace=function(t,e){e&&this.$search.set(e);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,t)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},t.prototype.replaceAll=function(t,e){e&&this.$search.set(e);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],t)&&i++;return this.selection.setSelectionRange(r),i},t.prototype.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return e=this.$search.replace(n,e),null!==e?(t.end=this.session.replace(t,e),t):null},t.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},t.prototype.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&r.mixin(e,t);var i=this.selection.getRange();null==e.needle&&(t=this.session.getTextRange(i)||this.$search.$options.needle,t||(i=this.session.getWordRange(i.start.row,i.start.column),t=this.session.getTextRange(i)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:i});var o=this.$search.find(this.session);return e.preventScroll?o:o?(this.revealRange(o,n),o):(e.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},t.prototype.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},t.prototype.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},t.prototype.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(n)},t.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},t.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},t.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(t){t.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()},t.prototype.setAutoScrollEditorIntoView=function(t){if(t){var e,n=this,i=!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 o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(e=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&e&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var t=n.renderer,o=t.$cursorLayer.$pixelPos,s=t.layerConfig,a=o.top-s.offset;i=o.top>=0&&a+e.top<0||!(o.top<s.height&&o.top+e.top+s.lineHeight>window.innerHeight)&&null,null!=i&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=e=null}}));this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},t.prototype.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,o.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},t.prototype.prompt=function(t,e,n){var i=this;y.loadModule("ace/ext/prompt",(function(r){r.prompt(i,t,e,n)}))},t}();C.$uid=0,C.prototype.curOp=null,C.prototype.prevOp={},C.prototype.$mergeableCommands=["backspace","del","insertstring"],C.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"],["&&","||"],["==","!="]],r.implement(C.prototype,g),y.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){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(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?k.attach(this):k.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var t=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(t||this.renderer.placeholderNode)!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var e=o.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(t){var e,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(t){t.blur(),t.renderer.scroller.focus()},readOnly:!0},i=function(t){if(t.target==this.renderer.scroller&&t.keyCode===A["enter"]){t.preventDefault();var e=this.getCursorPosition().row;this.isRowVisible(e)||this.scrollToLine(e,!0,!0),this.focus()}};t?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),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",x("editor")),this.renderer.$gutter.setAttribute("aria-label",x("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),e||(e=new _(this)),e.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",i.bind(this)),this.commands.removeCommand(n),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),e&&e.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 k={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"·":""))+""},getWidth:function(t,e,n){return Math.max(e.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=C})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t,e){this.element=t,this.canvasHeight=e||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return t.prototype.moveContainer=function(t){i.translate(this.element,0,-t.firstRowScreen*t.lineHeight%this.canvasHeight-t.offset*this.$offsetCoefficient)},t.prototype.pageChanged=function(t,e){return Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)!==Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)},t.prototype.computeLineTop=function(t,e,n){var i=e.firstRowScreen*e.lineHeight,r=Math.floor(i/this.canvasHeight),o=n.documentToScreenRow(t,0)*e.lineHeight;return o-r*this.canvasHeight},t.prototype.computeLineHeight=function(t,e,n){return e.lineHeight*n.getRowLineCount(t)},t.prototype.getLength=function(){return this.cells.length},t.prototype.get=function(t){return this.cells[t]},t.prototype.shift=function(){this.$cacheCell(this.cells.shift())},t.prototype.pop=function(){this.$cacheCell(this.cells.pop())},t.prototype.push=function(t){if(Array.isArray(t)){this.cells.push.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.appendChild(e)}else this.cells.push(t),this.element.appendChild(t.element)},t.prototype.unshift=function(t){if(Array.isArray(t)){this.cells.unshift.apply(this.cells,t);for(var e=i.createFragment(this.element),n=0;n<t.length;n++)e.appendChild(t[n].element);this.element.firstChild?this.element.insertBefore(e,this.element.firstChild):this.element.appendChild(e)}else this.cells.unshift(t),this.element.insertAdjacentElement("afterbegin",t.element)},t.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},t.prototype.$cacheCell=function(t){t&&(t.element.remove(),this.cellCache.push(t))},t.prototype.createCell=function(t,e,n,r){var o=this.cellCache.pop();if(!o){var s=i.createElement("div");r&&r(s),this.element.appendChild(s),o={element:s,text:"",row:t}}return o.row=t,o},t}();e.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,a=t("./lines").Lines,l=t("../config").nls,c=function(){function t(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(t){this.session&&this.session.off("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},t.prototype.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},t.prototype.setAnnotations=function(t){this.$annotations=[];for(var e=0;e<t.length;e++){var n=t[e],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[],type:[]});var s=n.text,a=n.type;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&(r.text.push(s),r.type.push(a));var l=n.className;l?r.className=l:"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},t.prototype.$updateAnnotations=function(t){if(this.$annotations.length){var e=t.start.row,n=t.end.row-e;if(0===n);else if("remove"==t.action)this.$annotations.splice(e,n+1,null);else{var i=new Array(n+1);i.unshift(e,1),this.$annotations.splice.apply(this.$annotations,i)}}},t.prototype.update=function(t){this.config=t;var e=this.session,n=t.firstRow,i=Math.min(t.lastRow+t.gutterOffset,e.getLength()-1);this.oldLastRow=i,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();var r=e.getNextFoldLine(n),o=r?r.start.row:1/0,s=null,a=-1,l=n;while(1){if(l>o&&(l=r.end.row+1,r=e.getNextFoldLine(l,r),o=r?r.start.row:1/0),l>i){while(this.$lines.getLength()>a+1)this.$lines.pop();break}s=this.$lines.get(++a),s?s.row=l:(s=this.$lines.createCell(l,t,this.session,u),this.$lines.push(s)),this.$renderCell(s,t,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(t)},t.prototype.$updateGutterWidth=function(t){var e=this.session,n=e.gutterRenderer||this.$renderer,i=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+i-1);var o=n?n.getWidth(e,r,t):r.toString().length*t.characterWidth,s=this.$padding||this.$computePadding();o+=s.left+s.right,o===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<e.length;n++){var i=e[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==e[n-1].row))break;i=e[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},t.prototype.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,e.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(t,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},t.prototype.$renderLines=function(t,e,n){var i=[],r=e,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;while(1){if(r>s&&(r=o.end.row+1,o=this.session.getNextFoldLine(r,o),s=o?o.start.row:1/0),r>n)break;var a=this.$lines.createCell(r,t,this.session,u);this.$renderCell(a,t,o,r),i.push(a),r++}return i},t.prototype.$renderCell=function(t,e,n,r){var o=t.element,s=this.session,a=o.childNodes[0],c=o.childNodes[1],u=o.childNodes[2],h=u.firstChild,d=s.$firstLineNumber,f=s.$breakpoints,p=s.$decorations,g=s.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&s.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=e.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",b=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",_=(g?g.getText(s,r):r+d).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&r>=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),f[r]&&(w+=f[r]),p[r]&&(w+=p[r]),this.$annotations[r]&&r!==v&&(w+=this.$annotations[r].className),m){var x=m[r];null==x&&(x=m[r]=s.getFoldWidget(r))}if(x){var S="ace_fold-widget ace_"+x,A="start"==x&&r==v&&r<n.end.row;if(A){S+=" ace_closed";for(var C="",k=!1,$=r+1;$<=n.end.row;$++)if(this.$annotations[$]){if(" ace_error"===this.$annotations[$].className){k=!0,C=" ace_error_fold";break}" ace_warning"!==this.$annotations[$].className||(k=!0,C=" ace_warning_fold")}w+=C}else S+=" ace_open";c.className!=S&&(c.className=S),i.setStyle(c.style,"height",y),i.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var T=s.getFoldWidgetRange(r);T?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[T.start.row+1,T.end.row+1])):n?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("Toggle code folding, row $0",[r+1])),A?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("Fold code")))}else c&&(i.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));return k&&this.$showFoldedAnnotations?(u.className="ace_gutter_annotation",h.className=b,h.className+=C,i.setStyle(h.style,"height",y),i.setStyle(u.style,"display","block"),i.setStyle(u.style,"height",y),u.setAttribute("aria-label",l("Read annotations row $0",[_])),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")):this.$annotations[r]?(u.className="ace_gutter_annotation",h.className=b,this.$useSvgGutterIcons?h.className+=this.$annotations[r].className:o.classList.add(this.$annotations[r].className.replace(" ","")),i.setStyle(h.style,"height",y),i.setStyle(u.style,"display","block"),i.setStyle(u.style,"height",y),u.setAttribute("aria-label",l("Read annotations row $0",[_])),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")):(i.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0")),_!==a.data&&(a.data=_),o.className!=w&&(o.className=w),i.setStyle(t.element.style,"height",this.$lines.computeLineHeight(r,e,s)+"px"),i.setStyle(t.element.style,"top",this.$lines.computeLineTop(r,e,s)+"px"),t.text=_,"none"===u.style.display&&"none"===c.style.display?t.element.setAttribute("aria-hidden",!0):t.element.setAttribute("aria-hidden",!1),t},t.prototype.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},t.prototype.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(t){t?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},t.prototype.getRegion=function(t){var e=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return t.x<e.left+n.left?"markers":this.$showFoldWidgets&&t.x>n.right-e.right?"foldWidgets":void 0},t}();function u(t){var e=document.createTextNode("");t.appendChild(e);var n=i.createElement("span");t.appendChild(n);var r=i.createElement("span");t.appendChild(r);var o=i.createElement("span");return r.appendChild(o),t}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,r.implement(c.prototype,s),e.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../range").Range,r=t("../lib/dom"),o=function(){function t(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return t.prototype.setPadding=function(t){this.$padding=t},t.prototype.setSession=function(t){this.session=t},t.prototype.setMarkers=function(t){this.markers=t},t.prototype.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},t.prototype.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,t),s=this.$padding+r.start.column*t.characterWidth;i.renderer(e,r,s,o,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)while(this.i<this.element.childElementCount)this.element.removeChild(this.element.lastChild)}},t.prototype.$getTop=function(t,e){return(t-e.firstRowScreen)*e.lineHeight},t.prototype.drawTextMarker=function(t,e,n,r,o){for(var a=this.session,l=e.start.row,c=e.end.row,u=l,h=0,d=0,f=a.getScreenLastRowColumn(u),p=new i(u,e.start.column,u,d);u<=c;u++)p.start.row=p.end.row=u,p.start.column=u==l?e.start.column:a.getRowWrapIndent(u),p.end.column=f,h=d,d=f,f=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:e.end.column,this.drawSingleLineMarker(t,p,n+(u==l?" ace_start":"")+" ace_br"+s(u==l||u==l+1&&e.start.column,h<d,d>f,u==c),r,u==c?0:1,o)},t.prototype.drawMultiLineMarker=function(t,e,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(e.start.row,i),l=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)){var c=e.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(t,c,n+" ace_br1 ace_start",i,null,r)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(e.end.row)){c=e.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(t,c,n+" ace_br12",i,null,r)}else{a=this.$getTop(e.end.row,i);var u=e.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+u+"px;top:"+a+"px;left:"+o+"px;"+(r||""))}if(s=(e.end.row-e.start.row-1)*i.lineHeight,!(s<=0)){a=this.$getTop(e.start.row+1,i);var h=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(h?" ace_br"+h:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+o+"px;"+(r||""))}},t.prototype.drawSingleLineMarker=function(t,e,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,o);var s=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i),c=this.$padding+e.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},t.prototype.drawBidiSingleLineMarker=function(t,e,n,i,r,o){var s=i.lineHeight,a=this.$getTop(e.start.row,i),l=this.$padding,c=this.session.$bidiHandler.getSelections(e.start.column,e.end.column);c.forEach((function(t){this.elt(n,"height:"+s+"px;width:"+(t.width+(r||0))+"px;top:"+a+"px;left:"+(l+t.left)+"px;"+(o||""))}),this)},t.prototype.drawFullLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;e.start.row!=e.end.row&&(s+=this.$getTop(e.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},t.prototype.drawScreenLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},t}();function s(t,e,n,i){return(t?1:0)|(e?2:0)|(n?4:0)|(i?8:0)}o.prototype.$padding=0,e.Marker=o})),ace.define("ace/layer/text_util",["require","exports","module"],(function(t,e,n){var i=new Set(["text","rparen","lparen"]);e.isTextToken=function(t){return i.has(t)}})),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,n){"use strict";var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,l=t("../config").nls,c=t("./text_util").isTextToken,u=function(){function t(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return t.prototype.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode(),n=e?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},t.prototype.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(t){this.session=t,t&&this.$computeTabString()},t.prototype.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,"string"==typeof t?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(t){return this.$highlightIndentGuides!==t&&(this.$highlightIndentGuides=t,t)},t.prototype.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;n<t+1;n++)if(this.showTabs){var i=this.dom.createElement("span");i.className="ace_invisible ace_invisible_tab",i.textContent=o.stringRepeat(this.TAB_CHAR,n),e.push(i)}else e.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):a;i=this.dom.createElement("span");i.className=r+s,i.textContent=a,this.$tabStrings[" "]=i;i=this.dom.createElement("span");i.className=r+l,i.textContent=c,this.$tabStrings["\t"]=i}},t.prototype.updateLines=function(t,e,n){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var i=Math.max(e,t.firstRow),r=Math.min(n,t.lastRow),o=this.element.childNodes,s=0,a=t.firstRow;a<i;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}var c=!1,u=(a=i,l=this.session.getNextFoldLine(a),l?l.start.row:1/0);while(1){if(a>u&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),u=l?l.start.row:1/0),a>r)break;var h=o[s++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)while(s<this.$lines.cells.length){var f=this.$lines.cells[s++];f.element.style.top=this.$lines.computeLineTop(f.row,t,this.session)+"px"}},t.prototype.scrollLines=function(t){var e=this.config;if(this.config=t,this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=t.lastRow,i=e?e.lastRow:-1;if(!e||i<t.firstRow)return this.update(t);if(n<e.firstRow)return this.update(t);if(!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(e.lastRow>t.lastRow)for(r=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,e.firstRow-1)),t.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(t,e,n){var i=[],o=e,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;while(1){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:1/0),o>n)break;var l=this.$lines.createCell(o,t,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,t,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,t,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},t.prototype.update=function(t){this.$lines.moveContainer(t),this.config=t;var e=t.firstRow,n=t.lastRow,i=this.$lines;while(i.getLength())i.pop();i.push(this.$renderLinesFragment(t,e,n))},t.prototype.$renderToken=function(t,e,n,i){var r,s=this,a=/(\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,u=this.dom.createFragment(this.element),h=0;while(r=a.exec(i)){var d=r[1],f=r[2],p=r[3],g=r[4],m=r[5];if(s.showSpaces||!f){var v=h!=r.index?i.slice(h,r.index):"";if(h=r.index+r[0].length,v&&u.appendChild(this.dom.createTextNode(v,this.element)),d){var y=s.session.getScreenTabSize(e+r.index);u.appendChild(s.$tabStrings[y].cloneNode(!0)),e+=y-1}else if(f)if(s.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(s.SPACE_CHAR,f.length),u.appendChild(w)}else u.appendChild(this.dom.createTextNode(f,this.element));else if(p){w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(s.SPACE_CHAR,p.length),u.appendChild(w)}else if(g){e+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:g,u.appendChild(w)}else if(m){e+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=m,u.appendChild(w)}}}if(u.appendChild(this.dom.createTextNode(h?i.slice(h):i,this.element)),c(n.type))t.appendChild(u);else{var b="ace_"+n.type.replace(/\./g," ace_");w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("Unfold code"))),w.className=b,w.appendChild(u),t.appendChild(w)}return e+i.length},t.prototype.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);if(i<=0||i>=n)return e;if(" "==e[0]){i-=i%this.tabSize;for(var r=i/this.tabSize,o=0;o<r;o++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}if("\t"==e[0]){for(o=0;o<i;o++)t.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(i)}return this.$highlightIndentGuide(),e},t.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var t=this.session.doc.$lines;if(t){var e=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(e.row))[0].length,i=Math.floor(n/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:i,start:e.row};var r=this.session.$bracketHighlight;if(r)for(var o=this.session.$bracketHighlight.ranges,s=0;s<o.length;s++)if(e.row!==o[s].start.row){this.$highlightIndentGuideMarker.end=o[s].start.row,e.row>o[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==t[e.row]&&e.column===t[e.row].length){this.$highlightIndentGuideMarker.dir=1;for(s=e.row+1;s<t.length;s++){var a=t[s],l=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,l<=n))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var t=this.$lines.cells,e=0;e<t.length;e++){var n=t[e],i=n.element.childNodes;if(i.length>0)for(var r=0;r<i.length;r++)if(i[r].classList&&i[r].classList.contains("ace_indent-guide-active")){i[r].classList.remove("ace_indent-guide-active");break}}},t.prototype.$setIndentGuideActive=function(t,e){var n=this.session.doc.getLine(t.row);if(""!==n){var i=t.element.childNodes;if(i){var r=i[e-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var t=this.$lines.cells;this.$clearActiveIndentGuide();var e=this.$highlightIndentGuideMarker.indentLevel;if(0!==e)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<t.length;n++){var i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}else for(n=t.length-1;n>=0;n--){i=t[n];if(this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,e)}}}},t.prototype.$createLineElement=function(t){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},t.prototype.$renderWrappedLine=function(t,e,n){var i=0,r=0,s=n[0],a=0,l=this.$createLineElement();t.appendChild(l);for(var c=0;c<e.length;c++){var u=e[c],h=u.value;if(0==c&&this.displayIndentGuides){if(i=h.length,h=this.renderIndentGuide(l,h,s),!h)continue;i-=h.length}if(i+h.length<s)a=this.$renderToken(l,a,u,h),i+=h.length;else{while(i+h.length>=s)a=this.$renderToken(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),t.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),r++,a=0,s=n[r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},t.prototype.$renderSimpleLine=function(t,e){for(var n=0,i=0;i<e.length;i++){var r=e[i],o=r.value;if(0!=i||!this.displayIndentGuides||(o=this.renderIndentGuide(t,o),o)){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,n,r,o);n=this.$renderToken(t,n,r,o)}}},t.prototype.$renderOverflowMessage=function(t,e,n,i,r){n&&this.$renderToken(t,e,n,i.slice(0,this.MAX_LINE_LENGTH-e));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"<hide>":"<click to see more...>",t.appendChild(o)},t.prototype.$renderLine=function(t,e,n){if(n||0==n||(n=this.session.getFoldLine(e)),n)var i=this.$getFoldLineTokens(e,n);else i=this.session.getTokens(e);var r=t;if(i.length){var o=this.session.getRowSplitData(e);if(o&&o.length){this.$renderWrappedLine(t,i,o);r=t.lastChild}else{r=t;this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,i)}}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showEOL&&r){n&&(e=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(s)}},t.prototype.$getFoldLineTokens=function(t,e){var n=this.session,i=[];function r(t,e,n){var r=0,o=0;while(o+t[r].value.length<e)if(o+=t[r].value.length,r++,r==t.length)return;if(o!=e){var s=t[r].value.substring(e-o);s.length>n-e&&(s=s.substring(0,n-e)),i.push({type:t[r].type,value:s}),o=e+s.length,r+=1}while(o<n&&r<t.length){s=t[r].value;s.length+o>n?i.push({type:t[r].type,value:s.substring(0,n-o)}):i.push(t[r]),o+=s.length,r+=1}}var o=n.getTokens(t);return e.walk((function(t,e,s,a,l){null!=t?i.push({type:"fold",value:t}):(l&&(o=n.getTokens(e)),o.length&&r(o,a,s))}),e.end.row,this.session.getLine(e.end.row).length),i},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,i.implement(u.prototype,a),e.Text=u})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(){function t(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return t.prototype.$updateOpacity=function(t){for(var e=this.cursors,n=e.length;n--;)i.setStyle(e[n].style,"opacity",t?"":"0")},t.prototype.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},t.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},t.prototype.setPadding=function(t){this.$padding=t},t.prototype.setSession=function(t){this.session=t},t.prototype.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},t.prototype.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},t.prototype.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,i.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},t.prototype.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},t.prototype.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},t.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},t.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},t.prototype.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=function(){this.timeoutId=setTimeout((function(){t(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){t(!0),e()}),this.blinkInterval),e()}else this.$stopCssAnimation()},t.prototype.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),r=(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},t.prototype.isCursorInView=function(t,e){return t.top>=0&&t.top<e.maxHeight},t.prototype.update=function(t){this.config=t;var e=this.session.$selectionMarkers,n=0,r=0;void 0!==e&&0!==e.length||(e=[{cursor:null}]);n=0;for(var o=e.length;n<o;n++){var s=this.getPixelPosition(e[n].cursor,!0);if(!((s.top>t.height+t.offset||s.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,t,e[n],this.session):this.isCursorInView(s,t)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(t.characterWidth)+"px"),i.setStyle(l,"height",t.lineHeight+"px")):i.setStyle(l,"display","none")}}while(this.cursors.length>r)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},t.prototype.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},t.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},t}();r.prototype.$padding=0,r.prototype.drawCursor=null,e.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/event"),a=t("./lib/event_emitter").EventEmitter,l=32768,c=function(){function t(t,e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+e,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return t.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},t}();r.implement(c.prototype,a);var u=function(t){function e(e,n){var i=t.call(this,e,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=o.scrollbarWidth(e.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return i(e,t),e.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.element.style.height=t+"px"},e.prototype.setScrollHeight=function(t){this.scrollHeight=t,t>l?(this.coeff=l/t,t=l):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},e.prototype.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)},e}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var h=function(t){function e(e,n){var i=t.call(this,e,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return i(e,t),e.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.setWidth=function(t){this.element.style.width=t+"px"},e.prototype.setInnerWidth=function(t){this.inner.style.width=t+"px"},e.prototype.setScrollWidth=function(t){this.inner.style.width=t+"px"},e.prototype.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)},e}(c);e.ScrollBar=u,e.ScrollBarV=u,e.ScrollBarH=h,e.VScrollBar=u,e.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=t("./lib/oop"),o=t("./lib/dom"),s=t("./lib/event"),a=t("./lib/event_emitter").EventEmitter;o.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var l=function(){function t(t,e){this.element=o.createElement("div"),this.element.className="ace_sb"+e,this.inner=o.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},t}();r.implement(l.prototype,a);var c=function(t){function e(e,n){var i=t.call(this,e,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=e,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return i(e,t),e.prototype.onMouseDown=function(t,e){if("mousedown"===t&&0===s.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientY,r=function(t){i=t.clientY},o=function(){clearInterval(u)},a=e.clientY,l=this.thumbTop,c=function(){if(void 0!==i){var t=n.scrollTopFromThumbTop(l+i-a);t!==n.scrollTop&&n._emit("scroll",{data:t})}};s.capture(this.inner,r,o);var u=setInterval(c,20);return s.preventDefault(e)}var h=e.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(h)}),s.preventDefault(e)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var e=t*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return e|=0,e<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,e){(this.pageHeight!==t||e)&&(this.pageHeight=t,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})))},e.prototype.setScrollTop=function(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var u=function(t){function e(e,n){var i=t.call(this,e,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return i(e,t),e.prototype.onMouseDown=function(t,e){if("mousedown"===t&&0===s.getButton(e)&&2!==e.detail){if(e.target===this.inner){var n=this,i=e.clientX,r=function(t){i=t.clientX},o=function(){clearInterval(u)},a=e.clientX,l=this.thumbLeft,c=function(){if(void 0!==i){var t=n.scrollLeftFromThumbLeft(l+i-a);t!==n.scrollLeft&&n._emit("scroll",{data:t})}};s.capture(this.inner,r,o);var u=setInterval(c,20);return s.preventDefault(e)}var h=e.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(h)}),s.preventDefault(e)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var e=t*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return e|=0,e<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},e.prototype.setWidth=function(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,e){(this.pageWidth!==t||e)&&(this.pageWidth=t,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})))},e.prototype.setScrollLeft=function(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(l);u.prototype.setInnerWidth=u.prototype.setScrollWidth,e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=u,e.VScrollBar=c,e.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(t,e,n){"use strict";var i=t("./lib/event"),r=function(){function t(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var n=this;this._flush=function(t){n.pending=!1;var e=n.changes;if(e&&(i.blockIdle(100),n.changes=0,n.onRender(e)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return t.prototype.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},t.prototype.clear=function(t){var e=this.changes;return this.changes=0,e},t}();e.RenderLoop=r})),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,n){var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("../lib/event"),a=t("../lib/useragent"),l=t("../lib/event_emitter").EventEmitter,c=512,u="function"==typeof ResizeObserver,h=200,d=function(){function t(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},t.prototype.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},t.prototype.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver((function(e){t.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},t.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=s.onIdle((function e(){t.checkForSizeChanges(),s.onIdle(e,500)}),500)},t.prototype.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/c};return 0===e.width||0===e.height?null:e},t.prototype.$measureCharWidth=function(t){this.$main.textContent=o.stringRepeat(t,c);var e=this.$main.getBoundingClientRect();return e.width/c},t.prototype.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(t){return t&&t.parentElement?(window.getComputedStyle(t)["zoom"]||1)*this.$getZoom(t.parentElement):1},t.prototype.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(h,0),t(0,h),t(h,h)],this.el)},t.prototype.transformCoordinates=function(t,e){if(t){var n=this.$getZoom(this.el);t=s(1/n,t)}function i(t,e,n){var i=t[1]*e[0]-t[0]*e[1];return[(-e[1]*n[0]+e[0]*n[1])/i,(+t[1]*n[0]-t[0]*n[1])/i]}function r(t,e){return[t[0]-e[0],t[1]-e[1]]}function o(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function a(t){var e=t.getBoundingClientRect();return[e.left,e.top]}this.els||this.$initTransformMeasureNodes();var l=a(this.els[0]),c=a(this.els[1]),u=a(this.els[2]),d=a(this.els[3]),f=i(r(d,c),r(d,u),r(o(c,u),o(d,l))),p=s(1+f[0],r(c,l)),g=s(1+f[1],r(u,l));if(e){var m=e,v=f[0]*m[0]/h+f[1]*m[1]/h+1,y=o(s(m[0],p),s(m[1],g));return o(s(1/v/h,y),l)}var w=r(t,l),b=i(r(p,s(f[0],w)),r(g,s(f[1],w)),w);return s(h,b)},t}();d.prototype.$characterSize={width:0,height:0},i.implement(d.prototype,l),e.FontMetrics=d})),ace.define("ace/css/editor-css",["require","exports","module"],(function(t,e,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts &nbsp; instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n white-space: pre;\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/event_emitter").EventEmitter,s=function(){function t(t,e){this.canvas=i.createElement("canvas"),this.renderer=e,this.pixelRatio=1,this.maxHeight=e.layerConfig.maxHeight,this.lineHeight=e.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.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)"},t.element.appendChild(this.canvas)}return t.prototype.$updateDecorators=function(t){var e=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;if(t){this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height;var n=(t.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var i=this.canvas.getContext("2d");function r(t,e){return t.priority<e.priority?-1:t.priority>e.priority?1:0}var o=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach((function(t){t.priority=s[t.type]||null})),o=o.sort(r);for(var a=this.renderer.session.$foldData,l=0;l<o.length;l++){var c=o[l].row,u=this.compensateFoldRows(c,a),h=Math.round((c-u)*this.lineHeight*this.heightRatio),d=Math.round((c-u)*this.lineHeight*this.heightRatio),f=Math.round(((c-u)*this.lineHeight+this.lineHeight)*this.heightRatio),p=f-d;if(p<this.minDecorationHeight){var g=(d+f)/2|0;g<this.halfMinDecorationHeight?g=this.halfMinDecorationHeight:g+this.halfMinDecorationHeight>this.canvasHeight&&(g=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(g-this.halfMinDecorationHeight),f=Math.round(g+this.halfMinDecorationHeight)}i.fillStyle=e[o[l].type]||null,i.fillRect(0,h,this.canvasWidth,f-d)}}var m=this.renderer.session.selection.getCursor();if(m){u=this.compensateFoldRows(m.row,a),h=Math.round((m.row-u)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,h,this.canvasWidth,2)}},t.prototype.compensateFoldRows=function(t,e){var n=0;if(e&&e.length>0)for(var i=0;i<e.length;i++)t>e[i].start.row&&t<e[i].end.row?n+=t-e[i].start.row:t>=e[i].end.row&&(n+=e[i].end.row-e[i].start.row);return n},t}();r.implement(s.prototype,o),e.Decorator=s})),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,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/lang"),s=t("./config"),a=t("./layer/gutter").Gutter,l=t("./layer/marker").Marker,c=t("./layer/text").Text,u=t("./layer/cursor").Cursor,h=t("./scrollbar").HScrollBar,d=t("./scrollbar").VScrollBar,f=t("./scrollbar_custom").HScrollBar,p=t("./scrollbar_custom").VScrollBar,g=t("./renderloop").RenderLoop,m=t("./layer/font_metrics").FontMetrics,v=t("./lib/event_emitter").EventEmitter,y=t("./css/editor-css"),w=t("./layer/decorators").Decorator,b=t("./lib/useragent");r.importCssString(y,"ace_editor.css",!1);var _=function(){function t(t,e){var n=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(t){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",t)})),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=!b.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return t.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(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},t.prototype.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(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))},t.prototype.updateLines=function(t,e,n){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<e&&(this.$changedLines.lastRow=e)):this.$changedLines={firstRow:t,lastRow:e},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},t.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},t.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},t.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},t.prototype.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},t.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},t.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},t.prototype.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(t,e,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},t.prototype.$updateCachedSize=function(t,e,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(t||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(t||s.width!=n)){o|=this.CHANGE_SIZE,s.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(o|=this.CHANGE_FULL)}return s.$dirty=!n||!i,o&&this._signal("resize",a),o},t.prototype.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},t.prototype.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(t/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},t.prototype.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},t.prototype.getAnimatedScroll=function(){return this.$animatedScroll},t.prototype.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},t.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},t.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},t.prototype.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},t.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},t.prototype.setHighlightIndentGuides=function(t){this.setOption("highlightIndentGuides",t)},t.prototype.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},t.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},t.prototype.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},t.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},t.prototype.getShowGutter=function(){return this.getOption("showGutter")},t.prototype.setShowGutter=function(t){return this.setOption("showGutter",t)},t.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},t.prototype.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},t.prototype.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},t.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},t.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},t.prototype.getContainerElement=function(){return this.container},t.prototype.getMouseEventTarget=function(){return this.scroller},t.prototype.getTextAreaContainer=function(){return this.container},t.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var n=this.$cursorLayer.$pixelPos;if(n){e&&e.markerRange&&(n=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var i=this.layerConfig,o=n.top,s=n.left;o-=i.offset;var a=e&&e.useTextareaForIME||b.isMobile?this.lineHeight:1;if(o<0||o>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(e)if(e.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;s-=this.scrollLeft,s>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",l+"px"),r.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(o,c))}}}else r.translate(this.textarea,-100,0)}},t.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},t.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},t.prototype.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow,n=this.session.documentToScreenRow(e,0)*t.lineHeight;return n-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},t.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},t.prototype.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},t.prototype.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},t.prototype.setMargin=function(t,e,n,i){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},t.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},t.prototype.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},t.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},t.prototype.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},t.prototype.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(t-=(e-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>t-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},t.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},t.prototype.freeze=function(){this.$frozen=!0},t.prototype.unfreeze=function(){this.$frozen=!1},t.prototype.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",s=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",s)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_LINES?((this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):t&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",t)}else this.$changes|=t},t.prototype.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=n<=2*this.lineHeight,r=!i&&t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},t.prototype.$computeLayerConfig=function(){var t=this.session,e=this.$size,n=e.height<=2*this.lineHeight,i=this.session.getScreenLength(),r=i*this.lineHeight,o=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=e.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,r-e.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-e.scrollerWidth+h.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-r+u<0||this.scrollTop>h.top),f=l!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,g,m=this.scrollTop%this.lineHeight,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),w=y+v,b=this.lineHeight;y=t.screenToDocumentRow(y,0);var _=t.getFoldLine(y);_&&(y=_.start.row),p=t.documentToScreenRow(y,0),g=t.getRowLength(y)*b,w=Math.min(t.screenToDocumentRow(w,0),t.getLength()-1),c=e.scrollerHeight+t.getRowLength(w)*b+g,m=this.scrollTop-p*b;var x=0;return(this.layerConfig.width!=o||a)&&(x=this.CHANGE_H_SCROLL),(a||f)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),f&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:p,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+e.height-e.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},t.prototype.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(t>n.lastRow+1)&&!(e<n.firstRow))return e===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,t,e),!0)}},t.prototype.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),this.$textLayer&&t>this.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},t.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},t.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},t.prototype.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},t.prototype.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},t.prototype.updateBreakpoints=function(t){this._rows=t,this.$loop.schedule(this.CHANGE_GUTTER)},t.prototype.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},t.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},t.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},t.prototype.showCursor=function(){this.$cursorLayer.showCursor()},t.prototype.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},t.prototype.scrollCursorIntoView=function(t,e,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(t),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>o?(e&&l+s>o+this.lineHeight&&(o-=e*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(e&&l+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=e*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft,u=2*this.layerConfig.characterWidth;r-u<c?(r-=u,r<this.$padding+u&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):(r+=u,c+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&r-c<this.characterWidth&&this.session.setScrollLeft(0))}},t.prototype.getScrollTop=function(){return this.session.getScrollTop()},t.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},t.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},t.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},t.prototype.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},t.prototype.alignCursor=function(t,e){"number"==typeof t&&(t={row:t,column:0});var n=this.$cursorLayer.getPixelPosition(t),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(e||0);return this.session.setScrollTop(r),r},t.prototype.$calcSteps=function(t,e){var n=0,i=this.STEPS,r=[],o=function(t,e,n){return n*(Math.pow(t-1,3)+1)+e};for(n=0;n<i;++n)r.push(o(n/this.STEPS,t,e-t));return r},t.prototype.scrollToLine=function(t,e,n,i){var r=this.$cursorLayer.getPixelPosition({row:t,column:0}),o=r.top;e&&(o-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(o),!1!==n&&this.animateScrolling(s,i)},t.prototype.animateScrolling=function(t,e){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(t!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0],t==n))return}var o=i.$calcSteps(t,n);this.$scrollAnimation={from:t,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,e&&e()}},t.prototype.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},t.prototype.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},t.prototype.scrollTo=function(t,e){this.session.setScrollTop(e),this.session.setScrollLeft(t)},t.prototype.scrollBy=function(t,e){e&&this.session.setScrollTop(this.session.getScrollTop()+e),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},t.prototype.isScrollableBy=function(t,e){return e<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},t.prototype.pixelToScreenCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:s,column:a,side:o-a>0?1:-1,offsetX:r}},t.prototype.screenToTextCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,s=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((e+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),r)},t.prototype.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},t.prototype.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},t.prototype.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},t.prototype.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),void 0==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},t.prototype.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},t.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var t=this.session.selection.cursor;this.removeExtraToken(t.row,t.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},t.prototype.setGhostText=function(t,e){var n=this.session.selection.cursor,i=e||{row:n.row,column:n.column};this.removeGhostText();var r=t.split("\n");if(this.addToken(r[0],"ghost_text",i.row,i.column),this.$ghostText={text:t,position:{row:i.row,column:i.column}},r.length>1){this.$ghostTextWidget={text:r.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var o=this.$cursorLayer.getPixelPosition(i,!0),s=this.container,a=s.getBoundingClientRect().height,l=r.length*this.lineHeight,c=l<a-o.top;if(c)return;l<a?this.scrollBy(0,(r.length-1)*this.lineHeight):this.scrollBy(0,o.top)}},t.prototype.removeGhostText=function(){if(this.$ghostText){var t=this.$ghostText.position;this.removeExtraToken(t.row,t.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},t.prototype.addToken=function(t,e,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var o={type:e,value:t},s=r.getTokens(n);if(null!=i&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(a+=c.value.length,i<=a){var u=c.value.length-(a-i),h=c.value.slice(0,u),d=c.value.slice(u);s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:d});break}}else s.push(o);this.updateLines(n,n)},t.prototype.removeExtraToken=function(t,e){this.session.bgTokenizer.lines[t]=null,this.updateLines(t,t)},t.prototype.setTheme=function(t,e){var n=this;if(this.$themeId=t,n._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t)o(t);else{var i=t||this.$options.theme.initialValue;s.loadModule(["theme",i],o)}function o(i){if(n.$themeId!=t)return e&&e();if(!i||!i.cssClass)throw new Error("couldn't load module "+t+" or it didn't call define");i.$id&&(n.$themeId=i.$id),r.importCssString(i.cssText,i.cssClass,n.container),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),e&&e()}},t.prototype.getTheme=function(){return this.$themeId},t.prototype.setStyle=function(t,e){r.setCssClass(this.container,t,!1!==e)},t.prototype.unsetStyle=function(t){r.removeCssClass(this.container,t)},t.prototype.setCursorStyle=function(t){r.setStyle(this.scroller.style,"cursor",t)},t.prototype.setMouseCursor=function(t){r.setStyle(this.scroller.style,"cursor",t)},t.prototype.attachToShadowRoot=function(){r.importCssString(y,"ace_editor.css",this.container)},t.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},t.prototype.$updateCustomScrollbar=function(t){var e=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===t?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollTop(t.data-e.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){e.$scrollAnimation||e.session.setScrollLeft(t.data-e.scrollMargin.left)})))},t.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var t=this;this.$resizeTimer=o.delayedCall((function(){t.destroyed||t.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(e){var n=e[0].contentRect.width,i=e[0].contentRect.height;Math.abs(t.$size.width-n)>1||Math.abs(t.$size.height-i)>1?t.$resizeTimer.delay():t.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},t}();_.prototype.CHANGE_CURSOR=1,_.prototype.CHANGE_MARKER=2,_.prototype.CHANGE_GUTTER=4,_.prototype.CHANGE_SCROLL=8,_.prototype.CHANGE_LINES=16,_.prototype.CHANGE_TEXT=32,_.prototype.CHANGE_SIZE=64,_.prototype.CHANGE_MARKER_BACK=128,_.prototype.CHANGE_MARKER_FRONT=256,_.prototype.CHANGE_FULL=512,_.prototype.CHANGE_H_SCROLL=1024,_.prototype.$changes=0,_.prototype.$padding=null,_.prototype.$frozen=!1,_.prototype.STEPS=8,i.implement(_.prototype,v),s.defineOptions(_.prototype,"renderer",{useResizeObserver:{set:function(t){!t&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):t&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&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(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(t){this.$gutterLayer.$useSvgGutterIcons=t},initialValue:!1},showFoldedAnnotations:{set:function(t){this.$gutterLayer.$showFoldedAnnotations=t},initialValue:!1},fadeFoldWidgets:{set:function(t){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(t){1==this.$textLayer.setHighlightIndentGuides(t)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(t){this.$gutterLayer.setHighlightGutterLine(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(t){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(t){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(t){this.updateFull()}},minLines:{set:function(t){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(t){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(t){t=+t||0,this.$scrollPastEnd!=t&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(t){this.$updateCustomScrollbar(t)},initialValue:!1},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),e.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/net"),o=t("../lib/event_emitter").EventEmitter,s=t("../config");function a(t){var e="importScripts('"+r.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(o){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new n;return i.append(e),i.getBlob("application/javascript")}}function l(t){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=a(t),n=window.URL||window.webkitURL,i=n.createObjectURL(e);return new Worker(i)}return new Worker(t)}var c=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){i.implement(this,o),this.$createWorkerFromOldConfig=function(e,n,i,r,o){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),s.get("packaged")||!t.toUrl)r=r||s.moduleUrl(n,"worker");else{var a=this.$normalizePath;r=r||a(t.toUrl("ace/worker/worker.js",null,"_"));var c={};e.forEach((function(e){c[e]=a(t.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=l(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return r.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,e.push(i)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==t.action?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(c.prototype);var u=function(t,e,n){var i=null,r=!1,a=Object.create(o),l=[],u=new c({messageBuffer:l,terminate:function(){},postMessage:function(t){l.push(t),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(t){r=t};var h=function(){var t=l.shift();t.command?i[t.command].apply(i,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},s.loadModule(["worker",e],(function(t){i=new t[n](a);while(l.length)h()})),u};e.UIWorkerClient=u,e.WorkerClient=c,e.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(t,e,n){"use strict";var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,o=t("./lib/oop"),s=function(){function t(t,e,n,i,r,o){var s=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager()["$undostack"]||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return t.prototype.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=e.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),t.others.push(i)})),n.setUndoSelect(!1)},t.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)}))}},t.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},t.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var e=t;if(e.start.row===e.end.row&&e.start.row===this.pos.row){this.$updating=!0;var n="insert"===t.action?e.end.column-e.start.column:e.start.column-e.end.column,r=e.start.column>=this.pos.column&&e.start.column<=this.pos.column+this.length+1,o=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};this.doc.insertMergedLines(l,t.lines)}else if("remove"===t.action)for(s=this.others.length-1;s>=0;s--){a=this.others[s],l={row:a.row,column:a.column+o};this.doc.remove(new i(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},t.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},t.prototype.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(n,r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},t.prototype.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},t.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},t.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t["$undostack"]).length-this.$undoStackDepth,n=0;n<e;n++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},t}();o.implement(s.prototype,r),e.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent");function o(t,e){return t.row==e.row&&t.column==e.column}function s(t){var e=t.domEvent,n=e.altKey,s=e.shiftKey,a=e.ctrlKey,l=t.getAccelKey(),c=t.getButton();if(a&&r.isMac&&(c=e.button),t.editor.inMultiSelectMode&&2==c)t.editor.textInput.onContextMenu(t.domEvent);else if(a||n||l){if(0===c){var u,h=t.editor,d=h.selection,f=h.inMultiSelectMode,p=t.getDocumentPosition(),g=d.getCursor(),m=t.inSelection()||d.isEmpty()&&o(p,g),v=t.x,y=t.y,w=function(t){v=t.clientX,y=t.clientY},b=h.session,_=h.renderer.pixelToScreenCoordinates(v,y),x=_;if(h.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!f&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&e.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!f&&m)return;if(!f){var S=d.toOrientedRange();h.addSelectionMarker(S)}var A=d.rangeList.rangeAtPoint(p);h.inVirtualSelectionMode=!0,s&&(A=null,S=d.ranges[0]||S,h.removeSelectionMarker(S)),h.once("mouseup",(function(){var t=d.toOrientedRange();A&&t.isEmpty()&&o(A.cursor,t.cursor)?d.substractPoint(t.cursor):(s?d.substractPoint(S.cursor):S&&(h.removeSelectionMarker(S),d.addRange(S)),d.addRange(t)),h.inVirtualSelectionMode=!1}))}else if("block"==u){var C;t.stop(),h.inVirtualSelectionMode=!0;var k=[],$=function(){var t=h.renderer.pixelToScreenCoordinates(v,y),e=b.screenToDocumentPosition(t.row,t.column,t.offsetX);o(x,t)&&o(e,d.lead)||(x=t,h.selection.moveToPosition(e),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(k),k=d.rectangularRangeBlock(x,_),h.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=h.$mouseHandler.$clickSelection.clone()),k.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};f&&!l?d.toSingleRange():!f&&l&&(C=d.toOrientedRange(),h.addSelectionMarker(C)),s?_=b.documentToScreenPosition(d.lead):d.moveToPosition(p),x={row:-1,column:-1};var T=function(t){$(),clearInterval(R),h.removeSelectionMarkers(k),k.length||(k=[d.toOrientedRange()]),C&&(h.removeSelectionMarker(C),d.toSingleRange(C));for(var e=0;e<k.length;e++)d.addRange(k[e]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},L=$;i.capture(h.container,w,T);var R=setInterval((function(){L()}),20);return t.preventDefault()}}}else 0===c&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode()}e.onMouseDown=s})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(t,e,n){e.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(t){t.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(t){t.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(t){t.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(t){t.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(t){t.multiSelect.rangeCount>1?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.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(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(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,n){var i=t("./range_list").RangeList,r=t("./range").Range,o=t("./selection").Selection,s=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),l=t("./lib/lang"),c=t("./commands/multi_select_commands");e.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=t("./search").Search,h=new u;function d(t,e,n){return h.$options.wrap=!0,h.$options.needle=e,h.$options.backwards=-1==n,h.find(t)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),e=e||this.ranges[0],e&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],n=0;n<t.length;n++){var i=t[n],o=i.start.row,s=i.end.row;if(o===s)e.push(i.clone());else{e.push(new r(o,i.start.column,o,this.session.getLine(o).length));while(++o<s)e.push(this.getLineRange(o,!0));e.push(new r(s,0,s,i.end.column))}0!=n||this.isBackwards()||(e=e.reverse())}this.toSingleRange();for(n=e.length;n--;)this.addRange(e[n])},this.joinSelections=function(){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor),s=this.rectangularRangeBlock(i,o);s.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],o=t.column<e.column;if(o)var s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;else s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;var u,h=t.row<e.row;if(h)var d=t.row,f=e.row;else d=e.row,f=t.row;s<0&&(s=0),d<0&&(d=0),d==f&&(n=!0);for(var p=d;p<=f;p++){var m=r.fromPoints(this.session.screenToDocumentPosition(p,s,l),this.session.screenToDocumentPosition(p,a,c));if(m.isEmpty()){if(u&&g(m.end,u))break;u=m.end}m.cursor=o?m.start:m.end,i.push(m)}if(h&&i.reverse(),!n){var v=i.length-1;while(i[v].isEmpty()&&v>0)v--;if(v>0){var y=0;while(i[y].isEmpty())y++}for(var w=v;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var p=t("./editor").Editor;function g(t,e){return t.row==e.row&&t.column==e.column}function m(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",s),t.commands.addCommands(c.defaultCommands),v(t))}function v(t){if(t.textInput){var e=t.textInput.getElement(),n=!1;a.addListener(e,"keydown",(function(e){var r=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&r?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),t),a.addListener(e,"keyup",i,t),a.addListener(e,"blur",i,t)}function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,u=(r?l:c).ranges;if(!u.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var h=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)while(f>0&&u[f].start.row==u[f-1].end.row)f--;d.fromOrientedRange(u[f]),d.index=f,this.selection=a.selection=d;var p=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===p||(i=p),d.toOrientedRange(u[f])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=h,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;i<e.length;i++)n.push(this.session.getTextRange(e[i]));var r=this.session.getDocument().getNewLineCharacter();t=n.join(r),t.length==(n.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,e){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&e==this.multiSelect.anchor)return;var i=e==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=e.row||this.session.$clipPositionToDocument(i.row,i.column).column!=e.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(t,e,n){if(e=e||{},e.needle=t||e.needle,void 0==e.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();e.needle=this.session.getTextRange(i)}this.$search.set(e);var r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),r.length},this.selectMoreLines=function(t,e){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s=this.session.screenToDocumentPosition(o.row+t,o.column);if(n.isEmpty())l=s;else var a=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(a.row+t,a.column);if(i){var c=r.fromPoints(s,l);c.cursor=c.start}else{c=r.fromPoints(l,s);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(e)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(t){for(var e=this.session,n=e.multiSelect,i=n.ranges,r=i.length;r--;){var o=i[r];if(o.isEmpty()){var s=e.getWordRange(o.start.row,o.start.column);o.start.row=s.start.row,o.start.column=s.start.column,o.end.row=s.end.row,o.end.column=s.end.column}}n.mergeOverlappingRanges();var a=[];for(r=i.length;r--;){o=i[r];a.unshift(e.getTextRange(o))}t<0?a.unshift(a.pop()):a.push(a.shift());for(r=i.length;r--;){o=i[r];var l=o.clone();e.replace(o,a[r]),o.start.row=l.start.row,o.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(t,e,n){var i=this.session,r=i.multiSelect,o=r.toOrientedRange();if(!o.isEmpty()||(o=i.getWordRange(o.start.row,o.start.column),o.cursor=-1==t?o.start:o.end,this.multiSelect.addRange(o),!n)){var s=i.getTextRange(o),a=d(i,s,t);a&&(a.cursor=-1==t?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(o.cursor)}},this.alignCursors=function(){var t=this.session,e=t.multiSelect,n=e.ranges,i=-1,o=n.filter((function(t){if(t.cursor.row==i)return!0;i=t.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(t){e.substractPoint(t.cursor)}));var s=0,a=1/0,c=n.map((function(e){var n=e.cursor,i=t.getLine(n.row),r=i.substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>s&&(s=n.column),r<a&&(a=r),r}));n.forEach((function(e,n){var i=e.cursor,o=s-i.column,u=c[n]-a;o>u?t.insert(i,l.stringRepeat(" ",o-u)):t.remove(new r(i.row,i.column,i.row,i.column-o+u)),e.start.column=e.end.column=s,e.start.row=e.end.row=i.row,e.cursor=e.end})),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<g);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var n,i,r,o=!0,s=!0;return t.map((function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==n?(n=e[1].length,i=e[2].length,r=e[3].length,e):(n+i+r!=e[1].length+e[2].length+e[3].length&&(s=!1),n!=e[1].length&&(o=!1),n>e[1].length&&(n=e[1].length),i<e[2].length&&(i=e[2].length),r>e[3].length&&(r=e[3].length),e):[t]})).map(e?c:o?s?u:c:h);function a(t){return l.stringRepeat(" ",t)}function c(t){return t[2]?a(n)+t[2]+a(i-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function u(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function h(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(p.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=m,t("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(t){m(this),t?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(t,e,n){"use strict";var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,o=t.getLine(e),s=o.search(r);if(-1!=s){var a=n||o.length,l=t.getLength(),c=e,u=e;while(++e<l){var h=t.getLine(e).search(r);if(-1!=h){if(h<=s){var d=t.getTokenAt(e,0);if(!d||"string"!==d.type)break}u=e}}if(u>c){var f=t.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r+1},a=t.$findClosingBracket(e,s,o);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r},a=t.$findOpeningBracket(e,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(t,e,n){"use strict";var i=t("../line_widgets").LineWidgets,r=t("../lib/dom"),o=t("../range").Range,s=t("../config").nls;function a(t,e,n){var i=0,r=t.length-1;while(i<=r){var o=i+r>>1,s=n(e,t[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}function l(t,e,n){var i=t.getAnnotations().sort(o.comparePoints);if(i.length){var r=a(i,{row:e,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===e){do{s=i[r+=n]}while(s&&s.row===e);if(!s)return i.slice()}var l=[];e=s.row;do{l[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==e);return l.length&&l}}}e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(t));var o=t.getCursorPosition(),a=o.row,c=n.widgetManager.getWidgetsAtRow(a).filter((function(t){return"errorMarker"==t.type}))[0];c?c.destroy():a-=e;var u,h=l(n,a,e);if(h){var d=h[0];o.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,o.row=d.row,u=t.renderer.$gutterLayer.$annotations[o.row]}else{if(c)return;u={text:[s("Looks good!")],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var f={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=f.el.appendChild(r.createElement("div")),g=f.el.appendChild(r.createElement("div"));g.className="error_widget_arrow "+u.className;var m=t.renderer.$cursorLayer.getPixelPosition(o).left;g.style.left=m+t.renderer.gutterWidth-5+"px",f.el.className="error_widget_wrapper",p.className="error_widget "+u.className,p.innerHTML=u.text.join("<br>"),p.appendChild(r.createElement("div"));var v=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return f.destroy(),{command:"null"}};f.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(f),t.off("changeSelection",f.destroy),t.off("changeSession",f.destroy),t.off("mouseup",f.destroy),t.off("change",f.destroy))},t.keyBinding.addKeyboardHandler(v),t.on("changeSelection",f.destroy),t.on("changeSession",f.destroy),t.on("mouseup",f.destroy),t.on("change",f.destroy),t.session.widgetManager.addLineWidget(f),f.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","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,n){"use strict";t("./loader_build")(e);var i=t("./lib/dom"),r=t("./range").Range,o=t("./editor").Editor,s=t("./edit_session").EditSession,a=t("./undomanager").UndoManager,l=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(t,n){if("string"==typeof t){var r=t;if(t=document.getElementById(r),!t)throw new Error("ace.edit can't find div #"+r)}if(t&&t.env&&t.env.editor instanceof o)return t.env.editor;var s="";if(t&&/input|textarea/i.test(t.tagName)){var a=t;s=a.value,t=i.createElement("pre"),a.parentNode.replaceChild(t,a)}else t&&(s=t.textContent,t.innerHTML="");var c=e.createEditSession(s),u=new o(new l(t),c,n),h={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(h.textarea=a),u.on("destroy",(function(){h.editor.container.env=null})),u.container.env=u.env=h,u},e.createEditSession=function(t,e){var n=new s(t,e);return n.setUndoManager(new a),n},e.Range=r,e.Editor=o,e.EditSession=s,e.UndoManager=a,e.VirtualRenderer=l,e.version=e.config.version})),function(){ace.require(["ace/ace"],(function(e){e&&(e.config.init(!0),e.define=ace.define);var n=function(){return this}();for(var i in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=e),e)e.hasOwnProperty(i)&&(n.ace[i]=e[i]);n.ace["default"]=n.ace,t&&(t.exports=n.ace)}))}()},5914:t=>{t.exports=function(t,e,n,i,r){var o,s;if(void 0===i)i=0;else if(i|=0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(void 0===r)r=t.length-1;else if(r|=0,r<i||r>=t.length)throw new RangeError("invalid upper bound");while(i<=r)if(o=i+(r-i>>>1),s=+n(t[o],e,o,t),s<0)i=o+1;else{if(!(s>0))return o;r=o-1}return~i}},5859:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var i=n(6758),r=n.n(i),o=n(935),s=n.n(o),a=s()(r());a.push([t.id,'.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-moz-min-content;width:min-content}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;position:relative;width:100%;height:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{position:absolute;pointer-events:none}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{height:100%;border-right:1px dashed #607d8b}.u-hz .u-cursor-y,.u-vt .u-cursor-x{width:100%;border-bottom:1px dashed #607d8b}.u-cursor-pt{position:absolute;top:0;left:0;border-radius:50%;border:0 solid;pointer-events:none;will-change:transform;background-clip:padding-box!important}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}',""]);const l=a},3605:(t,e,n)=>{"use strict";n.d(e,{A:()=>G});var i={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(t,e,n){var r,o=i[t];return r="string"===typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};const o=r;function s(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}var a={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},c={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u={date:s({formats:a,defaultWidth:"full"}),time:s({formats:l,defaultWidth:"full"}),dateTime:s({formats:c,defaultWidth:"full"})};const h=u;var d={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},f=function(t,e,n,i){return d[t]};const p=f;function g(t){return function(e,n){var i,r=null!==n&&void 0!==n&&n.context?String(n.context):"standalone";if("formatting"===r&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[a]}var c=t.argumentCallback?t.argumentCallback(e):e;return i[c]}}var m={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},v={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},w={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},b={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},x=function(t,e){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},S={ordinalNumber:x,era:g({values:m,defaultWidth:"wide"}),quarter:g({values:v,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:y,defaultWidth:"wide"}),day:g({values:w,defaultWidth:"wide"}),dayPeriod:g({values:b,defaultWidth:"wide",formattingValues:_,defaultFormattingWidth:"wide"})};const A=S;function C(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var s,a=o[0],l=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?$(l,(function(t){return t.test(a)})):k(l,(function(t){return t.test(a)}));s=t.valueCallback?t.valueCallback(c):c,s=n.valueCallback?n.valueCallback(s):s;var u=e.slice(a.length);return{value:s,rest:u}}}function k(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function $(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}function T(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(t.matchPattern);if(!i)return null;var r=i[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=e.slice(r.length);return{value:s,rest:a}}}var L=/^(\d+)(th|st|nd|rd)?/i,R=/\d+/i,E={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},M={any:[/^b/i,/^(a|c)/i]},D={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I={any:[/1/i,/2/i,/3/i,/4/i]},O={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},P={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},N={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},W={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},H={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},B={ordinalNumber:T({matchPattern:L,parsePattern:R,valueCallback:function(t){return parseInt(t,10)}}),era:C({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:M,defaultParseWidth:"any"}),quarter:C({matchPatterns:D,defaultMatchWidth:"wide",parsePatterns:I,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:C({matchPatterns:O,defaultMatchWidth:"wide",parsePatterns:P,defaultParseWidth:"any"}),day:C({matchPatterns:N,defaultMatchWidth:"wide",parsePatterns:F,defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:W,defaultMatchWidth:"any",parsePatterns:H,defaultParseWidth:"any"})};const z=B;var U={code:"en-US",formatDistance:o,formatLong:h,formatRelative:p,localize:A,match:z,options:{weekStartsOn:0,firstWeekContainsDate:1}};const j=U,G=j},6017:(t,e,n)=>{"use strict";n.d(e,{q:()=>r});var i={};function r(){return i}},8681:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},r=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},o=function(t,e){var n,o=t.match(/(P+)(p+)?/)||[],s=o[1],a=o[2];if(!a)return i(t,e);switch(s){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"});break}return n.replace("{{date}}",i(s,e)).replace("{{time}}",r(a,e))},s={p:r,P:o};const a=s},7641:(t,e,n)=>{"use strict";function i(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}n.d(e,{A:()=>i})},9591:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var i=n(5286),r=n(3378),o=n(1262),s=n(1092);function a(t){(0,s.A)(1,arguments);var e=(0,o.A)(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var i=(0,r.A)(n);return i}var l=6048e5;function c(t){(0,s.A)(1,arguments);var e=(0,i.A)(t),n=(0,r.A)(e).getTime()-a(e).getTime();return Math.round(n/l)+1}},1262:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(5286),r=n(1092),o=n(3378);function s(t){(0,r.A)(1,arguments);var e=(0,i.A)(t),n=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(n+1,0,4),s.setUTCHours(0,0,0,0);var a=(0,o.A)(s),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=(0,o.A)(l);return e.getTime()>=a.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},5287:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var i=n(5286),r=n(8033),o=n(443),s=n(1092),a=n(3733),l=n(6017);function c(t,e){var n,i,c,u,h,d,f,p;(0,s.A)(1,arguments);var g=(0,l.q)(),m=(0,a.A)(null!==(n=null!==(i=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==i?i:null===(f=g.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,o.A)(t,e),y=new Date(0);y.setUTCFullYear(v,0,m),y.setUTCHours(0,0,0,0);var w=(0,r.A)(y,e);return w}var u=6048e5;function h(t,e){(0,s.A)(1,arguments);var n=(0,i.A)(t),o=(0,r.A)(n,e).getTime()-c(n,e).getTime();return Math.round(o/u)+1}},443:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var i=n(5286),r=n(1092),o=n(8033),s=n(3733),a=n(6017);function l(t,e){var n,l,c,u,h,d,f,p;(0,r.A)(1,arguments);var g=(0,i.A)(t),m=g.getUTCFullYear(),v=(0,a.q)(),y=(0,s.A)(null!==(n=null!==(l=null!==(c=null!==(u=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==u?u:null===e||void 0===e||null===(h=e.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==l?l:null===(f=v.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=new Date(0);w.setUTCFullYear(m+1,0,y),w.setUTCHours(0,0,0,0);var b=(0,o.A)(w,e),_=new Date(0);_.setUTCFullYear(m,0,y),_.setUTCHours(0,0,0,0);var x=(0,o.A)(_,e);return g.getTime()>=b.getTime()?m+1:g.getTime()>=x.getTime()?m:m-1}},5044:(t,e,n)=>{"use strict";n.d(e,{ef:()=>o,lJ:()=>a,xM:()=>s});var i=["D","DD"],r=["YY","YYYY"];function o(t){return-1!==i.indexOf(t)}function s(t){return-1!==r.indexOf(t)}function a(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},1092:(t,e,n)=>{"use strict";function i(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}n.d(e,{A:()=>i})},3378:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(5286),r=n(1092);function o(t){(0,r.A)(1,arguments);var e=1,n=(0,i.A)(t),o=n.getUTCDay(),s=(o<e?7:0)+o-e;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}},8033:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(5286),r=n(1092),o=n(3733),s=n(6017);function a(t,e){var n,a,l,c,u,h,d,f;(0,r.A)(1,arguments);var p=(0,s.q)(),g=(0,o.A)(null!==(n=null!==(a=null!==(l=null!==(c=null===e||void 0===e?void 0:e.weekStartsOn)&&void 0!==c?c:null===e||void 0===e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==l?l:p.weekStartsOn)&&void 0!==a?a:null===(d=p.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,i.A)(t),v=m.getUTCDay(),y=(v<g?7:0)+v-g;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}},3733:(t,e,n)=>{"use strict";function i(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,{A:()=>i})},8593:(t,e,n)=>{"use strict";n.d(e,{A:()=>D});var i=n(4523),r=n(5409),o=n(5286),s=n(1092),a=864e5;function l(t){(0,s.A)(1,arguments);var e=(0,o.A)(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime(),r=n-i;return Math.floor(r/a)+1}var c=n(9591),u=n(1262),h=n(5287),d=n(443);function f(t,e){var n=t<0?"-":"",i=Math.abs(t).toString();while(i.length<e)i="0"+i;return n+i}var p={y:function(t,e){var n=t.getUTCFullYear(),i=n>0?n:1-n;return f("yy"===e?i%100:i,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):f(n+1,2)},d:function(t,e){return f(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return f(t.getUTCHours()%12||12,e.length)},H:function(t,e){return f(t.getUTCHours(),e.length)},m:function(t,e){return f(t.getUTCMinutes(),e.length)},s:function(t,e){return f(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,i=t.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return f(r,e.length)}};const g=p;var m={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},v={G:function(t,e,n){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return g.y(t,e)},Y:function(t,e,n,i){var r=(0,d.A)(t,i),o=r>0?r:1-r;if("YY"===e){var s=o%100;return f(s,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):f(o,e.length)},R:function(t,e){var n=(0,u.A)(t);return f(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return f(n,e.length)},Q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return f(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return f(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){var i=t.getUTCMonth();switch(e){case"M":case"MM":return g.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return f(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){var r=(0,h.A)(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):f(r,e.length)},I:function(t,e,n){var i=(0,c.A)(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):f(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):g.d(t,e)},D:function(t,e,n){var i=l(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):f(i,e.length)},E:function(t,e,n){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return f(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){var r=t.getUTCDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return f(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){var i=t.getUTCDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return f(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){var i=t.getUTCHours(),r=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var i,r=t.getUTCHours();switch(i=12===r?m.noon:0===r?m.midnight:r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var i,r=t.getUTCHours();switch(i=r>=17?m.evening:r>=12?m.afternoon:r>=4?m.morning:m.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var i=t.getUTCHours()%12;return 0===i&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return g.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):g.H(t,e)},K:function(t,e,n){var i=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},k:function(t,e,n){var i=t.getUTCHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):f(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):g.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):g.s(t,e)},S:function(t,e){return g.S(t,e)},X:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return w(o);case"XXXX":case"XX":return b(o);case"XXXXX":case"XXX":default:return b(o,":")}},x:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"x":return w(o);case"xxxx":case"xx":return b(o);case"xxxxx":case"xxx":default:return b(o,":")}},O:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+y(o,":");case"OOOO":default:return"GMT"+b(o,":")}},z:function(t,e,n,i){var r=i._originalDate||t,o=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+y(o,":");case"zzzz":default:return"GMT"+b(o,":")}},t:function(t,e,n,i){var r=i._originalDate||t,o=Math.floor(r.getTime()/1e3);return f(o,e.length)},T:function(t,e,n,i){var r=i._originalDate||t,o=r.getTime();return f(o,e.length)}};function y(t,e){var n=t>0?"-":"+",i=Math.abs(t),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var s=e||"";return n+String(r)+s+f(o,2)}function w(t,e){if(t%60===0){var n=t>0?"-":"+";return n+f(Math.abs(t)/60,2)}return b(t,e)}function b(t,e){var n=e||"",i=t>0?"-":"+",r=Math.abs(t),o=f(Math.floor(r/60),2),s=f(r%60,2);return i+o+n+s}const _=v;var x=n(8681),S=n(7641),A=n(5044),C=n(3733),k=n(6017),$=n(3605),T=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,R=/^'([^]*?)'?$/,E=/''/g,M=/[a-zA-Z]/;function D(t,e,n){var a,l,c,u,h,d,f,p,g,m,v,y,w,b,R,E,D,O;(0,s.A)(2,arguments);var P=String(e),N=(0,k.q)(),F=null!==(a=null!==(l=null===n||void 0===n?void 0:n.locale)&&void 0!==l?l:N.locale)&&void 0!==a?a:$.A,W=(0,C.A)(null!==(c=null!==(u=null!==(h=null!==(d=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==d?d:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(p=f.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==h?h:N.firstWeekContainsDate)&&void 0!==u?u:null===(g=N.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==c?c:1);if(!(W>=1&&W<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=(0,C.A)(null!==(v=null!==(y=null!==(w=null!==(b=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==b?b:null===n||void 0===n||null===(R=n.locale)||void 0===R||null===(E=R.options)||void 0===E?void 0:E.weekStartsOn)&&void 0!==w?w:N.weekStartsOn)&&void 0!==y?y:null===(D=N.locale)||void 0===D||null===(O=D.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==v?v:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var B=(0,o.A)(t);if(!(0,i.A)(B))throw new RangeError("Invalid time value");var z=(0,S.A)(B),U=(0,r.A)(B,z),j={firstWeekContainsDate:W,weekStartsOn:H,locale:F,_originalDate:B},G=P.match(L).map((function(t){var e=t[0];if("p"===e||"P"===e){var n=x.A[e];return n(t,F.formatLong)}return t})).join("").match(T).map((function(i){if("''"===i)return"'";var r=i[0];if("'"===r)return I(i);var o=_[r];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,A.xM)(i)||(0,A.lJ)(i,e,String(t)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,A.ef)(i)||(0,A.lJ)(i,e,String(t)),o(U,i,F.localize,j);if(r.match(M))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return i})).join("");return G}function I(t){var e=t.match(R);return e?e[1].replace(E,"'"):t}},4523:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(8169),r=n(1092);function o(t){return(0,r.A)(1,arguments),t instanceof Date||"object"===(0,i.A)(t)&&"[object Date]"===Object.prototype.toString.call(t)}var s=n(5286);function a(t){if((0,r.A)(1,arguments),!o(t)&&"number"!==typeof t)return!1;var e=(0,s.A)(t);return!isNaN(Number(e))}},8328:(t,e,n)=>{"use strict";n.d(e,{A:()=>Ut});var i=n(8169);n(7107),n(7010);function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function s(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(l)throw s}}}}var a=n(3605),l=n(5409),c=n(5286);function u(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var h=n(8681),d=n(7641),f=n(5044),p=n(3733),g=n(1092);function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}function _(t,e){if(e&&("object"===(0,i.A)(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function x(t){var e=b();return function(){var n,i=w(t);if(e){var r=w(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _(this,n)}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var A=n(2423);function C(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(0,A.A)(i.key),i)}}function k(t,e,n){return e&&C(t.prototype,e),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var $=n(237),T=10,L=function(){function t(){S(this,t),(0,$.A)(this,"priority",void 0),(0,$.A)(this,"subPriority",0)}return k(t,[{key:"validate",value:function(t,e){return!0}}]),t}(),R=function(t){y(n,t);var e=x(n);function n(t,i,r,o,s){var a;return S(this,n),a=e.call(this),a.value=t,a.validateValue=i,a.setValue=r,a.priority=o,s&&(a.subPriority=s),a}return k(n,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,n){return this.setValue(t,e,this.value,n)}}]),n}(L),E=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",T),(0,$.A)(m(t),"subPriority",-1),t}return k(n,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var n=new Date(0);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}}]),n}(L),M=function(){function t(){S(this,t),(0,$.A)(this,"incompatibleTokens",void 0),(0,$.A)(this,"priority",void 0),(0,$.A)(this,"subPriority",void 0)}return k(t,[{key:"run",value:function(t,e,n,i){var r=this.parse(t,e,n,i);return r?{setter:new R(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(t,e,n){return!0}}]),t}(),D=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",140),(0,$.A)(m(t),"incompatibleTokens",["R","u","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,n){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),I=(Math.pow(10,8),6e4),O=36e5,P=1e3,N={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},F={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function W(t,e){return t?{value:e(t.value),rest:t.rest}:t}function H(t,e){var n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function B(t,e){var n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};var i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*O+o*I+s*P),rest:e.slice(n[0].length)}}function z(t){return H(N.anyDigitsSigned,t)}function U(t,e){switch(t){case 1:return H(N.singleDigit,e);case 2:return H(N.twoDigits,e);case 3:return H(N.threeDigits,e);case 4:return H(N.fourDigits,e);default:return H(new RegExp("^\\d{1,"+t+"}"),e)}}function j(t,e){switch(t){case 1:return H(N.singleDigitSigned,e);case 2:return H(N.twoDigitsSigned,e);case 3:return H(N.threeDigitsSigned,e);case 4:return H(N.fourDigitsSigned,e);default:return H(new RegExp("^-?\\d{1,"+t+"}"),e)}}function G(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function V(t,e){var n,i=e>0,r=i?e:1-e;if(r<=50)n=t||100;else{var o=r+50,s=100*Math.floor(o/100),a=t>=o%100;n=t+s-(a?100:0)}return i?n:1-n}function Y(t){return t%400===0||t%4===0&&t%100!==0}var q=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return W(U(4,t),i);case"yo":return W(n.ordinalNumber(t,{unit:"year"}),i);default:return W(U(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var r=V(n.year,i);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}var o="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),K=n(443),X=n(8033),Q=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return W(U(4,t),i);case"Yo":return W(n.ordinalNumber(t,{unit:"year"}),i);default:return W(U(e.length,t),i)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,n,i){var r=(0,K.A)(t,i);if(n.isTwoDigitYear){var o=V(n.year,r);return t.setUTCFullYear(o,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,X.A)(t,i)}var s="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(s,0,i.firstWeekContainsDate),t.setUTCHours(0,0,0,0),(0,X.A)(t,i)}}]),n}(M),Z=n(3378),J=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e){return j("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),(0,Z.A)(i)}}]),n}(M),tt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",130),(0,$.A)(m(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e){return j("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,n){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),et=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",120),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"Q":case"QQ":return U(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(M),nt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",120),(0,$.A)(m(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"q":case"qq":return U(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,n){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t}}]),n}(M),it=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,$.A)(m(t),"priority",110),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"M":return W(H(N.month,t),i);case"MM":return W(U(2,t),i);case"Mo":return W(n.ordinalNumber(t,{unit:"month"}),i);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),rt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",110),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return t-1};switch(e){case"L":return W(H(N.month,t),i);case"LL":return W(U(2,t),i);case"Lo":return W(n.ordinalNumber(t,{unit:"month"}),i);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t}}]),n}(M),ot=n(5287);function st(t,e,n){(0,g.A)(2,arguments);var i=(0,c.A)(t),r=(0,p.A)(e),o=(0,ot.A)(i,n)-r;return i.setUTCDate(i.getUTCDate()-7*o),i}var at=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",100),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"w":return H(N.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n,i){return(0,X.A)(st(t,n,i),i)}}]),n}(M),lt=n(9591);function ct(t,e){(0,g.A)(2,arguments);var n=(0,c.A)(t),i=(0,p.A)(e),r=(0,lt.A)(n)-i;return n.setUTCDate(n.getUTCDate()-7*r),n}var ut=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",100),(0,$.A)(m(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"I":return H(N.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,n){return(0,Z.A)(ct(t,n))}}]),n}(M),ht=[31,28,31,30,31,30,31,31,30,31,30,31],dt=[31,29,31,30,31,30,31,31,30,31,30,31],ft=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"subPriority",1),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"d":return H(N.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=Y(n),r=t.getUTCMonth();return i?e>=1&&e<=dt[r]:e>=1&&e<=ht[r]}},{key:"set",value:function(t,e,n){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t}}]),n}(M),pt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"subpriority",1),(0,$.A)(m(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"D":case"DD":return H(N.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){var n=t.getUTCFullYear(),i=Y(n);return i?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,n){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t}}]),n}(M),gt=n(6017);function mt(t,e,n){var i,r,o,s,a,l,u,h;(0,g.A)(2,arguments);var d=(0,gt.q)(),f=(0,p.A)(null!==(i=null!==(r=null!==(o=null!==(s=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==s?s:null===n||void 0===n||null===(a=n.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==r?r:null===(u=d.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,c.A)(t),v=(0,p.A)(e),y=m.getUTCDay(),w=v%7,b=(w+7)%7,_=(b<f?7:0)+v-y;return m.setUTCDate(m.getUTCDate()+_),m}var vt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["D","i","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M),yt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return W(U(e.length,t),r);case"eo":return W(n.ordinalNumber(t,{unit:"day"}),r);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M),wt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n,i){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return W(U(e.length,t),r);case"co":return W(n.ordinalNumber(t,{unit:"day"}),r);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,n,i){return t=mt(t,n,i),t.setUTCHours(0,0,0,0),t}}]),n}(M);function bt(t,e){(0,g.A)(2,arguments);var n=(0,p.A)(e);n%7===0&&(n-=7);var i=1,r=(0,c.A)(t),o=r.getUTCDay(),s=n%7,a=(s+7)%7,l=(a<i?7:0)+n-o;return r.setUTCDate(r.getUTCDate()+l),r}var _t=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",90),(0,$.A)(m(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return U(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return W(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return W(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return W(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return W(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,n){return t=bt(t,n),t.setUTCHours(0,0,0,0),t}}]),n}(M),xt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["b","B","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),St=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["a","B","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),At=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",80),(0,$.A)(m(t),"incompatibleTokens",["a","b","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,n){return t.setUTCHours(G(n),0,0,0),t}}]),n}(M),Ct=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["H","K","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"h":return H(N.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):i||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t}}]),n}(M),kt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["a","b","h","K","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"H":return H(N.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,n){return t.setUTCHours(n,0,0,0),t}}]),n}(M),$t=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["h","H","k","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"K":return H(N.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,n){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t}}]),n}(M),Tt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",70),(0,$.A)(m(t),"incompatibleTokens",["a","b","h","H","K","t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"k":return H(N.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,n){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t}}]),n}(M),Lt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",60),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"m":return H(N.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCMinutes(n,0,0),t}}]),n}(M),Rt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",50),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e,n){switch(e){case"s":return H(N.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return U(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,n){return t.setUTCSeconds(n,0),t}}]),n}(M),Et=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",30),(0,$.A)(m(t),"incompatibleTokens",["t","T"]),t}return k(n,[{key:"parse",value:function(t,e){var n=function(t){return Math.floor(t*Math.pow(10,3-e.length))};return W(U(e.length,t),n)}},{key:"set",value:function(t,e,n){return t.setUTCMilliseconds(n),t}}]),n}(M),Mt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",10),(0,$.A)(m(t),"incompatibleTokens",["t","T","x"]),t}return k(n,[{key:"parse",value:function(t,e){switch(e){case"X":return B(F.basicOptionalMinutes,t);case"XX":return B(F.basic,t);case"XXXX":return B(F.basicOptionalSeconds,t);case"XXXXX":return B(F.extendedOptionalSeconds,t);case"XXX":default:return B(F.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(M),Dt=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",10),(0,$.A)(m(t),"incompatibleTokens",["t","T","X"]),t}return k(n,[{key:"parse",value:function(t,e){switch(e){case"x":return B(F.basicOptionalMinutes,t);case"xx":return B(F.basic,t);case"xxxx":return B(F.basicOptionalSeconds,t);case"xxxxx":return B(F.extendedOptionalSeconds,t);case"xxx":default:return B(F.extended,t)}}},{key:"set",value:function(t,e,n){return e.timestampIsSet?t:new Date(t.getTime()-n)}}]),n}(M),It=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",40),(0,$.A)(m(t),"incompatibleTokens","*"),t}return k(n,[{key:"parse",value:function(t){return z(t)}},{key:"set",value:function(t,e,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(M),Ot=function(t){y(n,t);var e=x(n);function n(){var t;S(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r)),(0,$.A)(m(t),"priority",20),(0,$.A)(m(t),"incompatibleTokens","*"),t}return k(n,[{key:"parse",value:function(t){return z(t)}},{key:"set",value:function(t,e,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(M),Pt={G:new D,y:new q,Y:new Q,R:new J,u:new tt,Q:new et,q:new nt,M:new it,L:new rt,w:new at,I:new ut,d:new ft,D:new pt,E:new vt,e:new yt,c:new wt,i:new _t,a:new xt,b:new St,B:new At,h:new Ct,H:new kt,K:new $t,k:new Tt,m:new Lt,s:new Rt,S:new Et,X:new Mt,x:new Dt,t:new It,T:new Ot},Nt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wt=/^'([^]*?)'?$/,Ht=/''/g,Bt=/\S/,zt=/[a-zA-Z]/;function Ut(t,e,n,r){var o,m,v,y,w,b,_,x,S,A,C,k,$,T,L,R,M,D;(0,g.A)(3,arguments);var I=String(t),O=String(e),P=(0,gt.q)(),N=null!==(o=null!==(m=null===r||void 0===r?void 0:r.locale)&&void 0!==m?m:P.locale)&&void 0!==o?o:a.A;if(!N.match)throw new RangeError("locale must contain match property");var F=(0,p.A)(null!==(v=null!==(y=null!==(w=null!==(b=null===r||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==b?b:null===r||void 0===r||null===(_=r.locale)||void 0===_||null===(x=_.options)||void 0===x?void 0:x.firstWeekContainsDate)&&void 0!==w?w:P.firstWeekContainsDate)&&void 0!==y?y:null===(S=P.locale)||void 0===S||null===(A=S.options)||void 0===A?void 0:A.firstWeekContainsDate)&&void 0!==v?v:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=(0,p.A)(null!==(C=null!==(k=null!==($=null!==(T=null===r||void 0===r?void 0:r.weekStartsOn)&&void 0!==T?T:null===r||void 0===r||null===(L=r.locale)||void 0===L||null===(R=L.options)||void 0===R?void 0:R.weekStartsOn)&&void 0!==$?$:P.weekStartsOn)&&void 0!==k?k:null===(M=P.locale)||void 0===M||null===(D=M.options)||void 0===D?void 0:D.weekStartsOn)&&void 0!==C?C:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===I?(0,c.A)(n):new Date(NaN);var H,B={firstWeekContainsDate:F,weekStartsOn:W,locale:N},z=[new E],U=O.match(Ft).map((function(t){var e=t[0];if(e in h.A){var n=h.A[e];return n(t,N.formatLong)}return t})).join("").match(Nt),j=[],G=s(U);try{var V=function(){var e=H.value;null!==r&&void 0!==r&&r.useAdditionalWeekYearTokens||!(0,f.xM)(e)||(0,f.lJ)(e,O,t),null!==r&&void 0!==r&&r.useAdditionalDayOfYearTokens||!(0,f.ef)(e)||(0,f.lJ)(e,O,t);var n=e[0],i=Pt[n];if(i){var o=i.incompatibleTokens;if(Array.isArray(o)){var s=j.find((function(t){return o.includes(t.token)||t.token===n}));if(s)throw new RangeError("The format string mustn't contain `".concat(s.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===i.incompatibleTokens&&j.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));j.push({token:n,fullToken:e});var a=i.run(I,e,N.match,B);if(!a)return{v:new Date(NaN)};z.push(a.setter),I=a.rest}else{if(n.match(zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===e?e="'":"'"===n&&(e=jt(e)),0!==I.indexOf(e))return{v:new Date(NaN)};I=I.slice(e.length)}};for(G.s();!(H=G.n()).done;){var Y=V();if("object"===(0,i.A)(Y))return Y.v}}catch(nt){G.e(nt)}finally{G.f()}if(I.length>0&&Bt.test(I))return new Date(NaN);var q=z.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return z.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),K=(0,c.A)(n);if(isNaN(K.getTime()))return new Date(NaN);var X,Q=(0,l.A)(K,(0,d.A)(K)),Z={},J=s(q);try{for(J.s();!(X=J.n()).done;){var tt=X.value;if(!tt.validate(Q,B))return new Date(NaN);var et=tt.set(Q,Z,B);Array.isArray(et)?(Q=et[0],u(Z,et[1])):Q=et}}catch(nt){J.e(nt)}finally{J.f()}return Q}function jt(t){return t.match(Wt)[1].replace(Ht,"'")}},7014:(t,e,n)=>{"use strict";n.d(e,{A:()=>h});var i=n(8169),r=n(3733),o=n(5286),s=n(1092);function a(t,e){(0,s.A)(2,arguments);var n=(0,o.A)(t),i=(0,r.A)(e);return isNaN(i)?new Date(NaN):i?(n.setDate(n.getDate()+i),n):n}function l(t,e){(0,s.A)(2,arguments);var n=(0,r.A)(e);return a(t,-n)}function c(t,e){(0,s.A)(2,arguments);var n=(0,o.A)(t),i=(0,r.A)(e);if(isNaN(i))return new Date(NaN);if(!i)return n;var a=n.getDate(),l=new Date(n.getTime());l.setMonth(n.getMonth()+i+1,0);var c=l.getDate();return a>=c?l:(n.setFullYear(l.getFullYear(),l.getMonth(),a),n)}function u(t,e){(0,s.A)(2,arguments);var n=(0,r.A)(e);return c(t,-n)}function h(t,e){if((0,s.A)(2,arguments),!e||"object"!==(0,i.A)(e))return new Date(NaN);var n=e.years?(0,r.A)(e.years):0,o=e.months?(0,r.A)(e.months):0,a=e.weeks?(0,r.A)(e.weeks):0,c=e.days?(0,r.A)(e.days):0,h=e.hours?(0,r.A)(e.hours):0,d=e.minutes?(0,r.A)(e.minutes):0,f=e.seconds?(0,r.A)(e.seconds):0,p=u(t,o+12*n),g=l(p,c+7*a),m=d+60*h,v=f+60*m,y=1e3*v,w=new Date(g.getTime()-y);return w}},5409:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var i=n(3733),r=n(5286),o=n(1092);function s(t,e){(0,o.A)(2,arguments);var n=(0,r.A)(t).getTime(),s=(0,i.A)(e);return new Date(n+s)}function a(t,e){(0,o.A)(2,arguments);var n=(0,i.A)(e);return s(t,-n)}},5286:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var i=n(8169),r=n(1092);function o(t){(0,r.A)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===(0,i.A)(t)&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},5650:(t,e,n)=>{var i=n(8942),r=i.Symbol;t.exports=r},5111:t=>{function e(t,e){var n=-1,i=null==t?0:t.length,r=Array(i);while(++n<i)r[n]=e(t[n],n,t);return r}t.exports=e},4187:t=>{function e(t,e,n,i){var r=-1,o=null==t?0:t.length;i&&o&&(n=t[++r]);while(++r<o)n=e(n,t[r],r,t);return n}t.exports=e},2837:t=>{function e(t){return t.split("")}t.exports=e},9546:t=>{var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}t.exports=n},7379:(t,e,n)=>{var i=n(5650),r=n(8870),o=n(9005),s="[object Null]",a="[object Undefined]",l=i?i.toStringTag:void 0;function c(t){return null==t?void 0===t?a:s:l&&l in Object(t)?r(t):o(t)}t.exports=c},1035:t=>{function e(t){return function(e){return null==t?void 0:t[e]}}t.exports=e},3501:t=>{function e(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;var o=Array(r);while(++i<r)o[i]=t[i+e];return o}t.exports=e},2291:(t,e,n)=>{var i=n(5650),r=n(5111),o=n(3142),s=n(1187),a=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;function u(t){if("string"==typeof t)return t;if(o(t))return r(t,u)+"";if(s(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}t.exports=u},8931:(t,e,n)=>{var i=n(3501);function r(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:i(t,e,n)}t.exports=r},4326:(t,e,n)=>{var i=n(8931),r=n(3417),o=n(2237),s=n(5243);function a(t){return function(e){e=s(e);var n=r(e)?o(e):void 0,a=n?n[0]:e.charAt(0),l=n?i(n,1).join(""):e.slice(1);return a[t]()+l}}t.exports=a},3640:(t,e,n)=>{var i=n(4187),r=n(5881),o=n(9850),s="['’]",a=RegExp(s,"g");function l(t){return function(e){return i(o(r(e).replace(a,"")),t,"")}}t.exports=l},9968:(t,e,n)=>{var i=n(1035),r={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},o=i(r);t.exports=o},4967:(t,e,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},8870:(t,e,n)=>{var i=n(5650),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i?i.toStringTag:void 0;function l(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(l){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r}t.exports=l},3417:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="\\u200d",l=RegExp("["+a+e+o+s+"]");function c(t){return l.test(t)}t.exports=c},5813:t=>{var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}t.exports=n},9005:t=>{var e=Object.prototype,n=e.toString;function i(t){return n.call(t)}t.exports=i},8942:(t,e,n)=>{var i=n(4967),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();t.exports=o},2237:(t,e,n)=>{var i=n(2837),r=n(3417),o=n(2013);function s(t){return r(t)?o(t):i(t)}t.exports=s},2013:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\ufe0e\\ufe0f",a="["+e+"]",l="["+o+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",m="["+s+"]?",v="(?:"+p+"(?:"+[h,d,f].join("|")+")"+m+g+")*",y=m+g+v,w="(?:"+[h+l+"?",l,d,f,a].join("|")+")",b=RegExp(c+"(?="+c+")|"+w+y,"g");function _(t){return t.match(b)||[]}t.exports=_},482:t=>{var e="\\ud800-\\udfff",n="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=n+i+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",l="\\xac\\xb1\\xd7\\xf7",c="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",u="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",p=l+c+u+h,g="['’]",m="["+p+"]",v="["+o+"]",y="\\d+",w="["+s+"]",b="["+a+"]",_="[^"+e+p+y+s+a+d+"]",x="\\ud83c[\\udffb-\\udfff]",S="(?:"+v+"|"+x+")",A="[^"+e+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",k="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+d+"]",T="\\u200d",L="(?:"+b+"|"+_+")",R="(?:"+$+"|"+_+")",E="(?:"+g+"(?:d|ll|m|re|s|t|ve))?",M="(?:"+g+"(?:D|LL|M|RE|S|T|VE))?",D=S+"?",I="["+f+"]?",O="(?:"+T+"(?:"+[A,C,k].join("|")+")"+I+D+")*",P="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F=I+D+O,W="(?:"+[w,C,k].join("|")+")"+F,H=RegExp([$+"?"+b+"+"+E+"(?="+[m,$,"$"].join("|")+")",R+"+"+M+"(?="+[m,$+L,"$"].join("|")+")",$+"?"+L+"+"+E,$+"+"+M,N,P,y,W].join("|"),"g");function B(t){return t.match(H)||[]}t.exports=B},9677:(t,e,n)=>{var i=n(6005),r=n(3640),o=r((function(t,e,n){return e=e.toLowerCase(),t+(n?i(e):e)}));t.exports=o},6005:(t,e,n)=>{var i=n(5243),r=n(5485);function o(t){return r(i(t).toLowerCase())}t.exports=o},5881:(t,e,n)=>{var i=n(9968),r=n(5243),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",c=s+a+l,u="["+c+"]",h=RegExp(u,"g");function d(t){return t=r(t),t&&t.replace(o,i).replace(h,"")}t.exports=d},3142:t=>{var e=Array.isArray;t.exports=e},547:t=>{function e(t){return null!=t&&"object"==typeof t}t.exports=e},1187:(t,e,n)=>{var i=n(7379),r=n(547),o="[object Symbol]";function s(t){return"symbol"==typeof t||r(t)&&i(t)==o}t.exports=s},5250:function(t,e,n){var i;
41
41
  /**
42
42
  * @license
43
43
  * Lodash <https://lodash.com/>
@@ -66,5 +66,5 @@ For more information about SproutCore, visit http://www.sproutcore.com
66
66
  * Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>
67
67
  * @license MIT
68
68
  */
69
- var i={},r="function"===typeof Map?new Map:null,o="swap",s="move",a="synchronize",l="layoutStart",c="layoutEnd",u="layoutAbort",h="add",d="remove",f="showStart",p="showEnd",g="hideStart",m="hideEnd",v="filter",y="sort",w="move",b="send",_="beforeSend",x="receive",S="beforeReceive",A="dragInit",C="dragStart",k="dragMove",$="dragScroll",T="dragEnd",L="dragReleaseStart",R="dragReleaseEnd",E="destroy",M="ontouchstart"in window,D=!!window.PointerEvent,I=!!window.navigator.msPointerEnabled,O=16777216;function P(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}P.prototype.on=function(t,e){if(!this._events||!t||!e)return this;var n=this._events[t];return n||(n=this._events[t]=[]),n.push(e),this},P.prototype.off=function(t,e){if(!this._events||!t||!e)return this;var n,i=this._events[t];if(!i||!i.length)return this;while(-1!==(n=i.indexOf(e)))i.splice(n,1);return this},P.prototype.clear=function(t){if(!this._events||!t)return this;var e=this._events[t];return e&&(e.length=0,delete this._events[t]),this},P.prototype.emit=function(t){if(!this._events||!t)return this._clearOnEmit=!1,this;var e=this._events[t];if(!e||!e.length)return this._clearOnEmit=!1,this;var n,i=this._queue,r=i.length,o=arguments.length-1;o>3&&(n=[],n.push.apply(n,arguments),n.shift()),i.push.apply(i,e),this._clearOnEmit&&(e.length=0,this._clearOnEmit=!1),++this._counter;for(var s=r,a=i.length;s<a;s++)if(0===o?i[s]():1===o?i[s](arguments[1]):2===o?i[s](arguments[1],arguments[2]):3===o?i[s](arguments[1],arguments[2],arguments[3]):i[s].apply(null,n),!this._events)return this;return--this._counter,this._counter||(i.length=0),this},P.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},P.prototype.countListeners=function(t){if(!this._events)return 0;var e=this._events[t];return e?e.length:0},P.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var N=D?"pointerout":I?"MSPointerOut":"",F=100;function W(t){N&&(this._dragger=t,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}W.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(N,this._onOut))},W.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(N,this._onOut),this._resetData(),this._isActive=!1)},W.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},W.prototype._onStart=function(t){"mouse"!==t.pointerType&&this._addBehaviour()},W.prototype._onOut=function(t){this._dragger._getTrackedTouch(t)&&(this._resetData(),this._outEvent=t,this._timeout=window.setTimeout(this._onTimeout,F))},W.prototype._onTimeout=function(){var t=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(t)},W.prototype.destroy=function(){N&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var H=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],B={};function z(t,e){var n=B[e]||"";if(n)return n;var i=e[0].toUpperCase()+e.slice(1),r=0;while(r<H.length){if(n=H[r]?H[r]+i:e,n in t)return B[e]=n,n;++r}return""}function U(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(n){}return t}var j=window.navigator.userAgent.toLowerCase(),G=j.indexOf("edge")>-1,V=j.indexOf("trident")>-1,Y=j.indexOf("firefox")>-1,q=j.indexOf("android")>-1,K=!!U()&&{passive:!0},X="touchAction",Q=z(document.documentElement.style,X),Z="auto";function J(t,e){this._element=t,this._emitter=new P,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(G||V)&&(D||I)&&(this._edgeHack=new W(this)),this.setCssProps(e),this._touchAction||this.setTouchAction(Z),t.addEventListener("dragstart",J._preventDefault,!1),t.addEventListener(J._inputEvents.start,this._onStart,K)}J._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},J._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},J._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},J._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},J._inputEvents=function(){return M?J._touchEvents:D?J._pointerEvents:I?J._msPointerEvents:J._mouseEvents}(),J._emitter=new P,J._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},J._activeInstances=[],J._preventDefault=function(t){t.preventDefault&&!1!==t.cancelable&&t.preventDefault()},J._activateInstance=function(t){var e=J._activeInstances.indexOf(t);e>-1||(J._activeInstances.push(t),J._emitter.on(J._emitterEvents.move,t._onMove),J._emitter.on(J._emitterEvents.cancel,t._onCancel),J._emitter.on(J._emitterEvents.end,t._onEnd),1===J._activeInstances.length&&J._bindListeners())},J._deactivateInstance=function(t){var e=J._activeInstances.indexOf(t);-1!==e&&(J._activeInstances.splice(e,1),J._emitter.off(J._emitterEvents.move,t._onMove),J._emitter.off(J._emitterEvents.cancel,t._onCancel),J._emitter.off(J._emitterEvents.end,t._onEnd),J._activeInstances.length||J._unbindListeners())},J._bindListeners=function(){window.addEventListener(J._inputEvents.move,J._onMove,K),window.addEventListener(J._inputEvents.end,J._onEnd,K),J._inputEvents.cancel&&window.addEventListener(J._inputEvents.cancel,J._onCancel,K)},J._unbindListeners=function(){window.removeEventListener(J._inputEvents.move,J._onMove,K),window.removeEventListener(J._inputEvents.end,J._onEnd,K),J._inputEvents.cancel&&window.removeEventListener(J._inputEvents.cancel,J._onCancel,K)},J._getEventPointerId=function(t){return"number"===typeof t.pointerId?t.pointerId:t.changedTouches?t.changedTouches[0]?t.changedTouches[0].identifier:null:1},J._getTouchById=function(t,e){if("number"===typeof t.pointerId)return t.pointerId===e?t:null;if(t.changedTouches){for(var n=0;n<t.changedTouches.length;n++)if(t.changedTouches[n].identifier===e)return t.changedTouches[n];return null}return t},J._onMove=function(t){J._emitter.emit(J._emitterEvents.move,t)},J._onCancel=function(t){J._emitter.emit(J._emitterEvents.cancel,t)},J._onEnd=function(t){J._emitter.emit(J._emitterEvents.end,t)},J.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,J._deactivateInstance(this)},J.prototype._createEvent=function(t,e){var n=this._getTrackedTouch(e);return{type:t,srcEvent:e,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:t===J._emitterEvents.start?0:this.getDeltaTime(),isFirst:t===J._emitterEvents.start,isFinal:t===J._emitterEvents.end||t===J._emitterEvents.cancel,pointerType:e.pointerType||(e.touches?"touch":"mouse"),identifier:this._pointerId,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX,pageY:n.pageY,target:n.target}},J.prototype._emit=function(t,e){this._emitter.emit(t,this._createEvent(t,e))},J.prototype._getTrackedTouch=function(t){return null===this._pointerId?null:J._getTouchById(t,this._pointerId)},J.prototype._onStart=function(t){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=J._getEventPointerId(t),null!==this._pointerId)){var e=this._getTrackedTouch(t);this._startX=this._currentX=e.clientX,this._startY=this._currentY=e.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(J._emitterEvents.start,t),this._isActive&&J._activateInstance(this)}},J.prototype._onMove=function(t){var e=this._getTrackedTouch(t);e&&(this._currentX=e.clientX,this._currentY=e.clientY,this._emit(J._emitterEvents.move,t))},J.prototype._onCancel=function(t){this._getTrackedTouch(t)&&(this._emit(J._emitterEvents.cancel,t),this._reset())},J.prototype._onEnd=function(t){this._getTrackedTouch(t)&&(this._emit(J._emitterEvents.end,t),this._reset())},J.prototype.isActive=function(){return this._isActive},J.prototype.setTouchAction=function(t){this._touchAction=t,Q&&(this._cssProps[Q]="",this._element.style[Q]=t),M&&(this._element.removeEventListener(J._touchEvents.start,J._preventDefault,!0),(this._element.style[Q]!==t||Y&&q)&&this._element.addEventListener(J._touchEvents.start,J._preventDefault,!0))},J.prototype.setCssProps=function(t){if(t){var e,n,i=this._cssProps,r=this._element;for(e in i)r.style[e]=i[e],delete i[e];for(e in t)t[e]&&(e!==X?(n=z(r.style,e),n&&(i[n]="",r.style[n]=t[e])):this.setTouchAction(t[e]))}},J.prototype.getDeltaX=function(){return this._currentX-this._startX},J.prototype.getDeltaY=function(){return this._currentY-this._startY},J.prototype.getDistance=function(){var t=this.getDeltaX(),e=this.getDeltaY();return Math.sqrt(t*t+e*e)},J.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},J.prototype.on=function(t,e){this._emitter.on(t,e)},J.prototype.off=function(t,e){this._emitter.off(t,e)},J.prototype.destroy=function(){if(!this._isDestroyed){var t=this._element;for(var e in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),t.removeEventListener(J._inputEvents.start,this._onStart,K),t.removeEventListener("dragstart",J._preventDefault,!1),t.removeEventListener(J._touchEvents.start,J._preventDefault,!0),this._cssProps)t.style[e]=this._cssProps[e],delete this._cssProps[e];this._element=null,this._isDestroyed=!0}};var tt=1e3/60,et=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return this.setTimeout((function(){t(Date.now())}),tt)}).bind(window);function nt(t){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var e=0;e<t;e++)this._lanes.push(new it)}function it(){this.queue=[],this.indices={},this.callbacks={}}nt.prototype._step=function(t){var e,n,i,r,o,s,a=this._lanes,l=this._stepQueue,c=this._stepCallbacks;for(this._nextStep=null,e=0;e<a.length;e++){for(r=a[e].queue,o=a[e].callbacks,s=a[e].indices,n=0;n<r.length;n++)i=r[n],i&&(l.push(i),c[i]=o[i],delete o[i],delete s[i]);r.length=0}for(e=0;e<l.length;e++)i=l[e],c[i]&&c[i](t),delete c[i];l.length=0},nt.prototype.add=function(t,e,n){this._lanes[t].add(e,n),this._nextStep||(this._nextStep=et(this._step))},nt.prototype.remove=function(t,e){this._lanes[t].remove(e)},it.prototype.add=function(t,e){var n=this.indices[t];void 0!==n&&(this.queue[n]=void 0),this.queue.push(t),this.callbacks[t]=e,this.indices[t]=this.queue.length-1},it.prototype.remove=function(t){var e=this.indices[t];void 0!==e&&(this.queue[e]=void 0,delete this.callbacks[t],delete this.indices[t])};var rt="layoutRead",ot="layoutWrite",st="visibilityRead",at="visibilityWrite",lt="dragStartRead",ct="dragStartWrite",ut="dragMoveRead",ht="dragMoveWrite",dt="dragScrollRead",ft="dragScrollWrite",pt="dragSortRead",gt="placeholderLayoutRead",mt="placeholderLayoutWrite",vt="placeholderResizeWrite",yt="autoScrollRead",wt="autoScrollWrite",bt="debounceRead",_t=0,xt=1,St=2,At=new nt(3);function Ct(t,e,n){At.add(_t,rt+t,e),At.add(St,ot+t,n)}function kt(t){At.remove(_t,rt+t),At.remove(St,ot+t)}function $t(t,e,n){At.add(_t,st+t,e),At.add(St,at+t,n)}function Tt(t){At.remove(_t,st+t),At.remove(St,at+t)}function Lt(t,e,n){At.add(_t,lt+t,e),At.add(St,ct+t,n)}function Rt(t){At.remove(_t,lt+t),At.remove(St,ct+t)}function Et(t,e,n){At.add(_t,ut+t,e),At.add(St,ht+t,n)}function Mt(t){At.remove(_t,ut+t),At.remove(St,ht+t)}function Dt(t,e,n){At.add(_t,dt+t,e),At.add(St,ft+t,n)}function It(t){At.remove(_t,dt+t),At.remove(St,ft+t)}function Ot(t,e){At.add(xt,pt+t,e)}function Pt(t){At.remove(xt,pt+t)}function Nt(t,e,n){At.add(_t,gt+t,e),At.add(St,mt+t,n)}function Ft(t){At.remove(_t,gt+t),At.remove(St,mt+t)}function Wt(t,e){At.add(St,vt+t,e)}function Ht(t){At.remove(St,vt+t)}function Bt(t,e){At.add(_t,yt,t),At.add(St,wt,e)}function zt(){At.remove(_t,yt),At.remove(St,wt)}function Ut(t,e){At.add(_t,bt+t,e)}function jt(t){At.remove(_t,bt+t)}var Gt=1,Vt=2,Yt=4,qt=8,Kt=Gt|qt,Xt=Gt|Yt,Qt=Vt|qt,Zt=Vt|Yt,Jt="function";function te(t){return typeof t===Jt}var ee="function"===typeof WeakMap?new WeakMap:null;function ne(t,e){var n=ee&&ee.get(t);return n||(n=window.getComputedStyle(t,null),ee&&ee.set(t,n)),n.getPropertyValue(e)}function ie(t,e){return parseFloat(ne(t,e))||0}var re=document.documentElement,oe=document.body,se={value:0,offset:0};function ae(t){return t===window||t===re||t===oe?window:t}function le(t){return t===window?t.pageXOffset:t.scrollLeft}function ce(t){return t===window?t.pageYOffset:t.scrollTop}function ue(t){return t===window?re.scrollWidth-re.clientWidth:t.scrollWidth-t.clientWidth}function he(t){return t===window?re.scrollHeight-re.clientHeight:t.scrollHeight-t.clientHeight}function de(t,e){if(e=e||{},t===window)e.width=re.clientWidth,e.height=re.clientHeight,e.left=0,e.right=e.width,e.top=0,e.bottom=e.height;else{var n=t.getBoundingClientRect(),i=t.clientLeft||ie(t,"border-left-width"),r=t.clientTop||ie(t,"border-top-width");e.width=t.clientWidth,e.height=t.clientHeight,e.left=n.left+i,e.right=e.left+e.width,e.top=n.top+r,e.bottom=e.top+e.height}return e}function fe(t){return t._drag._getGrid()._settings.dragAutoScroll}function pe(t){t._drag&&t._drag._prepareScroll()}function ge(t){if(t._drag&&t._isActive){var e=t._drag;e._scrollDiffX=e._scrollDiffY=0,t._setTranslate(e._left,e._top)}}function me(t,e,n,i){return se.value=Math.min(i/2,t),se.offset=Math.max(0,n+2*se.value+i*e-i)/2,se}function ve(){this.reset()}function ye(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function we(t,e){this.pool=[],this.createItem=t,this.releaseItem=e}function be(t,e){return!(t.left+t.width<=e.left||e.left+e.width<=t.left||t.top+t.height<=e.top||e.top+e.height<=t.top)}function _e(t,e){if(!be(t,e))return 0;var n=Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left),i=Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top);return n*i}function xe(t,e){var n=_e(t,e);if(!n)return 0;var i=Math.min(t.width,e.width)*Math.min(t.height,e.height);return n/i*100}ve.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},ve.prototype.hasReachedEnd=function(){return Yt&this.direction?this.value>=this.maxValue:this.value<=0},ve.prototype.computeCurrentScrollValue=function(){return null===this.value?Gt&this.direction?le(this.element):ce(this.element):Math.max(0,Math.min(this.value,this.maxValue))},ve.prototype.computeNextScrollValue=function(t){var e=this.speed*(t/1e3),n=Yt&this.direction?this.value+e:this.value-e;return Math.max(0,Math.min(n,this.maxValue))},ve.prototype.computeSpeed=function(){var t={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1};return function(e){var n=this.item,i=fe(n).speed;return te(i)?(t.direction=this.direction,t.threshold=this.threshold,t.distance=this.distance,t.value=this.value,t.maxValue=this.maxValue,t.duration=this.duration,t.speed=this.speed,t.deltaTime=e,t.isEnding=this.isEnding,i(n,this.element,t)):i}}(),ve.prototype.tick=function(t){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(t),this.value=this.computeNextScrollValue(t),this.duration+=t,this.value},ve.prototype.onStart=function(){var t=this.item,e=fe(t).onStart;te(e)&&e(t,this.element,this.direction)},ve.prototype.onStop=function(){var t=this.item,e=fe(t).onStop;te(e)&&e(t,this.element,this.direction),t._drag&&t._drag.sort()},ye.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},ye.prototype.addRequest=function(t){Gt&t.direction?(this.removeRequest(this.requestX),this.requestX=t):(this.removeRequest(this.requestY),this.requestY=t),t.action=this},ye.prototype.removeRequest=function(t){t&&(this.requestX===t?(this.requestX=null,t.action=null):this.requestY===t&&(this.requestY=null,t.action=null))},ye.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:le(this.element),this.scrollTop=this.requestY?this.requestY.value:ce(this.element)},ye.prototype.scroll=function(){var t=this.element;t&&(t.scrollTo?t.scrollTo(this.scrollLeft,this.scrollTop):(t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop))},we.prototype.pick=function(){return this.pool.pop()||this.createItem()},we.prototype.release=function(t){this.releaseItem(t),-1===this.pool.indexOf(t)&&this.pool.push(t)},we.prototype.reset=function(){this.pool.length=0};var Se={width:0,height:0,left:0,right:0,top:0,bottom:0},Ae={width:0,height:0,left:0,right:0,top:0,bottom:0};function Ce(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[Gt]={},this._requests[Vt]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new we((function(){return new ve}),(function(t){t.reset()})),this._actionPool=new we((function(){return new ye}),(function(t){t.reset()})),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Ce.AXIS_X=Gt,Ce.AXIS_Y=Vt,Ce.FORWARD=Yt,Ce.BACKWARD=qt,Ce.LEFT=Kt,Ce.RIGHT=Xt,Ce.UP=Qt,Ce.DOWN=Zt,Ce.smoothSpeed=function(t,e,n){return function(i,r,o){var s=0;if(!o.isEnding)if(o.threshold>0){var a=o.threshold-Math.max(0,o.distance);s=t/o.threshold*a}else s=t;var l=o.speed,c=s;return l===s?c:l<s?(c=l+e*(o.deltaTime/1e3),Math.min(s,c)):(c=l-n*(o.deltaTime/1e3),Math.max(s,c))}},Ce.pointerHandle=function(t){var e={left:0,top:0,width:0,height:0},n=t||1;return function(t,i,r,o,s,a,l){return e.left=a-.5*n,e.top=l-.5*n,e.width=n,e.height=n,e}},Ce.prototype._readTick=function(t){this._isDestroyed||(t&&this._tickTime?(this._tickDeltaTime=t-this._tickTime,this._tickTime=t,this._updateRequests(),this._updateActions()):(this._tickTime=t,this._tickDeltaTime=0))},Ce.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),Bt(this._readTick,this._writeTick))},Ce.prototype._startTicking=function(){this._isTicking=!0,Bt(this._readTick,this._writeTick)},Ce.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,zt()},Ce.prototype._getItemHandleRect=function(t,e,n){var i=t._drag;if(e){var r=i._dragMoveEvent||i._dragStartEvent,o=e(t,i._clientX,i._clientY,t._width,t._height,r.clientX,r.clientY);n.left=o.left,n.top=o.top,n.width=o.width,n.height=o.height}else n.left=i._clientX,n.top=i._clientY,n.width=t._width,n.height=t._height;return n.right=n.left+n.width,n.bottom=n.top+n.height,n},Ce.prototype._requestItemScroll=function(t,e,n,i,r,o,s){var a=this._requests[e],l=a[t._id];l?l.element===n&&l.direction===i||l.reset():l=this._requestPool.pick(),l.item=t,l.element=n,l.direction=i,l.threshold=r,l.distance=o,l.maxValue=s,a[t._id]=l},Ce.prototype._cancelItemScroll=function(t,e){var n=this._requests[e],i=n[t._id];i&&(i.action&&i.action.removeRequest(i),this._requestPool.release(i),delete n[t._id])},Ce.prototype._checkItemOverlap=function(t,e,n){var i=fe(t),r=te(i.targets)?i.targets(t):i.targets,o=i.threshold,s=i.safeZone;if(!r||!r.length)return e&&this._cancelItemScroll(t,Gt),void(n&&this._cancelItemScroll(t,Vt));var a=this._dragDirections[t._id],l=a[0],c=a[1];if(!l&&!c)return e&&this._cancelItemScroll(t,Gt),void(n&&this._cancelItemScroll(t,Vt));for(var u=this._getItemHandleRect(t,i.handle,Se),h=Ae,d=null,f=null,p=!0,g=!0,m=0,v=0,y=null,w=null,b=0,_=0,x=0,S=null,A=-1/0,C=0,k=0,$=null,T=0,L=0,R=null,E=-1/0,M=0,D=0,I=null,O=0,P=0,N=0;N<r.length;N++)d=r[N],p=e&&l&&d.axis!==Vt,g=n&&c&&d.axis!==Gt,v=d.priority||0,(!p||v<A)&&(!g||v<E)||(f=ae(d.element||d),_=p?ue(f):-1,x=g?he(f):-1,(_||x)&&(h=de(f,h),m=xe(u,h),m<=0||(p&&v>=A&&_>0&&(v>A||m>k)&&(w=null,y=me("number"===typeof d.threshold?d.threshold:o,s,u.width,h.width),l===Xt?(b=h.right+y.offset-u.right,b<=y.value&&le(f)<_&&(w=Xt)):l===Kt&&(b=u.left-(h.left-y.offset),b<=y.value&&le(f)>0&&(w=Kt)),null!==w&&(S=f,A=v,C=y.value,k=m,$=w,T=b,L=_)),g&&v>=E&&x>0&&(v>E||m>D)&&(w=null,y=me("number"===typeof d.threshold?d.threshold:o,s,u.height,h.height),c===Zt?(b=h.bottom+y.offset-u.bottom,b<=y.value&&ce(f)<x&&(w=Zt)):c===Qt&&(b=u.top-(h.top-y.offset),b<=y.value&&ce(f)>0&&(w=Qt)),null!==w&&(R=f,E=v,M=y.value,D=m,I=w,O=b,P=x)))));e&&(S?this._requestItemScroll(t,Gt,S,$,C,T,L):this._cancelItemScroll(t,Gt)),n&&(R?this._requestItemScroll(t,Vt,R,I,M,O,P):this._cancelItemScroll(t,Vt))},Ce.prototype._updateScrollRequest=function(t){for(var e=t.item,n=fe(e),i=te(n.targets)?n.targets(e):n.targets,r=i&&i.length||0,o=n.threshold,s=n.safeZone,a=this._getItemHandleRect(e,n.handle,Se),l=Ae,c=null,u=null,h=!1,d=null,f=null,p=null,g=null,m=null,v=null,y=0;y<r;y++)if(c=i[y],u=ae(c.element||c),u===t.element){if(h=!!(Gt&t.direction),h){if(c.axis===Vt)continue}else if(c.axis===Gt)continue;if(m=h?ue(u):he(u),m<=0)break;if(l=de(u,l),d=xe(a,l),d<=0)break;if(f=me("number"===typeof c.threshold?c.threshold:o,s,h?a.width:a.height,h?l.width:l.height),p=t.direction===Kt?a.left-(l.left-f.offset):t.direction===Xt?l.right+f.offset-a.right:t.direction===Qt?a.top-(l.top-f.offset):l.bottom+f.offset-a.bottom,p>f.value)break;if(g=h?le(u):ce(u),v=Yt&t.direction?g>=m:g<=0,v)break;return t.maxValue=m,t.threshold=f.value,t.distance=p,t.isEnding=!1,!0}return!0===n.smoothStop&&t.speed>0?(null===v&&(v=t.hasReachedEnd()),t.isEnding=!v):t.isEnding=!1,t.isEnding},Ce.prototype._updateRequests=function(){for(var t,e,n,i,r,o,s,a=this._items,l=this._requests[Gt],c=this._requests[Vt],u=0;u<a.length;u++)t=a[u],i=this._requestOverlapCheck[t._id],r=i>0&&this._tickTime-i>this._overlapCheckInterval,o=!0,e=l[t._id],e&&e.isActive&&(o=!this._updateScrollRequest(e),o&&(r=!0,this._cancelItemScroll(t,Gt))),s=!0,n=c[t._id],n&&n.isActive&&(s=!this._updateScrollRequest(n),s&&(r=!0,this._cancelItemScroll(t,Vt))),r&&(this._requestOverlapCheck[t._id]=0,this._checkItemOverlap(t,o,s))},Ce.prototype._requestAction=function(t,e){for(var n=this._actions,i=e===Gt,r=null,o=0;o<n.length;o++){if(r=n[o],t.element===r.element){if(i?r.requestX:r.requestY)return void this._cancelItemScroll(t.item,e);break}r=null}r||(r=this._actionPool.pick()),r.element=t.element,r.addRequest(t),t.tick(this._tickDeltaTime),n.push(r)},Ce.prototype._updateActions=function(){var t,e,n,i,r=this._items,o=this._requests,s=this._actions;for(i=0;i<r.length;i++)t=r[i]._id,e=o[Gt][t],n=o[Vt][t],e&&this._requestAction(e,Gt),n&&this._requestAction(n,Vt);for(i=0;i<s.length;i++)s[i].computeScrollValues()},Ce.prototype._applyActions=function(){var t,e=this._actions,n=this._items;if(e.length){for(t=0;t<e.length;t++)e[t].scroll(),this._actionPool.release(e[t]);for(e.length=0,t=0;t<n.length;t++)pe(n[t]);for(t=0;t<n.length;t++)ge(n[t])}},Ce.prototype._updateDragDirection=function(t){var e=this._dragPositions[t._id],n=this._dragDirections[t._id],i=t._drag._left,r=t._drag._top;if(e.length){var o=e[0],s=e[1];n[0]=i>o?Xt:i<o?Kt:n[0]||0,n[1]=r>s?Zt:r<s?Qt:n[1]||0}e[0]=i,e[1]=r},Ce.prototype.addItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);-1===e&&(this._items.push(t),this._requestOverlapCheck[t._id]=this._tickTime,this._dragDirections[t._id]=[0,0],this._dragPositions[t._id]=[],this._isTicking||this._startTicking())}},Ce.prototype.updateItem=function(t){this._isDestroyed||this._dragDirections[t._id]&&(this._updateDragDirection(t),this._requestOverlapCheck[t._id]||(this._requestOverlapCheck[t._id]=this._tickTime))},Ce.prototype.removeItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);if(-1!==e){var n=t._id,i=this._requests[Gt][n];i&&(this._cancelItemScroll(t,Gt),delete this._requests[Gt][n]);var r=this._requests[Vt][n];r&&(this._cancelItemScroll(t,Vt),delete this._requests[Vt][n]),delete this._requestOverlapCheck[n],delete this._dragPositions[n],delete this._dragDirections[n],this._items.splice(e,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},Ce.prototype.isItemScrollingX=function(t){var e=this._requests[Gt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrollingY=function(t){var e=this._requests[Vt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrolling=function(t){return this.isItemScrollingX(t)||this.isItemScrollingY(t)},Ce.prototype.destroy=function(){if(!this._isDestroyed){for(var t=this._items.slice(0),e=0;e<t.length;e++)this.removeItem(t[e]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var ke=window.Element.prototype,$e=ke.matches||ke.matchesSelector||ke.webkitMatchesSelector||ke.mozMatchesSelector||ke.msMatchesSelector||ke.oMatchesSelector||function(){return!1};function Te(t,e){return $e.call(t,e)}function Le(t,e){e&&(t.classList?t.classList.add(e):Te(t,"."+e)||(t.className+=" "+e))}var Re=[],Ee="number";function Me(t,e,n){var i=typeof n===Ee?n:-1;i<0&&(i=t.length-i+1),t.splice.apply(t,Re.concat(i,0,e)),Re.length=0}function De(t,e,n){var i=Math.max(0,t.length-1+(n||0));return e>i?i:e<0?Math.max(i+e+1,0):e}function Ie(t,e,n){if(!(t.length<2)){var i=De(t,e),r=De(t,n);i!==r&&t.splice(r,0,t.splice(i,1)[0])}}function Oe(t,e,n){if(!(t.length<2)){var i,r=De(t,e),o=De(t,n);r!==o&&(i=t[r],t[r]=t[o],t[o]=i)}}var Pe=z(document.documentElement.style,"transform")||"transform",Ne=/([A-Z])/g,Fe=/^(webkit-|moz-|ms-|o-)/,We=/^(-m-s-)/;function He(t){var e=t.replace(Ne,"-$1").toLowerCase();return e=e.replace(Fe,"-$1"),e=e.replace(We,"-ms-"),e}var Be=He(Pe),ze="none",Ue="inline",je="none",Ge="display";function Ve(t){var e=ne(t,Be);if(!e||e===ze)return!1;var n=ne(t,Ge);return n!==Ue&&n!==je}function Ye(t){var e=document,n=t||e;while(n&&n!==e&&"static"===ne(n,"position")&&!Ve(n))n=n.parentElement||e;return n}var qe={},Ke={},Xe={};function Qe(t,e){var n,i=e||{};return i.left=0,i.top=0,t===document?i:(i.left=window.pageXOffset||0,i.top=window.pageYOffset||0,t.self===window.self||(n=t.getBoundingClientRect(),i.left+=n.left,i.top+=n.top,i.left+=ie(t,"border-left-width"),i.top+=ie(t,"border-top-width")),i)}function Ze(t,e,n){return Xe.left=0,Xe.top=0,t===e||n&&(t=Ye(t),e=Ye(e),t===e)||(Qe(t,qe),Qe(e,Ke),Xe.left=Ke.left-qe.left,Xe.top=Ke.top-qe.top),Xe}function Je(t){return"auto"===t||"scroll"===t||"overlay"===t}function tn(t){return Je(ne(t,"overflow"))||Je(ne(t,"overflow-x"))||Je(ne(t,"overflow-y"))}function en(t,e){e=e||[];while(t&&t!==document)t.getRootNode&&t instanceof DocumentFragment?t=t.getRootNode().host:(tn(t)&&e.push(t),t=t.parentNode);return e.push(window),e}var nn={},rn="none",on=/^matrix3d/,sn=/([^,]*,){4}/,an=/([^,]*,){12}/,ln=/[^,]*,/;function cn(t){nn.x=0,nn.y=0;var e=ne(t,Be);if(!e||e===rn)return nn;var n=on.test(e),i=e.replace(n?an:sn,""),r=i.replace(ln,"");return nn.x=parseFloat(i)||0,nn.y=parseFloat(r)||0,nn}function un(t,e){e&&(t.classList?t.classList.remove(e):Te(t,"."+e)&&(t.className=(" "+t.className+" ").replace(" "+e+" "," ").trim()))}var hn=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,dn=0,fn=1,pn=2,gn=!!U()&&{passive:!0};function mn(t){var e=t._element,n=t.getGrid(),i=n._settings;this._item=t,this._gridId=n._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=te(i.dragStartPredicate)?i.dragStartPredicate:mn.defaultStartPredicate,this._startPredicateState=dn,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=i.dragHandle&&e.querySelector(i.dragHandle)||e,this._dragger=new J(this._handle,i.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function vn(t){if("a"===t.tagName.toLowerCase()){var e=t.getAttribute("href");if(e){var n=t.getAttribute("target");n&&"_self"!==n?window.open(e,n):window.location.href=e}}}function yn(t,e){var n,i,r={};if(Array.isArray(e))for(i=0;i<e.length;i++)n=e[i],r[n]=ne(t,He(n));else for(n in e)r[n]=ne(t,He(n));return r}mn.autoScroller=new Ce,mn.defaultStartPredicate=function(t,e,n){var i=t._drag;if(e.isFirst&&e.srcEvent.button)return!1;if(!hn&&e.isFirst&&!0===e.srcEvent.isTrusted&&!1===e.srcEvent.defaultPrevented&&!1===e.srcEvent.cancelable)return!1;if(!e.isFinal){var r=i._startPredicateData;if(!r){var o=n||i._getGrid()._settings.dragStartPredicate||{};i._startPredicateData=r={distance:Math.max(o.distance,0)||0,delay:Math.max(o.delay,0)||0}}return r.delay&&(r.event=e,r.delayTimer||(r.delayTimer=window.setTimeout((function(){r.delay=0,i._resolveStartPredicate(r.event)&&(i._forceResolveStartPredicate(r.event),i._resetStartPredicate())}),r.delay))),i._resolveStartPredicate(e)}i._finishStartPredicate(e)},mn.defaultSortPredicate=function(){var t={},e={},n={},i=[],r=1,a=100;function l(n,r,o){var s,a,l,c,u,h,d,f,p,g,m=null,v=r._settings.dragSort,y=-1;if(!0===v?(i[0]=r,a=i):te(v)&&(a=v.call(r,n)),!a||!Array.isArray(a)||!a.length)return m;for(g=0;g<a.length;g++)if(l=a[g],!l._isDestroyed){l._updateBoundingRect(),h=Math.max(0,l._left),d=Math.max(0,l._top),f=Math.min(window.innerWidth,l._right),p=Math.min(window.innerHeight,l._bottom),c=l._element.parentNode;while(c&&c!==document&&c!==document.documentElement&&c!==document.body)if(c.getRootNode&&c instanceof DocumentFragment)c=c.getRootNode().host;else{if("visible"!==ne(c,"overflow")&&(u=c.getBoundingClientRect(),h=Math.max(h,u.left),d=Math.max(d,u.top),f=Math.min(f,u.right),p=Math.min(p,u.bottom)),"fixed"===ne(c,"position"))break;c=c.parentNode}h>=f||d>=p||(e.left=h,e.top=d,e.width=f-h,e.height=p-d,s=xe(t,e),s>o&&s>y&&(y=s,m=l))}return i.length=0,m}return function(i,c){var u=i._drag,h=u._getGrid(),d=c&&"number"===typeof c.threshold?c.threshold:50,f=c&&c.action===o?o:s,p=c&&c.migrateAction===o?o:s;d=Math.min(Math.max(d,r),a),t.width=i._width,t.height=i._height,t.left=u._clientX,t.top=u._clientY;var g=l(i,h,d);if(!g)return null;var m,v,y,w=i.getGrid()!==g,b=0,_=0,x=0,S=-1,A=!1;for(g===h?(t.left=u._gridX+i._marginLeft,t.top=u._gridY+i._marginTop):(g._updateBorders(1,0,1,0),b=g._left+g._borderLeft,_=g._top+g._borderTop),y=0;y<g._items.length;y++)m=g._items[y],m._isActive&&m!==i&&(A=!0,e.width=m._width,e.height=m._height,e.left=m._left+m._marginLeft+b,e.top=m._top+m._marginTop+_,v=xe(t,e),v>x&&(S=y,x=v));return w&&x<d&&(S=A?S:0,x=d),x>=d?(n.grid=g,n.index=S,n.action=w?p:f,n):null}}(),mn.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var t=this._item,e=t._id;if(mn.autoScroller.removeItem(t),Rt(e),Mt(e),It(e),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var n=t._element,i=this._getGrid(),r=i._settings.itemDraggingClass;n.parentNode!==i._element&&(i._element.appendChild(n),t._setTranslate(this._gridX,this._gridY),r&&n.clientWidth),un(n,r)}this._reset()}},mn.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(!0===t?this._handleSort():Ot(e._id,this._handleSort))},mn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),mn.autoScroller.removeItem(this._item),this._isDestroyed=!0)},mn.prototype._getGrid=function(){return i[this._gridId]||null},mn.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},mn.prototype._bindScrollListeners=function(){var t,e,n=this._getGrid()._element,i=this._container,r=this._scrollers;if(r.length=0,en(this._item._element.parentNode,r),i!==n)for(t=[],en(n,t),e=0;e<t.length;e++)r.indexOf(t[e])<0&&r.push(t[e]);for(e=0;e<r.length;e++)r[e].addEventListener("scroll",this._onScroll,gn)},mn.prototype._unbindScrollListeners=function(){var t,e=this._scrollers;for(t=0;t<e.length;t++)e[t].removeEventListener("scroll",this._onScroll,gn);e.length=0},mn.prototype._resolveStartPredicate=function(t){var e=this._startPredicateData;if(!(t.distance<e.distance||e.delay))return this._resetStartPredicate(),!0},mn.prototype._forceResolveStartPredicate=function(t){this._isDestroyed||this._startPredicateState!==fn||(this._startPredicateState=pn,this._onStart(t))},mn.prototype._finishStartPredicate=function(t){var e=this._item._element,n=Math.abs(t.deltaX)<2&&Math.abs(t.deltaY)<2&&t.deltaTime<200;this._resetStartPredicate(),n&&vn(e)},mn.prototype._resetHeuristics=function(t,e){this._blockedSortIndex=null,this._sortX1=this._sortX2=t,this._sortY1=this._sortY2=e},mn.prototype._checkHeuristics=function(t,e){var n=this._getGrid()._settings.dragSortHeuristics,i=n.minDragDistance;if(i<=0)return this._blockedSortIndex=null,!0;var r=t-this._sortX2,o=e-this._sortY2,s=i>3&&n.minBounceBackAngle>0;if(s||(this._blockedSortIndex=null),Math.abs(r)>i||Math.abs(o)>i){if(s){var a=Math.atan2(r,o),l=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),c=Math.atan2(Math.sin(a-l),Math.cos(a-l));Math.abs(c)>n.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=t,this._sortY2=e,!0}return!1},mn.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},mn.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&mn.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var e=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||e){var n=t.dragSortHeuristics.sortInterval;n<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,n))}}},mn.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Ot(this._item._id,this._handleSort)},mn.prototype._cancelSort=function(){this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),Pt(this._item._id)},mn.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort,e=t&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},mn.prototype._checkOverlap=function(){if(this._isActive){var t,e,n,i,r,a,l,c,u=this._item,h=this._getGrid()._settings;t=te(h.dragSortPredicate)?h.dragSortPredicate(u,this._dragMoveEvent):mn.defaultSortPredicate(u,h.dragSortPredicate),t&&"number"===typeof t.index&&(l=t.action===o?o:s,e=u.getGrid(),i=t.grid||e,c=e!==i,n=e._items.indexOf(u),r=De(i._items,t.index,c&&l===s?1:0),(c||r!==this._blockedSortIndex)&&(c?(this._blockedSortIndex=null,a=i._items[r],e._hasListeners(_)&&e._emit(_,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),i._hasListeners(S)&&i._emit(S,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),u._gridId=i._id,this._isMigrating=u._gridId!==this._gridId,e._items.splice(n,1),Me(i._items,u,r),u._sortData=null,e._hasListeners(b)&&e._emit(b,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),i._hasListeners(x)&&i._emit(x,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),l===o&&a&&a.isActive()&&i._items.indexOf(a)>-1&&i.send(a,e,n,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),e.layout(),i.layout()):n!==r&&(this._blockedSortIndex=n,(l===o?Oe:Ie)(e._items,n,r),e._hasListeners(w)&&e._emit(w,{item:u,fromIndex:n,toIndex:r,action:l}),e.layout())))}},mn.prototype._finishMigration=function(){var t,e,n=this._item,i=n._dragRelease,r=n._element,o=n._isActive,s=n.getGrid(),a=s._element,l=s._settings,c=l.dragContainer||a,u=this._getGrid()._settings,h=r.parentNode,d=o?u.itemVisibleClass:u.itemHiddenClass,f=o?l.itemVisibleClass:l.itemHiddenClass;this._isMigrating=!1,this.destroy(),u.itemClass!==l.itemClass&&(un(r,u.itemClass),Le(r,l.itemClass)),d!==f&&(un(r,d),Le(r,f)),c!==h&&(c.appendChild(r),e=Ze(h,c,!0),t=cn(r),t.x-=e.left,t.y-=e.top),n._refreshDimensions(),e=Ze(c,a,!0),i._containerDiffX=e.left,i._containerDiffY=e.top,n._drag=l.dragEnabled?new mn(n):null,c!==h&&n._setTranslate(t.x,t.y),n._visibility.setStyles(o?l.visibleStyles:l.hiddenStyles),i.start()},mn.prototype._preStartCheck=function(t){this._startPredicateState===dn&&(this._startPredicateState=fn),this._startPredicateState===fn?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=pn,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=dn)):this._startPredicateState===pn&&this._isActive&&this._onMove(t)},mn.prototype._preEndCheck=function(t){var e=this._startPredicateState===pn;this._startPredicate(this._item,t),this._startPredicateState=dn,e&&this._isActive&&(this._isStarted?this._onEnd(t):this.stop())},mn.prototype._onStart=function(t){var e=this._item;e._isActive&&(this._isActive=!0,this._dragStartEvent=t,mn.autoScroller.addItem(e),Lt(e._id,this._prepareStart,this._applyStart))},mn.prototype._prepareStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._settings,r=n._element,o=i.dragContainer||r,s=Ye(o),a=cn(e),l=e.getBoundingClientRect(),c=o!==r;if(this._container=o,this._containingBlock=s,this._clientX=l.left,this._clientY=l.top,this._left=this._gridX=a.x,this._top=this._gridY=a.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),c){var u=Ze(s,r);this._containerDiffX=u.left,this._containerDiffY=u.top}}}},mn.prototype._applyStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid(),n=t._element,i=t._dragRelease,r=t._migrate,o=this._container!==e._element;t.isPositioning()&&t._layout.stop(!0,this._left,this._top),r._isActive&&(this._left-=r._containerDiffX,this._top-=r._containerDiffY,this._gridX-=r._containerDiffX,this._gridY-=r._containerDiffY,r.stop(!0,this._left,this._top)),t.isReleasing()&&i._reset(),e._settings.dragPlaceholder.enabled&&t._dragPlaceholder.create(),this._isStarted=!0,e._emit(A,t,this._dragStartEvent),o&&(n.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(n),t._setTranslate(this._left,this._top))),Le(n,e._settings.itemDraggingClass),this._bindScrollListeners(),e._emit(C,t,this._dragStartEvent)}}},mn.prototype._onMove=function(t){var e=this._item;e._isActive?(this._dragMoveEvent=t,Et(e._id,this._prepareMove,this._applyMove),Ot(e._id,this._handleSort)):this.stop()},mn.prototype._prepareMove=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid()._settings,n=e.dragAxis,i=this._dragMoveEvent,r=this._dragPrevMoveEvent||this._dragStartEvent||i;if("y"!==n){var o=i.clientX-r.clientX;this._left=this._left-this._moveDiffX+o,this._gridX=this._gridX-this._moveDiffX+o,this._clientX=this._clientX-this._moveDiffX+o,this._moveDiffX=o}if("x"!==n){var s=i.clientY-r.clientY;this._top=this._top-this._moveDiffY+s,this._gridY=this._gridY-this._moveDiffY+s,this._clientY=this._clientY-this._moveDiffY+s,this._moveDiffY=s}this._dragPrevMoveEvent=i}}},mn.prototype._applyMove=function(){if(this._isActive){var t=this._item;t._isActive&&(this._moveDiffX=this._moveDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit(k,t,this._dragMoveEvent),mn.autoScroller.updateItem(t))}},mn.prototype._onScroll=function(t){var e=this._item;e._isActive?(this._scrollEvent=t,Dt(e._id,this._prepareScroll,this._applyScroll),Ot(e._id,this._handleSort)):this.stop()},mn.prototype._prepareScroll=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._element,r=e.getBoundingClientRect();if(this._container!==i){var o=Ze(this._containingBlock,i);this._containerDiffX=o.left,this._containerDiffY=o.top}var s=this._clientX-this._moveDiffX-r.left;this._left=this._left-this._scrollDiffX+s,this._scrollDiffX=s;var a=this._clientY-this._moveDiffY-r.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},mn.prototype._applyScroll=function(){if(this._isActive){var t=this._item;t._isActive&&(this._scrollDiffX=this._scrollDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit($,t,this._scrollEvent))}},mn.prototype._onEnd=function(t){var e=this._item,n=e._element,i=this._getGrid(),r=i._settings,o=e._dragRelease;e._isActive?(Rt(e._id),Mt(e._id),It(e._id),this._finishSort(),this._unbindScrollListeners(),o._containerDiffX=this._containerDiffX,o._containerDiffY=this._containerDiffY,this._reset(),un(n,r.itemDraggingClass),mn.autoScroller.removeItem(e),i._emit(T,e,t),this._isMigrating?this._finishMigration():o.start()):this.stop()};var wn=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,bn={};function _n(t){var e=bn[t];return e||(e=t.replace(wn,""),e!==t&&(e=e[0].toLowerCase()+e.slice(1)),bn[t]=e,e)}var xn="[native code]";function Sn(t){var e=window.Symbol;return!!(t&&te(e)&&te(e.toString)&&e(t).toString().indexOf(xn)>-1)}function An(t,e){for(var n in e)t.style[n]=e[n]}var Cn=!(!Element||!te(Element.prototype.animate)),kn=!(!Element||!Sn(Element.prototype.animate));function $n(t){this._element=t,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function Tn(t,e){var n={};for(var i in t)n[e?i:_n(i)]=t[i];return n}function Ln(t,e){return"translateX("+t+"px) translateY("+e+"px)"}function Rn(t){this._item=t,this._animation=new $n,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function En(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}$n.prototype.start=function(t,e,n){if(!this._isDestroyed){var i=this._element,r=n||{};if(!Cn)return An(i,e),this._callback=te(r.onFinish)?r.onFinish:null,void this._onFinish();var o,s,a,l=this._animation,c=this._props,u=this._values,h=r.duration||300,d=r.easing||"ease",f=!1;if(l&&(s=0,h===this._duration&&d===this._easing||(f=!0),!f)){for(o in e)if(++s,a=c.indexOf(o),-1===a||e[o]!==u[a]){f=!0;break}s!==c.length&&(f=!0)}if(f&&l.cancel(),this._callback=te(r.onFinish)?r.onFinish:null,!l||f){for(o in c.length=u.length=0,e)c.push(o),u.push(e[o]);this._duration=h,this._easing=d,this._animation=i.animate([Tn(t,kn),Tn(e,kn)],{duration:h,easing:d}),this._animation.onfinish=this._onFinish,An(i,e)}}},$n.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},$n.prototype.getCurrentStyles=function(){return yn(element,currentProps)},$n.prototype.isAnimating=function(){return!!this._animation},$n.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},$n.prototype._onFinish=function(){var t=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,t&&t()},Rn.prototype._updateDimensions=function(){this.isActive()&&An(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Rn.prototype._onLayoutStart=function(t,e){var n=this._item;if(-1!==t.indexOf(n)){var i=n._left,r=n._top,o=this._left,s=this._top;if(this._left=i,this._top=r,e||this._didMigrate||o!==i||s!==r){var a=i+n._marginLeft,l=r+n._marginTop,c=n.getGrid(),u=!e&&c._settings.layoutDuration>0;if(!u||this._didMigrate)return Ft(n._id),this._element.style[Pe]=Ln(a,l),this._animation.stop(),void(this._didMigrate&&(c.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=a,this._nextTransY=l,Nt(n._id,this._setupAnimation,this._startAnimation)}}else this.reset()},Rn.prototype._setupAnimation=function(){if(this.isActive()){var t=cn(this._element);this._transX=t.x,this._transY=t.y}},Rn.prototype._startAnimation=function(){if(this.isActive()){var t=this._animation,e=this._transX,n=this._transY,i=this._nextTransX,r=this._nextTransY;if(e!==i||n!==r){var o=this._item.getGrid()._settings,s={},a={};s[Pe]=Ln(e,n),a[Pe]=Ln(i,r),t.start(s,a,{duration:o.layoutDuration,easing:o.layoutEasing,onFinish:this._onLayoutEnd})}else t.isAnimating()&&(this._element.style[Pe]=Ln(i,r),t.stop())}},Rn.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Rn.prototype._onReleaseEnd=function(t){if(t._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Rn.prototype._onMigrate=function(t){if(t.item===this._item){var e=this._item.getGrid(),n=t.toGrid;e.off(R,this._onReleaseEnd),e.off(l,this._onLayoutStart),e.off(_,this._onMigrate),e.off(g,this._onHide),n.on(R,this._onReleaseEnd),n.on(l,this._onLayoutStart),n.on(_,this._onMigrate),n.on(g,this._onHide),this._didMigrate=!0}},Rn.prototype._onHide=function(t){t.indexOf(this._item)>-1&&this.reset()},Rn.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var t,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._left=e._left,this._top=e._top,t=te(i.dragPlaceholder.createElement)?i.dragPlaceholder.createElement(e):document.createElement("div"),this._element=t,r._element=t,this._className=i.itemPlaceholderClass||"",this._className&&Le(t,this._className),An(t,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),t.style[Pe]=Ln(e._left+e._marginLeft,e._top+e._marginTop),n.on(l,this._onLayoutStart),n.on(R,this._onReleaseEnd),n.on(_,this._onMigrate),n.on(g,this._onHide),te(i.dragPlaceholder.onCreate)&&i.dragPlaceholder.onCreate(e,t),n.getElement().appendChild(t)}},Rn.prototype.reset=function(){if(this.isActive()){var t=this._element,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._resetAfterLayout=!1,Ft(e._id),Ht(e._id),r.stop(),r._element=null,n.off(R,this._onReleaseEnd),n.off(l,this._onLayoutStart),n.off(_,this._onMigrate),n.off(g,this._onHide),this._className&&(un(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,te(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(e,t)}},Rn.prototype.isActive=function(){return!!this._element},Rn.prototype.getElement=function(){return this._element},Rn.prototype.updateDimensions=function(){this.isActive()&&Wt(this._item._id,this._updateDimensions)},Rn.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},En.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var t=this._item,e=t.getGrid(),n=e._settings;this._isActive=!0,Le(t._element,n.itemReleasingClass),n.dragRelease.useDragContainer||this._placeToGrid(),e._emit(L,t),e._nextLayoutData||t._layout.start(!1)}},En.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item,r=i.getGrid();t||void 0!==e&&void 0!==n||(e=i._left,n=i._top);var o=this._placeToGrid(e,n);this._reset(o),t||r._emit(R,i)}},En.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},En.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},En.prototype._placeToGrid=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=n.getGrid()._element,o=!1;if(i.parentNode!==r){if(void 0===t||void 0===e){var s=cn(i);t=s.x-this._containerDiffX,e=s.y-this._containerDiffY}r.appendChild(i),n._setTranslate(t,e),o=!0}return this._containerDiffX=0,this._containerDiffY=0,o}},En.prototype._reset=function(t){if(!this._isDestroyed){var e=this._item,n=e.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,n&&(t&&e._element.clientWidth,un(e._element,n))}};var Mn=2;function Dn(t){var e=t._element,n=e.style;this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},n.left="0px",n.top="0px",t._setTranslate(0,0),this._animation=new $n(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function In(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function On(t){var e=t._isActive,n=t._element,i=n.children[0],r=t.getGrid()._settings;if(!i)throw new Error("No valid child element found within item element.");this._item=t,this._isDestroyed=!1,this._isHidden=!e,this._isHiding=!1,this._isShowing=!1,this._childElement=i,this._currentStyleProps=[],this._animation=new $n(i),this._queue="visibility-"+t._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),n.style.display=e?"":"none",Le(n,e?r.itemVisibleClass:r.itemHiddenClass),this.setStyles(e?r.visibleStyles:r.hiddenStyles)}Dn.prototype.start=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._dragRelease,r=n.getGrid()._settings,o=this._isActive,s=i.isJustReleased(),a=s?r.dragRelease.duration:r.layoutDuration,l=s?r.dragRelease.easing:r.layoutEasing,c=!t&&!this._skipNextAnimation&&a>0;if(o&&(kt(n._id),n._emitter.burst(this._queue,!0,n)),s&&(i._isPositioningStarted=!0),te(e)&&n._emitter.on(this._queue,e),this._skipNextAnimation=!1,!c)return this._updateOffsets(),n._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=l,this._animOptions.duration=a,this._isInterrupted=o,Ct(n._id,this._setupAnimation,this._startAnimation)}},Dn.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item;if(kt(i._id),this._animation.isAnimating()){if(void 0===e||void 0===n){var r=cn(i._element);e=r.x,n=r.y}i._setTranslate(e,n),this._animation.stop()}un(i._element,i.getGrid()._settings.itemPositioningClass),this._isActive=!1,t&&i._emitter.burst(this._queue,!0,i)}},Dn.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),t[Pe]="",t.left="",t.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Dn.prototype._updateOffsets=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;this._offsetLeft=n._isActive?n._containerDiffX:e._isActive?e._containerDiffX:0,this._offsetTop=n._isActive?n._containerDiffY:e._isActive?e._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Dn.prototype._finish=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;t._tX=this._nextLeft,t._tY=this._nextTop,this._isActive&&(this._isActive=!1,un(t._element,t.getGrid()._settings.itemPositioningClass)),n._isActive&&n.stop(),e._isActive&&e.stop(),t._emitter.burst(this._queue,!1,t)}},Dn.prototype._setupAnimation=function(){var t=this._item;if(void 0===t._tX||void 0===t._tY){var e=cn(t._element);t._tX=e.x,t._tY=e.y}},Dn.prototype._startAnimation=function(){var t=this._item,e=t.getGrid()._settings,n=this._animOptions.duration<=0;this._updateOffsets();var i=Math.abs(t._left-(t._tX-this._offsetLeft)),r=Math.abs(t._top-(t._tY-this._offsetTop));if(n||i<Mn&&r<Mn)return(i||r||this._isInterrupted)&&t._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||Le(t._element,e.itemPositioningClass),this._currentStyles[Pe]=Ln(t._tX,t._tY),this._targetStyles[Pe]=Ln(this._nextLeft,this._nextTop),t._tX=t._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},In.prototype.start=function(t,e,n){if(!this._isDestroyed){var i,r,o,s,a,l,c,u,h,d,f=this._item,p=f._element,g=f.isActive(),m=f.isVisible(),v=f.getGrid(),y=v._settings,w=t._settings,A=t._element,C=t._items,k=v._items.indexOf(f),$=n||document.body;if("number"===typeof e)i=De(C,e,1);else{if(r=t.getItem(e),!r)return;i=C.indexOf(r)}(f.isPositioning()||this._isActive||f.isReleasing())&&(l=cn(p),c=l.x,u=l.y),f.isPositioning()&&f._layout.stop(!0,c,u),this._isActive&&(c-=this._containerDiffX,u-=this._containerDiffY,this.stop(!0,c,u)),f.isReleasing()&&(c-=f._dragRelease._containerDiffX,u-=f._dragRelease._containerDiffY,f._dragRelease.stop(!0,c,u)),f._visibility.stop(!0),f._drag&&f._drag.destroy(),v._hasListeners(_)&&v._emit(_,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(S)&&t._emit(S,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),y.itemClass!==w.itemClass&&(un(p,y.itemClass),Le(p,w.itemClass)),h=m?y.itemVisibleClass:y.itemHiddenClass,d=m?w.itemVisibleClass:w.itemHiddenClass,h!==d&&(un(p,h),Le(p,d)),v._items.splice(k,1),Me(C,f,i),f._gridId=t._id,g?(o=p.parentNode,$!==o&&($.appendChild(p),s=Ze($,o,!0),l||(l=cn(p),c=l.x,u=l.y),f._setTranslate(c+s.left,u+s.top))):A.appendChild(p),f._visibility.setStyles(m?w.visibleStyles:w.hiddenStyles),g&&(a=Ze($,A,!0)),f._refreshDimensions(),f._sortData=null,f._drag=w.dragEnabled?new mn(f):null,g?(this._isActive=!0,this._container=$,this._containerDiffX=a.left,this._containerDiffY=a.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),v._hasListeners(b)&&v._emit(b,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(x)&&t._emit(x,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i})}},In.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i,r=this._item,o=r._element,s=r.getGrid(),a=s._element;this._container!==a&&(void 0!==e&&void 0!==n||(t?(i=cn(o),e=i.x-this._containerDiffX,n=i.y-this._containerDiffY):(e=r._left,n=r._top)),a.appendChild(o),r._setTranslate(e,n)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},In.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},On.prototype.show=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=te(e)?e:null,o=n.getGrid(),s=o._settings;this._isShowing||this._isHidden?!this._isShowing||t?(this._isShowing||(n._emitter.burst(this._queue,!0,n),un(i,s.itemHiddenClass),Le(i,s.itemVisibleClass),this._isHiding||(i.style.display="")),r&&n._emitter.on(this._queue,r),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,t,this._finishShow)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},On.prototype.hide=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=te(e)?e:null,o=n.getGrid(),s=o._settings;this._isHiding||!this._isHidden?!this._isHiding||t?(this._isHiding||(n._emitter.burst(this._queue,!0,n),Le(i,s.itemHiddenClass),un(i,s.itemVisibleClass)),r&&n._emitter.on(this._queue,r),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,t,this._finishHide)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},On.prototype.stop=function(t){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var e=this._item;Tt(e._id),this._animation.stop(),t&&e._emitter.burst(this._queue,!0,e)}},On.prototype.setStyles=function(t){var e=this._childElement,n=this._currentStyleProps;for(var i in this._removeCurrentStyles(),t)n.push(i),e.style[i]=t[i]},On.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item,e=t._element,n=t.getGrid(),i=n._settings;this.stop(!0),t._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),un(e,i.itemVisibleClass),un(e,i.itemHiddenClass),e.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},On.prototype._startAnimation=function(t,e,n){if(!this._isDestroyed){var i,r=this._item,o=this._animation,s=this._childElement,a=r.getGrid()._settings,l=t?a.visibleStyles:a.hiddenStyles,c=t?a.showDuration:a.hideDuration,u=t?a.showEasing:a.hideEasing,h=e||c<=0;if(l){if(Tt(r._id),h)return An(s,l),o.stop(),void(n&&n());o.isAnimating()&&(o._animation.onfinish=null),$t(r._id,(function(){i=yn(s,l)}),(function(){o.start(i,l,{duration:c,easing:u,onFinish:n})}))}else n&&n()}},On.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},On.prototype._finishHide=function(){if(this._isHidden){var t=this._item;this._isHiding=!1,t._layout.stop(!0,0,0),t._element.style.display="none",t._emitter.burst(this._queue,!1,t)}},On.prototype._removeCurrentStyles=function(){for(var t=this._childElement,e=this._currentStyleProps,n=0;n<e.length;n++)t.style[e[n]]="";e.length=0};var Pn=0;function Nn(){return++Pn}function Fn(t,e,n){var i=t._settings;if(r){if(r.has(e))throw new Error("You can only create one Muuri Item per element!");r.set(e,this)}this._id=Nn(),this._gridId=t._id,this._element=e,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new P,e.parentNode!==t._element&&t._element.appendChild(e),Le(e,i.itemClass),"boolean"!==typeof n&&(n="none"!==ne(e,"display")),this._isActive=n,this._visibility=new On(this),this._layout=new Dn(this),this._migrate=new In(this),this._drag=i.dragEnabled?new mn(this):null,this._dragRelease=new En(this),this._dragPlaceholder=new Rn(this)}function Wn(t){var e=1,n=2,i=4,r=8,o=16,s=.001,a=.5;function l(t){return((1e3*t+.5|0)/10|0)/100}function c(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(c.prototype.computeLayout=function(t,s){var a,c,u,h,d,f,p=t.items,g=t.slots,m=!!(s&e),v=!!(s&n),y=!!(s&i),w=!!(s&r),b=!!(s&o),_="number"===typeof p[0];if(!p.length)return t;for(c=_?2:1,a=0;a<p.length;a+=c)_?(h=p[a],d=p[a+1]):(u=p[a],h=u._width+u._marginLeft+u._marginRight,d=u._height+u._marginTop+u._marginBottom),b&&(h=l(h),d=l(d)),f=this.computeNextSlot(t,h,d,m,v),v?f.left+f.width>t.width&&(t.width=f.left+f.width):f.top+f.height>t.height&&(t.height=f.top+f.height),g[++this.slotIndex]=f.left,g[++this.slotIndex]=f.top,(y||w)&&this.slotSizes.push(f.width,f.height);if(y)for(a=0;a<g.length;a+=2)g[a]=t.width-(g[a]+this.slotSizes[a]);if(w)for(a=1;a<g.length;a+=2)g[a]=t.height-(g[a]+this.slotSizes[a]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,t},c.prototype.computeNextSlot=function(t,e,n,i,r){var o,l,c,u,h,d=this.slotData,f=this.currentRects,p=this.nextRects,g=!1;for(p.length=0,d.left=null,d.top=null,d.width=e,d.height=n,u=0;u<f.length;u++)if(l=f[u],l&&(o=this.getRect(l),d.width<=o.width+s&&d.height<=o.height+s)){d.left=o.left,d.top=o.top;break}if(null===d.left&&(r?(d.left=t.width,d.top=0):(d.left=0,d.top=t.height),i||(g=!0)),!r&&d.top+d.height>t.height+s&&(d.left>a&&p.push(this.addRect(0,t.height,d.left,1/0)),d.left+d.width<t.width-a&&p.push(this.addRect(d.left+d.width,t.height,t.width-d.left-d.width,1/0)),t.height=d.top+d.height),r&&d.left+d.width>t.width+s&&(d.top>a&&p.push(this.addRect(t.width,0,1/0,d.top)),d.top+d.height<t.height-a&&p.push(this.addRect(t.width,d.top+d.height,1/0,t.height-d.top-d.height)),t.width=d.left+d.width),!g)for(i&&(u=0);u<f.length;u++)if(l=f[u],l)for(o=this.getRect(l),c=this.splitRect(o,d),h=0;h<c.length;h++)l=c[h],o=this.getRect(l),(r?o.left+s<t.width-s:o.top+s<t.height-s)&&p.push(l);return p.length>1&&this.purgeRects(p).sort(r?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=p,this.nextRects=f,d},c.prototype.addRect=function(t,e,n,i){var r=++this.rectId;return this.rectStore[r]=t||0,this.rectStore[++this.rectId]=e||0,this.rectStore[++this.rectId]=n||0,this.rectStore[++this.rectId]=i||0,r},c.prototype.getRect=function(t,e){return e||(e=this.rectTarget),e.left=this.rectStore[t]||0,e.top=this.rectStore[++t]||0,e.width=this.rectStore[++t]||0,e.height=this.rectStore[++t]||0,e},c.prototype.splitRect=function(){var t=[],e=0,n=0;return function(i,r){return t.length=0,i.left+i.width<=r.left+s||r.left+r.width<=i.left+s||i.top+i.height<=r.top+s||r.top+r.height<=i.top+s?(t.push(this.addRect(i.left,i.top,i.width,i.height)),t):(e=r.left-i.left,e>=a&&t.push(this.addRect(i.left,i.top,e,i.height)),e=i.left+i.width-(r.left+r.width),e>=a&&t.push(this.addRect(r.left+r.width,i.top,e,i.height)),n=r.top-i.top,n>=a&&t.push(this.addRect(i.left,i.top,i.width,n)),n=i.top+i.height-(r.top+r.height),n>=a&&t.push(this.addRect(i.left,r.top+r.height,i.width,n)),t)}}(),c.prototype.isRectAWithinRectB=function(t,e){return t.left+s>=e.left&&t.top+s>=e.top&&t.left+t.width-s<=e.left+e.width&&t.top+t.height-s<=e.top+e.height},c.prototype.purgeRects=function(){var t={},e={};return function(n){var i,r=n.length;while(r--)if(i=n.length,n[r]){this.getRect(n[r],t);while(i--)if(n[i]&&r!==i&&(this.getRect(n[i],e),this.isRectAWithinRectB(t,e))){n[r]=0;break}}return n}}(),c.prototype.sortRectsTopLeft=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s>e.left?1:0}}(),c.prototype.sortRectsLeftTop=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s<e.left?1:t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:0}}(),t){var u=1,h=2,d=3,f=4,p=new c;self.onmessage=function(t){var e=new Float32Array(t.data),n=e.subarray(f,e.length),i=new Float32Array(n.length),r=e[d],o={items:n,slots:i,width:e[u],height:e[h]};p.computeLayout(o,r),e[u]=o.width,e[h]=o.height,e.set(o.slots,f),postMessage(e.buffer,[e.buffer])}}return c}Fn.prototype.getGrid=function(){return i[this._gridId]},Fn.prototype.getElement=function(){return this._element},Fn.prototype.getWidth=function(){return this._width},Fn.prototype.getHeight=function(){return this._height},Fn.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},Fn.prototype.getPosition=function(){return{left:this._left,top:this._top}},Fn.prototype.isActive=function(){return this._isActive},Fn.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},Fn.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},Fn.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},Fn.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},Fn.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},Fn.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},Fn.prototype.isDestroyed=function(){return this._isDestroyed},Fn.prototype._refreshDimensions=function(t){if(!this._isDestroyed&&(!0===t||!this._visibility._isHidden)){var e=this._element,n=this._dragPlaceholder,i=e.getBoundingClientRect();this._width=i.width,this._height=i.height,this._marginLeft=Math.max(0,ie(e,"margin-left")),this._marginRight=Math.max(0,ie(e,"margin-right")),this._marginTop=Math.max(0,ie(e,"margin-top")),this._marginBottom=Math.max(0,ie(e,"margin-bottom")),n&&n.updateDimensions()}},Fn.prototype._refreshSortData=function(){if(!this._isDestroyed){var t,e=this._sortData={},n=this.getGrid()._settings.sortData;for(t in n)e[t]=n[t](this,this._element)}},Fn.prototype._addToLayout=function(t,e){!0!==this._isActive&&(this._isActive=!0,this._left=t||0,this._top=e||0)},Fn.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},Fn.prototype._canSkipLayout=function(t,e){return this._left===t&&this._top===e&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},Fn.prototype._setTranslate=function(t,e){return(this._tX!==t||this._tY!==e)&&(this._tX=t,this._tY=e,this._element.style[Pe]=Ln(t,e),!0)},Fn.prototype._destroy=function(t){if(!this._isDestroyed){var e=this._element,n=this.getGrid(),i=n._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),un(e,i.itemClass),t&&e.parentNode.removeChild(e),r&&r.delete(e),this._isActive=!1,this._isDestroyed=!0}};var Hn=Wn(),Bn=null,zn=[];function Un(t,e){var n=[];if(t>0){Bn||(Bn=URL.createObjectURL(new Blob(["("+Wn.toString()+")(true)"],{type:"application/javascript"})));for(var i,r=0;r<t;r++)i=new Worker(Bn),e&&(i.onmessage=e),n.push(i),zn.push(i)}return n}function jn(t){for(var e,n,i=0;i<t.length;i++)e=t[i],e.onmessage=null,e.onerror=null,e.onmessageerror=null,e.terminate(),n=zn.indexOf(e),n>-1&&zn.splice(n,1);Bn&&!zn.length&&(URL.revokeObjectURL(Bn),Bn=null)}function Gn(){return!!(window.Worker&&window.URL&&window.Blob)}var Vn=1,Yn=2,qn=4,Kn=8,Xn=16,Qn=0,Zn=1,Jn=2,ti=3,ei=4;function ni(t,e){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(e),t="number"===typeof t?Math.max(0,t):0,t&&Gn())try{this._workers=Un(t,this._onWorkerMessage)}catch(n){this._processor=new Hn}else this._processor=new Hn}ni.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var t=this._layoutQueue.shift(),e=this._workers.pop(),n=this._layoutWorkerData[t];delete this._layoutWorkerData[t],this._layoutWorkers[t]=e,e.postMessage(n.buffer,[n.buffer])}},ni.prototype._onWorkerMessage=function(t){var e=new Float32Array(t.data),n=e[Qn],i=this._layouts[n],r=this._layoutCallbacks[n],o=this._layoutWorkers[n];i&&delete this._layouts[n],r&&delete this._layoutCallbacks[n],o&&delete this._layoutWorkers[n],i&&r&&(i.width=e[Zn],i.height=e[Jn],i.slots=e.subarray(ei,e.length),this._finalizeLayout(i),r(i)),o&&(this._workers.push(o),this._sendToWorker())},ni.prototype._finalizeLayout=function(t){var e=t._grid,n=t._settings&Yn,i="border-box"===e._boxSizing;return delete t._grid,delete t._settings,t.styles={},n?t.styles.width=(i?t.width+e._borderLeft+e._borderRight:t.width)+"px":t.styles.height=(i?t.height+e._borderTop+e._borderBottom:t.height)+"px",t},ni.prototype.setOptions=function(t){var e,n,i,r,o;t&&(e="boolean"===typeof t.fillGaps?t.fillGaps?Vn:0:this._options&Vn,n="boolean"===typeof t.horizontal?t.horizontal?Yn:0:this._options&Yn,i="boolean"===typeof t.alignRight?t.alignRight?qn:0:this._options&qn,r="boolean"===typeof t.alignBottom?t.alignBottom?Kn:0:this._options&Kn,o="boolean"===typeof t.rounding?t.rounding?Xn:0:this._options&Xn,this._options=e|n|i|r|o)},ni.prototype.createLayout=function(t,e,n,i,r,o){if(this._layouts[e])throw new Error("A layout with the provided id is currently being processed.");var s=this._options&Yn,a={id:e,items:n,slots:null,width:s?0:i,height:s?r:0,_grid:t,_settings:this._options};if(!n.length)return a.slots=[],this._finalizeLayout(a),void o(a);if(this._processor)return a.slots=window.Float32Array?new Float32Array(2*n.length):new Array(2*n.length),this._processor.computeLayout(a,a._settings),this._finalizeLayout(a),void o(a);var l,c,u,h=new Float32Array(ei+2*n.length);for(h[Qn]=e,h[Zn]=a.width,h[Jn]=a.height,h[ti]=a._settings,l=0,c=ei-1,u;l<n.length;l++)u=n[l],h[++c]=u._width+u._marginLeft+u._marginRight,h[++c]=u._height+u._marginTop+u._marginBottom;return this._layoutQueue.push(e),this._layouts[e]=a,this._layoutCallbacks[e]=o,this._layoutWorkerData[e]=h,this._sendToWorker(),this.cancelLayout.bind(this,e)},ni.prototype.cancelLayout=function(t){var e=this._layouts[t];if(e&&(delete this._layouts[t],delete this._layoutCallbacks[t],this._layoutWorkerData[t])){delete this._layoutWorkerData[t];var n=this._layoutQueue.indexOf(t);n>-1&&this._layoutQueue.splice(n,1)}},ni.prototype.destroy=function(){for(var t in this._layoutWorkers)this._workers.push(this._layoutWorkers[t]);jn(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var ii=0;function ri(t,e){var n=++ii,i=0,r=0,o=!1,s=function(e){o||(r&&(i-=e-r),r=e,i>0?Ut(n,s):(i=r=0,t()))};return function(a){if(!o){if(!(e<=0))return!0===a?(o=!0,i=r=0,s=void 0,void jt(n)):void(i<=0?(i=e,s(0)):i=e);!0!==a&&t()}}}var oi="[object HTMLCollection]",si="[object NodeList]";function ai(t){var e=Object.prototype.toString.call(t);return e===oi||e===si}var li="object",ci="[object Object]",ui=Object.prototype.toString;function hi(t){return typeof t===li&&ui.call(t)===ci}function di(){}function fi(t){return ai(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var pi="number",gi="string",mi="instant",vi=0;function yi(t,e){typeof t===gi&&(t=document.querySelector(t));var n=t.getRootNode?t.getRootNode({composed:!0})===document:document.body.contains(t);if(!n||t===document.documentElement)throw new Error("Container element must be an existing DOM element.");var r=wi(yi.defaultOptions,e);r.visibleStyles=Ai(r.visibleStyles),r.hiddenStyles=Ai(r.hiddenStyles),te(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Nn(),this._element=t,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new P,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),i[this._id]=this,Le(t,r.containerClass),xi(this,r.layoutOnResize),this.add(_i(t,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function wi(t,e){var n=bi({},t);return e&&(n=bi(n,e)),e&&e.visibleStyles?n.visibleStyles=e.visibleStyles:t&&t.visibleStyles&&(n.visibleStyles=t.visibleStyles),e&&e.hiddenStyles?n.hiddenStyles=e.hiddenStyles:t&&t.hiddenStyles&&(n.hiddenStyles=t.hiddenStyles),n}function bi(t,e){var n,i,r,o=Object.keys(e),s=o.length;for(r=0;r<s;r++)i=o[r],n=hi(e[i]),hi(t[i])&&n?t[i]=bi(bi({},t[i]),e[i]):n?t[i]=bi({},e[i]):Array.isArray(e[i])?t[i]=e[i].slice(0):t[i]=e[i];return t}function _i(t,e){if("*"===e)return t.children;if(typeof e===gi){for(var n=[],i=t.children,r=0;r<i.length;r++)Te(i[r],e)&&n.push(i[r]);return n}return Array.isArray(e)||ai(e)?e:[]}function xi(t,e){typeof e!==pi&&(e=!0===e?0:-1),e>=0&&(t._resizeHandler=ri((function(){t.refreshItems().layout()}),e),window.addEventListener("resize",t._resizeHandler))}function Si(t){t._resizeHandler&&(t._resizeHandler(!0),window.removeEventListener("resize",t._resizeHandler),t._resizeHandler=null)}function Ai(t){var e,n,i={},r=document.documentElement.style;for(e in t)t[e]&&(n=z(r,e),n&&(i[n]=t[e]));return i}function Ci(t){for(var e={},n=0;n<t.length;n++)e[t[n]._id]=n;return e}function ki(t,e,n){var i=t[e._id],r=t[n._id];return i-r}yi.Item=Fn,yi.ItemLayout=Dn,yi.ItemVisibility=On,yi.ItemMigrate=In,yi.ItemDrag=mn,yi.ItemDragRelease=En,yi.ItemDragPlaceholder=Rn,yi.Emitter=P,yi.Animator=$n,yi.Dragger=J,yi.Packer=ni,yi.AutoScroller=Ce,yi.defaultPacker=new ni(2),yi.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:s,migrateAction:s},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:Ce.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},yi.prototype.on=function(t,e){return this._emitter.on(t,e),this},yi.prototype.off=function(t,e){return this._emitter.off(t,e),this},yi.prototype.getElement=function(){return this._element},yi.prototype.getItem=function(t){if(this._isDestroyed||!t&&0!==t)return null;if(typeof t===pi)return this._items[t>-1?t:this._items.length+t]||null;if(t instanceof Fn)return t._gridId===this._id?t:null;if(r){var e=r.get(t);return e&&e._gridId===this._id?e:null}for(var n=0;n<this._items.length;n++)if(this._items[n]._element===t)return this._items[n];return null},yi.prototype.getItems=function(t){if(this._isDestroyed||void 0===t)return this._items.slice(0);var e,n,i=[];if(Array.isArray(t)||ai(t))for(e=0;e<t.length;e++)n=this.getItem(t[e]),n&&i.push(n);else n=this.getItem(t),n&&i.push(n);return i},yi.prototype.refreshItems=function(t,e){if(this._isDestroyed)return this;var n,i,r,o,s=t||this._items;if(!0===e)for(o=[],n=0;n<s.length;n++)i=s[n],i.isVisible()||i.isHiding()||(r=i.getElement().style,r.visibility="hidden",r.display="",o.push(r));for(n=0;n<s.length;n++)s[n]._refreshDimensions(e);if(!0===e){for(n=0;n<o.length;n++)r=o[n],r.visibility="",r.display="none";o.length=0}return this},yi.prototype.refreshSortData=function(t){if(this._isDestroyed)return this;for(var e=t||this._items,n=0;n<e.length;n++)e[n]._refreshSortData();return this},yi.prototype.synchronize=function(){if(this._isDestroyed)return this;var t,e,n=this._items;if(!n.length)return this;for(var i=0;i<n.length;i++)e=n[i]._element,e.parentNode===this._element&&(t=t||document.createDocumentFragment(),t.appendChild(e));return t?(this._element.appendChild(t),this._emit(a),this):this},yi.prototype.layout=function(t,e){if(this._isDestroyed)return this;var n=this._nextLayoutData;n&&te(n.cancel)&&n.cancel(),vi=vi%O+1;var i=vi;this._nextLayoutData={id:i,instant:t,onFinish:e,cancel:null};for(var r=this._items,o=[],s=0;s<r.length;s++)r[s]._isActive&&o.push(r[s]);this._refreshDimensions();var a,l=this._width-this._borderLeft-this._borderRight,c=this._height-this._borderTop-this._borderBottom,u=this._settings.layout;return te(u)?a=u(this,i,o,l,c,this._onLayoutDataReceived):(yi.defaultPacker.setOptions(u),a=yi.defaultPacker.createLayout(this,i,o,l,c,this._onLayoutDataReceived)),te(a)&&this._nextLayoutData&&this._nextLayoutData.id===i&&(this._nextLayoutData.cancel=a),this},yi.prototype.add=function(t,e){if(this._isDestroyed||!t)return[];var n=fi(t);if(!n.length)return n;var i,r,o,s,a=e||{},l=a.layout?a.layout:void 0===a.layout,c=this._items,u=!1;for(s=0;s<n.length;s++)r=n[s],r.parentNode!==this._element&&(i=i||document.createDocumentFragment(),i.appendChild(r));for(i&&this._element.appendChild(i),s=0;s<n.length;s++)r=n[s],o=n[s]=new Fn(this,r,a.active),o._isActive&&(u=!0,o._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)o=n[s],o._refreshDimensions(),o._refreshSortData();return Me(c,n,a.index),this._hasListeners(h)&&this._emit(h,n.slice(0)),u&&l&&this.layout(l===mi,te(l)?l:void 0),n},yi.prototype.remove=function(t,e){if(this._isDestroyed||!t.length)return[];var n,i,r,o=e||{},s=o.layout?o.layout:void 0===o.layout,a=!1,l=this.getItems(),c=[],u=[];for(r=0;r<t.length;r++)i=t[r],i._isDestroyed||(n=this._items.indexOf(i),-1!==n&&(i._isActive&&(a=!0),c.push(i),u.push(l.indexOf(i)),i._destroy(o.removeElements),this._items.splice(n,1)));return this._hasListeners(d)&&this._emit(d,c.slice(0),u),a&&s&&this.layout(s===mi,te(s)?s:void 0),c},yi.prototype.show=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!0,e),this},yi.prototype.hide=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!1,e),this},yi.prototype.filter=function(t,e){if(this._isDestroyed||!this._items.length)return this;var n,i,r=[],o=[],s=typeof t===gi,a=te(t),l=e||{},c=!0===l.instant,u=l.syncWithLayout,h=l.layout?l.layout:void 0===l.layout,d=te(l.onFinish)?l.onFinish:null,f=-1,p=di;if(d&&(p=function(){++f&&d(r.slice(0),o.slice(0))}),a||s)for(i=0;i<this._items.length;i++)n=this._items[i],(a?t(n):Te(n._element,t))?r.push(n):o.push(n);return r.length?this.show(r,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),o.length?this.hide(o,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),(r.length||o.length)&&(this._hasListeners(v)&&this._emit(v,r.slice(0),o.slice(0)),h&&this.layout(h===mi,te(h)?h:void 0)),this},yi.prototype.sort=function(){var t,e,n,i;function r(r,o){for(var s,a,l,c,u=0,h=0;h<t.length;h++)if(s=t[h][0],a=t[h][1],l=(r._sortData?r:r._refreshSortData())._sortData[s],c=(o._sortData?o:o._refreshSortData())._sortData[s],u="desc"===a||!a&&e?c<l?-1:c>l?1:0:l<c?-1:l>c?1:0,u)return u;return u||(i||(i=Ci(n)),u=e?ki(i,o,r):ki(i,r,o)),u}function o(r,o){var s=e?-t(r,o):t(r,o);return s||(i||(i=Ci(n)),s=e?ki(i,o,r):ki(i,r,o)),s}return function(s,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,c=a||{},u=c.layout?c.layout:void 0===c.layout;if(e=!!c.descending,n=l.slice(0),i=null,te(s))t=s,l.sort(o);else if(typeof s===gi)t=s.trim().split(" ").filter((function(t){return t})).map((function(t){return t.split(":")})),l.sort(r);else{if(!Array.isArray(s))throw t=e=n=i=null,new Error("Invalid comparer argument provided.");l.length=0,l.push.apply(l,s)}return this._hasListeners(y)&&this._emit(y,l.slice(0),n),u&&this.layout(u===mi,te(u)?u:void 0),t=e=n=i=null,this}}(),yi.prototype.move=function(t,e,n){if(this._isDestroyed||this._items.length<2)return this;var i,r,a=this._items,l=n||{},c=l.layout?l.layout:void 0===l.layout,u=l.action===o,h=u?o:s,d=this.getItem(t),f=this.getItem(e);return d&&f&&d!==f&&(i=a.indexOf(d),r=a.indexOf(f),u?Oe(a,i,r):Ie(a,i,r),this._hasListeners(w)&&this._emit(w,{item:d,fromIndex:i,toIndex:r,action:h}),c&&this.layout(c===mi,te(c)?c:void 0)),this},yi.prototype.send=function(t,e,n,i){if(this._isDestroyed||e._isDestroyed||this===e)return this;if(t=this.getItem(t),!t)return this;var r=i||{},o=r.appendTo||document.body,s=r.layoutSender?r.layoutSender:void 0===r.layoutSender,a=r.layoutReceiver?r.layoutReceiver:void 0===r.layoutReceiver;return t._migrate.start(e,n,o),t._migrate._isActive&&t._isActive&&(s&&this.layout(s===mi,te(s)?s:void 0),a&&e.layout(a===mi,te(a)?a:void 0)),this},yi.prototype.destroy=function(t){if(this._isDestroyed)return this;var e,n,r=this._element,o=this._items.slice(0),s=this._layout&&this._layout.styles||{};for(Si(this),e=0;e<o.length;e++)o[e]._destroy(t);for(n in this._items.length=0,un(r,this._settings.containerClass),s)r.style[n]="";return this._emit(E),this._emitter.destroy(),delete i[this._id],this._isDestroyed=!0,this},yi.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},yi.prototype._hasListeners=function(t){return!this._isDestroyed&&this._emitter.countListeners(t)>0},yi.prototype._updateBoundingRect=function(){var t=this._element,e=t.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},yi.prototype._updateBorders=function(t,e,n,i){var r=this._element;t&&(this._borderLeft=ie(r,"border-left-width")),e&&(this._borderRight=ie(r,"border-right-width")),n&&(this._borderTop=ie(r,"border-top-width")),i&&(this._borderBottom=ie(r,"border-bottom-width"))},yi.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=ne(this._element,"box-sizing")},yi.prototype._onLayoutDataReceived=function(){var t=[];return function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var n,i,r,o,s=this,a=this._nextLayoutData.instant,h=this._nextLayoutData.onFinish,d=e.items.length,f=d;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(u)&&this._emit(u,this._layout.items.slice(0)),this._layout=e,t.length=0,o=0;o<d;o++)n=e.items[o],n?(i=e.slots[2*o],r=e.slots[2*o+1],n._canSkipLayout(i,r)?--f:(n._left=i,n._top=r,n.isActive()&&!n.isDragging()?t.push(n):--f)):--f;if(e.styles&&An(this._element,e.styles),!this._hasListeners(l)||(this._emit(l,e.items.slice(0),!0===a),this._layout.id===e.id)){var p=function(){if(!(--f>0)){var t=s._layout.id!==e.id,n=te(a)?a:h;t||(s._isLayoutFinished=!0),te(n)&&n(e.items.slice(0),t),!t&&s._hasListeners(c)&&s._emit(c,e.items.slice(0))}};if(!t.length)return p(),this;for(this._isLayoutFinished=!1,o=0;o<t.length;o++){if(this._layout.id!==e.id)break;t[o]._layout.start(!0===a,p)}return this._layout.id===e.id&&(t.length=0),this}}}}(),yi.prototype._setItemsVisibility=function(t,e,n){var i,r,o=this,s=t.slice(0),a=n||{},c=!0===a.instant,u=a.onFinish,h=a.layout?a.layout:void 0===a.layout,d=s.length,v=e?f:g,y=e?p:m,w=e?"show":"hide",b=!1,_=[],x=[];if(d){for(r=0;r<s.length;r++)i=s[r],(e&&!i._isActive||!e&&i._isActive)&&(b=!0),i._layout._skipNextAnimation=!(!e||i._isActive),e&&i._visibility._isHidden&&x.push(i),e?i._addToLayout():i._removeFromLayout();x.length&&(this.refreshItems(x,!0),x.length=0),b&&!1!==a.syncWithLayout?this.on(l,S):S(),b&&h&&this.layout(h===mi,te(h)?h:void 0)}else te(u)&&u(s);function S(){for(b&&!1!==a.syncWithLayout&&o.off(l,S),o._hasListeners(v)&&o._emit(v,s.slice(0)),r=0;r<s.length;r++)s[r]._gridId===o._id?s[r]._visibility[w](c,(function(t,e){t||_.push(e),--d<1&&(te(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))})):--d<1&&(te(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))}};const $i=yi},9471:(t,e,n)=>{var i;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var n,i,s,a,l,c,u,h,d,f=1,p=t.length,g="";for(i=0;i<p;i++)if("string"===typeof t[i])g+=t[i];else if("object"===typeof t[i]){if(a=t[i],a.keys)for(n=e[f],s=0;s<a.keys.length;s++){if(void 0==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));n=n[a.keys[s]]}else n=a.param_no?e[a.param_no]:e[f++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),r.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(r.number.test(a.type)&&(h=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase();break}r.json.test(a.type)?g+=n:(!r.number.test(a.type)||h&&!a.sign?d="":(d=h?"+":"-",n=n.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(d+n).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?d+n+l:"0"===c?d+l+n:l+d+n)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];var e,n=t,i=[],o=0;while(n){if(null!==(e=r.text.exec(n)))i.push(e[0]);else if(null!==(e=r.modulo.exec(n)))i.push("%");else{if(null===(e=r.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1]);while(""!==(a=a.substring(c[0].length)))if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return l[t]=i}o,s,"undefined"!==typeof window&&(window["sprintf"]=o,window["vsprintf"]=s,i=function(){return{sprintf:o,vsprintf:s}}.call(e,n,e,t),void 0===i||(t.exports=i))}()},9037:(t,e,n)=>{var i=n(5859);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(4825).A;r("400a75d9",i,!0,{sourceMap:!1,shadowMode:!1})},286:(t,e,n)=>{"use strict";var i=n(4578),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new r("Incorrect invocation")}},8732:t=>{"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},1617:(t,e,n)=>{"use strict";var i=n(1025),r=n(8689),o=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==r(t))throw new o("ArrayBuffer expected");return t.byteLength}},6821:(t,e,n)=>{"use strict";var i=n(6881),r=n(1617),o=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==r(t))return!1;try{return o(t,0,0),!1}catch(e){return!0}}},5677:(t,e,n)=>{"use strict";var i=n(1488),r=n(6881),o=n(1025),s=n(4579),a=n(6821),l=n(1617),c=n(8850),u=n(9059),h=i.structuredClone,d=i.ArrayBuffer,f=i.DataView,p=i.TypeError,g=Math.min,m=d.prototype,v=f.prototype,y=r(m.slice),w=o(m,"resizable","get"),b=o(m,"maxByteLength","get"),_=r(v.getInt8),x=r(v.setInt8);t.exports=(u||c)&&function(t,e,n){var i,r=l(t),o=void 0===e?r:s(e),m=!w||!w(t);if(a(t))throw new p("ArrayBuffer is detached");if(u&&(t=h(t,{transfer:[t]}),r===o&&(n||m)))return t;if(r>=o&&(!n||m))i=y(t,0,o);else{var v=n&&!m&&b?{maxByteLength:b(t)}:void 0;i=new d(o,v);for(var S=new f(t),A=new f(i),C=g(o,r),k=0;k<C;k++)x(A,k,_(S,k))}return u||c(t),i}},7223:(t,e,n)=>{"use strict";var i,r,o,s=n(8732),a=n(6893),l=n(1488),c=n(4188),u=n(831),h=n(4418),d=n(5438),f=n(3174),p=n(8088),g=n(7509),m=n(997),v=n(4578),y=n(1786),w=n(5054),b=n(4282),_=n(6209),x=n(3086),S=x.enforce,A=x.get,C=l.Int8Array,k=C&&C.prototype,$=l.Uint8ClampedArray,T=$&&$.prototype,L=C&&y(C),R=k&&y(k),E=Object.prototype,M=l.TypeError,D=b("toStringTag"),I=_("TYPED_ARRAY_TAG"),O="TypedArrayConstructor",P=s&&!!w&&"Opera"!==d(l.opera),N=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},H=function(t){if(!u(t))return!1;var e=d(t);return"DataView"===e||h(F,e)||h(W,e)},B=function(t){var e=y(t);if(u(e)){var n=A(e);return n&&h(n,O)?n[O]:B(e)}},z=function(t){if(!u(t))return!1;var e=d(t);return h(F,e)||h(W,e)},U=function(t){if(z(t))return t;throw new M("Target is not a typed array")},j=function(t){if(c(t)&&(!w||v(L,t)))return t;throw new M(f(t)+" is not a typed array constructor")},G=function(t,e,n,i){if(a){if(n)for(var r in F){var o=l[r];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(c){}}}R[t]&&!n||g(R,t,n?e:P&&k[t]||e,i)}},V=function(t,e,n){var i,r;if(a){if(w){if(n)for(i in F)if(r=l[i],r&&h(r,t))try{delete r[t]}catch(o){}if(L[t]&&!n)return;try{return g(L,t,n?e:P&&L[t]||e)}catch(o){}}for(i in F)r=l[i],!r||r[t]&&!n||g(r,t,e)}};for(i in F)r=l[i],o=r&&r.prototype,o?S(o)[O]=r:P=!1;for(i in W)r=l[i],o=r&&r.prototype,o&&(S(o)[O]=r);if((!P||!c(L)||L===Function.prototype)&&(L=function(){throw new M("Incorrect invocation")},P))for(i in F)l[i]&&w(l[i],L);if((!P||!R||R===E)&&(R=L.prototype,P))for(i in F)l[i]&&w(l[i].prototype,R);if(P&&y(T)!==R&&w(T,R),a&&!h(R,D))for(i in N=!0,m(R,D,{configurable:!0,get:function(){return u(this)?this[I]:void 0}}),F)l[i]&&p(l[i],I,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:N&&I,aTypedArray:U,aTypedArrayConstructor:j,exportTypedArrayMethod:G,exportTypedArrayStaticMethod:V,getTypedArrayConstructor:B,isView:H,isTypedArray:z,TypedArray:L,TypedArrayPrototype:R}},8633:(t,e,n)=>{"use strict";var i=n(1488),r=n(6881),o=n(6893),s=n(8732),a=n(2735),l=n(8088),c=n(997),u=n(4320),h=n(5234),d=n(286),f=n(6744),p=n(7611),g=n(4579),m=n(2420),v=n(6103),y=n(1786),w=n(5054),b=n(8150),_=n(7825),x=n(4166),S=n(8657),A=n(3754),C=n(3086),k=a.PROPER,$=a.CONFIGURABLE,T="ArrayBuffer",L="DataView",R="prototype",E="Wrong length",M="Wrong index",D=C.getterFor(T),I=C.getterFor(L),O=C.set,P=i[T],N=P,F=N&&N[R],W=i[L],H=W&&W[R],B=Object.prototype,z=i.Array,U=i.RangeError,j=r(b),G=r([].reverse),V=v.pack,Y=v.unpack,q=function(t){return[255&t]},K=function(t){return[255&t,t>>8&255]},X=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Q=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Z=function(t){return V(m(t),23,4)},J=function(t){return V(t,52,8)},tt=function(t,e,n){c(t[R],e,{configurable:!0,get:function(){return n(this)[e]}})},et=function(t,e,n,i){var r=I(t),o=g(n),s=!!i;if(o+e>r.byteLength)throw new U(M);var a=r.bytes,l=o+r.byteOffset,c=_(a,l,l+e);return s?c:G(c)},nt=function(t,e,n,i,r,o){var s=I(t),a=g(n),l=i(+r),c=!!o;if(a+e>s.byteLength)throw new U(M);for(var u=s.bytes,h=a+s.byteOffset,d=0;d<e;d++)u[h+d]=l[c?d:e-d-1]};if(s){var it=k&&P.name!==T;h((function(){P(1)}))&&h((function(){new P(-1)}))&&!h((function(){return new P,new P(1.5),new P(NaN),1!==P.length||it&&!$}))?it&&$&&l(P,"name",T):(N=function(t){return d(this,F),x(new P(g(t)),this,N)},N[R]=F,F.constructor=N,S(N,P)),w&&y(H)!==B&&w(H,B);var rt=new W(new N(2)),ot=r(H.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||u(H,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else N=function(t){d(this,F);var e=g(t);O(this,{type:T,bytes:j(z(e),0),byteLength:e}),o||(this.byteLength=e,this.detached=!1)},F=N[R],W=function(t,e,n){d(this,H),d(t,F);var i=D(t),r=i.byteLength,s=f(e);if(s<0||s>r)throw new U("Wrong offset");if(n=void 0===n?r-s:p(n),s+n>r)throw new U(E);O(this,{type:L,buffer:t,byteLength:n,byteOffset:s,bytes:i.bytes}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=s)},H=W[R],o&&(tt(N,"byteLength",D),tt(W,"buffer",I),tt(W,"byteLength",I),tt(W,"byteOffset",I)),u(H,{getInt8:function(t){return et(this,1,t)[0]<<24>>24},getUint8:function(t){return et(this,1,t)[0]},getInt16:function(t){var e=et(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=et(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Q(et(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Q(et(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(et(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(et(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){nt(this,1,t,q,e)},setUint8:function(t,e){nt(this,1,t,q,e)},setInt16:function(t,e){nt(this,2,t,K,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){nt(this,2,t,K,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){nt(this,4,t,X,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){nt(this,4,t,X,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){nt(this,4,t,Z,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){nt(this,8,t,J,e,arguments.length>2&&arguments[2])}});A(N,T),A(W,L),t.exports={ArrayBuffer:N,DataView:W}},8150:(t,e,n)=>{"use strict";var i=n(3628),r=n(675),o=n(9389);t.exports=function(t){var e=i(this),n=o(e),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);while(c>a)e[a++]=t;return e}},6759:(t,e,n)=>{"use strict";var i=n(9389);t.exports=function(t,e,n){var r=0,o=arguments.length>2?n:i(e),s=new t(o);while(o>r)s[r]=e[r++];return s}},6859:(t,e,n)=>{"use strict";var i=n(5821),r=n(9944),o=n(3628),s=n(4412),a=n(8146),l=n(866),c=n(9389),u=n(4417),h=n(2350),d=n(9874),f=Array;t.exports=function(t){var e=o(t),n=l(this),p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g;m&&(g=i(g,p>2?arguments[2]:void 0));var v,y,w,b,_,x,S=d(e),A=0;if(!S||this===f&&a(S))for(v=c(e),y=n?new this(v):f(v);v>A;A++)x=m?g(e[A],A):e[A],u(y,A,x);else for(b=h(e,S),_=b.next,y=n?new this:[];!(w=r(_,b)).done;A++)x=m?s(b,g,[w.value,A],!0):w.value,u(y,A,x);return y.length=A,y}},710:(t,e,n)=>{"use strict";var i=n(5821),r=n(7568),o=n(3628),s=n(9389),a=function(t){var e=1===t;return function(n,a,l){var c,u,h=o(n),d=r(h),f=s(d),p=i(a,l);while(f-- >0)if(c=d[f],u=p(c,f,h),u)switch(t){case 0:return c;case 1:return f}return e?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}},4104:(t,e,n)=>{"use strict";var i=n(5821),r=n(6881),o=n(7568),s=n(3628),a=n(9389),l=n(5022),c=r([].push),u=function(t){var e=1===t,n=2===t,r=3===t,u=4===t,h=6===t,d=7===t,f=5===t||h;return function(p,g,m,v){for(var y,w,b=s(p),_=o(b),x=a(_),S=i(g,m),A=0,C=v||l,k=e?C(p,x):n||d?C(p,0):void 0;x>A;A++)if((f||A in _)&&(y=_[A],w=S(y,A,b),t))if(e)k[A]=w;else if(w)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:c(k,y)}else switch(t){case 4:return!1;case 7:c(k,y)}return h?-1:r||u?u:k}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},7825:(t,e,n)=>{"use strict";var i=n(6881);t.exports=i([].slice)},9295:(t,e,n)=>{"use strict";var i=n(7825),r=Math.floor,o=function(t,e){var n=t.length;if(n<8){var s,a,l=1;while(l<n){a=l,s=t[l];while(a&&e(t[a-1],s)>0)t[a]=t[--a];a!==l++&&(t[a]=s)}}else{var c=r(n/2),u=o(i(t,0,c),e),h=o(i(t,c),e),d=u.length,f=h.length,p=0,g=0;while(p<d||g<f)t[p+g]=p<d&&g<f?e(u[p],h[g])<=0?u[p++]:h[g++]:p<d?u[p++]:h[g++]}return t};t.exports=o},9980:(t,e,n)=>{"use strict";var i=n(6719),r=n(866),o=n(831),s=n(4282),a=s("species"),l=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,r(e)&&(e===l||i(e.prototype))?e=void 0:o(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?l:e}},5022:(t,e,n)=>{"use strict";var i=n(9980);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},1433:(t,e,n)=>{"use strict";var i=n(9389);t.exports=function(t,e){for(var n=i(t),r=new e(n),o=0;o<n;o++)r[o]=t[n-o-1];return r}},6803:(t,e,n)=>{"use strict";var i=n(9389),r=n(6744),o=RangeError;t.exports=function(t,e,n,s){var a=i(t),l=r(n),c=l<0?a+l:l;if(c>=a||c<0)throw new o("Incorrect index");for(var u=new e(a),h=0;h<a;h++)u[h]=h===c?s:t[h];return u}},4412:(t,e,n)=>{"use strict";var i=n(3770),r=n(8500);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(s){r(t,"throw",s)}}},7283:(t,e,n)=>{"use strict";var i=n(4282),r=i("iterator"),o=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(l){return!1}var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(l){}return n}},4417:(t,e,n)=>{"use strict";var i=n(6893),r=n(4466),o=n(9123);t.exports=function(t,e,n){i?r.f(t,e,o(0,n)):t[e]=n}},997:(t,e,n)=>{"use strict";var i=n(4530),r=n(4466);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),r.f(t,e,n)}},4320:(t,e,n)=>{"use strict";var i=n(7509);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},8850:(t,e,n)=>{"use strict";var i,r,o,s,a=n(1488),l=n(9577),c=n(9059),u=a.structuredClone,h=a.ArrayBuffer,d=a.MessageChannel,f=!1;if(c)f=function(t){u(t,{transfer:[t]})};else if(h)try{d||(i=l("worker_threads"),i&&(d=i.MessageChannel)),d&&(r=new d,o=new h(2),s=function(t){r.port1.postMessage(null,[t])},2===o.byteLength&&(s(o),0===o.byteLength&&(f=s)))}catch(p){}t.exports=f},8807:(t,e,n)=>{"use strict";var i=n(4109),r=i.match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},7267:(t,e,n)=>{"use strict";var i=n(7499),r=n(7359);t.exports=!i&&!r&&"object"==typeof window&&"object"==typeof document},7499:t=>{"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},5661:(t,e,n)=>{"use strict";var i=n(4109);t.exports=/MSIE|Trident/.test(i)},3589:(t,e,n)=>{"use strict";var i=n(4109),r=i.match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},5821:(t,e,n)=>{"use strict";var i=n(5691),r=n(4977),o=n(9055),s=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},5691:(t,e,n)=>{"use strict";var i=n(8689),r=n(6881);t.exports=function(t){if("Function"===i(t))return r(t)}},9874:(t,e,n)=>{"use strict";var i=n(5438),r=n(2913),o=n(4318),s=n(9164),a=n(4282),l=a("iterator");t.exports=function(t){if(!o(t))return r(t,l)||r(t,"@@iterator")||s[i(t)]}},2350:(t,e,n)=>{"use strict";var i=n(9944),r=n(4977),o=n(3770),s=n(3174),a=n(9874),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(r(n))return o(i(n,t));throw new l(s(t)+" is not iterable")}},6103:t=>{"use strict";var e=Array,n=Math.abs,i=Math.pow,r=Math.floor,o=Math.log,s=Math.LN2,a=function(t,a,l){var c,u,h,d=e(l),f=8*l-a-1,p=(1<<f)-1,g=p>>1,m=23===a?i(2,-24)-i(2,-77):0,v=t<0||0===t&&1/t<0?1:0,y=0;t=n(t),t!==t||t===1/0?(u=t!==t?1:0,c=p):(c=r(o(t)/s),h=i(2,-c),t*h<1&&(c--,h*=2),t+=c+g>=1?m/h:m*i(2,1-g),t*h>=2&&(c++,h/=2),c+g>=p?(u=0,c=p):c+g>=1?(u=(t*h-1)*i(2,a),c+=g):(u=t*i(2,g-1)*i(2,a),c=0));while(a>=8)d[y++]=255&u,u/=256,a-=8;c=c<<a|u,f+=a;while(f>0)d[y++]=255&c,c/=256,f-=8;return d[--y]|=128*v,d},l=function(t,e){var n,r=t.length,o=8*r-e-1,s=(1<<o)-1,a=s>>1,l=o-7,c=r-1,u=t[c--],h=127&u;u>>=7;while(l>0)h=256*h+t[c--],l-=8;n=h&(1<<-l)-1,h>>=-l,l+=e;while(l>0)n=256*n+t[c--],l-=8;if(0===h)h=1-a;else{if(h===s)return n?NaN:u?-1/0:1/0;n+=i(2,e),h-=a}return(u?-1:1)*n*i(2,h-e)};t.exports={pack:a,unpack:l}},8146:(t,e,n)=>{"use strict";var i=n(4282),r=n(9164),o=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},5448:(t,e,n)=>{"use strict";var i=n(5438);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},4752:(t,e,n)=>{"use strict";var i=n(831),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},473:(t,e,n)=>{"use strict";var i=n(831),r=n(8689),o=n(4282),s=o("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[s])?!!e:"RegExp"===r(t))}},8500:(t,e,n)=>{"use strict";var i=n(9944),r=n(3770),o=n(2913);t.exports=function(t,e,n){var s,a;r(t);try{if(s=o(t,"return"),!s){if("throw"===e)throw n;return n}s=i(s,t)}catch(l){a=!0,s=l}if("throw"===e)throw n;if(a)throw s;return r(s),n}},2871:(t,e,n)=>{"use strict";var i=n(579),r=Math.abs,o=2220446049250313e-31,s=1/o,a=function(t){return t+s-s};t.exports=function(t,e,n,s){var l=+t,c=r(l),u=i(l);if(c<s)return u*a(c/s/e)*s*e;var h=(1+e/o)*c,d=h-(h-c);return d>n||d!==d?u*(1/0):u*d}},2420:(t,e,n)=>{"use strict";var i=n(2871),r=1.1920928955078125e-7,o=34028234663852886e22,s=11754943508222875e-54;t.exports=Math.fround||function(t){return i(t,r,o,s)}},579:t=>{"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!==e?e:e<0?-1:1}},9456:(t,e,n)=>{"use strict";var i=n(6893),r=n(6881),o=n(9944),s=n(5234),a=n(7137),l=n(156),c=n(4416),u=n(3628),h=n(7568),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||s((function(){if(i&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==d({},t)[n]||a(d({},e)).join("")!==r}))?function(t,e){var n=u(t),r=arguments.length,s=1,d=l.f,f=c.f;while(r>s){var g,m=h(arguments[s++]),v=d?p(a(m),d(m)):a(m),y=v.length,w=0;while(y>w)g=v[w++],i&&!o(f,m,g)||(n[g]=m[g])}return n}:d},3113:(t,e,n)=>{"use strict";var i=n(9944),r=n(4418),o=n(4578),s=n(4932),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||r(t,"flags")||!o(a,t)?e:i(s,t)}},5268:(t,e,n)=>{"use strict";var i=n(1488),r=n(6893),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!r)return i[t];var e=o(i,t);return e&&e.value}},3900:(t,e,n)=>{"use strict";var i=n(5604),r=n(997),o=n(4282),s=n(6893),a=o("species");t.exports=function(t){var e=i(t);s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},6294:(t,e,n)=>{"use strict";var i=n(6881),r=2147483647,o=36,s=1,a=26,l=38,c=700,u=72,h=128,d="-",f=/[^\0-\u007E]/,p=/[.\u3002\uFF0E\uFF61]/g,g="Overflow: input needs wider integers to process",m=o-s,v=RangeError,y=i(p.exec),w=Math.floor,b=String.fromCharCode,_=i("".charCodeAt),x=i([].join),S=i([].push),A=i("".replace),C=i("".split),k=i("".toLowerCase),$=function(t){var e=[],n=0,i=t.length;while(n<i){var r=_(t,n++);if(r>=55296&&r<=56319&&n<i){var o=_(t,n++);56320===(64512&o)?S(e,((1023&r)<<10)+(1023&o)+65536):(S(e,r),n--)}else S(e,r)}return e},T=function(t){return t+22+75*(t<26)},L=function(t,e,n){var i=0;t=n?w(t/c):t>>1,t+=w(t/e);while(t>m*a>>1)t=w(t/m),i+=o;return w(i+(m+1)*t/(t+l))},R=function(t){var e=[];t=$(t);var n,i,l=t.length,c=h,f=0,p=u;for(n=0;n<t.length;n++)i=t[n],i<128&&S(e,b(i));var m=e.length,y=m;m&&S(e,d);while(y<l){var _=r;for(n=0;n<t.length;n++)i=t[n],i>=c&&i<_&&(_=i);var A=y+1;if(_-c>w((r-f)/A))throw new v(g);for(f+=(_-c)*A,c=_,n=0;n<t.length;n++){if(i=t[n],i<c&&++f>r)throw new v(g);if(i===c){var C=f,k=o;while(1){var R=k<=p?s:k>=p+a?a:k-p;if(C<R)break;var E=C-R,M=o-R;S(e,b(T(R+E%M))),C=w(E/M),k+=o}S(e,b(T(C))),p=L(f,A,y===m),f=0,y++}}f++,c++}return x(e,"")};t.exports=function(t){var e,n,i=[],r=C(A(k(t),p,"."),".");for(e=0;e<r.length;e++)n=r[e],S(i,y(f,n)?"xn--"+R(n):n);return x(i,".")}},9059:(t,e,n)=>{"use strict";var i=n(1488),r=n(5234),o=n(3749),s=n(7267),a=n(7499),l=n(7359),c=i.structuredClone;t.exports=!!c&&!r((function(){if(a&&o>92||l&&o>94||s&&o>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},7429:(t,e,n)=>{"use strict";var i=n(290),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw new r("Can't convert number to bigint");return BigInt(e)}},4579:(t,e,n)=>{"use strict";var i=n(6744),r=n(7611),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw new o("Wrong length or index");return n}},7584:(t,e,n)=>{"use strict";var i=n(939),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw new r("Wrong offset");return n}},939:(t,e,n)=>{"use strict";var i=n(6744),r=RangeError;t.exports=function(t){var e=i(t);if(e<0)throw new r("The argument can't be less than 0");return e}},4108:t=>{"use strict";var e=Math.round;t.exports=function(t){var n=e(t);return n<0?0:n>255?255:255&n}},9577:(t,e,n)=>{"use strict";var i=n(7359);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(e){}}},3978:(t,e,n)=>{"use strict";var i=n(5613),r=n(1488),o=n(9944),s=n(6893),a=n(5772),l=n(7223),c=n(8633),u=n(286),h=n(9123),d=n(8088),f=n(4752),p=n(7611),g=n(4579),m=n(7584),v=n(4108),y=n(2344),w=n(4418),b=n(5438),_=n(831),x=n(6032),S=n(7065),A=n(4578),C=n(5054),k=n(5629).f,$=n(3292),T=n(4104).forEach,L=n(3900),R=n(997),E=n(4466),M=n(9304),D=n(6759),I=n(3086),O=n(4166),P=I.get,N=I.set,F=I.enforce,W=E.f,H=M.f,B=r.RangeError,z=c.ArrayBuffer,U=z.prototype,j=c.DataView,G=l.NATIVE_ARRAY_BUFFER_VIEWS,V=l.TYPED_ARRAY_TAG,Y=l.TypedArray,q=l.TypedArrayPrototype,K=l.isTypedArray,X="BYTES_PER_ELEMENT",Q="Wrong length",Z=function(t,e){R(t,e,{configurable:!0,get:function(){return P(this)[e]}})},J=function(t){var e;return A(U,t)||"ArrayBuffer"===(e=b(t))||"SharedArrayBuffer"===e},tt=function(t,e){return K(t)&&!x(e)&&e in t&&f(+e)&&e>=0},et=function(t,e){return e=y(e),tt(t,e)?h(2,t[e]):H(t,e)},nt=function(t,e,n){return e=y(e),!(tt(t,e)&&_(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};s?(G||(M.f=et,E.f=nt,Z(q,"buffer"),Z(q,"byteOffset"),Z(q,"byteLength"),Z(q,"length")),i({target:"Object",stat:!0,forced:!G},{getOwnPropertyDescriptor:et,defineProperty:nt}),t.exports=function(t,e,n){var s=t.match(/\d+/)[0]/8,l=t+(n?"Clamped":"")+"Array",c="get"+t,h="set"+t,f=r[l],y=f,w=y&&y.prototype,b={},x=function(t,e){var n=P(t);return n.view[c](e*s+n.byteOffset,!0)},A=function(t,e,i){var r=P(t);r.view[h](e*s+r.byteOffset,n?v(i):i,!0)},R=function(t,e){W(t,e,{get:function(){return x(this,e)},set:function(t){return A(this,e,t)},enumerable:!0})};G?a&&(y=e((function(t,e,n,i){return u(t,w),O(function(){return _(e)?J(e)?void 0!==i?new f(e,m(n,s),i):void 0!==n?new f(e,m(n,s)):new f(e):K(e)?D(y,e):o($,y,e):new f(g(e))}(),t,y)})),C&&C(y,Y),T(k(f),(function(t){t in y||d(y,t,f[t])})),y.prototype=w):(y=e((function(t,e,n,i){u(t,w);var r,a,l,c=0,h=0;if(_(e)){if(!J(e))return K(e)?D(y,e):o($,y,e);r=e,h=m(n,s);var d=e.byteLength;if(void 0===i){if(d%s)throw new B(Q);if(a=d-h,a<0)throw new B(Q)}else if(a=p(i)*s,a+h>d)throw new B(Q);l=a/s}else l=g(e),a=l*s,r=new z(a);N(t,{buffer:r,byteOffset:h,byteLength:a,length:l,view:new j(r)});while(c<l)R(t,c++)})),C&&C(y,Y),w=y.prototype=S(q)),w.constructor!==y&&d(w,"constructor",y),F(w).TypedArrayConstructor=y,V&&d(w,V,l);var E=y!==f;b[l]=y,i({global:!0,constructor:!0,forced:E,sham:!G},b),X in y||d(y,X,s),X in w||d(w,X,s),L(l)}):t.exports=function(){}},5772:(t,e,n)=>{"use strict";var i=n(1488),r=n(5234),o=n(7283),s=n(7223).NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,l=i.Int8Array;t.exports=!s||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||r((function(){return 1!==new l(new a(2),1,void 0).length}))},3292:(t,e,n)=>{"use strict";var i=n(5821),r=n(9944),o=n(1361),s=n(3628),a=n(9389),l=n(2350),c=n(9874),u=n(8146),h=n(5448),d=n(7223).aTypedArrayConstructor,f=n(7429);t.exports=function(t){var e,n,p,g,m,v,y,w,b=o(this),_=s(t),x=arguments.length,S=x>1?arguments[1]:void 0,A=void 0!==S,C=c(_);if(C&&!u(C)){y=l(_,C),w=y.next,_=[];while(!(v=r(w,y)).done)_.push(v.value)}for(A&&x>2&&(S=i(S,arguments[2])),n=a(_),p=new(d(b))(n),g=h(p),e=0;n>e;e++)m=A?S(_[e],e):_[e],p[e]=g?f(m):+m;return p}},6301:(t,e,n)=>{"use strict";var i=n(5234),r=n(4282),o=n(6893),s=n(1942),a=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e["delete"]("b"),i+=n+t})),n["delete"]("a",2),n["delete"]("b",void 0),s&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(s||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},9445:t=>{"use strict";var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},2482:(t,e,n)=>{"use strict";var i=n(6893),r=n(997),o=n(6821),s=ArrayBuffer.prototype;i&&!("detached"in s)&&r(s,"detached",{configurable:!0,get:function(){return o(this)}})},4147:(t,e,n)=>{"use strict";var i=n(5613),r=n(5677);r&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},7067:(t,e,n)=>{"use strict";var i=n(5613),r=n(5677);r&&i({target:"ArrayBuffer",proto:!0},{transfer:function(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},7087:(t,e,n)=>{"use strict";var i=n(5613),r=n(1488),o=n(3754);i({global:!0},{Reflect:{}}),o(r.Reflect,"Reflect",!0)},7146:(t,e,n)=>{"use strict";var i=n(1488),r=n(6893),o=n(997),s=n(4932),a=n(5234),l=i.RegExp,c=l.prototype,u=r&&a((function(){var t=!0;try{l(".","d")}catch(u){t=!1}var e={},n="",i=t?"dgimsy":"gimsy",r=function(t,i){Object.defineProperty(e,t,{get:function(){return n+=i,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(o.hasIndices="d"),o)r(s,o[s]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(e);return a!==i||n!==i}));u&&o(c,"flags",{configurable:!0,get:s})},1011:(t,e,n)=>{"use strict";var i=n(4212).charAt,r=n(2618),o=n(3086),s=n(3217),a=n(6224),l="String Iterator",c=o.set,u=o.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:r(t),index:0})}),(function(){var t,e=u(this),n=e.string,r=e.index;return r>=n.length?a(void 0,!0):(t=i(n,r),e.index+=t.length,a(t,!1))}))},8715:(t,e,n)=>{"use strict";var i=n(5613),r=n(9944),o=n(6881),s=n(9509),a=n(4188),l=n(4318),c=n(473),u=n(2618),h=n(2913),d=n(3113),f=n(1113),p=n(4282),g=n(1942),m=p("replace"),v=TypeError,y=o("".indexOf),w=o("".replace),b=o("".slice),_=Math.max;i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,p,x,S,A,C,k,$=s(this),T=0,L=0,R="";if(!l(t)){if(n=c(t),n&&(i=u(s(d(t))),!~y(i,"g")))throw new v("`.replaceAll` does not allow non-global regexes");if(o=h(t,m),o)return r(o,t,$,e);if(g&&n)return w(u($),t,e)}p=u($),x=u(t),S=a(e),S||(e=u(e)),A=x.length,C=_(1,A),T=y(p,x);while(-1!==T)k=S?u(e(x,T,p)):f(x,p,T,[],void 0,e),R+=b(p,L,T)+k,L=T+A,T=T+C>p.length?-1:y(p,x,T+C);return L<p.length&&(R+=b(p,L)),R}})},785:(t,e,n)=>{"use strict";var i=n(7223),r=n(9389),o=n(6744),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("at",(function(t){var e=s(this),n=r(e),i=o(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}))},8357:(t,e,n)=>{"use strict";var i=n(7223),r=n(8150),o=n(7429),s=n(5438),a=n(9944),l=n(6881),c=n(5234),u=i.aTypedArray,h=i.exportTypedArrayMethod,d=l("".slice),f=c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));h("fill",(function(t){var e=arguments.length;u(this);var n="Big"===d(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),f)},821:(t,e,n)=>{"use strict";var i=n(7223),r=n(710).findLastIndex,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLastIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6196:(t,e,n)=>{"use strict";var i=n(7223),r=n(710).findLast,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLast",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6554:(t,e,n)=>{"use strict";var i=n(1488),r=n(9944),o=n(7223),s=n(9389),a=n(7584),l=n(3628),c=n(5234),u=i.RangeError,h=i.Int8Array,d=h&&h.prototype,f=d&&d.set,p=o.aTypedArray,g=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(f,t,{length:1,0:3},1),3!==t[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(f,this,n,e);var i=this.length,o=s(n),c=0;if(o+e>i)throw new u("Wrong length");while(c<o)this[e+c]=n[c++]}),!m||v)},8472:(t,e,n)=>{"use strict";var i=n(1488),r=n(5691),o=n(5234),s=n(4977),a=n(9295),l=n(7223),c=n(8807),u=n(5661),h=n(3749),d=n(3589),f=l.aTypedArray,p=l.exportTypedArrayMethod,g=i.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(o((function(){m(new g(2),null)}))&&o((function(){m(new g(2),{})}))),y=!!m&&!o((function(){if(h)return h<74;if(c)return c<67;if(u)return!0;if(d)return d<602;var t,e,n=new g(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(m(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0})),w=function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!==n?-1:e!==e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}};p("sort",(function(t){return void 0!==t&&s(t),y?m(this,t):a(f(this),w(t))}),!y||v)},7404:(t,e,n)=>{"use strict";var i=n(1433),r=n(7223),o=r.aTypedArray,s=r.exportTypedArrayMethod,a=r.getTypedArrayConstructor;s("toReversed",(function(){return i(o(this),a(this))}))},5803:(t,e,n)=>{"use strict";var i=n(7223),r=n(6881),o=n(4977),s=n(6759),a=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,u=r(i.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&o(t);var e=a(this),n=s(l(e),e);return u(n,t)}))},2682:(t,e,n)=>{"use strict";var i=n(3978);i("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},3912:(t,e,n)=>{"use strict";var i=n(6803),r=n(7223),o=n(5448),s=n(6744),a=n(7429),l=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var n=l(this),r=s(t),u=o(n)?a(e):+e;return i(n,c(n),r,u)}}["with"],!h)},3647:(t,e,n)=>{"use strict";n(2482)},5114:(t,e,n)=>{"use strict";n(4147)},9358:(t,e,n)=>{"use strict";n(7067)},1615:(t,e,n)=>{"use strict";n(3873);var i=n(5613),r=n(1488),o=n(5268),s=n(9944),a=n(6881),l=n(6893),c=n(6301),u=n(7509),h=n(997),d=n(4320),f=n(3754),p=n(9383),g=n(3086),m=n(286),v=n(4188),y=n(4418),w=n(5821),b=n(5438),_=n(3770),x=n(831),S=n(2618),A=n(7065),C=n(9123),k=n(2350),$=n(9874),T=n(6224),L=n(9445),R=n(4282),E=n(9295),M=R("iterator"),D="URLSearchParams",I=D+"Iterator",O=g.set,P=g.getterFor(D),N=g.getterFor(I),F=o("fetch"),W=o("Request"),H=o("Headers"),B=W&&W.prototype,z=H&&H.prototype,U=r.RegExp,j=r.TypeError,G=r.decodeURIComponent,V=r.encodeURIComponent,Y=a("".charAt),q=a([].join),K=a([].push),X=a("".replace),Q=a([].shift),Z=a([].splice),J=a("".split),tt=a("".slice),et=/\+/g,nt=Array(4),it=function(t){return nt[t-1]||(nt[t-1]=U("((?:%[\\da-f]{2}){"+t+"})","gi"))},rt=function(t){try{return G(t)}catch(e){return t}},ot=function(t){var e=X(t,et," "),n=4;try{return G(e)}catch(i){while(n)e=X(e,it(n--),rt);return e}},st=/[!'()~]|%20/g,at={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lt=function(t){return at[t]},ct=function(t){return X(V(t),st,lt)},ut=p((function(t,e){O(this,{type:I,target:P(t).entries,index:0,kind:e})}),D,(function(){var t=N(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,T(void 0,!0);var i=e[n];switch(t.kind){case"keys":return T(i.key,!1);case"values":return T(i.value,!1)}return T([i.key,i.value],!1)}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Y(t,0)?tt(t,1):t:S(t)))};ht.prototype={type:D,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,o,a,l,c=this.entries,u=$(t);if(u){e=k(t,u),n=e.next;while(!(i=s(n,e)).done){if(r=k(_(i.value)),o=r.next,(a=s(o,r)).done||(l=s(o,r)).done||!s(o,r).done)throw new j("Expected sequence with length 2");K(c,{key:S(a.value),value:S(l.value)})}}else for(var h in t)y(t,h)&&K(c,{key:h,value:S(t[h])})},parseQuery:function(t){if(t){var e,n,i=this.entries,r=J(t,"&"),o=0;while(o<r.length)e=r[o++],e.length&&(n=J(e,"="),K(i,{key:ot(Q(n)),value:ot(q(n,"="))}))}},serialize:function(){var t,e=this.entries,n=[],i=0;while(i<e.length)t=e[i++],K(n,ct(t.key)+"="+ct(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dt=function(){m(this,ft);var t=arguments.length>0?arguments[0]:void 0,e=O(this,new ht(t));l||(this.size=e.entries.length)},ft=dt.prototype;if(d(ft,{append:function(t,e){var n=P(this);L(arguments.length,2),K(n.entries,{key:S(t),value:S(e)}),l||this.length++,n.updateURL()},delete:function(t){var e=P(this),n=L(arguments.length,1),i=e.entries,r=S(t),o=n<2?void 0:arguments[1],s=void 0===o?o:S(o),a=0;while(a<i.length){var c=i[a];if(c.key!==r||void 0!==s&&c.value!==s)a++;else if(Z(i,a,1),void 0!==s)break}l||(this.size=i.length),e.updateURL()},get:function(t){var e=P(this).entries;L(arguments.length,1);for(var n=S(t),i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){var e=P(this).entries;L(arguments.length,1);for(var n=S(t),i=[],r=0;r<e.length;r++)e[r].key===n&&K(i,e[r].value);return i},has:function(t){var e=P(this).entries,n=L(arguments.length,1),i=S(t),r=n<2?void 0:arguments[1],o=void 0===r?r:S(r),s=0;while(s<e.length){var a=e[s++];if(a.key===i&&(void 0===o||a.value===o))return!0}return!1},set:function(t,e){var n=P(this);L(arguments.length,1);for(var i,r=n.entries,o=!1,s=S(t),a=S(e),c=0;c<r.length;c++)i=r[c],i.key===s&&(o?Z(r,c--,1):(o=!0,i.value=a));o||K(r,{key:s,value:a}),l||(this.size=r.length),n.updateURL()},sort:function(){var t=P(this);E(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){var e,n=P(this).entries,i=w(t,arguments.length>1?arguments[1]:void 0),r=0;while(r<n.length)e=n[r++],i(e.value,e.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),u(ft,M,ft.entries,{name:"entries"}),u(ft,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),l&&h(ft,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),f(dt,D),i({global:!0,constructor:!0,forced:!c},{URLSearchParams:dt}),!c&&v(H)){var pt=a(z.has),gt=a(z.set),mt=function(t){if(x(t)){var e,n=t.body;if(b(n)===D)return e=t.headers?new H(t.headers):new H,pt(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A(t,{body:C(0,S(n)),headers:C(0,e)})}return t};if(v(F)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?mt(arguments[1]):{})}}),v(W)){var vt=function(t){return m(this,B),new W(t,arguments.length>1?mt(arguments[1]):{})};B.constructor=vt,vt.prototype=B,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vt})}}t.exports={URLSearchParams:dt,getState:P}},1412:(t,e,n)=>{"use strict";var i=n(7509),r=n(6881),o=n(2618),s=n(9445),a=URLSearchParams,l=a.prototype,c=r(l.append),u=r(l["delete"]),h=r(l.forEach),d=r([].push),f=new a("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&i(l,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=[];h(this,(function(t,e){d(i,{key:e,value:t})})),s(e,1);var r,a=o(t),l=o(n),f=0,p=0,g=!1,m=i.length;while(f<m)r=i[f++],g||r.key===a?(g=!0,u(this,r.key)):p++;while(p<m)r=i[p++],r.key===a&&r.value===l||c(this,r.key,r.value)}),{enumerable:!0,unsafe:!0})},1883:(t,e,n)=>{"use strict";var i=n(7509),r=n(6881),o=n(2618),s=n(9445),a=URLSearchParams,l=a.prototype,c=r(l.getAll),u=r(l.has),h=new a("a=1");!h.has("a",2)&&h.has("a",void 0)||i(l,"has",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=c(this,t);s(e,1);var r=o(n),a=0;while(a<i.length)if(i[a++]===r)return!0;return!1}),{enumerable:!0,unsafe:!0})},4397:(t,e,n)=>{"use strict";n(1615)},7905:(t,e,n)=>{"use strict";var i=n(6893),r=n(6881),o=n(997),s=URLSearchParams.prototype,a=r(s.forEach);i&&!("size"in s)&&o(s,"size",{get:function(){var t=0;return a(this,(function(){t++})),t},configurable:!0,enumerable:!0})},495:(t,e,n)=>{"use strict";n(1011);var i,r=n(5613),o=n(6893),s=n(6301),a=n(1488),l=n(5821),c=n(6881),u=n(7509),h=n(997),d=n(286),f=n(4418),p=n(9456),g=n(6859),m=n(7825),v=n(4212).codeAt,y=n(6294),w=n(2618),b=n(3754),_=n(9445),x=n(1615),S=n(3086),A=S.set,C=S.getterFor("URL"),k=x.URLSearchParams,$=x.getState,T=a.URL,L=a.TypeError,R=a.parseInt,E=Math.floor,M=Math.pow,D=c("".charAt),I=c(/./.exec),O=c([].join),P=c(1..toString),N=c([].pop),F=c([].push),W=c("".replace),H=c([].shift),B=c("".split),z=c("".slice),U=c("".toLowerCase),j=c([].unshift),G="Invalid authority",V="Invalid scheme",Y="Invalid host",q="Invalid port",K=/[a-z]/i,X=/[\d+-.a-z]/i,Q=/\d/,Z=/^0x/i,J=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,nt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+/,ot=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,st=/[\t\n\r]/g,at=function(t){var e,n,i,r,o,s,a,l=B(t,".");if(l.length&&""===l[l.length-1]&&l.length--,e=l.length,e>4)return t;for(n=[],i=0;i<e;i++){if(r=l[i],""===r)return t;if(o=10,r.length>1&&"0"===D(r,0)&&(o=I(Z,r)?16:8,r=z(r,8===o?1:2)),""===r)s=0;else{if(!I(10===o?tt:8===o?J:et,r))return t;s=R(r,o)}F(n,s)}for(i=0;i<e;i++)if(s=n[i],i===e-1){if(s>=M(256,5-e))return null}else if(s>255)return null;for(a=N(n),i=0;i<n.length;i++)a+=n[i]*M(256,3-i);return a},lt=function(t){var e,n,i,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return D(t,h)};if(":"===d()){if(":"!==D(t,1))return;h+=2,c++,u=c}while(d()){if(8===c)return;if(":"!==d()){e=n=0;while(n<4&&I(et,d()))e=16*e+R(d(),16),h++,n++;if("."===d()){if(0===n)return;if(h-=n,c>6)return;i=0;while(d()){if(r=null,i>0){if(!("."===d()&&i<4))return;h++}if(!I(Q,d()))return;while(I(Q,d())){if(o=R(d(),10),null===r)r=o;else{if(0===r)return;r=10*r+o}if(r>255)return;h++}l[c]=256*l[c]+r,i++,2!==i&&4!==i||c++}if(4!==i)return;break}if(":"===d()){if(h++,!d())return}else if(d())return;l[c++]=e}else{if(null!==u)return;h++,c++,u=c}}if(null!==u){s=c-u,c=7;while(0!==c&&s>0)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a}else if(8!==c)return;return l},ct=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e},ut=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)j(e,t%256),t=E(t/256);return O(e,".")}if("object"==typeof t){for(e="",i=ct(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=P(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ht={},dt=p({},ht,{" ":1,'"':1,"<":1,">":1,"`":1}),ft=p({},dt,{"#":1,"?":1,"{":1,"}":1}),pt=p({},ft,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gt=function(t,e){var n=v(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},mt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vt=function(t,e){var n;return 2===t.length&&I(K,D(t,0))&&(":"===(n=D(t,1))||!e&&"|"===n)},yt=function(t){var e;return t.length>1&&vt(z(t,0,2))&&(2===t.length||"/"===(e=D(t,2))||"\\"===e||"?"===e||"#"===e)},wt=function(t){return"."===t||"%2e"===U(t)},bt=function(t){return t=U(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},_t={},xt={},St={},At={},Ct={},kt={},$t={},Tt={},Lt={},Rt={},Et={},Mt={},Dt={},It={},Ot={},Pt={},Nt={},Ft={},Wt={},Ht={},Bt={},zt=function(t,e,n){var i,r,o,s=w(t);if(e){if(r=this.parse(s),r)throw new L(r);this.searchParams=null}else{if(void 0!==n&&(i=new zt(n,!0)),r=this.parse(s,null,i),r)throw new L(r);o=$(new k),o.bindURL(this),this.searchParams=o}};zt.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,l=this,c=e||_t,u=0,h="",d=!1,p=!1,v=!1;t=w(t),e||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=W(t,rt,""),t=W(t,ot,"$1")),t=W(t,st,""),r=g(t);while(u<=r.length){switch(o=r[u],c){case _t:if(!o||!I(K,o)){if(e)return V;c=St;continue}h+=U(o),c=xt;break;case xt:if(o&&(I(X,o)||"+"===o||"-"===o||"."===o))h+=U(o);else{if(":"!==o){if(e)return V;h="",c=St,u=0;continue}if(e&&(l.isSpecial()!==f(mt,h)||"file"===h&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=h,e)return void(l.isSpecial()&&mt[l.scheme]===l.port&&(l.port=null));h="","file"===l.scheme?c=It:l.isSpecial()&&n&&n.scheme===l.scheme?c=At:l.isSpecial()?c=Tt:"/"===r[u+1]?(c=Ct,u++):(l.cannotBeABaseURL=!0,F(l.path,""),c=Wt)}break;case St:if(!n||n.cannotBeABaseURL&&"#"!==o)return V;if(n.cannotBeABaseURL&&"#"===o){l.scheme=n.scheme,l.path=m(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=Bt;break}c="file"===n.scheme?It:kt;continue;case At:if("/"!==o||"/"!==r[u+1]){c=kt;continue}c=Lt,u++;break;case Ct:if("/"===o){c=Rt;break}c=Ft;continue;case kt:if(l.scheme=n.scheme,o===i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query;else if("/"===o||"\\"===o&&l.isSpecial())c=$t;else if("?"===o)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query="",c=Ht;else{if("#"!==o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.path.length--,c=Ft;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query,l.fragment="",c=Bt}break;case $t:if(!l.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=Ft;continue}c=Rt}else c=Lt;break;case Tt:if(c=Lt,"/"!==o||"/"!==D(h,u+1))continue;u++;break;case Lt:if("/"!==o&&"\\"!==o){c=Rt;continue}break;case Rt:if("@"===o){d&&(h="%40"+h),d=!0,s=g(h);for(var y=0;y<s.length;y++){var b=s[y];if(":"!==b||v){var _=gt(b,pt);v?l.password+=_:l.username+=_}else v=!0}h=""}else if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()){if(d&&""===h)return G;u-=g(h).length+1,h="",c=Et}else h+=o;break;case Et:case Mt:if(e&&"file"===l.scheme){c=Pt;continue}if(":"!==o||p){if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()){if(l.isSpecial()&&""===h)return Y;if(e&&""===h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h),a)return a;if(h="",c=Nt,e)return;continue}"["===o?p=!0:"]"===o&&(p=!1),h+=o}else{if(""===h)return Y;if(a=l.parseHost(h),a)return a;if(h="",c=Dt,e===Mt)return}break;case Dt:if(!I(Q,o)){if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()||e){if(""!==h){var x=R(h,10);if(x>65535)return q;l.port=l.isSpecial()&&x===mt[l.scheme]?null:x,h=""}if(e)return;c=Nt;continue}return q}h+=o;break;case It:if(l.scheme="file","/"===o||"\\"===o)c=Ot;else{if(!n||"file"!==n.scheme){c=Ft;continue}switch(o){case i:l.host=n.host,l.path=m(n.path),l.query=n.query;break;case"?":l.host=n.host,l.path=m(n.path),l.query="",c=Ht;break;case"#":l.host=n.host,l.path=m(n.path),l.query=n.query,l.fragment="",c=Bt;break;default:yt(O(m(r,u),""))||(l.host=n.host,l.path=m(n.path),l.shortenPath()),c=Ft;continue}}break;case Ot:if("/"===o||"\\"===o){c=Pt;break}n&&"file"===n.scheme&&!yt(O(m(r,u),""))&&(vt(n.path[0],!0)?F(l.path,n.path[0]):l.host=n.host),c=Ft;continue;case Pt:if(o===i||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&vt(h))c=Ft;else if(""===h){if(l.host="",e)return;c=Nt}else{if(a=l.parseHost(h),a)return a;if("localhost"===l.host&&(l.host=""),e)return;h="",c=Nt}continue}h+=o;break;case Nt:if(l.isSpecial()){if(c=Ft,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==i&&(c=Ft,"/"!==o))continue}else l.fragment="",c=Bt;else l.query="",c=Ht;break;case Ft:if(o===i||"/"===o||"\\"===o&&l.isSpecial()||!e&&("?"===o||"#"===o)){if(bt(h)?(l.shortenPath(),"/"===o||"\\"===o&&l.isSpecial()||F(l.path,"")):wt(h)?"/"===o||"\\"===o&&l.isSpecial()||F(l.path,""):("file"===l.scheme&&!l.path.length&&vt(h)&&(l.host&&(l.host=""),h=D(h,0)+":"),F(l.path,h)),h="","file"===l.scheme&&(o===i||"?"===o||"#"===o))while(l.path.length>1&&""===l.path[0])H(l.path);"?"===o?(l.query="",c=Ht):"#"===o&&(l.fragment="",c=Bt)}else h+=gt(o,ft);break;case Wt:"?"===o?(l.query="",c=Ht):"#"===o?(l.fragment="",c=Bt):o!==i&&(l.path[0]+=gt(o,ht));break;case Ht:e||"#"!==o?o!==i&&("'"===o&&l.isSpecial()?l.query+="%27":l.query+="#"===o?"%23":gt(o,ht)):(l.fragment="",c=Bt);break;case Bt:o!==i&&(l.fragment+=gt(o,dt));break}u++}},parseHost:function(t){var e,n,i;if("["===D(t,0)){if("]"!==D(t,t.length-1))return Y;if(e=lt(z(t,1,-1)),!e)return Y;this.host=e}else if(this.isSpecial()){if(t=y(t),I(nt,t))return Y;if(e=at(t),null===e)return Y;this.host=e}else{if(I(it,t))return Y;for(e="",n=g(t),i=0;i<n.length;i++)e+=gt(n[i],ht);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return f(mt,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&vt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,i=t.password,r=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==r?(c+="//",t.includesCredentials()&&(c+=n+(i?":"+i:"")+"@"),c+=ut(r),null!==o&&(c+=":"+o)):"file"===e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+O(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw new L(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new Ut(t.path[0]).origin}catch(n){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+ut(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(w(t)+":",_t)},getUsername:function(){return this.username},setUsername:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=gt(e[n],pt)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=gt(e[n],pt)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ut(t):ut(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Et)},getHostname:function(){var t=this.host;return null===t?"":ut(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Mt)},getPort:function(){var t=this.port;return null===t?"":w(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(t=w(t),""===t?this.port=null:this.parse(t,Dt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+O(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Nt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){t=w(t),""===t?this.query=null:("?"===D(t,0)&&(t=z(t,1)),this.query="",this.parse(t,Ht)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){t=w(t),""!==t?("#"===D(t,0)&&(t=z(t,1)),this.fragment="",this.parse(t,Bt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ut=function(t){var e=d(this,jt),n=_(arguments.length,1)>1?arguments[1]:void 0,i=A(e,new zt(t,!1,n));o||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=Ut.prototype,Gt=function(t,e){return{get:function(){return C(this)[t]()},set:e&&function(t){return C(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(jt,"href",Gt("serialize","setHref")),h(jt,"origin",Gt("getOrigin")),h(jt,"protocol",Gt("getProtocol","setProtocol")),h(jt,"username",Gt("getUsername","setUsername")),h(jt,"password",Gt("getPassword","setPassword")),h(jt,"host",Gt("getHost","setHost")),h(jt,"hostname",Gt("getHostname","setHostname")),h(jt,"port",Gt("getPort","setPort")),h(jt,"pathname",Gt("getPathname","setPathname")),h(jt,"search",Gt("getSearch","setSearch")),h(jt,"searchParams",Gt("getSearchParams")),h(jt,"hash",Gt("getHash","setHash"))),u(jt,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),u(jt,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),T){var Vt=T.createObjectURL,Yt=T.revokeObjectURL;Vt&&u(Ut,"createObjectURL",l(Vt,T)),Yt&&u(Ut,"revokeObjectURL",l(Yt,T))}b(Ut,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ut})},3165:(t,e,n)=>{"use strict";n(495)},4625:(t,e,n)=>{"use strict";n.d(e,{A:()=>ze});var i={};function r(t,e){return function(){return t.apply(e,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>Mt,hasStandardBrowserEnv:()=>Dt,hasStandardBrowserWebWorkerEnv:()=>It});const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,a=(t=>e=>{const n=o.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),l=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:u}=Array,h=c("undefined");function d(t){return null!==t&&!h(t)&&null!==t.constructor&&!h(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const f=l("ArrayBuffer");function p(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e}const g=c("string"),m=c("function"),v=c("number"),y=t=>null!==t&&"object"===typeof t,w=t=>!0===t||!1===t,b=t=>{if("object"!==a(t))return!1;const e=s(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},_=l("Date"),x=l("File"),S=l("Blob"),A=l("FileList"),C=t=>y(t)&&m(t.pipe),k=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=a(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},$=l("URLSearchParams"),T=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function L(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let i,r;if("object"!==typeof t&&(t=[t]),u(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let s;for(i=0;i<o;i++)s=r[i],e.call(null,t[s],s,t)}}function R(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;while(r-- >0)if(i=n[r],e===i.toLowerCase())return i;return null}const E=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),M=t=>!h(t)&&t!==E;function D(){const{caseless:t}=M(this)&&this||{},e={},n=(n,i)=>{const r=t&&R(e,i)||i;b(e[r])&&b(n)?e[r]=D(e[r],n):b(n)?e[r]=D({},n):u(n)?e[r]=n.slice():e[r]=n};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&L(arguments[i],n);return e}const I=(t,e,n,{allOwnKeys:i}={})=>(L(e,((e,i)=>{n&&m(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),O=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),P=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},N=(t,e,n,i)=>{let r,o,a;const l={};if(e=e||{},null==t)return e;do{r=Object.getOwnPropertyNames(t),o=r.length;while(o-- >0)a=r[o],i&&!i(a,t,e)||l[a]||(e[a]=t[a],l[a]=!0);t=!1!==n&&s(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},F=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},W=t=>{if(!t)return null;if(u(t))return t;let e=t.length;if(!v(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},H=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&s(Uint8Array)),B=(t,e)=>{const n=t&&t[Symbol.iterator],i=n.call(t);let r;while((r=i.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}},z=(t,e)=>{let n;const i=[];while(null!==(n=t.exec(e)))i.push(n);return i},U=l("HTMLFormElement"),j=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),V=l("RegExp"),Y=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};L(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},q=t=>{Y(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];m(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},K=(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return u(t)?i(t):i(String(t).split(e)),n},X=()=>{},Q=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Z="abcdefghijklmnopqrstuvwxyz",J="0123456789",tt={DIGIT:J,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+J},et=(t=16,e=tt.ALPHA_DIGIT)=>{let n="";const{length:i}=e;while(t--)n+=e[Math.random()*i|0];return n};function nt(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const it=t=>{const e=new Array(10),n=(t,i)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=u(t)?[]:{};return L(t,((t,e)=>{const o=n(t,i+1);!h(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},rt=l("AsyncFunction"),ot=t=>t&&(y(t)||m(t))&&m(t.then)&&m(t.catch),st={isArray:u,isArrayBuffer:f,isBuffer:d,isFormData:k,isArrayBufferView:p,isString:g,isNumber:v,isBoolean:w,isObject:y,isPlainObject:b,isUndefined:h,isDate:_,isFile:x,isBlob:S,isRegExp:V,isFunction:m,isStream:C,isURLSearchParams:$,isTypedArray:H,isFileList:A,forEach:L,merge:D,extend:I,trim:T,stripBOM:O,inherits:P,toFlatObject:N,kindOf:a,kindOfTest:l,endsWith:F,toArray:W,forEachEntry:B,matchAll:z,isHTMLForm:U,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Y,freezeMethods:q,toObjectSet:K,toCamelCase:j,noop:X,toFiniteNumber:Q,findKey:R,global:E,isContextDefined:M,ALPHABET:tt,generateString:et,isSpecCompliantForm:nt,toJSONObject:it,isAsyncFn:rt,isThenable:ot};function at(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}st.inherits(at,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:st.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lt=at.prototype,ct={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ct[t]={value:t}})),Object.defineProperties(at,ct),Object.defineProperty(lt,"isAxiosError",{value:!0}),at.from=(t,e,n,i,r,o)=>{const s=Object.create(lt);return st.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),at.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const ut=at,ht=null;function dt(t){return st.isPlainObject(t)||st.isArray(t)}function ft(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function pt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ft(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function gt(t){return st.isArray(t)&&!t.some(dt)}const mt=st.toFlatObject(st,{},null,(function(t){return/^is[A-Z]/.test(t)}));function vt(t,e,n){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new(ht||FormData),n=st.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!st.isUndefined(e[t])}));const i=n.metaTokens,r=n.visitor||u,o=n.dots,s=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,l=a&&st.isSpecCompliantForm(e);if(!st.isFunction(r))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(st.isDate(t))return t.toISOString();if(!l&&st.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(t)||st.isTypedArray(t)?l&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,r){let a=t;if(t&&!r&&"object"===typeof t)if(st.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(st.isArray(t)&&gt(t)||(st.isFileList(t)||st.endsWith(n,"[]"))&&(a=st.toArray(t)))return n=ft(n),a.forEach((function(t,i){!st.isUndefined(t)&&null!==t&&e.append(!0===s?pt([n],i,o):null===s?n:n+"[]",c(t))})),!1;return!!dt(t)||(e.append(pt(r,n,o),c(t)),!1)}const h=[],d=Object.assign(mt,{defaultVisitor:u,convertValue:c,isVisitable:dt});function f(t,n){if(!st.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),st.forEach(t,(function(t,i){const o=!(st.isUndefined(t)||null===t)&&r.call(e,t,st.isString(i)?i.trim():i,n,d);!0===o&&f(t,n?n.concat(i):[i])})),h.pop()}}if(!st.isObject(t))throw new TypeError("data must be an object");return f(t),e}const yt=vt;function wt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&yt(t,this,e)}const _t=bt.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,wt)}:wt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const xt=bt;function St(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(t,e,n){if(!e)return t;const i=n&&n.encode||St,r=n&&n.serialize;let o;if(o=r?r(e,n):st.isURLSearchParams(e)?e.toString():new xt(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class Ct{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){st.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const kt=Ct,$t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!==typeof URLSearchParams?URLSearchParams:xt,Lt="undefined"!==typeof FormData?FormData:null,Rt="undefined"!==typeof Blob?Blob:null,Et={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Lt,Blob:Rt},protocols:["http","https","file","blob","url","data"]},Mt="undefined"!==typeof window&&"undefined"!==typeof document,Dt=(t=>Mt&&["ReactNative","NativeScript","NS"].indexOf(t)<0)("undefined"!==typeof navigator&&navigator.product),It=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Ot={...i,...Et};function Pt(t,e){return yt(t,new Ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Ot.isNode&&st.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Nt(t){return st.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Ft(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}function Wt(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=t.length;if(o=!o&&st.isArray(i)?i.length:o,a)return st.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&st.isObject(i[o])||(i[o]=[]);const l=e(t,n,i[o],r);return l&&st.isArray(i[o])&&(i[o]=Ft(i[o])),!s}if(st.isFormData(t)&&st.isFunction(t.entries)){const n={};return st.forEachEntry(t,((t,i)=>{e(Nt(t),i,n,0)})),n}return null}const Ht=Wt;function Bt(t,e,n){if(st.isString(t))try{return(e||JSON.parse)(t),st.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}const zt={transitional:$t,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=st.isObject(t);r&&st.isHTMLForm(t)&&(t=new FormData(t));const o=st.isFormData(t);if(o)return i&&i?JSON.stringify(Ht(t)):t;if(st.isArrayBuffer(t)||st.isBuffer(t)||st.isStream(t)||st.isFile(t)||st.isBlob(t))return t;if(st.isArrayBufferView(t))return t.buffer;if(st.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Pt(t,this.formSerializer).toString();if((s=st.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return yt(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Bt(t)):t}],transformResponse:[function(t){const e=this.transitional||zt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&st.isString(t)&&(n&&!this.responseType||i)){const n=e&&e.silentJSONParsing,o=!n&&i;try{return JSON.parse(t)}catch(r){if(o){if("SyntaxError"===r.name)throw ut.from(r,ut.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};st.forEach(["delete","get","head","post","put","patch"],(t=>{zt.headers[t]={}}));const Ut=zt,jt=st.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gt=t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&jt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e},Vt=Symbol("internals");function Yt(t){return t&&String(t).trim().toLowerCase()}function qt(t){return!1===t||null==t?t:st.isArray(t)?t.map(qt):String(t)}function Kt(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=n.exec(t))e[i[1]]=i[2];return e}const Xt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qt(t,e,n,i,r){return st.isFunction(i)?i.call(this,e,n):(r&&(e=n),st.isString(e)?st.isString(i)?-1!==e.indexOf(i):st.isRegExp(i)?i.test(e):void 0:void 0)}function Zt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function Jt(t,e){const n=st.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}class te{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=Yt(e);if(!r)throw new Error("header name must be a non-empty string");const o=st.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=qt(t))}const o=(t,e)=>st.forEach(t,((t,n)=>r(t,n,e)));return st.isPlainObject(t)||t instanceof this.constructor?o(t,e):st.isString(t)&&(t=t.trim())&&!Xt(t)?o(Gt(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=Yt(t),t){const n=st.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return Kt(t);if(st.isFunction(e))return e.call(this,t,n);if(st.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Yt(t),t){const n=st.findKey(this,t);return!(!n||void 0===this[n]||e&&!Qt(this,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=Yt(t),t){const r=st.findKey(n,t);!r||e&&!Qt(n,n[r],r,e)||(delete n[r],i=!0)}}return st.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;while(n--){const r=e[n];t&&!Qt(this,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return st.forEach(this,((i,r)=>{const o=st.findKey(n,r);if(o)return e[o]=qt(i),void delete e[r];const s=t?Zt(r):String(r).trim();s!==r&&delete e[r],e[s]=qt(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return st.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&st.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}},n=e.accessors,i=this.prototype;function r(t){const e=Yt(t);n[e]||(Jt(i,t),n[e]=!0)}return st.isArray(t)?t.forEach(r):r(t),this}}te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),st.reduceDescriptors(te.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),st.freezeMethods(te);const ee=te;function ne(t,e){const n=this||Ut,i=e||n,r=ee.from(i.headers);let o=i.data;return st.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function ie(t){return!(!t||!t.__CANCEL__)}function re(t,e,n){ut.call(this,null==t?"canceled":t,ut.ERR_CANCELED,e,n),this.name="CanceledError"}st.inherits(re,ut,{__CANCEL__:!0});const oe=re;function se(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const ae=Ot.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const s=[t+"="+encodeURIComponent(e)];st.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),st.isString(i)&&s.push("path="+i),st.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function le(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ce(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ue(t,e){return t&&!le(e)?ce(t,e):e}const he=Ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=st.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function de(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fe(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let u=s,h=0;while(u!==o)h+=n[u++],u%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-r<e)return;const d=c&&l-c;return d?Math.round(1e3*h/d):void 0}}const pe=fe;function ge(t,e){let n=0;const i=pe(50,250);return r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a),c=o<=s;n=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const me="undefined"!==typeof XMLHttpRequest,ve=me&&function(t){return new Promise((function(e,n){let i=t.data;const r=ee.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:l}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(st.isFormData(i))if(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if(!1!==(s=r.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];r.setContentType([t||"multipart/form-data",...e].join("; "))}let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const h=ue(t.baseURL,t.url);function d(){if(!u)return;const i=ee.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),r=a&&"text"!==a&&"json"!==a?u.response:u.responseText,o={data:r,status:u.status,statusText:u.statusText,headers:i,config:t,request:u};se((function(t){e(t),c()}),(function(t){n(t),c()}),o),u=null}if(u.open(t.method.toUpperCase(),At(h,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(n(new ut("Request aborted",ut.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||$t;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ut(e,i.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,u)),u=null},Ot.hasStandardBrowserEnv&&(l&&st.isFunction(l)&&(l=l(t)),l||!1!==l&&he(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&ae.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in u&&st.forEach(r.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),st.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),a&&"json"!==a&&(u.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&u.addEventListener("progress",ge(t.onDownloadProgress,!0)),"function"===typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ge(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{u&&(n(!e||e.type?new oe(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=de(h);f&&-1===Ot.protocols.indexOf(f)?n(new ut("Unsupported protocol "+f+":",ut.ERR_BAD_REQUEST,t)):u.send(i||null)}))},ye={http:ht,xhr:ve};st.forEach(ye,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const we=t=>`- ${t}`,be=t=>st.isFunction(t)||null===t||!1===t,_e={getAdapter:t=>{t=st.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o<e;o++){let e;if(n=t[o],i=n,!be(n)&&(i=ye[(e=String(n)).toLowerCase()],void 0===i))throw new ut(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+o]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(we).join("\n"):" "+we(t[0]):"as no adapter specified";throw new ut("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:ye};function xe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oe(null,t)}function Se(t){xe(t),t.headers=ee.from(t.headers),t.data=ne.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=_e.getAdapter(t.adapter||Ut.adapter);return e(t).then((function(e){return xe(t),e.data=ne.call(t,t.transformResponse,e),e.headers=ee.from(e.headers),e}),(function(e){return ie(e)||(xe(t),e&&e.response&&(e.response.data=ne.call(t,t.transformResponse,e.response),e.response.headers=ee.from(e.response.headers))),Promise.reject(e)}))}const Ae=t=>t instanceof ee?t.toJSON():t;function Ce(t,e){e=e||{};const n={};function i(t,e,n){return st.isPlainObject(t)&&st.isPlainObject(e)?st.merge.call({caseless:n},t,e):st.isPlainObject(e)?st.merge({},e):st.isArray(e)?e.slice():e}function r(t,e,n){return st.isUndefined(e)?st.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!st.isUndefined(e))return i(void 0,e)}function s(t,e){return st.isUndefined(e)?st.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>r(Ae(t),Ae(e),!0)};return st.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,s=o(t[i],e[i],i);st.isUndefined(s)&&o!==a||(n[i]=s)})),n}const ke="1.6.5",$e={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{$e[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Te={};function Le(t,e,n){if("object"!==typeof t)throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;while(r-- >0){const o=i[r],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new ut("option "+o+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+o,ut.ERR_BAD_OPTION)}}$e.transitional=function(t,e,n){function i(t,e){return"[Axios v"+ke+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new ut(i(r," has been removed"+(e?" in "+e:"")),ut.ERR_DEPRECATED);return e&&!Te[r]&&(Te[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,o)}};const Re={assertOptions:Le,validators:$e},Ee=Re.validators;class Me{constructor(t){this.defaults=t,this.interceptors={request:new kt,response:new kt}}request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=Ce(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Re.assertOptions(n,{silentJSONParsing:Ee.transitional(Ee.boolean),forcedJSONParsing:Ee.transitional(Ee.boolean),clarifyTimeoutError:Ee.transitional(Ee.boolean)},!1),null!=i&&(st.isFunction(i)?e.paramsSerializer={serialize:i}:Re.assertOptions(i,{encode:Ee.function,serialize:Ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&st.merge(r.common,r[e.method]);r&&st.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=ee.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,h=0;if(!a){const t=[Se.bind(this),void 0];t.unshift.apply(t,s),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);while(h<u)c=c.then(t[h++],t[h++]);return c}u=s.length;let d=e;h=0;while(h<u){const t=s[h++],e=s[h++];try{d=t(d)}catch(f){e.call(this,f);break}}try{c=Se.call(this,d)}catch(f){return Promise.reject(f)}h=0,u=l.length;while(h<u)c=c.then(l[h++],l[h++]);return c}getUri(t){t=Ce(this.defaults,t);const e=ue(t.baseURL,t.url);return At(e,t.params,t.paramsSerializer)}}st.forEach(["delete","get","head","options"],(function(t){Me.prototype[t]=function(e,n){return this.request(Ce(n||{},{method:t,url:e,data:(n||{}).data}))}})),st.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(Ce(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Me.prototype[t]=e(),Me.prototype[t+"Form"]=e(!0)}));const De=Me;class Ie{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new oe(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Ie((function(e){t=e}));return{token:e,cancel:t}}}const Oe=Ie;function Pe(t){return function(e){return t.apply(null,e)}}function Ne(t){return st.isObject(t)&&!0===t.isAxiosError}const Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fe).forEach((([t,e])=>{Fe[e]=t}));const We=Fe;function He(t){const e=new De(t),n=r(De.prototype.request,e);return st.extend(n,De.prototype,e,{allOwnKeys:!0}),st.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return He(Ce(t,e))},n}const Be=He(Ut);Be.Axios=De,Be.CanceledError=oe,Be.CancelToken=Oe,Be.isCancel=ie,Be.VERSION=ke,Be.toFormData=yt,Be.AxiosError=ut,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=Pe,Be.isAxiosError=Ne,Be.mergeConfig=Ce,Be.AxiosHeaders=ee,Be.formToJSON=t=>Ht(st.isHTMLForm(t)?new FormData(t):t),Be.getAdapter=_e.getAdapter,Be.HttpStatusCode=We,Be.default=Be;const ze=Be}}]);
70
- //# sourceMappingURL=721.js.map
69
+ var i={},r="function"===typeof Map?new Map:null,o="swap",s="move",a="synchronize",l="layoutStart",c="layoutEnd",u="layoutAbort",h="add",d="remove",f="showStart",p="showEnd",g="hideStart",m="hideEnd",v="filter",y="sort",w="move",b="send",_="beforeSend",x="receive",S="beforeReceive",A="dragInit",C="dragStart",k="dragMove",$="dragScroll",T="dragEnd",L="dragReleaseStart",R="dragReleaseEnd",E="destroy",M="ontouchstart"in window,D=!!window.PointerEvent,I=!!window.navigator.msPointerEnabled,O=16777216;function P(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}P.prototype.on=function(t,e){if(!this._events||!t||!e)return this;var n=this._events[t];return n||(n=this._events[t]=[]),n.push(e),this},P.prototype.off=function(t,e){if(!this._events||!t||!e)return this;var n,i=this._events[t];if(!i||!i.length)return this;while(-1!==(n=i.indexOf(e)))i.splice(n,1);return this},P.prototype.clear=function(t){if(!this._events||!t)return this;var e=this._events[t];return e&&(e.length=0,delete this._events[t]),this},P.prototype.emit=function(t){if(!this._events||!t)return this._clearOnEmit=!1,this;var e=this._events[t];if(!e||!e.length)return this._clearOnEmit=!1,this;var n,i=this._queue,r=i.length,o=arguments.length-1;o>3&&(n=[],n.push.apply(n,arguments),n.shift()),i.push.apply(i,e),this._clearOnEmit&&(e.length=0,this._clearOnEmit=!1),++this._counter;for(var s=r,a=i.length;s<a;s++)if(0===o?i[s]():1===o?i[s](arguments[1]):2===o?i[s](arguments[1],arguments[2]):3===o?i[s](arguments[1],arguments[2],arguments[3]):i[s].apply(null,n),!this._events)return this;return--this._counter,this._counter||(i.length=0),this},P.prototype.burst=function(){return this._events?(this._clearOnEmit=!0,this.emit.apply(this,arguments),this):this},P.prototype.countListeners=function(t){if(!this._events)return 0;var e=this._events[t];return e?e.length:0},P.prototype.destroy=function(){return this._events?(this._queue.length=this._counter=0,this._events=null,this):this};var N=D?"pointerout":I?"MSPointerOut":"",F=100;function W(t){N&&(this._dragger=t,this._timeout=null,this._outEvent=null,this._isActive=!1,this._addBehaviour=this._addBehaviour.bind(this),this._removeBehaviour=this._removeBehaviour.bind(this),this._onTimeout=this._onTimeout.bind(this),this._resetData=this._resetData.bind(this),this._onStart=this._onStart.bind(this),this._onOut=this._onOut.bind(this),this._dragger.on("start",this._onStart))}W.prototype._addBehaviour=function(){this._isActive||(this._isActive=!0,this._dragger.on("move",this._resetData),this._dragger.on("cancel",this._removeBehaviour),this._dragger.on("end",this._removeBehaviour),window.addEventListener(N,this._onOut))},W.prototype._removeBehaviour=function(){this._isActive&&(this._dragger.off("move",this._resetData),this._dragger.off("cancel",this._removeBehaviour),this._dragger.off("end",this._removeBehaviour),window.removeEventListener(N,this._onOut),this._resetData(),this._isActive=!1)},W.prototype._resetData=function(){window.clearTimeout(this._timeout),this._timeout=null,this._outEvent=null},W.prototype._onStart=function(t){"mouse"!==t.pointerType&&this._addBehaviour()},W.prototype._onOut=function(t){this._dragger._getTrackedTouch(t)&&(this._resetData(),this._outEvent=t,this._timeout=window.setTimeout(this._onTimeout,F))},W.prototype._onTimeout=function(){var t=this._outEvent;this._resetData(),this._dragger.isActive()&&this._dragger._onCancel(t)},W.prototype.destroy=function(){N&&(this._dragger.off("start",this._onStart),this._removeBehaviour())};var H=["","webkit","moz","ms","o","Webkit","Moz","MS","O"],B={};function z(t,e){var n=B[e]||"";if(n)return n;var i=e[0].toUpperCase()+e.slice(1),r=0;while(r<H.length){if(n=H[r]?H[r]+i:e,n in t)return B[e]=n,n;++r}return""}function U(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(n){}return t}var j=window.navigator.userAgent.toLowerCase(),G=j.indexOf("edge")>-1,V=j.indexOf("trident")>-1,Y=j.indexOf("firefox")>-1,q=j.indexOf("android")>-1,K=!!U()&&{passive:!0},X="touchAction",Q=z(document.documentElement.style,X),Z="auto";function J(t,e){this._element=t,this._emitter=new P,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(G||V)&&(D||I)&&(this._edgeHack=new W(this)),this.setCssProps(e),this._touchAction||this.setTouchAction(Z),t.addEventListener("dragstart",J._preventDefault,!1),t.addEventListener(J._inputEvents.start,this._onStart,K)}J._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},J._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},J._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},J._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},J._inputEvents=function(){return M?J._touchEvents:D?J._pointerEvents:I?J._msPointerEvents:J._mouseEvents}(),J._emitter=new P,J._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},J._activeInstances=[],J._preventDefault=function(t){t.preventDefault&&!1!==t.cancelable&&t.preventDefault()},J._activateInstance=function(t){var e=J._activeInstances.indexOf(t);e>-1||(J._activeInstances.push(t),J._emitter.on(J._emitterEvents.move,t._onMove),J._emitter.on(J._emitterEvents.cancel,t._onCancel),J._emitter.on(J._emitterEvents.end,t._onEnd),1===J._activeInstances.length&&J._bindListeners())},J._deactivateInstance=function(t){var e=J._activeInstances.indexOf(t);-1!==e&&(J._activeInstances.splice(e,1),J._emitter.off(J._emitterEvents.move,t._onMove),J._emitter.off(J._emitterEvents.cancel,t._onCancel),J._emitter.off(J._emitterEvents.end,t._onEnd),J._activeInstances.length||J._unbindListeners())},J._bindListeners=function(){window.addEventListener(J._inputEvents.move,J._onMove,K),window.addEventListener(J._inputEvents.end,J._onEnd,K),J._inputEvents.cancel&&window.addEventListener(J._inputEvents.cancel,J._onCancel,K)},J._unbindListeners=function(){window.removeEventListener(J._inputEvents.move,J._onMove,K),window.removeEventListener(J._inputEvents.end,J._onEnd,K),J._inputEvents.cancel&&window.removeEventListener(J._inputEvents.cancel,J._onCancel,K)},J._getEventPointerId=function(t){return"number"===typeof t.pointerId?t.pointerId:t.changedTouches?t.changedTouches[0]?t.changedTouches[0].identifier:null:1},J._getTouchById=function(t,e){if("number"===typeof t.pointerId)return t.pointerId===e?t:null;if(t.changedTouches){for(var n=0;n<t.changedTouches.length;n++)if(t.changedTouches[n].identifier===e)return t.changedTouches[n];return null}return t},J._onMove=function(t){J._emitter.emit(J._emitterEvents.move,t)},J._onCancel=function(t){J._emitter.emit(J._emitterEvents.cancel,t)},J._onEnd=function(t){J._emitter.emit(J._emitterEvents.end,t)},J.prototype._reset=function(){this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._isActive=!1,J._deactivateInstance(this)},J.prototype._createEvent=function(t,e){var n=this._getTrackedTouch(e);return{type:t,srcEvent:e,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:t===J._emitterEvents.start?0:this.getDeltaTime(),isFirst:t===J._emitterEvents.start,isFinal:t===J._emitterEvents.end||t===J._emitterEvents.cancel,pointerType:e.pointerType||(e.touches?"touch":"mouse"),identifier:this._pointerId,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX,pageY:n.pageY,target:n.target}},J.prototype._emit=function(t,e){this._emitter.emit(t,this._createEvent(t,e))},J.prototype._getTrackedTouch=function(t){return null===this._pointerId?null:J._getTouchById(t,this._pointerId)},J.prototype._onStart=function(t){if(!this._isDestroyed&&null===this._pointerId&&(this._pointerId=J._getEventPointerId(t),null!==this._pointerId)){var e=this._getTrackedTouch(t);this._startX=this._currentX=e.clientX,this._startY=this._currentY=e.clientY,this._startTime=Date.now(),this._isActive=!0,this._emit(J._emitterEvents.start,t),this._isActive&&J._activateInstance(this)}},J.prototype._onMove=function(t){var e=this._getTrackedTouch(t);e&&(this._currentX=e.clientX,this._currentY=e.clientY,this._emit(J._emitterEvents.move,t))},J.prototype._onCancel=function(t){this._getTrackedTouch(t)&&(this._emit(J._emitterEvents.cancel,t),this._reset())},J.prototype._onEnd=function(t){this._getTrackedTouch(t)&&(this._emit(J._emitterEvents.end,t),this._reset())},J.prototype.isActive=function(){return this._isActive},J.prototype.setTouchAction=function(t){this._touchAction=t,Q&&(this._cssProps[Q]="",this._element.style[Q]=t),M&&(this._element.removeEventListener(J._touchEvents.start,J._preventDefault,!0),(this._element.style[Q]!==t||Y&&q)&&this._element.addEventListener(J._touchEvents.start,J._preventDefault,!0))},J.prototype.setCssProps=function(t){if(t){var e,n,i=this._cssProps,r=this._element;for(e in i)r.style[e]=i[e],delete i[e];for(e in t)t[e]&&(e!==X?(n=z(r.style,e),n&&(i[n]="",r.style[n]=t[e])):this.setTouchAction(t[e]))}},J.prototype.getDeltaX=function(){return this._currentX-this._startX},J.prototype.getDeltaY=function(){return this._currentY-this._startY},J.prototype.getDistance=function(){var t=this.getDeltaX(),e=this.getDeltaY();return Math.sqrt(t*t+e*e)},J.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},J.prototype.on=function(t,e){this._emitter.on(t,e)},J.prototype.off=function(t,e){this._emitter.off(t,e)},J.prototype.destroy=function(){if(!this._isDestroyed){var t=this._element;for(var e in this._edgeHack&&this._edgeHack.destroy(),this._reset(),this._emitter.destroy(),t.removeEventListener(J._inputEvents.start,this._onStart,K),t.removeEventListener("dragstart",J._preventDefault,!1),t.removeEventListener(J._touchEvents.start,J._preventDefault,!0),this._cssProps)t.style[e]=this._cssProps[e],delete this._cssProps[e];this._element=null,this._isDestroyed=!0}};var tt=1e3/60,et=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return this.setTimeout((function(){t(Date.now())}),tt)}).bind(window);function nt(t){this._nextStep=null,this._lanes=[],this._stepQueue=[],this._stepCallbacks={},this._step=this._step.bind(this);for(var e=0;e<t;e++)this._lanes.push(new it)}function it(){this.queue=[],this.indices={},this.callbacks={}}nt.prototype._step=function(t){var e,n,i,r,o,s,a=this._lanes,l=this._stepQueue,c=this._stepCallbacks;for(this._nextStep=null,e=0;e<a.length;e++){for(r=a[e].queue,o=a[e].callbacks,s=a[e].indices,n=0;n<r.length;n++)i=r[n],i&&(l.push(i),c[i]=o[i],delete o[i],delete s[i]);r.length=0}for(e=0;e<l.length;e++)i=l[e],c[i]&&c[i](t),delete c[i];l.length=0},nt.prototype.add=function(t,e,n){this._lanes[t].add(e,n),this._nextStep||(this._nextStep=et(this._step))},nt.prototype.remove=function(t,e){this._lanes[t].remove(e)},it.prototype.add=function(t,e){var n=this.indices[t];void 0!==n&&(this.queue[n]=void 0),this.queue.push(t),this.callbacks[t]=e,this.indices[t]=this.queue.length-1},it.prototype.remove=function(t){var e=this.indices[t];void 0!==e&&(this.queue[e]=void 0,delete this.callbacks[t],delete this.indices[t])};var rt="layoutRead",ot="layoutWrite",st="visibilityRead",at="visibilityWrite",lt="dragStartRead",ct="dragStartWrite",ut="dragMoveRead",ht="dragMoveWrite",dt="dragScrollRead",ft="dragScrollWrite",pt="dragSortRead",gt="placeholderLayoutRead",mt="placeholderLayoutWrite",vt="placeholderResizeWrite",yt="autoScrollRead",wt="autoScrollWrite",bt="debounceRead",_t=0,xt=1,St=2,At=new nt(3);function Ct(t,e,n){At.add(_t,rt+t,e),At.add(St,ot+t,n)}function kt(t){At.remove(_t,rt+t),At.remove(St,ot+t)}function $t(t,e,n){At.add(_t,st+t,e),At.add(St,at+t,n)}function Tt(t){At.remove(_t,st+t),At.remove(St,at+t)}function Lt(t,e,n){At.add(_t,lt+t,e),At.add(St,ct+t,n)}function Rt(t){At.remove(_t,lt+t),At.remove(St,ct+t)}function Et(t,e,n){At.add(_t,ut+t,e),At.add(St,ht+t,n)}function Mt(t){At.remove(_t,ut+t),At.remove(St,ht+t)}function Dt(t,e,n){At.add(_t,dt+t,e),At.add(St,ft+t,n)}function It(t){At.remove(_t,dt+t),At.remove(St,ft+t)}function Ot(t,e){At.add(xt,pt+t,e)}function Pt(t){At.remove(xt,pt+t)}function Nt(t,e,n){At.add(_t,gt+t,e),At.add(St,mt+t,n)}function Ft(t){At.remove(_t,gt+t),At.remove(St,mt+t)}function Wt(t,e){At.add(St,vt+t,e)}function Ht(t){At.remove(St,vt+t)}function Bt(t,e){At.add(_t,yt,t),At.add(St,wt,e)}function zt(){At.remove(_t,yt),At.remove(St,wt)}function Ut(t,e){At.add(_t,bt+t,e)}function jt(t){At.remove(_t,bt+t)}var Gt=1,Vt=2,Yt=4,qt=8,Kt=Gt|qt,Xt=Gt|Yt,Qt=Vt|qt,Zt=Vt|Yt,Jt="function";function te(t){return typeof t===Jt}var ee="function"===typeof WeakMap?new WeakMap:null;function ne(t,e){var n=ee&&ee.get(t);return n||(n=window.getComputedStyle(t,null),ee&&ee.set(t,n)),n.getPropertyValue(e)}function ie(t,e){return parseFloat(ne(t,e))||0}var re=document.documentElement,oe=document.body,se={value:0,offset:0};function ae(t){return t===window||t===re||t===oe?window:t}function le(t){return t===window?t.pageXOffset:t.scrollLeft}function ce(t){return t===window?t.pageYOffset:t.scrollTop}function ue(t){return t===window?re.scrollWidth-re.clientWidth:t.scrollWidth-t.clientWidth}function he(t){return t===window?re.scrollHeight-re.clientHeight:t.scrollHeight-t.clientHeight}function de(t,e){if(e=e||{},t===window)e.width=re.clientWidth,e.height=re.clientHeight,e.left=0,e.right=e.width,e.top=0,e.bottom=e.height;else{var n=t.getBoundingClientRect(),i=t.clientLeft||ie(t,"border-left-width"),r=t.clientTop||ie(t,"border-top-width");e.width=t.clientWidth,e.height=t.clientHeight,e.left=n.left+i,e.right=e.left+e.width,e.top=n.top+r,e.bottom=e.top+e.height}return e}function fe(t){return t._drag._getGrid()._settings.dragAutoScroll}function pe(t){t._drag&&t._drag._prepareScroll()}function ge(t){if(t._drag&&t._isActive){var e=t._drag;e._scrollDiffX=e._scrollDiffY=0,t._setTranslate(e._left,e._top)}}function me(t,e,n,i){return se.value=Math.min(i/2,t),se.offset=Math.max(0,n+2*se.value+i*e-i)/2,se}function ve(){this.reset()}function ye(){this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0}function we(t,e){this.pool=[],this.createItem=t,this.releaseItem=e}function be(t,e){return!(t.left+t.width<=e.left||e.left+e.width<=t.left||t.top+t.height<=e.top||e.top+e.height<=t.top)}function _e(t,e){if(!be(t,e))return 0;var n=Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left),i=Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top);return n*i}function xe(t,e){var n=_e(t,e);if(!n)return 0;var i=Math.min(t.width,e.width)*Math.min(t.height,e.height);return n/i*100}ve.prototype.reset=function(){this.isActive&&this.onStop(),this.item=null,this.element=null,this.isActive=!1,this.isEnding=!1,this.direction=null,this.value=null,this.maxValue=0,this.threshold=0,this.distance=0,this.speed=0,this.duration=0,this.action=null},ve.prototype.hasReachedEnd=function(){return Yt&this.direction?this.value>=this.maxValue:this.value<=0},ve.prototype.computeCurrentScrollValue=function(){return null===this.value?Gt&this.direction?le(this.element):ce(this.element):Math.max(0,Math.min(this.value,this.maxValue))},ve.prototype.computeNextScrollValue=function(t){var e=this.speed*(t/1e3),n=Yt&this.direction?this.value+e:this.value-e;return Math.max(0,Math.min(n,this.maxValue))},ve.prototype.computeSpeed=function(){var t={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1};return function(e){var n=this.item,i=fe(n).speed;return te(i)?(t.direction=this.direction,t.threshold=this.threshold,t.distance=this.distance,t.value=this.value,t.maxValue=this.maxValue,t.duration=this.duration,t.speed=this.speed,t.deltaTime=e,t.isEnding=this.isEnding,i(n,this.element,t)):i}}(),ve.prototype.tick=function(t){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(t),this.value=this.computeNextScrollValue(t),this.duration+=t,this.value},ve.prototype.onStart=function(){var t=this.item,e=fe(t).onStart;te(e)&&e(t,this.element,this.direction)},ve.prototype.onStop=function(){var t=this.item,e=fe(t).onStop;te(e)&&e(t,this.element,this.direction),t._drag&&t._drag.sort()},ye.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},ye.prototype.addRequest=function(t){Gt&t.direction?(this.removeRequest(this.requestX),this.requestX=t):(this.removeRequest(this.requestY),this.requestY=t),t.action=this},ye.prototype.removeRequest=function(t){t&&(this.requestX===t?(this.requestX=null,t.action=null):this.requestY===t&&(this.requestY=null,t.action=null))},ye.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:le(this.element),this.scrollTop=this.requestY?this.requestY.value:ce(this.element)},ye.prototype.scroll=function(){var t=this.element;t&&(t.scrollTo?t.scrollTo(this.scrollLeft,this.scrollTop):(t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop))},we.prototype.pick=function(){return this.pool.pop()||this.createItem()},we.prototype.release=function(t){this.releaseItem(t),-1===this.pool.indexOf(t)&&this.pool.push(t)},we.prototype.reset=function(){this.pool.length=0};var Se={width:0,height:0,left:0,right:0,top:0,bottom:0},Ae={width:0,height:0,left:0,right:0,top:0,bottom:0};function Ce(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[Gt]={},this._requests[Vt]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new we((function(){return new ve}),(function(t){t.reset()})),this._actionPool=new we((function(){return new ye}),(function(t){t.reset()})),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Ce.AXIS_X=Gt,Ce.AXIS_Y=Vt,Ce.FORWARD=Yt,Ce.BACKWARD=qt,Ce.LEFT=Kt,Ce.RIGHT=Xt,Ce.UP=Qt,Ce.DOWN=Zt,Ce.smoothSpeed=function(t,e,n){return function(i,r,o){var s=0;if(!o.isEnding)if(o.threshold>0){var a=o.threshold-Math.max(0,o.distance);s=t/o.threshold*a}else s=t;var l=o.speed,c=s;return l===s?c:l<s?(c=l+e*(o.deltaTime/1e3),Math.min(s,c)):(c=l-n*(o.deltaTime/1e3),Math.max(s,c))}},Ce.pointerHandle=function(t){var e={left:0,top:0,width:0,height:0},n=t||1;return function(t,i,r,o,s,a,l){return e.left=a-.5*n,e.top=l-.5*n,e.width=n,e.height=n,e}},Ce.prototype._readTick=function(t){this._isDestroyed||(t&&this._tickTime?(this._tickDeltaTime=t-this._tickTime,this._tickTime=t,this._updateRequests(),this._updateActions()):(this._tickTime=t,this._tickDeltaTime=0))},Ce.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),Bt(this._readTick,this._writeTick))},Ce.prototype._startTicking=function(){this._isTicking=!0,Bt(this._readTick,this._writeTick)},Ce.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,zt()},Ce.prototype._getItemHandleRect=function(t,e,n){var i=t._drag;if(e){var r=i._dragMoveEvent||i._dragStartEvent,o=e(t,i._clientX,i._clientY,t._width,t._height,r.clientX,r.clientY);n.left=o.left,n.top=o.top,n.width=o.width,n.height=o.height}else n.left=i._clientX,n.top=i._clientY,n.width=t._width,n.height=t._height;return n.right=n.left+n.width,n.bottom=n.top+n.height,n},Ce.prototype._requestItemScroll=function(t,e,n,i,r,o,s){var a=this._requests[e],l=a[t._id];l?l.element===n&&l.direction===i||l.reset():l=this._requestPool.pick(),l.item=t,l.element=n,l.direction=i,l.threshold=r,l.distance=o,l.maxValue=s,a[t._id]=l},Ce.prototype._cancelItemScroll=function(t,e){var n=this._requests[e],i=n[t._id];i&&(i.action&&i.action.removeRequest(i),this._requestPool.release(i),delete n[t._id])},Ce.prototype._checkItemOverlap=function(t,e,n){var i=fe(t),r=te(i.targets)?i.targets(t):i.targets,o=i.threshold,s=i.safeZone;if(!r||!r.length)return e&&this._cancelItemScroll(t,Gt),void(n&&this._cancelItemScroll(t,Vt));var a=this._dragDirections[t._id],l=a[0],c=a[1];if(!l&&!c)return e&&this._cancelItemScroll(t,Gt),void(n&&this._cancelItemScroll(t,Vt));for(var u=this._getItemHandleRect(t,i.handle,Se),h=Ae,d=null,f=null,p=!0,g=!0,m=0,v=0,y=null,w=null,b=0,_=0,x=0,S=null,A=-1/0,C=0,k=0,$=null,T=0,L=0,R=null,E=-1/0,M=0,D=0,I=null,O=0,P=0,N=0;N<r.length;N++)d=r[N],p=e&&l&&d.axis!==Vt,g=n&&c&&d.axis!==Gt,v=d.priority||0,(!p||v<A)&&(!g||v<E)||(f=ae(d.element||d),_=p?ue(f):-1,x=g?he(f):-1,(_||x)&&(h=de(f,h),m=xe(u,h),m<=0||(p&&v>=A&&_>0&&(v>A||m>k)&&(w=null,y=me("number"===typeof d.threshold?d.threshold:o,s,u.width,h.width),l===Xt?(b=h.right+y.offset-u.right,b<=y.value&&le(f)<_&&(w=Xt)):l===Kt&&(b=u.left-(h.left-y.offset),b<=y.value&&le(f)>0&&(w=Kt)),null!==w&&(S=f,A=v,C=y.value,k=m,$=w,T=b,L=_)),g&&v>=E&&x>0&&(v>E||m>D)&&(w=null,y=me("number"===typeof d.threshold?d.threshold:o,s,u.height,h.height),c===Zt?(b=h.bottom+y.offset-u.bottom,b<=y.value&&ce(f)<x&&(w=Zt)):c===Qt&&(b=u.top-(h.top-y.offset),b<=y.value&&ce(f)>0&&(w=Qt)),null!==w&&(R=f,E=v,M=y.value,D=m,I=w,O=b,P=x)))));e&&(S?this._requestItemScroll(t,Gt,S,$,C,T,L):this._cancelItemScroll(t,Gt)),n&&(R?this._requestItemScroll(t,Vt,R,I,M,O,P):this._cancelItemScroll(t,Vt))},Ce.prototype._updateScrollRequest=function(t){for(var e=t.item,n=fe(e),i=te(n.targets)?n.targets(e):n.targets,r=i&&i.length||0,o=n.threshold,s=n.safeZone,a=this._getItemHandleRect(e,n.handle,Se),l=Ae,c=null,u=null,h=!1,d=null,f=null,p=null,g=null,m=null,v=null,y=0;y<r;y++)if(c=i[y],u=ae(c.element||c),u===t.element){if(h=!!(Gt&t.direction),h){if(c.axis===Vt)continue}else if(c.axis===Gt)continue;if(m=h?ue(u):he(u),m<=0)break;if(l=de(u,l),d=xe(a,l),d<=0)break;if(f=me("number"===typeof c.threshold?c.threshold:o,s,h?a.width:a.height,h?l.width:l.height),p=t.direction===Kt?a.left-(l.left-f.offset):t.direction===Xt?l.right+f.offset-a.right:t.direction===Qt?a.top-(l.top-f.offset):l.bottom+f.offset-a.bottom,p>f.value)break;if(g=h?le(u):ce(u),v=Yt&t.direction?g>=m:g<=0,v)break;return t.maxValue=m,t.threshold=f.value,t.distance=p,t.isEnding=!1,!0}return!0===n.smoothStop&&t.speed>0?(null===v&&(v=t.hasReachedEnd()),t.isEnding=!v):t.isEnding=!1,t.isEnding},Ce.prototype._updateRequests=function(){for(var t,e,n,i,r,o,s,a=this._items,l=this._requests[Gt],c=this._requests[Vt],u=0;u<a.length;u++)t=a[u],i=this._requestOverlapCheck[t._id],r=i>0&&this._tickTime-i>this._overlapCheckInterval,o=!0,e=l[t._id],e&&e.isActive&&(o=!this._updateScrollRequest(e),o&&(r=!0,this._cancelItemScroll(t,Gt))),s=!0,n=c[t._id],n&&n.isActive&&(s=!this._updateScrollRequest(n),s&&(r=!0,this._cancelItemScroll(t,Vt))),r&&(this._requestOverlapCheck[t._id]=0,this._checkItemOverlap(t,o,s))},Ce.prototype._requestAction=function(t,e){for(var n=this._actions,i=e===Gt,r=null,o=0;o<n.length;o++){if(r=n[o],t.element===r.element){if(i?r.requestX:r.requestY)return void this._cancelItemScroll(t.item,e);break}r=null}r||(r=this._actionPool.pick()),r.element=t.element,r.addRequest(t),t.tick(this._tickDeltaTime),n.push(r)},Ce.prototype._updateActions=function(){var t,e,n,i,r=this._items,o=this._requests,s=this._actions;for(i=0;i<r.length;i++)t=r[i]._id,e=o[Gt][t],n=o[Vt][t],e&&this._requestAction(e,Gt),n&&this._requestAction(n,Vt);for(i=0;i<s.length;i++)s[i].computeScrollValues()},Ce.prototype._applyActions=function(){var t,e=this._actions,n=this._items;if(e.length){for(t=0;t<e.length;t++)e[t].scroll(),this._actionPool.release(e[t]);for(e.length=0,t=0;t<n.length;t++)pe(n[t]);for(t=0;t<n.length;t++)ge(n[t])}},Ce.prototype._updateDragDirection=function(t){var e=this._dragPositions[t._id],n=this._dragDirections[t._id],i=t._drag._left,r=t._drag._top;if(e.length){var o=e[0],s=e[1];n[0]=i>o?Xt:i<o?Kt:n[0]||0,n[1]=r>s?Zt:r<s?Qt:n[1]||0}e[0]=i,e[1]=r},Ce.prototype.addItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);-1===e&&(this._items.push(t),this._requestOverlapCheck[t._id]=this._tickTime,this._dragDirections[t._id]=[0,0],this._dragPositions[t._id]=[],this._isTicking||this._startTicking())}},Ce.prototype.updateItem=function(t){this._isDestroyed||this._dragDirections[t._id]&&(this._updateDragDirection(t),this._requestOverlapCheck[t._id]||(this._requestOverlapCheck[t._id]=this._tickTime))},Ce.prototype.removeItem=function(t){if(!this._isDestroyed){var e=this._items.indexOf(t);if(-1!==e){var n=t._id,i=this._requests[Gt][n];i&&(this._cancelItemScroll(t,Gt),delete this._requests[Gt][n]);var r=this._requests[Vt][n];r&&(this._cancelItemScroll(t,Vt),delete this._requests[Vt][n]),delete this._requestOverlapCheck[n],delete this._dragPositions[n],delete this._dragDirections[n],this._items.splice(e,1),this._isTicking&&!this._items.length&&this._stopTicking()}}},Ce.prototype.isItemScrollingX=function(t){var e=this._requests[Gt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrollingY=function(t){var e=this._requests[Vt][t._id];return!(!e||!e.isActive)},Ce.prototype.isItemScrolling=function(t){return this.isItemScrollingX(t)||this.isItemScrollingY(t)},Ce.prototype.destroy=function(){if(!this._isDestroyed){for(var t=this._items.slice(0),e=0;e<t.length;e++)this.removeItem(t[e]);this._actions.length=0,this._requestPool.reset(),this._actionPool.reset(),this._isDestroyed=!0}};var ke=window.Element.prototype,$e=ke.matches||ke.matchesSelector||ke.webkitMatchesSelector||ke.mozMatchesSelector||ke.msMatchesSelector||ke.oMatchesSelector||function(){return!1};function Te(t,e){return $e.call(t,e)}function Le(t,e){e&&(t.classList?t.classList.add(e):Te(t,"."+e)||(t.className+=" "+e))}var Re=[],Ee="number";function Me(t,e,n){var i=typeof n===Ee?n:-1;i<0&&(i=t.length-i+1),t.splice.apply(t,Re.concat(i,0,e)),Re.length=0}function De(t,e,n){var i=Math.max(0,t.length-1+(n||0));return e>i?i:e<0?Math.max(i+e+1,0):e}function Ie(t,e,n){if(!(t.length<2)){var i=De(t,e),r=De(t,n);i!==r&&t.splice(r,0,t.splice(i,1)[0])}}function Oe(t,e,n){if(!(t.length<2)){var i,r=De(t,e),o=De(t,n);r!==o&&(i=t[r],t[r]=t[o],t[o]=i)}}var Pe=z(document.documentElement.style,"transform")||"transform",Ne=/([A-Z])/g,Fe=/^(webkit-|moz-|ms-|o-)/,We=/^(-m-s-)/;function He(t){var e=t.replace(Ne,"-$1").toLowerCase();return e=e.replace(Fe,"-$1"),e=e.replace(We,"-ms-"),e}var Be=He(Pe),ze="none",Ue="inline",je="none",Ge="display";function Ve(t){var e=ne(t,Be);if(!e||e===ze)return!1;var n=ne(t,Ge);return n!==Ue&&n!==je}function Ye(t){var e=document,n=t||e;while(n&&n!==e&&"static"===ne(n,"position")&&!Ve(n))n=n.parentElement||e;return n}var qe={},Ke={},Xe={};function Qe(t,e){var n,i=e||{};return i.left=0,i.top=0,t===document?i:(i.left=window.pageXOffset||0,i.top=window.pageYOffset||0,t.self===window.self||(n=t.getBoundingClientRect(),i.left+=n.left,i.top+=n.top,i.left+=ie(t,"border-left-width"),i.top+=ie(t,"border-top-width")),i)}function Ze(t,e,n){return Xe.left=0,Xe.top=0,t===e||n&&(t=Ye(t),e=Ye(e),t===e)||(Qe(t,qe),Qe(e,Ke),Xe.left=Ke.left-qe.left,Xe.top=Ke.top-qe.top),Xe}function Je(t){return"auto"===t||"scroll"===t||"overlay"===t}function tn(t){return Je(ne(t,"overflow"))||Je(ne(t,"overflow-x"))||Je(ne(t,"overflow-y"))}function en(t,e){e=e||[];while(t&&t!==document)t.getRootNode&&t instanceof DocumentFragment?t=t.getRootNode().host:(tn(t)&&e.push(t),t=t.parentNode);return e.push(window),e}var nn={},rn="none",on=/^matrix3d/,sn=/([^,]*,){4}/,an=/([^,]*,){12}/,ln=/[^,]*,/;function cn(t){nn.x=0,nn.y=0;var e=ne(t,Be);if(!e||e===rn)return nn;var n=on.test(e),i=e.replace(n?an:sn,""),r=i.replace(ln,"");return nn.x=parseFloat(i)||0,nn.y=parseFloat(r)||0,nn}function un(t,e){e&&(t.classList?t.classList.remove(e):Te(t,"."+e)&&(t.className=(" "+t.className+" ").replace(" "+e+" "," ").trim()))}var hn=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,dn=0,fn=1,pn=2,gn=!!U()&&{passive:!0};function mn(t){var e=t._element,n=t.getGrid(),i=n._settings;this._item=t,this._gridId=n._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=te(i.dragStartPredicate)?i.dragStartPredicate:mn.defaultStartPredicate,this._startPredicateState=dn,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=i.dragHandle&&e.querySelector(i.dragHandle)||e,this._dragger=new J(this._handle,i.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function vn(t){if("a"===t.tagName.toLowerCase()){var e=t.getAttribute("href");if(e){var n=t.getAttribute("target");n&&"_self"!==n?window.open(e,n):window.location.href=e}}}function yn(t,e){var n,i,r={};if(Array.isArray(e))for(i=0;i<e.length;i++)n=e[i],r[n]=ne(t,He(n));else for(n in e)r[n]=ne(t,He(n));return r}mn.autoScroller=new Ce,mn.defaultStartPredicate=function(t,e,n){var i=t._drag;if(e.isFirst&&e.srcEvent.button)return!1;if(!hn&&e.isFirst&&!0===e.srcEvent.isTrusted&&!1===e.srcEvent.defaultPrevented&&!1===e.srcEvent.cancelable)return!1;if(!e.isFinal){var r=i._startPredicateData;if(!r){var o=n||i._getGrid()._settings.dragStartPredicate||{};i._startPredicateData=r={distance:Math.max(o.distance,0)||0,delay:Math.max(o.delay,0)||0}}return r.delay&&(r.event=e,r.delayTimer||(r.delayTimer=window.setTimeout((function(){r.delay=0,i._resolveStartPredicate(r.event)&&(i._forceResolveStartPredicate(r.event),i._resetStartPredicate())}),r.delay))),i._resolveStartPredicate(e)}i._finishStartPredicate(e)},mn.defaultSortPredicate=function(){var t={},e={},n={},i=[],r=1,a=100;function l(n,r,o){var s,a,l,c,u,h,d,f,p,g,m=null,v=r._settings.dragSort,y=-1;if(!0===v?(i[0]=r,a=i):te(v)&&(a=v.call(r,n)),!a||!Array.isArray(a)||!a.length)return m;for(g=0;g<a.length;g++)if(l=a[g],!l._isDestroyed){l._updateBoundingRect(),h=Math.max(0,l._left),d=Math.max(0,l._top),f=Math.min(window.innerWidth,l._right),p=Math.min(window.innerHeight,l._bottom),c=l._element.parentNode;while(c&&c!==document&&c!==document.documentElement&&c!==document.body)if(c.getRootNode&&c instanceof DocumentFragment)c=c.getRootNode().host;else{if("visible"!==ne(c,"overflow")&&(u=c.getBoundingClientRect(),h=Math.max(h,u.left),d=Math.max(d,u.top),f=Math.min(f,u.right),p=Math.min(p,u.bottom)),"fixed"===ne(c,"position"))break;c=c.parentNode}h>=f||d>=p||(e.left=h,e.top=d,e.width=f-h,e.height=p-d,s=xe(t,e),s>o&&s>y&&(y=s,m=l))}return i.length=0,m}return function(i,c){var u=i._drag,h=u._getGrid(),d=c&&"number"===typeof c.threshold?c.threshold:50,f=c&&c.action===o?o:s,p=c&&c.migrateAction===o?o:s;d=Math.min(Math.max(d,r),a),t.width=i._width,t.height=i._height,t.left=u._clientX,t.top=u._clientY;var g=l(i,h,d);if(!g)return null;var m,v,y,w=i.getGrid()!==g,b=0,_=0,x=0,S=-1,A=!1;for(g===h?(t.left=u._gridX+i._marginLeft,t.top=u._gridY+i._marginTop):(g._updateBorders(1,0,1,0),b=g._left+g._borderLeft,_=g._top+g._borderTop),y=0;y<g._items.length;y++)m=g._items[y],m._isActive&&m!==i&&(A=!0,e.width=m._width,e.height=m._height,e.left=m._left+m._marginLeft+b,e.top=m._top+m._marginTop+_,v=xe(t,e),v>x&&(S=y,x=v));return w&&x<d&&(S=A?S:0,x=d),x>=d?(n.grid=g,n.index=S,n.action=w?p:f,n):null}}(),mn.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var t=this._item,e=t._id;if(mn.autoScroller.removeItem(t),Rt(e),Mt(e),It(e),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var n=t._element,i=this._getGrid(),r=i._settings.itemDraggingClass;n.parentNode!==i._element&&(i._element.appendChild(n),t._setTranslate(this._gridX,this._gridY),r&&n.clientWidth),un(n,r)}this._reset()}},mn.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(!0===t?this._handleSort():Ot(e._id,this._handleSort))},mn.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),mn.autoScroller.removeItem(this._item),this._isDestroyed=!0)},mn.prototype._getGrid=function(){return i[this._gridId]||null},mn.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},mn.prototype._bindScrollListeners=function(){var t,e,n=this._getGrid()._element,i=this._container,r=this._scrollers;if(r.length=0,en(this._item._element.parentNode,r),i!==n)for(t=[],en(n,t),e=0;e<t.length;e++)r.indexOf(t[e])<0&&r.push(t[e]);for(e=0;e<r.length;e++)r[e].addEventListener("scroll",this._onScroll,gn)},mn.prototype._unbindScrollListeners=function(){var t,e=this._scrollers;for(t=0;t<e.length;t++)e[t].removeEventListener("scroll",this._onScroll,gn);e.length=0},mn.prototype._resolveStartPredicate=function(t){var e=this._startPredicateData;if(!(t.distance<e.distance||e.delay))return this._resetStartPredicate(),!0},mn.prototype._forceResolveStartPredicate=function(t){this._isDestroyed||this._startPredicateState!==fn||(this._startPredicateState=pn,this._onStart(t))},mn.prototype._finishStartPredicate=function(t){var e=this._item._element,n=Math.abs(t.deltaX)<2&&Math.abs(t.deltaY)<2&&t.deltaTime<200;this._resetStartPredicate(),n&&vn(e)},mn.prototype._resetHeuristics=function(t,e){this._blockedSortIndex=null,this._sortX1=this._sortX2=t,this._sortY1=this._sortY2=e},mn.prototype._checkHeuristics=function(t,e){var n=this._getGrid()._settings.dragSortHeuristics,i=n.minDragDistance;if(i<=0)return this._blockedSortIndex=null,!0;var r=t-this._sortX2,o=e-this._sortY2,s=i>3&&n.minBounceBackAngle>0;if(s||(this._blockedSortIndex=null),Math.abs(r)>i||Math.abs(o)>i){if(s){var a=Math.atan2(r,o),l=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),c=Math.atan2(Math.sin(a-l),Math.cos(a-l));Math.abs(c)>n.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=t,this._sortY2=e,!0}return!1},mn.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},mn.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&mn.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var e=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||e){var n=t.dragSortHeuristics.sortInterval;n<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,n))}}},mn.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,Ot(this._item._id,this._handleSort)},mn.prototype._cancelSort=function(){this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),Pt(this._item._id)},mn.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort,e=t&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),e&&this._checkOverlap()},mn.prototype._checkOverlap=function(){if(this._isActive){var t,e,n,i,r,a,l,c,u=this._item,h=this._getGrid()._settings;t=te(h.dragSortPredicate)?h.dragSortPredicate(u,this._dragMoveEvent):mn.defaultSortPredicate(u,h.dragSortPredicate),t&&"number"===typeof t.index&&(l=t.action===o?o:s,e=u.getGrid(),i=t.grid||e,c=e!==i,n=e._items.indexOf(u),r=De(i._items,t.index,c&&l===s?1:0),(c||r!==this._blockedSortIndex)&&(c?(this._blockedSortIndex=null,a=i._items[r],e._hasListeners(_)&&e._emit(_,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),i._hasListeners(S)&&i._emit(S,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),u._gridId=i._id,this._isMigrating=u._gridId!==this._gridId,e._items.splice(n,1),Me(i._items,u,r),u._sortData=null,e._hasListeners(b)&&e._emit(b,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),i._hasListeners(x)&&i._emit(x,{item:u,fromGrid:e,fromIndex:n,toGrid:i,toIndex:r}),l===o&&a&&a.isActive()&&i._items.indexOf(a)>-1&&i.send(a,e,n,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),e.layout(),i.layout()):n!==r&&(this._blockedSortIndex=n,(l===o?Oe:Ie)(e._items,n,r),e._hasListeners(w)&&e._emit(w,{item:u,fromIndex:n,toIndex:r,action:l}),e.layout())))}},mn.prototype._finishMigration=function(){var t,e,n=this._item,i=n._dragRelease,r=n._element,o=n._isActive,s=n.getGrid(),a=s._element,l=s._settings,c=l.dragContainer||a,u=this._getGrid()._settings,h=r.parentNode,d=o?u.itemVisibleClass:u.itemHiddenClass,f=o?l.itemVisibleClass:l.itemHiddenClass;this._isMigrating=!1,this.destroy(),u.itemClass!==l.itemClass&&(un(r,u.itemClass),Le(r,l.itemClass)),d!==f&&(un(r,d),Le(r,f)),c!==h&&(c.appendChild(r),e=Ze(h,c,!0),t=cn(r),t.x-=e.left,t.y-=e.top),n._refreshDimensions(),e=Ze(c,a,!0),i._containerDiffX=e.left,i._containerDiffY=e.top,n._drag=l.dragEnabled?new mn(n):null,c!==h&&n._setTranslate(t.x,t.y),n._visibility.setStyles(o?l.visibleStyles:l.hiddenStyles),i.start()},mn.prototype._preStartCheck=function(t){this._startPredicateState===dn&&(this._startPredicateState=fn),this._startPredicateState===fn?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=pn,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=dn)):this._startPredicateState===pn&&this._isActive&&this._onMove(t)},mn.prototype._preEndCheck=function(t){var e=this._startPredicateState===pn;this._startPredicate(this._item,t),this._startPredicateState=dn,e&&this._isActive&&(this._isStarted?this._onEnd(t):this.stop())},mn.prototype._onStart=function(t){var e=this._item;e._isActive&&(this._isActive=!0,this._dragStartEvent=t,mn.autoScroller.addItem(e),Lt(e._id,this._prepareStart,this._applyStart))},mn.prototype._prepareStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._settings,r=n._element,o=i.dragContainer||r,s=Ye(o),a=cn(e),l=e.getBoundingClientRect(),c=o!==r;if(this._container=o,this._containingBlock=s,this._clientX=l.left,this._clientY=l.top,this._left=this._gridX=a.x,this._top=this._gridY=a.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),c){var u=Ze(s,r);this._containerDiffX=u.left,this._containerDiffY=u.top}}}},mn.prototype._applyStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid(),n=t._element,i=t._dragRelease,r=t._migrate,o=this._container!==e._element;t.isPositioning()&&t._layout.stop(!0,this._left,this._top),r._isActive&&(this._left-=r._containerDiffX,this._top-=r._containerDiffY,this._gridX-=r._containerDiffX,this._gridY-=r._containerDiffY,r.stop(!0,this._left,this._top)),t.isReleasing()&&i._reset(),e._settings.dragPlaceholder.enabled&&t._dragPlaceholder.create(),this._isStarted=!0,e._emit(A,t,this._dragStartEvent),o&&(n.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(n),t._setTranslate(this._left,this._top))),Le(n,e._settings.itemDraggingClass),this._bindScrollListeners(),e._emit(C,t,this._dragStartEvent)}}},mn.prototype._onMove=function(t){var e=this._item;e._isActive?(this._dragMoveEvent=t,Et(e._id,this._prepareMove,this._applyMove),Ot(e._id,this._handleSort)):this.stop()},mn.prototype._prepareMove=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid()._settings,n=e.dragAxis,i=this._dragMoveEvent,r=this._dragPrevMoveEvent||this._dragStartEvent||i;if("y"!==n){var o=i.clientX-r.clientX;this._left=this._left-this._moveDiffX+o,this._gridX=this._gridX-this._moveDiffX+o,this._clientX=this._clientX-this._moveDiffX+o,this._moveDiffX=o}if("x"!==n){var s=i.clientY-r.clientY;this._top=this._top-this._moveDiffY+s,this._gridY=this._gridY-this._moveDiffY+s,this._clientY=this._clientY-this._moveDiffY+s,this._moveDiffY=s}this._dragPrevMoveEvent=i}}},mn.prototype._applyMove=function(){if(this._isActive){var t=this._item;t._isActive&&(this._moveDiffX=this._moveDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit(k,t,this._dragMoveEvent),mn.autoScroller.updateItem(t))}},mn.prototype._onScroll=function(t){var e=this._item;e._isActive?(this._scrollEvent=t,Dt(e._id,this._prepareScroll,this._applyScroll),Ot(e._id,this._handleSort)):this.stop()},mn.prototype._prepareScroll=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,n=this._getGrid(),i=n._element,r=e.getBoundingClientRect();if(this._container!==i){var o=Ze(this._containingBlock,i);this._containerDiffX=o.left,this._containerDiffY=o.top}var s=this._clientX-this._moveDiffX-r.left;this._left=this._left-this._scrollDiffX+s,this._scrollDiffX=s;var a=this._clientY-this._moveDiffY-r.top;this._top=this._top-this._scrollDiffY+a,this._scrollDiffY=a,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},mn.prototype._applyScroll=function(){if(this._isActive){var t=this._item;t._isActive&&(this._scrollDiffX=this._scrollDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit($,t,this._scrollEvent))}},mn.prototype._onEnd=function(t){var e=this._item,n=e._element,i=this._getGrid(),r=i._settings,o=e._dragRelease;e._isActive?(Rt(e._id),Mt(e._id),It(e._id),this._finishSort(),this._unbindScrollListeners(),o._containerDiffX=this._containerDiffX,o._containerDiffY=this._containerDiffY,this._reset(),un(n,r.itemDraggingClass),mn.autoScroller.removeItem(e),i._emit(T,e,t),this._isMigrating?this._finishMigration():o.start()):this.stop()};var wn=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,bn={};function _n(t){var e=bn[t];return e||(e=t.replace(wn,""),e!==t&&(e=e[0].toLowerCase()+e.slice(1)),bn[t]=e,e)}var xn="[native code]";function Sn(t){var e=window.Symbol;return!!(t&&te(e)&&te(e.toString)&&e(t).toString().indexOf(xn)>-1)}function An(t,e){for(var n in e)t.style[n]=e[n]}var Cn=!(!Element||!te(Element.prototype.animate)),kn=!(!Element||!Sn(Element.prototype.animate));function $n(t){this._element=t,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function Tn(t,e){var n={};for(var i in t)n[e?i:_n(i)]=t[i];return n}function Ln(t,e){return"translateX("+t+"px) translateY("+e+"px)"}function Rn(t){this._item=t,this._animation=new $n,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function En(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}$n.prototype.start=function(t,e,n){if(!this._isDestroyed){var i=this._element,r=n||{};if(!Cn)return An(i,e),this._callback=te(r.onFinish)?r.onFinish:null,void this._onFinish();var o,s,a,l=this._animation,c=this._props,u=this._values,h=r.duration||300,d=r.easing||"ease",f=!1;if(l&&(s=0,h===this._duration&&d===this._easing||(f=!0),!f)){for(o in e)if(++s,a=c.indexOf(o),-1===a||e[o]!==u[a]){f=!0;break}s!==c.length&&(f=!0)}if(f&&l.cancel(),this._callback=te(r.onFinish)?r.onFinish:null,!l||f){for(o in c.length=u.length=0,e)c.push(o),u.push(e[o]);this._duration=h,this._easing=d,this._animation=i.animate([Tn(t,kn),Tn(e,kn)],{duration:h,easing:d}),this._animation.onfinish=this._onFinish,An(i,e)}}},$n.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},$n.prototype.getCurrentStyles=function(){return yn(element,currentProps)},$n.prototype.isAnimating=function(){return!!this._animation},$n.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},$n.prototype._onFinish=function(){var t=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,t&&t()},Rn.prototype._updateDimensions=function(){this.isActive()&&An(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Rn.prototype._onLayoutStart=function(t,e){var n=this._item;if(-1!==t.indexOf(n)){var i=n._left,r=n._top,o=this._left,s=this._top;if(this._left=i,this._top=r,e||this._didMigrate||o!==i||s!==r){var a=i+n._marginLeft,l=r+n._marginTop,c=n.getGrid(),u=!e&&c._settings.layoutDuration>0;if(!u||this._didMigrate)return Ft(n._id),this._element.style[Pe]=Ln(a,l),this._animation.stop(),void(this._didMigrate&&(c.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=a,this._nextTransY=l,Nt(n._id,this._setupAnimation,this._startAnimation)}}else this.reset()},Rn.prototype._setupAnimation=function(){if(this.isActive()){var t=cn(this._element);this._transX=t.x,this._transY=t.y}},Rn.prototype._startAnimation=function(){if(this.isActive()){var t=this._animation,e=this._transX,n=this._transY,i=this._nextTransX,r=this._nextTransY;if(e!==i||n!==r){var o=this._item.getGrid()._settings,s={},a={};s[Pe]=Ln(e,n),a[Pe]=Ln(i,r),t.start(s,a,{duration:o.layoutDuration,easing:o.layoutEasing,onFinish:this._onLayoutEnd})}else t.isAnimating()&&(this._element.style[Pe]=Ln(i,r),t.stop())}},Rn.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Rn.prototype._onReleaseEnd=function(t){if(t._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Rn.prototype._onMigrate=function(t){if(t.item===this._item){var e=this._item.getGrid(),n=t.toGrid;e.off(R,this._onReleaseEnd),e.off(l,this._onLayoutStart),e.off(_,this._onMigrate),e.off(g,this._onHide),n.on(R,this._onReleaseEnd),n.on(l,this._onLayoutStart),n.on(_,this._onMigrate),n.on(g,this._onHide),this._didMigrate=!0}},Rn.prototype._onHide=function(t){t.indexOf(this._item)>-1&&this.reset()},Rn.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var t,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._left=e._left,this._top=e._top,t=te(i.dragPlaceholder.createElement)?i.dragPlaceholder.createElement(e):document.createElement("div"),this._element=t,r._element=t,this._className=i.itemPlaceholderClass||"",this._className&&Le(t,this._className),An(t,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),t.style[Pe]=Ln(e._left+e._marginLeft,e._top+e._marginTop),n.on(l,this._onLayoutStart),n.on(R,this._onReleaseEnd),n.on(_,this._onMigrate),n.on(g,this._onHide),te(i.dragPlaceholder.onCreate)&&i.dragPlaceholder.onCreate(e,t),n.getElement().appendChild(t)}},Rn.prototype.reset=function(){if(this.isActive()){var t=this._element,e=this._item,n=e.getGrid(),i=n._settings,r=this._animation;this._resetAfterLayout=!1,Ft(e._id),Ht(e._id),r.stop(),r._element=null,n.off(R,this._onReleaseEnd),n.off(l,this._onLayoutStart),n.off(_,this._onMigrate),n.off(g,this._onHide),this._className&&(un(t,this._className),this._className=""),t.parentNode.removeChild(t),this._element=null,te(i.dragPlaceholder.onRemove)&&i.dragPlaceholder.onRemove(e,t)}},Rn.prototype.isActive=function(){return!!this._element},Rn.prototype.getElement=function(){return this._element},Rn.prototype.updateDimensions=function(){this.isActive()&&Wt(this._item._id,this._updateDimensions)},Rn.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},En.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var t=this._item,e=t.getGrid(),n=e._settings;this._isActive=!0,Le(t._element,n.itemReleasingClass),n.dragRelease.useDragContainer||this._placeToGrid(),e._emit(L,t),e._nextLayoutData||t._layout.start(!1)}},En.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item,r=i.getGrid();t||void 0!==e&&void 0!==n||(e=i._left,n=i._top);var o=this._placeToGrid(e,n);this._reset(o),t||r._emit(R,i)}},En.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},En.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},En.prototype._placeToGrid=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=n.getGrid()._element,o=!1;if(i.parentNode!==r){if(void 0===t||void 0===e){var s=cn(i);t=s.x-this._containerDiffX,e=s.y-this._containerDiffY}r.appendChild(i),n._setTranslate(t,e),o=!0}return this._containerDiffX=0,this._containerDiffY=0,o}},En.prototype._reset=function(t){if(!this._isDestroyed){var e=this._item,n=e.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,n&&(t&&e._element.clientWidth,un(e._element,n))}};var Mn=2;function Dn(t){var e=t._element,n=e.style;this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},n.left="0px",n.top="0px",t._setTranslate(0,0),this._animation=new $n(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function In(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function On(t){var e=t._isActive,n=t._element,i=n.children[0],r=t.getGrid()._settings;if(!i)throw new Error("No valid child element found within item element.");this._item=t,this._isDestroyed=!1,this._isHidden=!e,this._isHiding=!1,this._isShowing=!1,this._childElement=i,this._currentStyleProps=[],this._animation=new $n(i),this._queue="visibility-"+t._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),n.style.display=e?"":"none",Le(n,e?r.itemVisibleClass:r.itemHiddenClass),this.setStyles(e?r.visibleStyles:r.hiddenStyles)}Dn.prototype.start=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._dragRelease,r=n.getGrid()._settings,o=this._isActive,s=i.isJustReleased(),a=s?r.dragRelease.duration:r.layoutDuration,l=s?r.dragRelease.easing:r.layoutEasing,c=!t&&!this._skipNextAnimation&&a>0;if(o&&(kt(n._id),n._emitter.burst(this._queue,!0,n)),s&&(i._isPositioningStarted=!0),te(e)&&n._emitter.on(this._queue,e),this._skipNextAnimation=!1,!c)return this._updateOffsets(),n._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=l,this._animOptions.duration=a,this._isInterrupted=o,Ct(n._id,this._setupAnimation,this._startAnimation)}},Dn.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item;if(kt(i._id),this._animation.isAnimating()){if(void 0===e||void 0===n){var r=cn(i._element);e=r.x,n=r.y}i._setTranslate(e,n),this._animation.stop()}un(i._element,i.getGrid()._settings.itemPositioningClass),this._isActive=!1,t&&i._emitter.burst(this._queue,!0,i)}},Dn.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),t[Pe]="",t.left="",t.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Dn.prototype._updateOffsets=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;this._offsetLeft=n._isActive?n._containerDiffX:e._isActive?e._containerDiffX:0,this._offsetTop=n._isActive?n._containerDiffY:e._isActive?e._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Dn.prototype._finish=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,n=t._dragRelease;t._tX=this._nextLeft,t._tY=this._nextTop,this._isActive&&(this._isActive=!1,un(t._element,t.getGrid()._settings.itemPositioningClass)),n._isActive&&n.stop(),e._isActive&&e.stop(),t._emitter.burst(this._queue,!1,t)}},Dn.prototype._setupAnimation=function(){var t=this._item;if(void 0===t._tX||void 0===t._tY){var e=cn(t._element);t._tX=e.x,t._tY=e.y}},Dn.prototype._startAnimation=function(){var t=this._item,e=t.getGrid()._settings,n=this._animOptions.duration<=0;this._updateOffsets();var i=Math.abs(t._left-(t._tX-this._offsetLeft)),r=Math.abs(t._top-(t._tY-this._offsetTop));if(n||i<Mn&&r<Mn)return(i||r||this._isInterrupted)&&t._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||Le(t._element,e.itemPositioningClass),this._currentStyles[Pe]=Ln(t._tX,t._tY),this._targetStyles[Pe]=Ln(this._nextLeft,this._nextTop),t._tX=t._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},In.prototype.start=function(t,e,n){if(!this._isDestroyed){var i,r,o,s,a,l,c,u,h,d,f=this._item,p=f._element,g=f.isActive(),m=f.isVisible(),v=f.getGrid(),y=v._settings,w=t._settings,A=t._element,C=t._items,k=v._items.indexOf(f),$=n||document.body;if("number"===typeof e)i=De(C,e,1);else{if(r=t.getItem(e),!r)return;i=C.indexOf(r)}(f.isPositioning()||this._isActive||f.isReleasing())&&(l=cn(p),c=l.x,u=l.y),f.isPositioning()&&f._layout.stop(!0,c,u),this._isActive&&(c-=this._containerDiffX,u-=this._containerDiffY,this.stop(!0,c,u)),f.isReleasing()&&(c-=f._dragRelease._containerDiffX,u-=f._dragRelease._containerDiffY,f._dragRelease.stop(!0,c,u)),f._visibility.stop(!0),f._drag&&f._drag.destroy(),v._hasListeners(_)&&v._emit(_,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(S)&&t._emit(S,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),y.itemClass!==w.itemClass&&(un(p,y.itemClass),Le(p,w.itemClass)),h=m?y.itemVisibleClass:y.itemHiddenClass,d=m?w.itemVisibleClass:w.itemHiddenClass,h!==d&&(un(p,h),Le(p,d)),v._items.splice(k,1),Me(C,f,i),f._gridId=t._id,g?(o=p.parentNode,$!==o&&($.appendChild(p),s=Ze($,o,!0),l||(l=cn(p),c=l.x,u=l.y),f._setTranslate(c+s.left,u+s.top))):A.appendChild(p),f._visibility.setStyles(m?w.visibleStyles:w.hiddenStyles),g&&(a=Ze($,A,!0)),f._refreshDimensions(),f._sortData=null,f._drag=w.dragEnabled?new mn(f):null,g?(this._isActive=!0,this._container=$,this._containerDiffX=a.left,this._containerDiffY=a.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),v._hasListeners(b)&&v._emit(b,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i}),t._hasListeners(x)&&t._emit(x,{item:f,fromGrid:v,fromIndex:k,toGrid:t,toIndex:i})}},In.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i,r=this._item,o=r._element,s=r.getGrid(),a=s._element;this._container!==a&&(void 0!==e&&void 0!==n||(t?(i=cn(o),e=i.x-this._containerDiffX,n=i.y-this._containerDiffY):(e=r._left,n=r._top)),a.appendChild(o),r._setTranslate(e,n)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},In.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},On.prototype.show=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=te(e)?e:null,o=n.getGrid(),s=o._settings;this._isShowing||this._isHidden?!this._isShowing||t?(this._isShowing||(n._emitter.burst(this._queue,!0,n),un(i,s.itemHiddenClass),Le(i,s.itemVisibleClass),this._isHiding||(i.style.display="")),r&&n._emitter.on(this._queue,r),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,t,this._finishShow)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},On.prototype.hide=function(t,e){if(!this._isDestroyed){var n=this._item,i=n._element,r=te(e)?e:null,o=n.getGrid(),s=o._settings;this._isHiding||!this._isHidden?!this._isHiding||t?(this._isHiding||(n._emitter.burst(this._queue,!0,n),Le(i,s.itemHiddenClass),un(i,s.itemVisibleClass)),r&&n._emitter.on(this._queue,r),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,t,this._finishHide)):r&&n._emitter.on(this._queue,r):r&&r(!1,n)}},On.prototype.stop=function(t){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var e=this._item;Tt(e._id),this._animation.stop(),t&&e._emitter.burst(this._queue,!0,e)}},On.prototype.setStyles=function(t){var e=this._childElement,n=this._currentStyleProps;for(var i in this._removeCurrentStyles(),t)n.push(i),e.style[i]=t[i]},On.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item,e=t._element,n=t.getGrid(),i=n._settings;this.stop(!0),t._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),un(e,i.itemVisibleClass),un(e,i.itemHiddenClass),e.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},On.prototype._startAnimation=function(t,e,n){if(!this._isDestroyed){var i,r=this._item,o=this._animation,s=this._childElement,a=r.getGrid()._settings,l=t?a.visibleStyles:a.hiddenStyles,c=t?a.showDuration:a.hideDuration,u=t?a.showEasing:a.hideEasing,h=e||c<=0;if(l){if(Tt(r._id),h)return An(s,l),o.stop(),void(n&&n());o.isAnimating()&&(o._animation.onfinish=null),$t(r._id,(function(){i=yn(s,l)}),(function(){o.start(i,l,{duration:c,easing:u,onFinish:n})}))}else n&&n()}},On.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},On.prototype._finishHide=function(){if(this._isHidden){var t=this._item;this._isHiding=!1,t._layout.stop(!0,0,0),t._element.style.display="none",t._emitter.burst(this._queue,!1,t)}},On.prototype._removeCurrentStyles=function(){for(var t=this._childElement,e=this._currentStyleProps,n=0;n<e.length;n++)t.style[e[n]]="";e.length=0};var Pn=0;function Nn(){return++Pn}function Fn(t,e,n){var i=t._settings;if(r){if(r.has(e))throw new Error("You can only create one Muuri Item per element!");r.set(e,this)}this._id=Nn(),this._gridId=t._id,this._element=e,this._isDestroyed=!1,this._left=0,this._top=0,this._width=0,this._height=0,this._marginLeft=0,this._marginRight=0,this._marginTop=0,this._marginBottom=0,this._tX=void 0,this._tY=void 0,this._sortData=null,this._emitter=new P,e.parentNode!==t._element&&t._element.appendChild(e),Le(e,i.itemClass),"boolean"!==typeof n&&(n="none"!==ne(e,"display")),this._isActive=n,this._visibility=new On(this),this._layout=new Dn(this),this._migrate=new In(this),this._drag=i.dragEnabled?new mn(this):null,this._dragRelease=new En(this),this._dragPlaceholder=new Rn(this)}function Wn(t){var e=1,n=2,i=4,r=8,o=16,s=.001,a=.5;function l(t){return((1e3*t+.5|0)/10|0)/100}function c(){this.currentRects=[],this.nextRects=[],this.rectTarget={},this.rectStore=[],this.slotSizes=[],this.rectId=0,this.slotIndex=-1,this.slotData={left:0,top:0,width:0,height:0},this.sortRectsLeftTop=this.sortRectsLeftTop.bind(this),this.sortRectsTopLeft=this.sortRectsTopLeft.bind(this)}if(c.prototype.computeLayout=function(t,s){var a,c,u,h,d,f,p=t.items,g=t.slots,m=!!(s&e),v=!!(s&n),y=!!(s&i),w=!!(s&r),b=!!(s&o),_="number"===typeof p[0];if(!p.length)return t;for(c=_?2:1,a=0;a<p.length;a+=c)_?(h=p[a],d=p[a+1]):(u=p[a],h=u._width+u._marginLeft+u._marginRight,d=u._height+u._marginTop+u._marginBottom),b&&(h=l(h),d=l(d)),f=this.computeNextSlot(t,h,d,m,v),v?f.left+f.width>t.width&&(t.width=f.left+f.width):f.top+f.height>t.height&&(t.height=f.top+f.height),g[++this.slotIndex]=f.left,g[++this.slotIndex]=f.top,(y||w)&&this.slotSizes.push(f.width,f.height);if(y)for(a=0;a<g.length;a+=2)g[a]=t.width-(g[a]+this.slotSizes[a]);if(w)for(a=1;a<g.length;a+=2)g[a]=t.height-(g[a]+this.slotSizes[a]);return this.slotSizes.length=0,this.currentRects.length=0,this.nextRects.length=0,this.rectStore.length=0,this.rectId=0,this.slotIndex=-1,t},c.prototype.computeNextSlot=function(t,e,n,i,r){var o,l,c,u,h,d=this.slotData,f=this.currentRects,p=this.nextRects,g=!1;for(p.length=0,d.left=null,d.top=null,d.width=e,d.height=n,u=0;u<f.length;u++)if(l=f[u],l&&(o=this.getRect(l),d.width<=o.width+s&&d.height<=o.height+s)){d.left=o.left,d.top=o.top;break}if(null===d.left&&(r?(d.left=t.width,d.top=0):(d.left=0,d.top=t.height),i||(g=!0)),!r&&d.top+d.height>t.height+s&&(d.left>a&&p.push(this.addRect(0,t.height,d.left,1/0)),d.left+d.width<t.width-a&&p.push(this.addRect(d.left+d.width,t.height,t.width-d.left-d.width,1/0)),t.height=d.top+d.height),r&&d.left+d.width>t.width+s&&(d.top>a&&p.push(this.addRect(t.width,0,1/0,d.top)),d.top+d.height<t.height-a&&p.push(this.addRect(t.width,d.top+d.height,1/0,t.height-d.top-d.height)),t.width=d.left+d.width),!g)for(i&&(u=0);u<f.length;u++)if(l=f[u],l)for(o=this.getRect(l),c=this.splitRect(o,d),h=0;h<c.length;h++)l=c[h],o=this.getRect(l),(r?o.left+s<t.width-s:o.top+s<t.height-s)&&p.push(l);return p.length>1&&this.purgeRects(p).sort(r?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=p,this.nextRects=f,d},c.prototype.addRect=function(t,e,n,i){var r=++this.rectId;return this.rectStore[r]=t||0,this.rectStore[++this.rectId]=e||0,this.rectStore[++this.rectId]=n||0,this.rectStore[++this.rectId]=i||0,r},c.prototype.getRect=function(t,e){return e||(e=this.rectTarget),e.left=this.rectStore[t]||0,e.top=this.rectStore[++t]||0,e.width=this.rectStore[++t]||0,e.height=this.rectStore[++t]||0,e},c.prototype.splitRect=function(){var t=[],e=0,n=0;return function(i,r){return t.length=0,i.left+i.width<=r.left+s||r.left+r.width<=i.left+s||i.top+i.height<=r.top+s||r.top+r.height<=i.top+s?(t.push(this.addRect(i.left,i.top,i.width,i.height)),t):(e=r.left-i.left,e>=a&&t.push(this.addRect(i.left,i.top,e,i.height)),e=i.left+i.width-(r.left+r.width),e>=a&&t.push(this.addRect(r.left+r.width,i.top,e,i.height)),n=r.top-i.top,n>=a&&t.push(this.addRect(i.left,i.top,i.width,n)),n=i.top+i.height-(r.top+r.height),n>=a&&t.push(this.addRect(i.left,r.top+r.height,i.width,n)),t)}}(),c.prototype.isRectAWithinRectB=function(t,e){return t.left+s>=e.left&&t.top+s>=e.top&&t.left+t.width-s<=e.left+e.width&&t.top+t.height-s<=e.top+e.height},c.prototype.purgeRects=function(){var t={},e={};return function(n){var i,r=n.length;while(r--)if(i=n.length,n[r]){this.getRect(n[r],t);while(i--)if(n[i]&&r!==i&&(this.getRect(n[i],e),this.isRectAWithinRectB(t,e))){n[r]=0;break}}return n}}(),c.prototype.sortRectsTopLeft=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s>e.left?1:0}}(),c.prototype.sortRectsLeftTop=function(){var t={},e={};return function(n,i){return this.getRect(n,t),this.getRect(i,e),t.left<e.left&&t.left+s<e.left?-1:t.left>e.left&&t.left-s<e.left?1:t.top<e.top&&t.top+s<e.top?-1:t.top>e.top&&t.top-s>e.top?1:0}}(),t){var u=1,h=2,d=3,f=4,p=new c;self.onmessage=function(t){var e=new Float32Array(t.data),n=e.subarray(f,e.length),i=new Float32Array(n.length),r=e[d],o={items:n,slots:i,width:e[u],height:e[h]};p.computeLayout(o,r),e[u]=o.width,e[h]=o.height,e.set(o.slots,f),postMessage(e.buffer,[e.buffer])}}return c}Fn.prototype.getGrid=function(){return i[this._gridId]},Fn.prototype.getElement=function(){return this._element},Fn.prototype.getWidth=function(){return this._width},Fn.prototype.getHeight=function(){return this._height},Fn.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},Fn.prototype.getPosition=function(){return{left:this._left,top:this._top}},Fn.prototype.isActive=function(){return this._isActive},Fn.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},Fn.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},Fn.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},Fn.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},Fn.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},Fn.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},Fn.prototype.isDestroyed=function(){return this._isDestroyed},Fn.prototype._refreshDimensions=function(t){if(!this._isDestroyed&&(!0===t||!this._visibility._isHidden)){var e=this._element,n=this._dragPlaceholder,i=e.getBoundingClientRect();this._width=i.width,this._height=i.height,this._marginLeft=Math.max(0,ie(e,"margin-left")),this._marginRight=Math.max(0,ie(e,"margin-right")),this._marginTop=Math.max(0,ie(e,"margin-top")),this._marginBottom=Math.max(0,ie(e,"margin-bottom")),n&&n.updateDimensions()}},Fn.prototype._refreshSortData=function(){if(!this._isDestroyed){var t,e=this._sortData={},n=this.getGrid()._settings.sortData;for(t in n)e[t]=n[t](this,this._element)}},Fn.prototype._addToLayout=function(t,e){!0!==this._isActive&&(this._isActive=!0,this._left=t||0,this._top=e||0)},Fn.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},Fn.prototype._canSkipLayout=function(t,e){return this._left===t&&this._top===e&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},Fn.prototype._setTranslate=function(t,e){return(this._tX!==t||this._tY!==e)&&(this._tX=t,this._tY=e,this._element.style[Pe]=Ln(t,e),!0)},Fn.prototype._destroy=function(t){if(!this._isDestroyed){var e=this._element,n=this.getGrid(),i=n._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),un(e,i.itemClass),t&&e.parentNode.removeChild(e),r&&r.delete(e),this._isActive=!1,this._isDestroyed=!0}};var Hn=Wn(),Bn=null,zn=[];function Un(t,e){var n=[];if(t>0){Bn||(Bn=URL.createObjectURL(new Blob(["("+Wn.toString()+")(true)"],{type:"application/javascript"})));for(var i,r=0;r<t;r++)i=new Worker(Bn),e&&(i.onmessage=e),n.push(i),zn.push(i)}return n}function jn(t){for(var e,n,i=0;i<t.length;i++)e=t[i],e.onmessage=null,e.onerror=null,e.onmessageerror=null,e.terminate(),n=zn.indexOf(e),n>-1&&zn.splice(n,1);Bn&&!zn.length&&(URL.revokeObjectURL(Bn),Bn=null)}function Gn(){return!!(window.Worker&&window.URL&&window.Blob)}var Vn=1,Yn=2,qn=4,Kn=8,Xn=16,Qn=0,Zn=1,Jn=2,ti=3,ei=4;function ni(t,e){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(e),t="number"===typeof t?Math.max(0,t):0,t&&Gn())try{this._workers=Un(t,this._onWorkerMessage)}catch(n){this._processor=new Hn}else this._processor=new Hn}ni.prototype._sendToWorker=function(){if(this._layoutQueue.length&&this._workers.length){var t=this._layoutQueue.shift(),e=this._workers.pop(),n=this._layoutWorkerData[t];delete this._layoutWorkerData[t],this._layoutWorkers[t]=e,e.postMessage(n.buffer,[n.buffer])}},ni.prototype._onWorkerMessage=function(t){var e=new Float32Array(t.data),n=e[Qn],i=this._layouts[n],r=this._layoutCallbacks[n],o=this._layoutWorkers[n];i&&delete this._layouts[n],r&&delete this._layoutCallbacks[n],o&&delete this._layoutWorkers[n],i&&r&&(i.width=e[Zn],i.height=e[Jn],i.slots=e.subarray(ei,e.length),this._finalizeLayout(i),r(i)),o&&(this._workers.push(o),this._sendToWorker())},ni.prototype._finalizeLayout=function(t){var e=t._grid,n=t._settings&Yn,i="border-box"===e._boxSizing;return delete t._grid,delete t._settings,t.styles={},n?t.styles.width=(i?t.width+e._borderLeft+e._borderRight:t.width)+"px":t.styles.height=(i?t.height+e._borderTop+e._borderBottom:t.height)+"px",t},ni.prototype.setOptions=function(t){var e,n,i,r,o;t&&(e="boolean"===typeof t.fillGaps?t.fillGaps?Vn:0:this._options&Vn,n="boolean"===typeof t.horizontal?t.horizontal?Yn:0:this._options&Yn,i="boolean"===typeof t.alignRight?t.alignRight?qn:0:this._options&qn,r="boolean"===typeof t.alignBottom?t.alignBottom?Kn:0:this._options&Kn,o="boolean"===typeof t.rounding?t.rounding?Xn:0:this._options&Xn,this._options=e|n|i|r|o)},ni.prototype.createLayout=function(t,e,n,i,r,o){if(this._layouts[e])throw new Error("A layout with the provided id is currently being processed.");var s=this._options&Yn,a={id:e,items:n,slots:null,width:s?0:i,height:s?r:0,_grid:t,_settings:this._options};if(!n.length)return a.slots=[],this._finalizeLayout(a),void o(a);if(this._processor)return a.slots=window.Float32Array?new Float32Array(2*n.length):new Array(2*n.length),this._processor.computeLayout(a,a._settings),this._finalizeLayout(a),void o(a);var l,c,u,h=new Float32Array(ei+2*n.length);for(h[Qn]=e,h[Zn]=a.width,h[Jn]=a.height,h[ti]=a._settings,l=0,c=ei-1,u;l<n.length;l++)u=n[l],h[++c]=u._width+u._marginLeft+u._marginRight,h[++c]=u._height+u._marginTop+u._marginBottom;return this._layoutQueue.push(e),this._layouts[e]=a,this._layoutCallbacks[e]=o,this._layoutWorkerData[e]=h,this._sendToWorker(),this.cancelLayout.bind(this,e)},ni.prototype.cancelLayout=function(t){var e=this._layouts[t];if(e&&(delete this._layouts[t],delete this._layoutCallbacks[t],this._layoutWorkerData[t])){delete this._layoutWorkerData[t];var n=this._layoutQueue.indexOf(t);n>-1&&this._layoutQueue.splice(n,1)}},ni.prototype.destroy=function(){for(var t in this._layoutWorkers)this._workers.push(this._layoutWorkers[t]);jn(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var ii=0;function ri(t,e){var n=++ii,i=0,r=0,o=!1,s=function(e){o||(r&&(i-=e-r),r=e,i>0?Ut(n,s):(i=r=0,t()))};return function(a){if(!o){if(!(e<=0))return!0===a?(o=!0,i=r=0,s=void 0,void jt(n)):void(i<=0?(i=e,s(0)):i=e);!0!==a&&t()}}}var oi="[object HTMLCollection]",si="[object NodeList]";function ai(t){var e=Object.prototype.toString.call(t);return e===oi||e===si}var li="object",ci="[object Object]",ui=Object.prototype.toString;function hi(t){return typeof t===li&&ui.call(t)===ci}function di(){}function fi(t){return ai(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var pi="number",gi="string",mi="instant",vi=0;function yi(t,e){typeof t===gi&&(t=document.querySelector(t));var n=t.getRootNode?t.getRootNode({composed:!0})===document:document.body.contains(t);if(!n||t===document.documentElement)throw new Error("Container element must be an existing DOM element.");var r=wi(yi.defaultOptions,e);r.visibleStyles=Ai(r.visibleStyles),r.hiddenStyles=Ai(r.hiddenStyles),te(r.dragSort)||(r.dragSort=!!r.dragSort),this._id=Nn(),this._element=t,this._settings=r,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new P,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),i[this._id]=this,Le(t,r.containerClass),xi(this,r.layoutOnResize),this.add(_i(t,r.items),{layout:!1}),r.layoutOnInit&&this.layout(!0)}function wi(t,e){var n=bi({},t);return e&&(n=bi(n,e)),e&&e.visibleStyles?n.visibleStyles=e.visibleStyles:t&&t.visibleStyles&&(n.visibleStyles=t.visibleStyles),e&&e.hiddenStyles?n.hiddenStyles=e.hiddenStyles:t&&t.hiddenStyles&&(n.hiddenStyles=t.hiddenStyles),n}function bi(t,e){var n,i,r,o=Object.keys(e),s=o.length;for(r=0;r<s;r++)i=o[r],n=hi(e[i]),hi(t[i])&&n?t[i]=bi(bi({},t[i]),e[i]):n?t[i]=bi({},e[i]):Array.isArray(e[i])?t[i]=e[i].slice(0):t[i]=e[i];return t}function _i(t,e){if("*"===e)return t.children;if(typeof e===gi){for(var n=[],i=t.children,r=0;r<i.length;r++)Te(i[r],e)&&n.push(i[r]);return n}return Array.isArray(e)||ai(e)?e:[]}function xi(t,e){typeof e!==pi&&(e=!0===e?0:-1),e>=0&&(t._resizeHandler=ri((function(){t.refreshItems().layout()}),e),window.addEventListener("resize",t._resizeHandler))}function Si(t){t._resizeHandler&&(t._resizeHandler(!0),window.removeEventListener("resize",t._resizeHandler),t._resizeHandler=null)}function Ai(t){var e,n,i={},r=document.documentElement.style;for(e in t)t[e]&&(n=z(r,e),n&&(i[n]=t[e]));return i}function Ci(t){for(var e={},n=0;n<t.length;n++)e[t[n]._id]=n;return e}function ki(t,e,n){var i=t[e._id],r=t[n._id];return i-r}yi.Item=Fn,yi.ItemLayout=Dn,yi.ItemVisibility=On,yi.ItemMigrate=In,yi.ItemDrag=mn,yi.ItemDragRelease=En,yi.ItemDragPlaceholder=Rn,yi.Emitter=P,yi.Animator=$n,yi.Dragger=J,yi.Packer=ni,yi.AutoScroller=Ce,yi.defaultPacker=new ni(2),yi.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!1},layoutOnResize:150,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragHandle:null,dragStartPredicate:{distance:0,delay:0},dragAxis:"xy",dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:s,migrateAction:s},dragRelease:{duration:300,easing:"ease",useDragContainer:!0},dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,createElement:null,onCreate:null,onRemove:null},dragAutoScroll:{targets:[],handle:null,threshold:50,safeZone:.2,speed:Ce.smoothSpeed(1e3,2e3,2500),sortDuringScroll:!0,smoothStop:!1,onStart:null,onStop:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},yi.prototype.on=function(t,e){return this._emitter.on(t,e),this},yi.prototype.off=function(t,e){return this._emitter.off(t,e),this},yi.prototype.getElement=function(){return this._element},yi.prototype.getItem=function(t){if(this._isDestroyed||!t&&0!==t)return null;if(typeof t===pi)return this._items[t>-1?t:this._items.length+t]||null;if(t instanceof Fn)return t._gridId===this._id?t:null;if(r){var e=r.get(t);return e&&e._gridId===this._id?e:null}for(var n=0;n<this._items.length;n++)if(this._items[n]._element===t)return this._items[n];return null},yi.prototype.getItems=function(t){if(this._isDestroyed||void 0===t)return this._items.slice(0);var e,n,i=[];if(Array.isArray(t)||ai(t))for(e=0;e<t.length;e++)n=this.getItem(t[e]),n&&i.push(n);else n=this.getItem(t),n&&i.push(n);return i},yi.prototype.refreshItems=function(t,e){if(this._isDestroyed)return this;var n,i,r,o,s=t||this._items;if(!0===e)for(o=[],n=0;n<s.length;n++)i=s[n],i.isVisible()||i.isHiding()||(r=i.getElement().style,r.visibility="hidden",r.display="",o.push(r));for(n=0;n<s.length;n++)s[n]._refreshDimensions(e);if(!0===e){for(n=0;n<o.length;n++)r=o[n],r.visibility="",r.display="none";o.length=0}return this},yi.prototype.refreshSortData=function(t){if(this._isDestroyed)return this;for(var e=t||this._items,n=0;n<e.length;n++)e[n]._refreshSortData();return this},yi.prototype.synchronize=function(){if(this._isDestroyed)return this;var t,e,n=this._items;if(!n.length)return this;for(var i=0;i<n.length;i++)e=n[i]._element,e.parentNode===this._element&&(t=t||document.createDocumentFragment(),t.appendChild(e));return t?(this._element.appendChild(t),this._emit(a),this):this},yi.prototype.layout=function(t,e){if(this._isDestroyed)return this;var n=this._nextLayoutData;n&&te(n.cancel)&&n.cancel(),vi=vi%O+1;var i=vi;this._nextLayoutData={id:i,instant:t,onFinish:e,cancel:null};for(var r=this._items,o=[],s=0;s<r.length;s++)r[s]._isActive&&o.push(r[s]);this._refreshDimensions();var a,l=this._width-this._borderLeft-this._borderRight,c=this._height-this._borderTop-this._borderBottom,u=this._settings.layout;return te(u)?a=u(this,i,o,l,c,this._onLayoutDataReceived):(yi.defaultPacker.setOptions(u),a=yi.defaultPacker.createLayout(this,i,o,l,c,this._onLayoutDataReceived)),te(a)&&this._nextLayoutData&&this._nextLayoutData.id===i&&(this._nextLayoutData.cancel=a),this},yi.prototype.add=function(t,e){if(this._isDestroyed||!t)return[];var n=fi(t);if(!n.length)return n;var i,r,o,s,a=e||{},l=a.layout?a.layout:void 0===a.layout,c=this._items,u=!1;for(s=0;s<n.length;s++)r=n[s],r.parentNode!==this._element&&(i=i||document.createDocumentFragment(),i.appendChild(r));for(i&&this._element.appendChild(i),s=0;s<n.length;s++)r=n[s],o=n[s]=new Fn(this,r,a.active),o._isActive&&(u=!0,o._layout._skipNextAnimation=!0);for(s=0;s<n.length;s++)o=n[s],o._refreshDimensions(),o._refreshSortData();return Me(c,n,a.index),this._hasListeners(h)&&this._emit(h,n.slice(0)),u&&l&&this.layout(l===mi,te(l)?l:void 0),n},yi.prototype.remove=function(t,e){if(this._isDestroyed||!t.length)return[];var n,i,r,o=e||{},s=o.layout?o.layout:void 0===o.layout,a=!1,l=this.getItems(),c=[],u=[];for(r=0;r<t.length;r++)i=t[r],i._isDestroyed||(n=this._items.indexOf(i),-1!==n&&(i._isActive&&(a=!0),c.push(i),u.push(l.indexOf(i)),i._destroy(o.removeElements),this._items.splice(n,1)));return this._hasListeners(d)&&this._emit(d,c.slice(0),u),a&&s&&this.layout(s===mi,te(s)?s:void 0),c},yi.prototype.show=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!0,e),this},yi.prototype.hide=function(t,e){return!this._isDestroyed&&t.length&&this._setItemsVisibility(t,!1,e),this},yi.prototype.filter=function(t,e){if(this._isDestroyed||!this._items.length)return this;var n,i,r=[],o=[],s=typeof t===gi,a=te(t),l=e||{},c=!0===l.instant,u=l.syncWithLayout,h=l.layout?l.layout:void 0===l.layout,d=te(l.onFinish)?l.onFinish:null,f=-1,p=di;if(d&&(p=function(){++f&&d(r.slice(0),o.slice(0))}),a||s)for(i=0;i<this._items.length;i++)n=this._items[i],(a?t(n):Te(n._element,t))?r.push(n):o.push(n);return r.length?this.show(r,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),o.length?this.hide(o,{instant:c,syncWithLayout:u,onFinish:p,layout:!1}):p(),(r.length||o.length)&&(this._hasListeners(v)&&this._emit(v,r.slice(0),o.slice(0)),h&&this.layout(h===mi,te(h)?h:void 0)),this},yi.prototype.sort=function(){var t,e,n,i;function r(r,o){for(var s,a,l,c,u=0,h=0;h<t.length;h++)if(s=t[h][0],a=t[h][1],l=(r._sortData?r:r._refreshSortData())._sortData[s],c=(o._sortData?o:o._refreshSortData())._sortData[s],u="desc"===a||!a&&e?c<l?-1:c>l?1:0:l<c?-1:l>c?1:0,u)return u;return u||(i||(i=Ci(n)),u=e?ki(i,o,r):ki(i,r,o)),u}function o(r,o){var s=e?-t(r,o):t(r,o);return s||(i||(i=Ci(n)),s=e?ki(i,o,r):ki(i,r,o)),s}return function(s,a){if(this._isDestroyed||this._items.length<2)return this;var l=this._items,c=a||{},u=c.layout?c.layout:void 0===c.layout;if(e=!!c.descending,n=l.slice(0),i=null,te(s))t=s,l.sort(o);else if(typeof s===gi)t=s.trim().split(" ").filter((function(t){return t})).map((function(t){return t.split(":")})),l.sort(r);else{if(!Array.isArray(s))throw t=e=n=i=null,new Error("Invalid comparer argument provided.");l.length=0,l.push.apply(l,s)}return this._hasListeners(y)&&this._emit(y,l.slice(0),n),u&&this.layout(u===mi,te(u)?u:void 0),t=e=n=i=null,this}}(),yi.prototype.move=function(t,e,n){if(this._isDestroyed||this._items.length<2)return this;var i,r,a=this._items,l=n||{},c=l.layout?l.layout:void 0===l.layout,u=l.action===o,h=u?o:s,d=this.getItem(t),f=this.getItem(e);return d&&f&&d!==f&&(i=a.indexOf(d),r=a.indexOf(f),u?Oe(a,i,r):Ie(a,i,r),this._hasListeners(w)&&this._emit(w,{item:d,fromIndex:i,toIndex:r,action:h}),c&&this.layout(c===mi,te(c)?c:void 0)),this},yi.prototype.send=function(t,e,n,i){if(this._isDestroyed||e._isDestroyed||this===e)return this;if(t=this.getItem(t),!t)return this;var r=i||{},o=r.appendTo||document.body,s=r.layoutSender?r.layoutSender:void 0===r.layoutSender,a=r.layoutReceiver?r.layoutReceiver:void 0===r.layoutReceiver;return t._migrate.start(e,n,o),t._migrate._isActive&&t._isActive&&(s&&this.layout(s===mi,te(s)?s:void 0),a&&e.layout(a===mi,te(a)?a:void 0)),this},yi.prototype.destroy=function(t){if(this._isDestroyed)return this;var e,n,r=this._element,o=this._items.slice(0),s=this._layout&&this._layout.styles||{};for(Si(this),e=0;e<o.length;e++)o[e]._destroy(t);for(n in this._items.length=0,un(r,this._settings.containerClass),s)r.style[n]="";return this._emit(E),this._emitter.destroy(),delete i[this._id],this._isDestroyed=!0,this},yi.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},yi.prototype._hasListeners=function(t){return!this._isDestroyed&&this._emitter.countListeners(t)>0},yi.prototype._updateBoundingRect=function(){var t=this._element,e=t.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top,this._right=e.right,this._bottom=e.bottom},yi.prototype._updateBorders=function(t,e,n,i){var r=this._element;t&&(this._borderLeft=ie(r,"border-left-width")),e&&(this._borderRight=ie(r,"border-right-width")),n&&(this._borderTop=ie(r,"border-top-width")),i&&(this._borderBottom=ie(r,"border-bottom-width"))},yi.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=ne(this._element,"box-sizing")},yi.prototype._onLayoutDataReceived=function(){var t=[];return function(e){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===e.id){var n,i,r,o,s=this,a=this._nextLayoutData.instant,h=this._nextLayoutData.onFinish,d=e.items.length,f=d;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(u)&&this._emit(u,this._layout.items.slice(0)),this._layout=e,t.length=0,o=0;o<d;o++)n=e.items[o],n?(i=e.slots[2*o],r=e.slots[2*o+1],n._canSkipLayout(i,r)?--f:(n._left=i,n._top=r,n.isActive()&&!n.isDragging()?t.push(n):--f)):--f;if(e.styles&&An(this._element,e.styles),!this._hasListeners(l)||(this._emit(l,e.items.slice(0),!0===a),this._layout.id===e.id)){var p=function(){if(!(--f>0)){var t=s._layout.id!==e.id,n=te(a)?a:h;t||(s._isLayoutFinished=!0),te(n)&&n(e.items.slice(0),t),!t&&s._hasListeners(c)&&s._emit(c,e.items.slice(0))}};if(!t.length)return p(),this;for(this._isLayoutFinished=!1,o=0;o<t.length;o++){if(this._layout.id!==e.id)break;t[o]._layout.start(!0===a,p)}return this._layout.id===e.id&&(t.length=0),this}}}}(),yi.prototype._setItemsVisibility=function(t,e,n){var i,r,o=this,s=t.slice(0),a=n||{},c=!0===a.instant,u=a.onFinish,h=a.layout?a.layout:void 0===a.layout,d=s.length,v=e?f:g,y=e?p:m,w=e?"show":"hide",b=!1,_=[],x=[];if(d){for(r=0;r<s.length;r++)i=s[r],(e&&!i._isActive||!e&&i._isActive)&&(b=!0),i._layout._skipNextAnimation=!(!e||i._isActive),e&&i._visibility._isHidden&&x.push(i),e?i._addToLayout():i._removeFromLayout();x.length&&(this.refreshItems(x,!0),x.length=0),b&&!1!==a.syncWithLayout?this.on(l,S):S(),b&&h&&this.layout(h===mi,te(h)?h:void 0)}else te(u)&&u(s);function S(){for(b&&!1!==a.syncWithLayout&&o.off(l,S),o._hasListeners(v)&&o._emit(v,s.slice(0)),r=0;r<s.length;r++)s[r]._gridId===o._id?s[r]._visibility[w](c,(function(t,e){t||_.push(e),--d<1&&(te(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))})):--d<1&&(te(u)&&u(_.slice(0)),o._hasListeners(y)&&o._emit(y,_.slice(0)))}};const $i=yi},9471:(t,e,n)=>{var i;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var n,i,s,a,l,c,u,h,d,f=1,p=t.length,g="";for(i=0;i<p;i++)if("string"===typeof t[i])g+=t[i];else if("object"===typeof t[i]){if(a=t[i],a.keys)for(n=e[f],s=0;s<a.keys.length;s++){if(void 0==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));n=n[a.keys[s]]}else n=a.param_no?e[a.param_no]:e[f++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),r.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(r.number.test(a.type)&&(h=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase();break}r.json.test(a.type)?g+=n:(!r.number.test(a.type)||h&&!a.sign?d="":(d=h?"+":"-",n=n.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(d+n).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?d+n+l:"0"===c?d+l+n:l+d+n)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];var e,n=t,i=[],o=0;while(n){if(null!==(e=r.text.exec(n)))i.push(e[0]);else if(null!==(e=r.modulo.exec(n)))i.push("%");else{if(null===(e=r.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1]);while(""!==(a=a.substring(c[0].length)))if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return l[t]=i}o,s,"undefined"!==typeof window&&(window["sprintf"]=o,window["vsprintf"]=s,i=function(){return{sprintf:o,vsprintf:s}}.call(e,n,e,t),void 0===i||(t.exports=i))}()},9037:(t,e,n)=>{var i=n(5859);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);var r=n(4825).A;r("400a75d9",i,!0,{sourceMap:!1,shadowMode:!1})},286:(t,e,n)=>{"use strict";var i=n(4578),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new r("Incorrect invocation")}},8732:t=>{"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},1617:(t,e,n)=>{"use strict";var i=n(1025),r=n(8689),o=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==r(t))throw new o("ArrayBuffer expected");return t.byteLength}},6821:(t,e,n)=>{"use strict";var i=n(6881),r=n(1617),o=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==r(t))return!1;try{return o(t,0,0),!1}catch(e){return!0}}},5677:(t,e,n)=>{"use strict";var i=n(1488),r=n(6881),o=n(1025),s=n(4579),a=n(6821),l=n(1617),c=n(8850),u=n(9059),h=i.structuredClone,d=i.ArrayBuffer,f=i.DataView,p=i.TypeError,g=Math.min,m=d.prototype,v=f.prototype,y=r(m.slice),w=o(m,"resizable","get"),b=o(m,"maxByteLength","get"),_=r(v.getInt8),x=r(v.setInt8);t.exports=(u||c)&&function(t,e,n){var i,r=l(t),o=void 0===e?r:s(e),m=!w||!w(t);if(a(t))throw new p("ArrayBuffer is detached");if(u&&(t=h(t,{transfer:[t]}),r===o&&(n||m)))return t;if(r>=o&&(!n||m))i=y(t,0,o);else{var v=n&&!m&&b?{maxByteLength:b(t)}:void 0;i=new d(o,v);for(var S=new f(t),A=new f(i),C=g(o,r),k=0;k<C;k++)x(A,k,_(S,k))}return u||c(t),i}},7223:(t,e,n)=>{"use strict";var i,r,o,s=n(8732),a=n(6893),l=n(1488),c=n(4188),u=n(831),h=n(4418),d=n(5438),f=n(3174),p=n(8088),g=n(7509),m=n(997),v=n(4578),y=n(1786),w=n(5054),b=n(4282),_=n(6209),x=n(3086),S=x.enforce,A=x.get,C=l.Int8Array,k=C&&C.prototype,$=l.Uint8ClampedArray,T=$&&$.prototype,L=C&&y(C),R=k&&y(k),E=Object.prototype,M=l.TypeError,D=b("toStringTag"),I=_("TYPED_ARRAY_TAG"),O="TypedArrayConstructor",P=s&&!!w&&"Opera"!==d(l.opera),N=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},H=function(t){if(!u(t))return!1;var e=d(t);return"DataView"===e||h(F,e)||h(W,e)},B=function(t){var e=y(t);if(u(e)){var n=A(e);return n&&h(n,O)?n[O]:B(e)}},z=function(t){if(!u(t))return!1;var e=d(t);return h(F,e)||h(W,e)},U=function(t){if(z(t))return t;throw new M("Target is not a typed array")},j=function(t){if(c(t)&&(!w||v(L,t)))return t;throw new M(f(t)+" is not a typed array constructor")},G=function(t,e,n,i){if(a){if(n)for(var r in F){var o=l[r];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(c){}}}R[t]&&!n||g(R,t,n?e:P&&k[t]||e,i)}},V=function(t,e,n){var i,r;if(a){if(w){if(n)for(i in F)if(r=l[i],r&&h(r,t))try{delete r[t]}catch(o){}if(L[t]&&!n)return;try{return g(L,t,n?e:P&&L[t]||e)}catch(o){}}for(i in F)r=l[i],!r||r[t]&&!n||g(r,t,e)}};for(i in F)r=l[i],o=r&&r.prototype,o?S(o)[O]=r:P=!1;for(i in W)r=l[i],o=r&&r.prototype,o&&(S(o)[O]=r);if((!P||!c(L)||L===Function.prototype)&&(L=function(){throw new M("Incorrect invocation")},P))for(i in F)l[i]&&w(l[i],L);if((!P||!R||R===E)&&(R=L.prototype,P))for(i in F)l[i]&&w(l[i].prototype,R);if(P&&y(T)!==R&&w(T,R),a&&!h(R,D))for(i in N=!0,m(R,D,{configurable:!0,get:function(){return u(this)?this[I]:void 0}}),F)l[i]&&p(l[i],I,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:N&&I,aTypedArray:U,aTypedArrayConstructor:j,exportTypedArrayMethod:G,exportTypedArrayStaticMethod:V,getTypedArrayConstructor:B,isView:H,isTypedArray:z,TypedArray:L,TypedArrayPrototype:R}},8633:(t,e,n)=>{"use strict";var i=n(1488),r=n(6881),o=n(6893),s=n(8732),a=n(2735),l=n(8088),c=n(997),u=n(4320),h=n(5234),d=n(286),f=n(6744),p=n(7611),g=n(4579),m=n(2420),v=n(6103),y=n(1786),w=n(5054),b=n(8150),_=n(7825),x=n(4166),S=n(8657),A=n(3754),C=n(3086),k=a.PROPER,$=a.CONFIGURABLE,T="ArrayBuffer",L="DataView",R="prototype",E="Wrong length",M="Wrong index",D=C.getterFor(T),I=C.getterFor(L),O=C.set,P=i[T],N=P,F=N&&N[R],W=i[L],H=W&&W[R],B=Object.prototype,z=i.Array,U=i.RangeError,j=r(b),G=r([].reverse),V=v.pack,Y=v.unpack,q=function(t){return[255&t]},K=function(t){return[255&t,t>>8&255]},X=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Q=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Z=function(t){return V(m(t),23,4)},J=function(t){return V(t,52,8)},tt=function(t,e,n){c(t[R],e,{configurable:!0,get:function(){return n(this)[e]}})},et=function(t,e,n,i){var r=I(t),o=g(n),s=!!i;if(o+e>r.byteLength)throw new U(M);var a=r.bytes,l=o+r.byteOffset,c=_(a,l,l+e);return s?c:G(c)},nt=function(t,e,n,i,r,o){var s=I(t),a=g(n),l=i(+r),c=!!o;if(a+e>s.byteLength)throw new U(M);for(var u=s.bytes,h=a+s.byteOffset,d=0;d<e;d++)u[h+d]=l[c?d:e-d-1]};if(s){var it=k&&P.name!==T;h((function(){P(1)}))&&h((function(){new P(-1)}))&&!h((function(){return new P,new P(1.5),new P(NaN),1!==P.length||it&&!$}))?it&&$&&l(P,"name",T):(N=function(t){return d(this,F),x(new P(g(t)),this,N)},N[R]=F,F.constructor=N,S(N,P)),w&&y(H)!==B&&w(H,B);var rt=new W(new N(2)),ot=r(H.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||u(H,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else N=function(t){d(this,F);var e=g(t);O(this,{type:T,bytes:j(z(e),0),byteLength:e}),o||(this.byteLength=e,this.detached=!1)},F=N[R],W=function(t,e,n){d(this,H),d(t,F);var i=D(t),r=i.byteLength,s=f(e);if(s<0||s>r)throw new U("Wrong offset");if(n=void 0===n?r-s:p(n),s+n>r)throw new U(E);O(this,{type:L,buffer:t,byteLength:n,byteOffset:s,bytes:i.bytes}),o||(this.buffer=t,this.byteLength=n,this.byteOffset=s)},H=W[R],o&&(tt(N,"byteLength",D),tt(W,"buffer",I),tt(W,"byteLength",I),tt(W,"byteOffset",I)),u(H,{getInt8:function(t){return et(this,1,t)[0]<<24>>24},getUint8:function(t){return et(this,1,t)[0]},getInt16:function(t){var e=et(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=et(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Q(et(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Q(et(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(et(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(et(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){nt(this,1,t,q,e)},setUint8:function(t,e){nt(this,1,t,q,e)},setInt16:function(t,e){nt(this,2,t,K,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){nt(this,2,t,K,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){nt(this,4,t,X,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){nt(this,4,t,X,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){nt(this,4,t,Z,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){nt(this,8,t,J,e,arguments.length>2&&arguments[2])}});A(N,T),A(W,L),t.exports={ArrayBuffer:N,DataView:W}},8150:(t,e,n)=>{"use strict";var i=n(3628),r=n(675),o=n(9389);t.exports=function(t){var e=i(this),n=o(e),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);while(c>a)e[a++]=t;return e}},6759:(t,e,n)=>{"use strict";var i=n(9389);t.exports=function(t,e,n){var r=0,o=arguments.length>2?n:i(e),s=new t(o);while(o>r)s[r]=e[r++];return s}},6859:(t,e,n)=>{"use strict";var i=n(5821),r=n(9944),o=n(3628),s=n(4412),a=n(8146),l=n(866),c=n(9389),u=n(4417),h=n(2350),d=n(9874),f=Array;t.exports=function(t){var e=o(t),n=l(this),p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g;m&&(g=i(g,p>2?arguments[2]:void 0));var v,y,w,b,_,x,S=d(e),A=0;if(!S||this===f&&a(S))for(v=c(e),y=n?new this(v):f(v);v>A;A++)x=m?g(e[A],A):e[A],u(y,A,x);else for(y=n?new this:[],b=h(e,S),_=b.next;!(w=r(_,b)).done;A++)x=m?s(b,g,[w.value,A],!0):w.value,u(y,A,x);return y.length=A,y}},710:(t,e,n)=>{"use strict";var i=n(5821),r=n(7568),o=n(3628),s=n(9389),a=function(t){var e=1===t;return function(n,a,l){var c,u,h=o(n),d=r(h),f=s(d),p=i(a,l);while(f-- >0)if(c=d[f],u=p(c,f,h),u)switch(t){case 0:return c;case 1:return f}return e?-1:void 0}};t.exports={findLast:a(0),findLastIndex:a(1)}},4104:(t,e,n)=>{"use strict";var i=n(5821),r=n(6881),o=n(7568),s=n(3628),a=n(9389),l=n(5022),c=r([].push),u=function(t){var e=1===t,n=2===t,r=3===t,u=4===t,h=6===t,d=7===t,f=5===t||h;return function(p,g,m,v){for(var y,w,b=s(p),_=o(b),x=a(_),S=i(g,m),A=0,C=v||l,k=e?C(p,x):n||d?C(p,0):void 0;x>A;A++)if((f||A in _)&&(y=_[A],w=S(y,A,b),t))if(e)k[A]=w;else if(w)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:c(k,y)}else switch(t){case 4:return!1;case 7:c(k,y)}return h?-1:r||u?u:k}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},7825:(t,e,n)=>{"use strict";var i=n(6881);t.exports=i([].slice)},9295:(t,e,n)=>{"use strict";var i=n(7825),r=Math.floor,o=function(t,e){var n=t.length;if(n<8){var s,a,l=1;while(l<n){a=l,s=t[l];while(a&&e(t[a-1],s)>0)t[a]=t[--a];a!==l++&&(t[a]=s)}}else{var c=r(n/2),u=o(i(t,0,c),e),h=o(i(t,c),e),d=u.length,f=h.length,p=0,g=0;while(p<d||g<f)t[p+g]=p<d&&g<f?e(u[p],h[g])<=0?u[p++]:h[g++]:p<d?u[p++]:h[g++]}return t};t.exports=o},9980:(t,e,n)=>{"use strict";var i=n(6719),r=n(866),o=n(831),s=n(4282),a=s("species"),l=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,r(e)&&(e===l||i(e.prototype))?e=void 0:o(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?l:e}},5022:(t,e,n)=>{"use strict";var i=n(9980);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},1433:(t,e,n)=>{"use strict";var i=n(9389);t.exports=function(t,e){for(var n=i(t),r=new e(n),o=0;o<n;o++)r[o]=t[n-o-1];return r}},6803:(t,e,n)=>{"use strict";var i=n(9389),r=n(6744),o=RangeError;t.exports=function(t,e,n,s){var a=i(t),l=r(n),c=l<0?a+l:l;if(c>=a||c<0)throw new o("Incorrect index");for(var u=new e(a),h=0;h<a;h++)u[h]=h===c?s:t[h];return u}},4412:(t,e,n)=>{"use strict";var i=n(3770),r=n(8500);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(s){r(t,"throw",s)}}},7283:(t,e,n)=>{"use strict";var i=n(4282),r=i("iterator"),o=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(l){return!1}var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(l){}return n}},4417:(t,e,n)=>{"use strict";var i=n(6893),r=n(4466),o=n(9123);t.exports=function(t,e,n){i?r.f(t,e,o(0,n)):t[e]=n}},997:(t,e,n)=>{"use strict";var i=n(4530),r=n(4466);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),r.f(t,e,n)}},4320:(t,e,n)=>{"use strict";var i=n(7509);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},8850:(t,e,n)=>{"use strict";var i,r,o,s,a=n(1488),l=n(9577),c=n(9059),u=a.structuredClone,h=a.ArrayBuffer,d=a.MessageChannel,f=!1;if(c)f=function(t){u(t,{transfer:[t]})};else if(h)try{d||(i=l("worker_threads"),i&&(d=i.MessageChannel)),d&&(r=new d,o=new h(2),s=function(t){r.port1.postMessage(null,[t])},2===o.byteLength&&(s(o),0===o.byteLength&&(f=s)))}catch(p){}t.exports=f},8807:(t,e,n)=>{"use strict";var i=n(4109),r=i.match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},7267:(t,e,n)=>{"use strict";var i=n(7499),r=n(7359);t.exports=!i&&!r&&"object"==typeof window&&"object"==typeof document},7499:t=>{"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},5661:(t,e,n)=>{"use strict";var i=n(4109);t.exports=/MSIE|Trident/.test(i)},3589:(t,e,n)=>{"use strict";var i=n(4109),r=i.match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},5821:(t,e,n)=>{"use strict";var i=n(5691),r=n(4977),o=n(9055),s=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},5691:(t,e,n)=>{"use strict";var i=n(8689),r=n(6881);t.exports=function(t){if("Function"===i(t))return r(t)}},9874:(t,e,n)=>{"use strict";var i=n(5438),r=n(2913),o=n(4318),s=n(9164),a=n(4282),l=a("iterator");t.exports=function(t){if(!o(t))return r(t,l)||r(t,"@@iterator")||s[i(t)]}},2350:(t,e,n)=>{"use strict";var i=n(9944),r=n(4977),o=n(3770),s=n(3174),a=n(9874),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(r(n))return o(i(n,t));throw new l(s(t)+" is not iterable")}},6103:t=>{"use strict";var e=Array,n=Math.abs,i=Math.pow,r=Math.floor,o=Math.log,s=Math.LN2,a=function(t,a,l){var c,u,h,d=e(l),f=8*l-a-1,p=(1<<f)-1,g=p>>1,m=23===a?i(2,-24)-i(2,-77):0,v=t<0||0===t&&1/t<0?1:0,y=0;t=n(t),t!==t||t===1/0?(u=t!==t?1:0,c=p):(c=r(o(t)/s),h=i(2,-c),t*h<1&&(c--,h*=2),t+=c+g>=1?m/h:m*i(2,1-g),t*h>=2&&(c++,h/=2),c+g>=p?(u=0,c=p):c+g>=1?(u=(t*h-1)*i(2,a),c+=g):(u=t*i(2,g-1)*i(2,a),c=0));while(a>=8)d[y++]=255&u,u/=256,a-=8;c=c<<a|u,f+=a;while(f>0)d[y++]=255&c,c/=256,f-=8;return d[--y]|=128*v,d},l=function(t,e){var n,r=t.length,o=8*r-e-1,s=(1<<o)-1,a=s>>1,l=o-7,c=r-1,u=t[c--],h=127&u;u>>=7;while(l>0)h=256*h+t[c--],l-=8;n=h&(1<<-l)-1,h>>=-l,l+=e;while(l>0)n=256*n+t[c--],l-=8;if(0===h)h=1-a;else{if(h===s)return n?NaN:u?-1/0:1/0;n+=i(2,e),h-=a}return(u?-1:1)*n*i(2,h-e)};t.exports={pack:a,unpack:l}},8146:(t,e,n)=>{"use strict";var i=n(4282),r=n(9164),o=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},5448:(t,e,n)=>{"use strict";var i=n(5438);t.exports=function(t){var e=i(t);return"BigInt64Array"===e||"BigUint64Array"===e}},4752:(t,e,n)=>{"use strict";var i=n(831),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},473:(t,e,n)=>{"use strict";var i=n(831),r=n(8689),o=n(4282),s=o("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[s])?!!e:"RegExp"===r(t))}},8500:(t,e,n)=>{"use strict";var i=n(9944),r=n(3770),o=n(2913);t.exports=function(t,e,n){var s,a;r(t);try{if(s=o(t,"return"),!s){if("throw"===e)throw n;return n}s=i(s,t)}catch(l){a=!0,s=l}if("throw"===e)throw n;if(a)throw s;return r(s),n}},2871:(t,e,n)=>{"use strict";var i=n(579),r=Math.abs,o=2220446049250313e-31,s=1/o,a=function(t){return t+s-s};t.exports=function(t,e,n,s){var l=+t,c=r(l),u=i(l);if(c<s)return u*a(c/s/e)*s*e;var h=(1+e/o)*c,d=h-(h-c);return d>n||d!==d?u*(1/0):u*d}},2420:(t,e,n)=>{"use strict";var i=n(2871),r=1.1920928955078125e-7,o=34028234663852886e22,s=11754943508222875e-54;t.exports=Math.fround||function(t){return i(t,r,o,s)}},579:t=>{"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!==e?e:e<0?-1:1}},9456:(t,e,n)=>{"use strict";var i=n(6893),r=n(6881),o=n(9944),s=n(5234),a=n(7137),l=n(156),c=n(4416),u=n(3628),h=n(7568),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||s((function(){if(i&&1!==d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==d({},t)[n]||a(d({},e)).join("")!==r}))?function(t,e){var n=u(t),r=arguments.length,s=1,d=l.f,f=c.f;while(r>s){var g,m=h(arguments[s++]),v=d?p(a(m),d(m)):a(m),y=v.length,w=0;while(y>w)g=v[w++],i&&!o(f,m,g)||(n[g]=m[g])}return n}:d},3113:(t,e,n)=>{"use strict";var i=n(9944),r=n(4418),o=n(4578),s=n(4932),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||r(t,"flags")||!o(a,t)?e:i(s,t)}},5268:(t,e,n)=>{"use strict";var i=n(1488),r=n(6893),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!r)return i[t];var e=o(i,t);return e&&e.value}},3900:(t,e,n)=>{"use strict";var i=n(5604),r=n(997),o=n(4282),s=n(6893),a=o("species");t.exports=function(t){var e=i(t);s&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},6294:(t,e,n)=>{"use strict";var i=n(6881),r=2147483647,o=36,s=1,a=26,l=38,c=700,u=72,h=128,d="-",f=/[^\0-\u007E]/,p=/[.\u3002\uFF0E\uFF61]/g,g="Overflow: input needs wider integers to process",m=o-s,v=RangeError,y=i(p.exec),w=Math.floor,b=String.fromCharCode,_=i("".charCodeAt),x=i([].join),S=i([].push),A=i("".replace),C=i("".split),k=i("".toLowerCase),$=function(t){var e=[],n=0,i=t.length;while(n<i){var r=_(t,n++);if(r>=55296&&r<=56319&&n<i){var o=_(t,n++);56320===(64512&o)?S(e,((1023&r)<<10)+(1023&o)+65536):(S(e,r),n--)}else S(e,r)}return e},T=function(t){return t+22+75*(t<26)},L=function(t,e,n){var i=0;t=n?w(t/c):t>>1,t+=w(t/e);while(t>m*a>>1)t=w(t/m),i+=o;return w(i+(m+1)*t/(t+l))},R=function(t){var e=[];t=$(t);var n,i,l=t.length,c=h,f=0,p=u;for(n=0;n<t.length;n++)i=t[n],i<128&&S(e,b(i));var m=e.length,y=m;m&&S(e,d);while(y<l){var _=r;for(n=0;n<t.length;n++)i=t[n],i>=c&&i<_&&(_=i);var A=y+1;if(_-c>w((r-f)/A))throw new v(g);for(f+=(_-c)*A,c=_,n=0;n<t.length;n++){if(i=t[n],i<c&&++f>r)throw new v(g);if(i===c){var C=f,k=o;while(1){var R=k<=p?s:k>=p+a?a:k-p;if(C<R)break;var E=C-R,M=o-R;S(e,b(T(R+E%M))),C=w(E/M),k+=o}S(e,b(T(C))),p=L(f,A,y===m),f=0,y++}}f++,c++}return x(e,"")};t.exports=function(t){var e,n,i=[],r=C(A(k(t),p,"."),".");for(e=0;e<r.length;e++)n=r[e],S(i,y(f,n)?"xn--"+R(n):n);return x(i,".")}},9059:(t,e,n)=>{"use strict";var i=n(1488),r=n(5234),o=n(3749),s=n(7267),a=n(7499),l=n(7359),c=i.structuredClone;t.exports=!!c&&!r((function(){if(a&&o>92||l&&o>94||s&&o>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},7429:(t,e,n)=>{"use strict";var i=n(290),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw new r("Can't convert number to bigint");return BigInt(e)}},4579:(t,e,n)=>{"use strict";var i=n(6744),r=n(7611),o=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw new o("Wrong length or index");return n}},7584:(t,e,n)=>{"use strict";var i=n(939),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw new r("Wrong offset");return n}},939:(t,e,n)=>{"use strict";var i=n(6744),r=RangeError;t.exports=function(t){var e=i(t);if(e<0)throw new r("The argument can't be less than 0");return e}},4108:t=>{"use strict";var e=Math.round;t.exports=function(t){var n=e(t);return n<0?0:n>255?255:255&n}},9577:(t,e,n)=>{"use strict";var i=n(7359);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(e){}}},3978:(t,e,n)=>{"use strict";var i=n(5613),r=n(1488),o=n(9944),s=n(6893),a=n(5772),l=n(7223),c=n(8633),u=n(286),h=n(9123),d=n(8088),f=n(4752),p=n(7611),g=n(4579),m=n(7584),v=n(4108),y=n(2344),w=n(4418),b=n(5438),_=n(831),x=n(6032),S=n(7065),A=n(4578),C=n(5054),k=n(5629).f,$=n(3292),T=n(4104).forEach,L=n(3900),R=n(997),E=n(4466),M=n(9304),D=n(6759),I=n(3086),O=n(4166),P=I.get,N=I.set,F=I.enforce,W=E.f,H=M.f,B=r.RangeError,z=c.ArrayBuffer,U=z.prototype,j=c.DataView,G=l.NATIVE_ARRAY_BUFFER_VIEWS,V=l.TYPED_ARRAY_TAG,Y=l.TypedArray,q=l.TypedArrayPrototype,K=l.isTypedArray,X="BYTES_PER_ELEMENT",Q="Wrong length",Z=function(t,e){R(t,e,{configurable:!0,get:function(){return P(this)[e]}})},J=function(t){var e;return A(U,t)||"ArrayBuffer"===(e=b(t))||"SharedArrayBuffer"===e},tt=function(t,e){return K(t)&&!x(e)&&e in t&&f(+e)&&e>=0},et=function(t,e){return e=y(e),tt(t,e)?h(2,t[e]):H(t,e)},nt=function(t,e,n){return e=y(e),!(tt(t,e)&&_(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};s?(G||(M.f=et,E.f=nt,Z(q,"buffer"),Z(q,"byteOffset"),Z(q,"byteLength"),Z(q,"length")),i({target:"Object",stat:!0,forced:!G},{getOwnPropertyDescriptor:et,defineProperty:nt}),t.exports=function(t,e,n){var s=t.match(/\d+/)[0]/8,l=t+(n?"Clamped":"")+"Array",c="get"+t,h="set"+t,f=r[l],y=f,w=y&&y.prototype,b={},x=function(t,e){var n=P(t);return n.view[c](e*s+n.byteOffset,!0)},A=function(t,e,i){var r=P(t);r.view[h](e*s+r.byteOffset,n?v(i):i,!0)},R=function(t,e){W(t,e,{get:function(){return x(this,e)},set:function(t){return A(this,e,t)},enumerable:!0})};G?a&&(y=e((function(t,e,n,i){return u(t,w),O(function(){return _(e)?J(e)?void 0!==i?new f(e,m(n,s),i):void 0!==n?new f(e,m(n,s)):new f(e):K(e)?D(y,e):o($,y,e):new f(g(e))}(),t,y)})),C&&C(y,Y),T(k(f),(function(t){t in y||d(y,t,f[t])})),y.prototype=w):(y=e((function(t,e,n,i){u(t,w);var r,a,l,c=0,h=0;if(_(e)){if(!J(e))return K(e)?D(y,e):o($,y,e);r=e,h=m(n,s);var d=e.byteLength;if(void 0===i){if(d%s)throw new B(Q);if(a=d-h,a<0)throw new B(Q)}else if(a=p(i)*s,a+h>d)throw new B(Q);l=a/s}else l=g(e),a=l*s,r=new z(a);N(t,{buffer:r,byteOffset:h,byteLength:a,length:l,view:new j(r)});while(c<l)R(t,c++)})),C&&C(y,Y),w=y.prototype=S(q)),w.constructor!==y&&d(w,"constructor",y),F(w).TypedArrayConstructor=y,V&&d(w,V,l);var E=y!==f;b[l]=y,i({global:!0,constructor:!0,forced:E,sham:!G},b),X in y||d(y,X,s),X in w||d(w,X,s),L(l)}):t.exports=function(){}},5772:(t,e,n)=>{"use strict";var i=n(1488),r=n(5234),o=n(7283),s=n(7223).NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,l=i.Int8Array;t.exports=!s||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||r((function(){return 1!==new l(new a(2),1,void 0).length}))},3292:(t,e,n)=>{"use strict";var i=n(5821),r=n(9944),o=n(1361),s=n(3628),a=n(9389),l=n(2350),c=n(9874),u=n(8146),h=n(5448),d=n(7223).aTypedArrayConstructor,f=n(7429);t.exports=function(t){var e,n,p,g,m,v,y,w,b=o(this),_=s(t),x=arguments.length,S=x>1?arguments[1]:void 0,A=void 0!==S,C=c(_);if(C&&!u(C)){y=l(_,C),w=y.next,_=[];while(!(v=r(w,y)).done)_.push(v.value)}for(A&&x>2&&(S=i(S,arguments[2])),n=a(_),p=new(d(b))(n),g=h(p),e=0;n>e;e++)m=A?S(_[e],e):_[e],p[e]=g?f(m):+m;return p}},6301:(t,e,n)=>{"use strict";var i=n(5234),r=n(4282),o=n(6893),s=n(1942),a=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e["delete"]("b"),i+=n+t})),n["delete"]("a",2),n["delete"]("b",void 0),s&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(s||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},9445:t=>{"use strict";var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},2482:(t,e,n)=>{"use strict";var i=n(6893),r=n(997),o=n(6821),s=ArrayBuffer.prototype;i&&!("detached"in s)&&r(s,"detached",{configurable:!0,get:function(){return o(this)}})},4147:(t,e,n)=>{"use strict";var i=n(5613),r=n(5677);r&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},7067:(t,e,n)=>{"use strict";var i=n(5613),r=n(5677);r&&i({target:"ArrayBuffer",proto:!0},{transfer:function(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},7146:(t,e,n)=>{"use strict";var i=n(1488),r=n(6893),o=n(997),s=n(4932),a=n(5234),l=i.RegExp,c=l.prototype,u=r&&a((function(){var t=!0;try{l(".","d")}catch(u){t=!1}var e={},n="",i=t?"dgimsy":"gimsy",r=function(t,i){Object.defineProperty(e,t,{get:function(){return n+=i,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(o.hasIndices="d"),o)r(s,o[s]);var a=Object.getOwnPropertyDescriptor(c,"flags").get.call(e);return a!==i||n!==i}));u&&o(c,"flags",{configurable:!0,get:s})},1011:(t,e,n)=>{"use strict";var i=n(4212).charAt,r=n(2618),o=n(3086),s=n(3217),a=n(6224),l="String Iterator",c=o.set,u=o.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:r(t),index:0})}),(function(){var t,e=u(this),n=e.string,r=e.index;return r>=n.length?a(void 0,!0):(t=i(n,r),e.index+=t.length,a(t,!1))}))},8715:(t,e,n)=>{"use strict";var i=n(5613),r=n(9944),o=n(6881),s=n(9509),a=n(4188),l=n(4318),c=n(473),u=n(2618),h=n(2913),d=n(3113),f=n(1113),p=n(4282),g=n(1942),m=p("replace"),v=TypeError,y=o("".indexOf),w=o("".replace),b=o("".slice),_=Math.max;i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,o,p,x,S,A,C,k,$=s(this),T=0,L=0,R="";if(!l(t)){if(n=c(t),n&&(i=u(s(d(t))),!~y(i,"g")))throw new v("`.replaceAll` does not allow non-global regexes");if(o=h(t,m),o)return r(o,t,$,e);if(g&&n)return w(u($),t,e)}p=u($),x=u(t),S=a(e),S||(e=u(e)),A=x.length,C=_(1,A),T=y(p,x);while(-1!==T)k=S?u(e(x,T,p)):f(x,p,T,[],void 0,e),R+=b(p,L,T)+k,L=T+A,T=T+C>p.length?-1:y(p,x,T+C);return L<p.length&&(R+=b(p,L)),R}})},785:(t,e,n)=>{"use strict";var i=n(7223),r=n(9389),o=n(6744),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("at",(function(t){var e=s(this),n=r(e),i=o(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:e[a]}))},8357:(t,e,n)=>{"use strict";var i=n(7223),r=n(8150),o=n(7429),s=n(5438),a=n(9944),l=n(6881),c=n(5234),u=i.aTypedArray,h=i.exportTypedArrayMethod,d=l("".slice),f=c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));h("fill",(function(t){var e=arguments.length;u(this);var n="Big"===d(s(this),0,3)?o(t):+t;return a(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),f)},821:(t,e,n)=>{"use strict";var i=n(7223),r=n(710).findLastIndex,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLastIndex",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6196:(t,e,n)=>{"use strict";var i=n(7223),r=n(710).findLast,o=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLast",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0)}))},6554:(t,e,n)=>{"use strict";var i=n(1488),r=n(9944),o=n(7223),s=n(9389),a=n(7584),l=n(3628),c=n(5234),u=i.RangeError,h=i.Int8Array,d=h&&h.prototype,f=d&&d.set,p=o.aTypedArray,g=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(f,t,{length:1,0:3},1),3!==t[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(f,this,n,e);var i=this.length,o=s(n),c=0;if(o+e>i)throw new u("Wrong length");while(c<o)this[e+c]=n[c++]}),!m||v)},8472:(t,e,n)=>{"use strict";var i=n(1488),r=n(5691),o=n(5234),s=n(4977),a=n(9295),l=n(7223),c=n(8807),u=n(5661),h=n(3749),d=n(3589),f=l.aTypedArray,p=l.exportTypedArrayMethod,g=i.Uint16Array,m=g&&r(g.prototype.sort),v=!!m&&!(o((function(){m(new g(2),null)}))&&o((function(){m(new g(2),{})}))),y=!!m&&!o((function(){if(h)return h<74;if(c)return c<67;if(u)return!0;if(d)return d<602;var t,e,n=new g(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(m(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0})),w=function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!==n?-1:e!==e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}};p("sort",(function(t){return void 0!==t&&s(t),y?m(this,t):a(f(this),w(t))}),!y||v)},7404:(t,e,n)=>{"use strict";var i=n(1433),r=n(7223),o=r.aTypedArray,s=r.exportTypedArrayMethod,a=r.getTypedArrayConstructor;s("toReversed",(function(){return i(o(this),a(this))}))},5803:(t,e,n)=>{"use strict";var i=n(7223),r=n(6881),o=n(4977),s=n(6759),a=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,u=r(i.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&o(t);var e=a(this),n=s(l(e),e);return u(n,t)}))},2682:(t,e,n)=>{"use strict";var i=n(3978);i("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},3912:(t,e,n)=>{"use strict";var i=n(6803),r=n(7223),o=n(5448),s=n(6744),a=n(7429),l=r.aTypedArray,c=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var n=l(this),r=s(t),u=o(n)?a(e):+e;return i(n,c(n),r,u)}}["with"],!h)},1615:(t,e,n)=>{"use strict";n(3873);var i=n(5613),r=n(1488),o=n(5268),s=n(9944),a=n(6881),l=n(6893),c=n(6301),u=n(7509),h=n(997),d=n(4320),f=n(3754),p=n(9383),g=n(3086),m=n(286),v=n(4188),y=n(4418),w=n(5821),b=n(5438),_=n(3770),x=n(831),S=n(2618),A=n(7065),C=n(9123),k=n(2350),$=n(9874),T=n(6224),L=n(9445),R=n(4282),E=n(9295),M=R("iterator"),D="URLSearchParams",I=D+"Iterator",O=g.set,P=g.getterFor(D),N=g.getterFor(I),F=o("fetch"),W=o("Request"),H=o("Headers"),B=W&&W.prototype,z=H&&H.prototype,U=r.RegExp,j=r.TypeError,G=r.decodeURIComponent,V=r.encodeURIComponent,Y=a("".charAt),q=a([].join),K=a([].push),X=a("".replace),Q=a([].shift),Z=a([].splice),J=a("".split),tt=a("".slice),et=/\+/g,nt=Array(4),it=function(t){return nt[t-1]||(nt[t-1]=U("((?:%[\\da-f]{2}){"+t+"})","gi"))},rt=function(t){try{return G(t)}catch(e){return t}},ot=function(t){var e=X(t,et," "),n=4;try{return G(e)}catch(i){while(n)e=X(e,it(n--),rt);return e}},st=/[!'()~]|%20/g,at={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lt=function(t){return at[t]},ct=function(t){return X(V(t),st,lt)},ut=p((function(t,e){O(this,{type:I,target:P(t).entries,index:0,kind:e})}),D,(function(){var t=N(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,T(void 0,!0);var i=e[n];switch(t.kind){case"keys":return T(i.key,!1);case"values":return T(i.value,!1)}return T([i.key,i.value],!1)}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Y(t,0)?tt(t,1):t:S(t)))};ht.prototype={type:D,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,o,a,l,c=this.entries,u=$(t);if(u){e=k(t,u),n=e.next;while(!(i=s(n,e)).done){if(r=k(_(i.value)),o=r.next,(a=s(o,r)).done||(l=s(o,r)).done||!s(o,r).done)throw new j("Expected sequence with length 2");K(c,{key:S(a.value),value:S(l.value)})}}else for(var h in t)y(t,h)&&K(c,{key:h,value:S(t[h])})},parseQuery:function(t){if(t){var e,n,i=this.entries,r=J(t,"&"),o=0;while(o<r.length)e=r[o++],e.length&&(n=J(e,"="),K(i,{key:ot(Q(n)),value:ot(q(n,"="))}))}},serialize:function(){var t,e=this.entries,n=[],i=0;while(i<e.length)t=e[i++],K(n,ct(t.key)+"="+ct(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dt=function(){m(this,ft);var t=arguments.length>0?arguments[0]:void 0,e=O(this,new ht(t));l||(this.size=e.entries.length)},ft=dt.prototype;if(d(ft,{append:function(t,e){var n=P(this);L(arguments.length,2),K(n.entries,{key:S(t),value:S(e)}),l||this.length++,n.updateURL()},delete:function(t){var e=P(this),n=L(arguments.length,1),i=e.entries,r=S(t),o=n<2?void 0:arguments[1],s=void 0===o?o:S(o),a=0;while(a<i.length){var c=i[a];if(c.key!==r||void 0!==s&&c.value!==s)a++;else if(Z(i,a,1),void 0!==s)break}l||(this.size=i.length),e.updateURL()},get:function(t){var e=P(this).entries;L(arguments.length,1);for(var n=S(t),i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){var e=P(this).entries;L(arguments.length,1);for(var n=S(t),i=[],r=0;r<e.length;r++)e[r].key===n&&K(i,e[r].value);return i},has:function(t){var e=P(this).entries,n=L(arguments.length,1),i=S(t),r=n<2?void 0:arguments[1],o=void 0===r?r:S(r),s=0;while(s<e.length){var a=e[s++];if(a.key===i&&(void 0===o||a.value===o))return!0}return!1},set:function(t,e){var n=P(this);L(arguments.length,1);for(var i,r=n.entries,o=!1,s=S(t),a=S(e),c=0;c<r.length;c++)i=r[c],i.key===s&&(o?Z(r,c--,1):(o=!0,i.value=a));o||K(r,{key:s,value:a}),l||(this.size=r.length),n.updateURL()},sort:function(){var t=P(this);E(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){var e,n=P(this).entries,i=w(t,arguments.length>1?arguments[1]:void 0),r=0;while(r<n.length)e=n[r++],i(e.value,e.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),u(ft,M,ft.entries,{name:"entries"}),u(ft,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),l&&h(ft,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),f(dt,D),i({global:!0,constructor:!0,forced:!c},{URLSearchParams:dt}),!c&&v(H)){var pt=a(z.has),gt=a(z.set),mt=function(t){if(x(t)){var e,n=t.body;if(b(n)===D)return e=t.headers?new H(t.headers):new H,pt(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A(t,{body:C(0,S(n)),headers:C(0,e)})}return t};if(v(F)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?mt(arguments[1]):{})}}),v(W)){var vt=function(t){return m(this,B),new W(t,arguments.length>1?mt(arguments[1]):{})};B.constructor=vt,vt.prototype=B,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vt})}}t.exports={URLSearchParams:dt,getState:P}},1412:(t,e,n)=>{"use strict";var i=n(7509),r=n(6881),o=n(2618),s=n(9445),a=URLSearchParams,l=a.prototype,c=r(l.append),u=r(l["delete"]),h=r(l.forEach),d=r([].push),f=new a("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&i(l,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=[];h(this,(function(t,e){d(i,{key:e,value:t})})),s(e,1);var r,a=o(t),l=o(n),f=0,p=0,g=!1,m=i.length;while(f<m)r=i[f++],g||r.key===a?(g=!0,u(this,r.key)):p++;while(p<m)r=i[p++],r.key===a&&r.value===l||c(this,r.key,r.value)}),{enumerable:!0,unsafe:!0})},1883:(t,e,n)=>{"use strict";var i=n(7509),r=n(6881),o=n(2618),s=n(9445),a=URLSearchParams,l=a.prototype,c=r(l.getAll),u=r(l.has),h=new a("a=1");!h.has("a",2)&&h.has("a",void 0)||i(l,"has",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return u(this,t);var i=c(this,t);s(e,1);var r=o(n),a=0;while(a<i.length)if(i[a++]===r)return!0;return!1}),{enumerable:!0,unsafe:!0})},4397:(t,e,n)=>{"use strict";n(1615)},7905:(t,e,n)=>{"use strict";var i=n(6893),r=n(6881),o=n(997),s=URLSearchParams.prototype,a=r(s.forEach);i&&!("size"in s)&&o(s,"size",{get:function(){var t=0;return a(this,(function(){t++})),t},configurable:!0,enumerable:!0})},495:(t,e,n)=>{"use strict";n(1011);var i,r=n(5613),o=n(6893),s=n(6301),a=n(1488),l=n(5821),c=n(6881),u=n(7509),h=n(997),d=n(286),f=n(4418),p=n(9456),g=n(6859),m=n(7825),v=n(4212).codeAt,y=n(6294),w=n(2618),b=n(3754),_=n(9445),x=n(1615),S=n(3086),A=S.set,C=S.getterFor("URL"),k=x.URLSearchParams,$=x.getState,T=a.URL,L=a.TypeError,R=a.parseInt,E=Math.floor,M=Math.pow,D=c("".charAt),I=c(/./.exec),O=c([].join),P=c(1..toString),N=c([].pop),F=c([].push),W=c("".replace),H=c([].shift),B=c("".split),z=c("".slice),U=c("".toLowerCase),j=c([].unshift),G="Invalid authority",V="Invalid scheme",Y="Invalid host",q="Invalid port",K=/[a-z]/i,X=/[\d+-.a-z]/i,Q=/\d/,Z=/^0x/i,J=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,nt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,rt=/^[\u0000-\u0020]+/,ot=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,st=/[\t\n\r]/g,at=function(t){var e,n,i,r,o,s,a,l=B(t,".");if(l.length&&""===l[l.length-1]&&l.length--,e=l.length,e>4)return t;for(n=[],i=0;i<e;i++){if(r=l[i],""===r)return t;if(o=10,r.length>1&&"0"===D(r,0)&&(o=I(Z,r)?16:8,r=z(r,8===o?1:2)),""===r)s=0;else{if(!I(10===o?tt:8===o?J:et,r))return t;s=R(r,o)}F(n,s)}for(i=0;i<e;i++)if(s=n[i],i===e-1){if(s>=M(256,5-e))return null}else if(s>255)return null;for(a=N(n),i=0;i<n.length;i++)a+=n[i]*M(256,3-i);return a},lt=function(t){var e,n,i,r,o,s,a,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,d=function(){return D(t,h)};if(":"===d()){if(":"!==D(t,1))return;h+=2,c++,u=c}while(d()){if(8===c)return;if(":"!==d()){e=n=0;while(n<4&&I(et,d()))e=16*e+R(d(),16),h++,n++;if("."===d()){if(0===n)return;if(h-=n,c>6)return;i=0;while(d()){if(r=null,i>0){if(!("."===d()&&i<4))return;h++}if(!I(Q,d()))return;while(I(Q,d())){if(o=R(d(),10),null===r)r=o;else{if(0===r)return;r=10*r+o}if(r>255)return;h++}l[c]=256*l[c]+r,i++,2!==i&&4!==i||c++}if(4!==i)return;break}if(":"===d()){if(h++,!d())return}else if(d())return;l[c++]=e}else{if(null!==u)return;h++,c++,u=c}}if(null!==u){s=c-u,c=7;while(0!==c&&s>0)a=l[c],l[c--]=l[u+s-1],l[u+--s]=a}else if(8!==c)return;return l},ct=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n&&(e=i,n=r),e},ut=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)j(e,t%256),t=E(t/256);return O(e,".")}if("object"==typeof t){for(e="",i=ct(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=P(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ht={},dt=p({},ht,{" ":1,'"':1,"<":1,">":1,"`":1}),ft=p({},dt,{"#":1,"?":1,"{":1,"}":1}),pt=p({},ft,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gt=function(t,e){var n=v(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},mt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vt=function(t,e){var n;return 2===t.length&&I(K,D(t,0))&&(":"===(n=D(t,1))||!e&&"|"===n)},yt=function(t){var e;return t.length>1&&vt(z(t,0,2))&&(2===t.length||"/"===(e=D(t,2))||"\\"===e||"?"===e||"#"===e)},wt=function(t){return"."===t||"%2e"===U(t)},bt=function(t){return t=U(t),".."===t||"%2e."===t||".%2e"===t||"%2e%2e"===t},_t={},xt={},St={},At={},Ct={},kt={},$t={},Tt={},Lt={},Rt={},Et={},Mt={},Dt={},It={},Ot={},Pt={},Nt={},Ft={},Wt={},Ht={},Bt={},zt=function(t,e,n){var i,r,o,s=w(t);if(e){if(r=this.parse(s),r)throw new L(r);this.searchParams=null}else{if(void 0!==n&&(i=new zt(n,!0)),r=this.parse(s,null,i),r)throw new L(r);o=$(new k),o.bindURL(this),this.searchParams=o}};zt.prototype={type:"URL",parse:function(t,e,n){var r,o,s,a,l=this,c=e||_t,u=0,h="",d=!1,p=!1,v=!1;t=w(t),e||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=W(t,rt,""),t=W(t,ot,"$1")),t=W(t,st,""),r=g(t);while(u<=r.length){switch(o=r[u],c){case _t:if(!o||!I(K,o)){if(e)return V;c=St;continue}h+=U(o),c=xt;break;case xt:if(o&&(I(X,o)||"+"===o||"-"===o||"."===o))h+=U(o);else{if(":"!==o){if(e)return V;h="",c=St,u=0;continue}if(e&&(l.isSpecial()!==f(mt,h)||"file"===h&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=h,e)return void(l.isSpecial()&&mt[l.scheme]===l.port&&(l.port=null));h="","file"===l.scheme?c=It:l.isSpecial()&&n&&n.scheme===l.scheme?c=At:l.isSpecial()?c=Tt:"/"===r[u+1]?(c=Ct,u++):(l.cannotBeABaseURL=!0,F(l.path,""),c=Wt)}break;case St:if(!n||n.cannotBeABaseURL&&"#"!==o)return V;if(n.cannotBeABaseURL&&"#"===o){l.scheme=n.scheme,l.path=m(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,c=Bt;break}c="file"===n.scheme?It:kt;continue;case At:if("/"!==o||"/"!==r[u+1]){c=kt;continue}c=Lt,u++;break;case Ct:if("/"===o){c=Rt;break}c=Ft;continue;case kt:if(l.scheme=n.scheme,o===i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query;else if("/"===o||"\\"===o&&l.isSpecial())c=$t;else if("?"===o)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query="",c=Ht;else{if("#"!==o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.path.length--,c=Ft;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=m(n.path),l.query=n.query,l.fragment="",c=Bt}break;case $t:if(!l.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,c=Ft;continue}c=Rt}else c=Lt;break;case Tt:if(c=Lt,"/"!==o||"/"!==D(h,u+1))continue;u++;break;case Lt:if("/"!==o&&"\\"!==o){c=Rt;continue}break;case Rt:if("@"===o){d&&(h="%40"+h),d=!0,s=g(h);for(var y=0;y<s.length;y++){var b=s[y];if(":"!==b||v){var _=gt(b,pt);v?l.password+=_:l.username+=_}else v=!0}h=""}else if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()){if(d&&""===h)return G;u-=g(h).length+1,h="",c=Et}else h+=o;break;case Et:case Mt:if(e&&"file"===l.scheme){c=Pt;continue}if(":"!==o||p){if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()){if(l.isSpecial()&&""===h)return Y;if(e&&""===h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h),a)return a;if(h="",c=Nt,e)return;continue}"["===o?p=!0:"]"===o&&(p=!1),h+=o}else{if(""===h)return Y;if(a=l.parseHost(h),a)return a;if(h="",c=Dt,e===Mt)return}break;case Dt:if(!I(Q,o)){if(o===i||"/"===o||"?"===o||"#"===o||"\\"===o&&l.isSpecial()||e){if(""!==h){var x=R(h,10);if(x>65535)return q;l.port=l.isSpecial()&&x===mt[l.scheme]?null:x,h=""}if(e)return;c=Nt;continue}return q}h+=o;break;case It:if(l.scheme="file","/"===o||"\\"===o)c=Ot;else{if(!n||"file"!==n.scheme){c=Ft;continue}switch(o){case i:l.host=n.host,l.path=m(n.path),l.query=n.query;break;case"?":l.host=n.host,l.path=m(n.path),l.query="",c=Ht;break;case"#":l.host=n.host,l.path=m(n.path),l.query=n.query,l.fragment="",c=Bt;break;default:yt(O(m(r,u),""))||(l.host=n.host,l.path=m(n.path),l.shortenPath()),c=Ft;continue}}break;case Ot:if("/"===o||"\\"===o){c=Pt;break}n&&"file"===n.scheme&&!yt(O(m(r,u),""))&&(vt(n.path[0],!0)?F(l.path,n.path[0]):l.host=n.host),c=Ft;continue;case Pt:if(o===i||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&vt(h))c=Ft;else if(""===h){if(l.host="",e)return;c=Nt}else{if(a=l.parseHost(h),a)return a;if("localhost"===l.host&&(l.host=""),e)return;h="",c=Nt}continue}h+=o;break;case Nt:if(l.isSpecial()){if(c=Ft,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==i&&(c=Ft,"/"!==o))continue}else l.fragment="",c=Bt;else l.query="",c=Ht;break;case Ft:if(o===i||"/"===o||"\\"===o&&l.isSpecial()||!e&&("?"===o||"#"===o)){if(bt(h)?(l.shortenPath(),"/"===o||"\\"===o&&l.isSpecial()||F(l.path,"")):wt(h)?"/"===o||"\\"===o&&l.isSpecial()||F(l.path,""):("file"===l.scheme&&!l.path.length&&vt(h)&&(l.host&&(l.host=""),h=D(h,0)+":"),F(l.path,h)),h="","file"===l.scheme&&(o===i||"?"===o||"#"===o))while(l.path.length>1&&""===l.path[0])H(l.path);"?"===o?(l.query="",c=Ht):"#"===o&&(l.fragment="",c=Bt)}else h+=gt(o,ft);break;case Wt:"?"===o?(l.query="",c=Ht):"#"===o?(l.fragment="",c=Bt):o!==i&&(l.path[0]+=gt(o,ht));break;case Ht:e||"#"!==o?o!==i&&("'"===o&&l.isSpecial()?l.query+="%27":l.query+="#"===o?"%23":gt(o,ht)):(l.fragment="",c=Bt);break;case Bt:o!==i&&(l.fragment+=gt(o,dt));break}u++}},parseHost:function(t){var e,n,i;if("["===D(t,0)){if("]"!==D(t,t.length-1))return Y;if(e=lt(z(t,1,-1)),!e)return Y;this.host=e}else if(this.isSpecial()){if(t=y(t),I(nt,t))return Y;if(e=at(t),null===e)return Y;this.host=e}else{if(I(it,t))return Y;for(e="",n=g(t),i=0;i<n.length;i++)e+=gt(n[i],ht);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return f(mt,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&vt(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,i=t.password,r=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,c=e+":";return null!==r?(c+="//",t.includesCredentials()&&(c+=n+(i?":"+i:"")+"@"),c+=ut(r),null!==o&&(c+=":"+o)):"file"===e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+O(s,"/"):"",null!==a&&(c+="?"+a),null!==l&&(c+="#"+l),c},setHref:function(t){var e=this.parse(t);if(e)throw new L(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new Ut(t.path[0]).origin}catch(n){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+ut(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(w(t)+":",_t)},getUsername:function(){return this.username},setUsername:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=gt(e[n],pt)}},getPassword:function(){return this.password},setPassword:function(t){var e=g(w(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=gt(e[n],pt)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ut(t):ut(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Et)},getHostname:function(){var t=this.host;return null===t?"":ut(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Mt)},getPort:function(){var t=this.port;return null===t?"":w(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(t=w(t),""===t?this.port=null:this.parse(t,Dt))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+O(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Nt))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){t=w(t),""===t?this.query=null:("?"===D(t,0)&&(t=z(t,1)),this.query="",this.parse(t,Ht)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){t=w(t),""!==t?("#"===D(t,0)&&(t=z(t,1)),this.fragment="",this.parse(t,Bt)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ut=function(t){var e=d(this,jt),n=_(arguments.length,1)>1?arguments[1]:void 0,i=A(e,new zt(t,!1,n));o||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=Ut.prototype,Gt=function(t,e){return{get:function(){return C(this)[t]()},set:e&&function(t){return C(this)[e](t)},configurable:!0,enumerable:!0}};if(o&&(h(jt,"href",Gt("serialize","setHref")),h(jt,"origin",Gt("getOrigin")),h(jt,"protocol",Gt("getProtocol","setProtocol")),h(jt,"username",Gt("getUsername","setUsername")),h(jt,"password",Gt("getPassword","setPassword")),h(jt,"host",Gt("getHost","setHost")),h(jt,"hostname",Gt("getHostname","setHostname")),h(jt,"port",Gt("getPort","setPort")),h(jt,"pathname",Gt("getPathname","setPathname")),h(jt,"search",Gt("getSearch","setSearch")),h(jt,"searchParams",Gt("getSearchParams")),h(jt,"hash",Gt("getHash","setHash"))),u(jt,"toJSON",(function(){return C(this).serialize()}),{enumerable:!0}),u(jt,"toString",(function(){return C(this).serialize()}),{enumerable:!0}),T){var Vt=T.createObjectURL,Yt=T.revokeObjectURL;Vt&&u(Ut,"createObjectURL",l(Vt,T)),Yt&&u(Ut,"revokeObjectURL",l(Yt,T))}b(Ut,"URL"),r({global:!0,constructor:!0,forced:!s,sham:!o},{URL:Ut})},3165:(t,e,n)=>{"use strict";n(495)},4541:(t,e,n)=>{"use strict";var i=n(5613),r=n(9944);i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},4625:(t,e,n)=>{"use strict";n.d(e,{A:()=>ze});var i={};function r(t,e){return function(){return t.apply(e,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>Mt,hasStandardBrowserEnv:()=>Dt,hasStandardBrowserWebWorkerEnv:()=>It});const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,a=(t=>e=>{const n=o.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),l=t=>(t=t.toLowerCase(),e=>a(e)===t),c=t=>e=>typeof e===t,{isArray:u}=Array,h=c("undefined");function d(t){return null!==t&&!h(t)&&null!==t.constructor&&!h(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const f=l("ArrayBuffer");function p(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e}const g=c("string"),m=c("function"),v=c("number"),y=t=>null!==t&&"object"===typeof t,w=t=>!0===t||!1===t,b=t=>{if("object"!==a(t))return!1;const e=s(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},_=l("Date"),x=l("File"),S=l("Blob"),A=l("FileList"),C=t=>y(t)&&m(t.pipe),k=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=a(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},$=l("URLSearchParams"),T=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function L(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let i,r;if("object"!==typeof t&&(t=[t]),u(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let s;for(i=0;i<o;i++)s=r[i],e.call(null,t[s],s,t)}}function R(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;while(r-- >0)if(i=n[r],e===i.toLowerCase())return i;return null}const E=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),M=t=>!h(t)&&t!==E;function D(){const{caseless:t}=M(this)&&this||{},e={},n=(n,i)=>{const r=t&&R(e,i)||i;b(e[r])&&b(n)?e[r]=D(e[r],n):b(n)?e[r]=D({},n):u(n)?e[r]=n.slice():e[r]=n};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&L(arguments[i],n);return e}const I=(t,e,n,{allOwnKeys:i}={})=>(L(e,((e,i)=>{n&&m(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),O=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),P=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},N=(t,e,n,i)=>{let r,o,a;const l={};if(e=e||{},null==t)return e;do{r=Object.getOwnPropertyNames(t),o=r.length;while(o-- >0)a=r[o],i&&!i(a,t,e)||l[a]||(e[a]=t[a],l[a]=!0);t=!1!==n&&s(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},F=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},W=t=>{if(!t)return null;if(u(t))return t;let e=t.length;if(!v(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},H=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&s(Uint8Array)),B=(t,e)=>{const n=t&&t[Symbol.iterator],i=n.call(t);let r;while((r=i.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}},z=(t,e)=>{let n;const i=[];while(null!==(n=t.exec(e)))i.push(n);return i},U=l("HTMLFormElement"),j=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),V=l("RegExp"),Y=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};L(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},q=t=>{Y(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];m(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},K=(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return u(t)?i(t):i(String(t).split(e)),n},X=()=>{},Q=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Z="abcdefghijklmnopqrstuvwxyz",J="0123456789",tt={DIGIT:J,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+J},et=(t=16,e=tt.ALPHA_DIGIT)=>{let n="";const{length:i}=e;while(t--)n+=e[Math.random()*i|0];return n};function nt(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const it=t=>{const e=new Array(10),n=(t,i)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=u(t)?[]:{};return L(t,((t,e)=>{const o=n(t,i+1);!h(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},rt=l("AsyncFunction"),ot=t=>t&&(y(t)||m(t))&&m(t.then)&&m(t.catch),st={isArray:u,isArrayBuffer:f,isBuffer:d,isFormData:k,isArrayBufferView:p,isString:g,isNumber:v,isBoolean:w,isObject:y,isPlainObject:b,isUndefined:h,isDate:_,isFile:x,isBlob:S,isRegExp:V,isFunction:m,isStream:C,isURLSearchParams:$,isTypedArray:H,isFileList:A,forEach:L,merge:D,extend:I,trim:T,stripBOM:O,inherits:P,toFlatObject:N,kindOf:a,kindOfTest:l,endsWith:F,toArray:W,forEachEntry:B,matchAll:z,isHTMLForm:U,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Y,freezeMethods:q,toObjectSet:K,toCamelCase:j,noop:X,toFiniteNumber:Q,findKey:R,global:E,isContextDefined:M,ALPHABET:tt,generateString:et,isSpecCompliantForm:nt,toJSONObject:it,isAsyncFn:rt,isThenable:ot};function at(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}st.inherits(at,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:st.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lt=at.prototype,ct={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ct[t]={value:t}})),Object.defineProperties(at,ct),Object.defineProperty(lt,"isAxiosError",{value:!0}),at.from=(t,e,n,i,r,o)=>{const s=Object.create(lt);return st.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),at.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const ut=at,ht=null;function dt(t){return st.isPlainObject(t)||st.isArray(t)}function ft(t){return st.endsWith(t,"[]")?t.slice(0,-2):t}function pt(t,e,n){return t?t.concat(e).map((function(t,e){return t=ft(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function gt(t){return st.isArray(t)&&!t.some(dt)}const mt=st.toFlatObject(st,{},null,(function(t){return/^is[A-Z]/.test(t)}));function vt(t,e,n){if(!st.isObject(t))throw new TypeError("target must be an object");e=e||new(ht||FormData),n=st.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!st.isUndefined(e[t])}));const i=n.metaTokens,r=n.visitor||u,o=n.dots,s=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,l=a&&st.isSpecCompliantForm(e);if(!st.isFunction(r))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(st.isDate(t))return t.toISOString();if(!l&&st.isBlob(t))throw new ut("Blob is not supported. Use a Buffer instead.");return st.isArrayBuffer(t)||st.isTypedArray(t)?l&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,r){let a=t;if(t&&!r&&"object"===typeof t)if(st.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(st.isArray(t)&&gt(t)||(st.isFileList(t)||st.endsWith(n,"[]"))&&(a=st.toArray(t)))return n=ft(n),a.forEach((function(t,i){!st.isUndefined(t)&&null!==t&&e.append(!0===s?pt([n],i,o):null===s?n:n+"[]",c(t))})),!1;return!!dt(t)||(e.append(pt(r,n,o),c(t)),!1)}const h=[],d=Object.assign(mt,{defaultVisitor:u,convertValue:c,isVisitable:dt});function f(t,n){if(!st.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),st.forEach(t,(function(t,i){const o=!(st.isUndefined(t)||null===t)&&r.call(e,t,st.isString(i)?i.trim():i,n,d);!0===o&&f(t,n?n.concat(i):[i])})),h.pop()}}if(!st.isObject(t))throw new TypeError("data must be an object");return f(t),e}const yt=vt;function wt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&yt(t,this,e)}const _t=bt.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,wt)}:wt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const xt=bt;function St(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(t,e,n){if(!e)return t;const i=n&&n.encode||St,r=n&&n.serialize;let o;if(o=r?r(e,n):st.isURLSearchParams(e)?e.toString():new xt(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class Ct{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){st.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const kt=Ct,$t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!==typeof URLSearchParams?URLSearchParams:xt,Lt="undefined"!==typeof FormData?FormData:null,Rt="undefined"!==typeof Blob?Blob:null,Et={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Lt,Blob:Rt},protocols:["http","https","file","blob","url","data"]},Mt="undefined"!==typeof window&&"undefined"!==typeof document,Dt=(t=>Mt&&["ReactNative","NativeScript","NS"].indexOf(t)<0)("undefined"!==typeof navigator&&navigator.product),It=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Ot={...i,...Et};function Pt(t,e){return yt(t,new Ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Ot.isNode&&st.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Nt(t){return st.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Ft(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}function Wt(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=t.length;if(o=!o&&st.isArray(i)?i.length:o,a)return st.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&st.isObject(i[o])||(i[o]=[]);const l=e(t,n,i[o],r);return l&&st.isArray(i[o])&&(i[o]=Ft(i[o])),!s}if(st.isFormData(t)&&st.isFunction(t.entries)){const n={};return st.forEachEntry(t,((t,i)=>{e(Nt(t),i,n,0)})),n}return null}const Ht=Wt;function Bt(t,e,n){if(st.isString(t))try{return(e||JSON.parse)(t),st.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}const zt={transitional:$t,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=st.isObject(t);r&&st.isHTMLForm(t)&&(t=new FormData(t));const o=st.isFormData(t);if(o)return i&&i?JSON.stringify(Ht(t)):t;if(st.isArrayBuffer(t)||st.isBuffer(t)||st.isStream(t)||st.isFile(t)||st.isBlob(t))return t;if(st.isArrayBufferView(t))return t.buffer;if(st.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Pt(t,this.formSerializer).toString();if((s=st.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return yt(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Bt(t)):t}],transformResponse:[function(t){const e=this.transitional||zt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&st.isString(t)&&(n&&!this.responseType||i)){const n=e&&e.silentJSONParsing,o=!n&&i;try{return JSON.parse(t)}catch(r){if(o){if("SyntaxError"===r.name)throw ut.from(r,ut.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};st.forEach(["delete","get","head","post","put","patch"],(t=>{zt.headers[t]={}}));const Ut=zt,jt=st.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Gt=t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&jt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e},Vt=Symbol("internals");function Yt(t){return t&&String(t).trim().toLowerCase()}function qt(t){return!1===t||null==t?t:st.isArray(t)?t.map(qt):String(t)}function Kt(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=n.exec(t))e[i[1]]=i[2];return e}const Xt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qt(t,e,n,i,r){return st.isFunction(i)?i.call(this,e,n):(r&&(e=n),st.isString(e)?st.isString(i)?-1!==e.indexOf(i):st.isRegExp(i)?i.test(e):void 0:void 0)}function Zt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function Jt(t,e){const n=st.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}class te{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=Yt(e);if(!r)throw new Error("header name must be a non-empty string");const o=st.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=qt(t))}const o=(t,e)=>st.forEach(t,((t,n)=>r(t,n,e)));return st.isPlainObject(t)||t instanceof this.constructor?o(t,e):st.isString(t)&&(t=t.trim())&&!Xt(t)?o(Gt(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=Yt(t),t){const n=st.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return Kt(t);if(st.isFunction(e))return e.call(this,t,n);if(st.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Yt(t),t){const n=st.findKey(this,t);return!(!n||void 0===this[n]||e&&!Qt(this,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=Yt(t),t){const r=st.findKey(n,t);!r||e&&!Qt(n,n[r],r,e)||(delete n[r],i=!0)}}return st.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;while(n--){const r=e[n];t&&!Qt(this,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return st.forEach(this,((i,r)=>{const o=st.findKey(n,r);if(o)return e[o]=qt(i),void delete e[r];const s=t?Zt(r):String(r).trim();s!==r&&delete e[r],e[s]=qt(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return st.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&st.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}},n=e.accessors,i=this.prototype;function r(t){const e=Yt(t);n[e]||(Jt(i,t),n[e]=!0)}return st.isArray(t)?t.forEach(r):r(t),this}}te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),st.reduceDescriptors(te.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),st.freezeMethods(te);const ee=te;function ne(t,e){const n=this||Ut,i=e||n,r=ee.from(i.headers);let o=i.data;return st.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function ie(t){return!(!t||!t.__CANCEL__)}function re(t,e,n){ut.call(this,null==t?"canceled":t,ut.ERR_CANCELED,e,n),this.name="CanceledError"}st.inherits(re,ut,{__CANCEL__:!0});const oe=re;function se(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ut("Request failed with status code "+n.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const ae=Ot.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const s=[t+"="+encodeURIComponent(e)];st.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),st.isString(i)&&s.push("path="+i),st.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function le(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ce(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ue(t,e){return t&&!le(e)?ce(t,e):e}const he=Ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=st.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function de(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fe(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let u=s,h=0;while(u!==o)h+=n[u++],u%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-r<e)return;const d=c&&l-c;return d?Math.round(1e3*h/d):void 0}}const pe=fe;function ge(t,e){let n=0;const i=pe(50,250);return r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a),c=o<=s;n=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const me="undefined"!==typeof XMLHttpRequest,ve=me&&function(t){return new Promise((function(e,n){let i=t.data;const r=ee.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:l}=t;function c(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(st.isFormData(i))if(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if(!1!==(s=r.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];r.setContentType([t||"multipart/form-data",...e].join("; "))}let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const h=ue(t.baseURL,t.url);function d(){if(!u)return;const i=ee.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),r=a&&"text"!==a&&"json"!==a?u.response:u.responseText,o={data:r,status:u.status,statusText:u.statusText,headers:i,config:t,request:u};se((function(t){e(t),c()}),(function(t){n(t),c()}),o),u=null}if(u.open(t.method.toUpperCase(),At(h,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(n(new ut("Request aborted",ut.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||$t;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new ut(e,i.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,t,u)),u=null},Ot.hasStandardBrowserEnv&&(l&&st.isFunction(l)&&(l=l(t)),l||!1!==l&&he(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&ae.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in u&&st.forEach(r.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),st.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),a&&"json"!==a&&(u.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&u.addEventListener("progress",ge(t.onDownloadProgress,!0)),"function"===typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ge(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{u&&(n(!e||e.type?new oe(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=de(h);f&&-1===Ot.protocols.indexOf(f)?n(new ut("Unsupported protocol "+f+":",ut.ERR_BAD_REQUEST,t)):u.send(i||null)}))},ye={http:ht,xhr:ve};st.forEach(ye,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const we=t=>`- ${t}`,be=t=>st.isFunction(t)||null===t||!1===t,_e={getAdapter:t=>{t=st.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o<e;o++){let e;if(n=t[o],i=n,!be(n)&&(i=ye[(e=String(n)).toLowerCase()],void 0===i))throw new ut(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+o]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(we).join("\n"):" "+we(t[0]):"as no adapter specified";throw new ut("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:ye};function xe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oe(null,t)}function Se(t){xe(t),t.headers=ee.from(t.headers),t.data=ne.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=_e.getAdapter(t.adapter||Ut.adapter);return e(t).then((function(e){return xe(t),e.data=ne.call(t,t.transformResponse,e),e.headers=ee.from(e.headers),e}),(function(e){return ie(e)||(xe(t),e&&e.response&&(e.response.data=ne.call(t,t.transformResponse,e.response),e.response.headers=ee.from(e.response.headers))),Promise.reject(e)}))}const Ae=t=>t instanceof ee?t.toJSON():t;function Ce(t,e){e=e||{};const n={};function i(t,e,n){return st.isPlainObject(t)&&st.isPlainObject(e)?st.merge.call({caseless:n},t,e):st.isPlainObject(e)?st.merge({},e):st.isArray(e)?e.slice():e}function r(t,e,n){return st.isUndefined(e)?st.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!st.isUndefined(e))return i(void 0,e)}function s(t,e){return st.isUndefined(e)?st.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>r(Ae(t),Ae(e),!0)};return st.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,s=o(t[i],e[i],i);st.isUndefined(s)&&o!==a||(n[i]=s)})),n}const ke="1.6.5",$e={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{$e[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Te={};function Le(t,e,n){if("object"!==typeof t)throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;while(r-- >0){const o=i[r],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new ut("option "+o+" must be "+n,ut.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ut("Unknown option "+o,ut.ERR_BAD_OPTION)}}$e.transitional=function(t,e,n){function i(t,e){return"[Axios v"+ke+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new ut(i(r," has been removed"+(e?" in "+e:"")),ut.ERR_DEPRECATED);return e&&!Te[r]&&(Te[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,o)}};const Re={assertOptions:Le,validators:$e},Ee=Re.validators;class Me{constructor(t){this.defaults=t,this.interceptors={request:new kt,response:new kt}}request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=Ce(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Re.assertOptions(n,{silentJSONParsing:Ee.transitional(Ee.boolean),forcedJSONParsing:Ee.transitional(Ee.boolean),clarifyTimeoutError:Ee.transitional(Ee.boolean)},!1),null!=i&&(st.isFunction(i)?e.paramsSerializer={serialize:i}:Re.assertOptions(i,{encode:Ee.function,serialize:Ee.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&st.merge(r.common,r[e.method]);r&&st.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=ee.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,h=0;if(!a){const t=[Se.bind(this),void 0];t.unshift.apply(t,s),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);while(h<u)c=c.then(t[h++],t[h++]);return c}u=s.length;let d=e;h=0;while(h<u){const t=s[h++],e=s[h++];try{d=t(d)}catch(f){e.call(this,f);break}}try{c=Se.call(this,d)}catch(f){return Promise.reject(f)}h=0,u=l.length;while(h<u)c=c.then(l[h++],l[h++]);return c}getUri(t){t=Ce(this.defaults,t);const e=ue(t.baseURL,t.url);return At(e,t.params,t.paramsSerializer)}}st.forEach(["delete","get","head","options"],(function(t){Me.prototype[t]=function(e,n){return this.request(Ce(n||{},{method:t,url:e,data:(n||{}).data}))}})),st.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(Ce(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Me.prototype[t]=e(),Me.prototype[t+"Form"]=e(!0)}));const De=Me;class Ie{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new oe(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Ie((function(e){t=e}));return{token:e,cancel:t}}}const Oe=Ie;function Pe(t){return function(e){return t.apply(null,e)}}function Ne(t){return st.isObject(t)&&!0===t.isAxiosError}const Fe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fe).forEach((([t,e])=>{Fe[e]=t}));const We=Fe;function He(t){const e=new De(t),n=r(De.prototype.request,e);return st.extend(n,De.prototype,e,{allOwnKeys:!0}),st.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return He(Ce(t,e))},n}const Be=He(Ut);Be.Axios=De,Be.CanceledError=oe,Be.CancelToken=Oe,Be.isCancel=ie,Be.VERSION=ke,Be.toFormData=yt,Be.AxiosError=ut,Be.Cancel=Be.CanceledError,Be.all=function(t){return Promise.all(t)},Be.spread=Pe,Be.isAxiosError=Ne,Be.mergeConfig=Ce,Be.AxiosHeaders=ee,Be.formToJSON=t=>Ht(st.isHTMLForm(t)?new FormData(t):t),Be.getAdapter=_e.getAdapter,Be.HttpStatusCode=We,Be.default=Be;const ze=Be}}]);
70
+ //# sourceMappingURL=533.js.map