openc3-cosmos-tool-tlmviewer 5.18.0 → 5.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/tools/tlmviewer/js/129.js +39 -0
- data/tools/tlmviewer/js/129.js.map +1 -0
- data/tools/tlmviewer/js/851.js +2 -0
- data/tools/tlmviewer/js/851.js.map +1 -0
- data/tools/tlmviewer/js/app.js +1 -1
- data/tools/tlmviewer/js/app.js.map +1 -1
- metadata +6 -6
- data/tools/tlmviewer/js/552.js +0 -2
- data/tools/tlmviewer/js/552.js.map +0 -1
- data/tools/tlmviewer/js/564.js +0 -39
- data/tools/tlmviewer/js/564.js.map +0 -1
data/tools/tlmviewer/js/564.js
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
(self["webpackChunk_openc3_cosmos_tool_tlmviewer"]=self["webpackChunk_openc3_cosmos_tool_tlmviewer"]||[]).push([[564],{7752:(t,e,n)=>{"use strict";n.d(e,{Be:()=>b,D$:()=>a});var i={logger:"undefined"!==typeof console?console:void 0,WebSocket:"undefined"!==typeof WebSocket?WebSocket:void 0},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 p{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(){}}}p.reopenDelay=500,p.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 f=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),f(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 p(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(9033),n(8903),n(1018),n(1415),n(4448),n(8871),n(6539),n(4293),n(2682),n(785),n(8357),n(6196),n(821),n(6554),n(8472),n(7404),n(5803),n(3912);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",p=r+"off",f=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",C=r+"value",k="width",$="height",A="top",T="bottom",L="left",R="right",E="#000",M=E+"0",I="mousemove",D="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,p):Z(t,p))}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 pt(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 ft(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,r]}function mt(t,e,n,i){let r=Nt(t),o=Nt(e);t==e&&(-1==r?(t*=n,e/=n):(t/=n,e*=n));let s=10==n?Ft:Wt,a=1==r?Et:It,l=1==o?It: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 pe(n)?kt(t,e,n):(bt.pad=n,bt.soft=i?0:null,bt.mode=i?3:0,kt(t,e,_t))}function St(t,e){return null==t?e:t}function Ct(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 kt(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),p=e-t,f=Ft(p),g=Ot(Rt(t),Rt(e)),m=Ft(g),v=Rt(m-f);(p<1e-9||v>10)&&(p=0,0!=t&&0!=e||(p=1e-9,2==h&&c!=zt&&(o=0),2==d&&u!=-zt&&(s=0)));let y=p||g||1e3,w=Ft(y),b=Pt(10,Et(w)),_=y*(0==p?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,C=Ot(a,x<S&&t>=S?S:Dt(S,x)),k=y*(0==p?0==e?.1:1:s),$=ne(te(e+k,b/10),9),A=e<=u&&(1==d||3==d&&$>=u||2==d&&$<=u)?u:-zt,T=Dt(l,$>A&&e<=A?A:Ot(A,$));return C==T&&0==C&&(T=100),[C,T]}const $t=new Intl.NumberFormat(j?Y.language:"en-US"),At=t=>$t.format(t),Tt=Math,Lt=Tt.PI,Rt=Tt.abs,Et=Tt.floor,Mt=Tt.round,It=Tt.ceil,Dt=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 Dt(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(It(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 pe(t){let e=!1;if(null!=t){let n=t.constructor;e=null==n||n==Object}return e}function fe(t){return null!=t&&"object"==typeof t}const ge=Object.getPrototypeOf(Uint8Array);function me(t,e=pe){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)pe(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(ke(t)){let e=t[0].slice();for(let n=1;n<t.length;n++)e.push(...t[n].slice(1));return $e(e[0])||(e=Ce(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 Ce(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 ke(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 $e(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 Ae=["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=Ae.map(Le),Me={MMMM:Ae,MMM:Ee,WWWW:Te,WWW:Re};function Ie(t){return(t<10?"0":"")+t}function De(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=>Ie(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ie(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ie(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=>Ie(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ie(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>De(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 p=[],f=h>=s,g=h>=o&&h<s,m=e(c),v=ne(m*t,3),y=fn(m.getFullYear(),f?0:m.getMonth(),g||f?1:m.getDate()),w=ne(y*t,3);if(g||f){let n=g?h/o:0,i=f?h/s:0,r=v==w?v:ne(fn(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=fn(l+i*o,c+n*o,1),a=s-e(ne(s*t,3));r=ne((+s+a)*t,3),r<=u&&p.push(r)}}else{let o=h>=r?r:h,s=Et(c)-Et(v),f=w+s+te(v-w,o);p.push(f);let g=e(f),m=g.getHours()+g.getMinutes()/n+g.getSeconds()/i,y=h/i,b=a.axes[l]._space,_=d/b;while(1){if(f=ne(f+h,1==t?0:3),f>u)break;if(y>1){let t=Et(ne(m+y,6))%24,n=e(f),r=n.getHours(),o=r-t;o>1&&(o=-1),f-=o*i,m=(m+y)%24;let s=p[p.length-1],a=ne((f-s)/h,3);a*_>=.7&&p.push(f)}else p.push(f)}}return p}}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,p=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(),f=n.getMinutes(),g=n.getSeconds(),m=i!=a&&p[2]||r!=l&&p[3]||o!=c&&p[4]||s!=u&&p[5]||f!=h&&p[6]||g!=d&&p[7]||p[1];return a=i,l=r,c=o,u=s,h=f,d=g,m(n)}))}}function pn(t,e){let n=Pe(e);return(e,i,r,o,s)=>i.map((e=>n(t(e))))}function fn(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,k,r),J(i,$,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 Cn(t,e){let n=t.series[e].points;return n.size}const kn=[0,0];function $n(t,e,n){return kn[0]=e,kn[1]=n,kn}function An(t,e,n,i=!0){return t=>{0==t.button&&(!i||t.target==e)&&n(t)}}function Tn(t,e,n,i=!0){return t=>{(!i||t.target==e)&&n(t)}}const Ln={show:!0,x:!0,y:!0,lock:!1,move:$n,points:{show:_n,size:Cn,width:0,stroke:Sn,fill:xn},bind:{mousedown:An,mouseup:An,click:An,dblclick:An,mousemove:Tn,mouseleave:Tn,mouseenter:Tn},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},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Rn={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},En=ve({},Rn,{filter:qt}),Mn=ve({},En,{size:10}),In=ve({},Rn,{show:!1}),Dn='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"',On="bold "+Dn,Pn=1.5,Nn={show:!0,scale:"x",stroke:E,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:On,side:2,grid:En,ticks:Mn,border:In,font:Dn,lineGap:Pn,rotate:0},Fn="Value",Wn="Time",Hn={show:!0,scale:"x",auto:!1,sorted:1,min:zt,max:-zt,idxs:[]};function Bn(t,e,n,i,r){return e.map((t=>null==t?"":At(t)))}function zn(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 Un(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 jn(t,e,n,i,r,o,s){let a=t.scales[t.axes[e].scale],l=a.asinh,c=i>l?Un(t,e,Ot(l,n),i,r):[l],u=i>=0&&n<=0?[0]:[],h=n<-l?Un(t,e,Ot(l,-i),-n,r):[l];return h.reverse().map((t=>-t)).concat(u,c)}const Gn=/./,Vn=/[12357]/,Yn=/[125]/,qn=/1/,Kn=(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 Xn(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?Gn:l(7,s)-u>=c?Vn:l(5,s)-u>=c?Yn:qn;if(h==qn){let t=Rt(l(1,s)-u);if(t<c)return Kn(e.slice().reverse(),a.distr,h,It(c/t)).reverse()}return Kn(e,a.distr,h,1)}function Qn(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?Kn(e.slice().reverse(),3,Gn,It(a/c)).reverse():e}function Zn(t,e,n,i){return null==i?U:null==e?"":At(e)}const Jn={show:!0,scale:"y",stroke:E,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:On,side:3,grid:En,ticks:Mn,border:In,font:Dn,lineGap:Pn,rotate:0};function ti(t,e){let n=3+2*(t||1);return ne(n*e,3)}function ei(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 ni={scale:null,auto:!0,sorted:0,min:zt,max:-zt},ii=(t,e,n,i,r)=>r,ri={show:!0,auto:!0,sorted:0,gaps:ii,alpha:1,facets:[ve({},ni,{scale:"x"}),ve({},ni,{scale:"y"})]},oi={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ii,alpha:1,points:{show:ei,filter:null},values:null,min:zt,max:-zt,idxs:[],path:null,clip:null};function si(t,e,n,i,r){return n/10}const ai={time:i,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},li=ve({},ai,{time:!1,ori:1}),ci={};function ui(t,e){let n=ci[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&&(ci[t]=n)),n}const hi=1,di=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,p=a.top,f=a.width,g=a.height,m=t.valToPosH,v=t.valToPosV;return 0==u.ori?n(r,l,c,u,h,m,v,d,p,f,g,xi,Ci,$i,Ti,Ri):n(r,l,c,u,h,v,m,p,d,g,f,Si,ki,Ai,Li,Ei)}function fi(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 gi(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 mi(t,e,n,i,r,o){return pi(t,e,((t,e,s,a,l,c,u,h,d,p,f)=>{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,p,h)),_=g(u(s[y],l,f,d)),x=g(c(e[w],a,p,h)),S=g(u(1==o?l.max:l.min,l,f,d)),C=new Path2D(r);return v(C,x,S),v(C,b,S),v(C,b,_),C}))}function vi(t,e,n,i,r,o){let s=null;if(t.length>0){s=new Path2D;const a=0==e?$i:Ai;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 yi(t,e,n){let i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function wi(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]),p=h==u?d:o(t[h]),f=u-r,g=s<=0&&f>=0&&f<l?o(t[f]):d;d=g;let m=h+r,v=s>=0&&m>=0&&m<l?o(t[m]):p;p=v,p>=d&&a.push([d,p])}}return a}function bi(t){return 0==t?Yt:1==t?Mt:e=>Jt(e,t)}function _i(t){let e=0==t?xi:Si,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=Dt(l,s/2,a/2),c=Dt(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 xi=(t,e,n)=>{t.moveTo(e,n)},Si=(t,e,n)=>{t.moveTo(n,e)},Ci=(t,e,n)=>{t.lineTo(e,n)},ki=(t,e,n)=>{t.lineTo(n,e)},$i=_i(0),Ai=_i(1),Ti=(t,e,n,i,r,o)=>{t.arc(e,n,i,r,o)},Li=(t,e,n,i,r,o)=>{t.arc(n,e,i,r,o)},Ri=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(e,n,i,r,o,s)},Ei=(t,e,n,i,r,o,s)=>{t.bezierCurveTo(n,e,r,i,s,o)};function Mi(t){return(t,e,n,i,r)=>pi(t,e,((e,o,s,a,l,c,u,h,d,p,f)=>{let g,m,{pxRound:v,points:y}=e;0==a.ori?(g=xi,m=Ti):(g=Si,m=Li);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:C,top:k,width:$,height:A}=t.bbox;$i(S,C-_,k-_,$+2*_,A+2*_);const T=t=>{if(null!=s[t]){let e=v(c(o[t],a,p,h)),n=v(u(s[t],l,f,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:hi|di}}))}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 Di=Ii(Ci),Oi=Ii(ki);function Pi(t){const e=St(t?.alignGaps,0);return(t,n,i,r)=>pi(t,n,((o,s,a,l,c,u,h,d,p,f,g)=>{let m,v,y=o.pxRound,w=t=>y(u(t,l,f,d)),b=t=>y(h(t,c,g,p));0==l.ori?(m=Ci,v=Di):(m=ki,v=Oi);const _=l.dir*(0==l.ori?1:-1),x={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:hi},S=x.stroke;let C,k,$,A=zt,T=-zt,L=w(s[1==_?i:r]),R=pt(a,i,r,1*_),E=pt(a,i,r,-1*_),M=w(s[R]),I=w(s[E]),D=!1;for(let t=1==_?i:r;t>=i&&t<=r;t+=_){let e=w(s[t]),n=a[t];e==L?null!=n?(k=b(n),A==zt&&(m(S,e,k),C=k),A=Dt(k,A),T=Ot(k,T)):null===n&&(D=!0):(A!=zt&&(v(S,L,A,T,C,k),$=L),null!=n?(k=b(n),m(S,e,k),A=T=C=k):(A=zt,T=-zt,null===n&&(D=!0)),L=e)}A!=zt&&A!=T&&$!=L&&v(S,L,A,T,C,k);let[O,P]=fi(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,I,r),m(e,M,r)}if(!o.spanGaps){let c=[];D&&c.push(...wi(s,a,i,r,_,w,e)),x.gaps=c=o.gaps(t,n,i,r,c),x.clip=vi(c,l.ori,d,p,f,g)}return 0!=P&&(x.band=2==P?[mi(t,n,i,r,S,-1),mi(t,n,i,r,S,1)]:mi(t,n,i,r,S,P)),x}))}function Ni(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,p,f,g,m,v,y)=>{let w=l.pxRound,{left:b,width:_}=t.bbox,x=t=>w(p(t,h,v,g)),S=t=>w(f(t,d,y,m)),C=0==h.ori?Ci:ki;const k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:hi},$=k.stroke,A=h.dir*(0==h.ori?1:-1);s=pt(u,s,a,1),a=pt(u,s,a,-1);let T=S(u[1==A?s:a]),L=x(c[1==A?s:a]),R=L,E=L;r&&-1==e&&(E=b,C($,E,T)),C($,L,T);for(let t=1==A?s:a;t>=s&&t<=a;t+=A){let n=u[t];if(null==n)continue;let i=x(c[t]),r=S(n);1==e?C($,i,T):C($,R,r),C($,i,r),T=r,R=i}let M=R;r&&1==e&&(M=b+_,C($,M,T));let[I,D]=fi(t,o);if(null!=l.fill||0!=I){let e=k.fill=new Path2D($),n=l.fillTo(t,o,l.min,l.max,I),i=S(n);C(e,M,i),C(e,E,i)}if(!l.spanGaps){let r=[];r.push(...wi(c,u,s,a,A,x,i));let d=l.width*q/2,p=n||1==e?d:-d,f=n||-1==e?-d:d;r.forEach((t=>{t[0]+=p,t[1]+=f})),k.gaps=r=l.gaps(t,o,s,a,r),k.clip=vi(r,h.ori,g,m,v,y)}return 0!=D&&(k.band=2==D?[mi(t,o,s,a,$,-1),mi(t,o,s,a,$,1)]:mi(t,o,s,a,$,D)),k}))}function Fi(t,e,n,i,r,o,s=zt){if(t.length>1){let a=null;for(let l=0,c=1/0;l<t.length;l++)if(void 0!==e[l]){if(null!=a){let e=Rt(t[l]-t[a]);e<c&&(c=e,s=Rt(n(t[l],i,r,o)-n(t[a],i,r,o)))}a=l}}return s}function Wi(t){t=t||se;const e=St(t.size,[.6,zt,1]),n=t.align||0,i=t.gap||0;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),l=St(e[2],1),c=St(t.disp,se),u=St(t.each,(t=>{})),{fill:h,stroke:d}=c;return(t,e,r,p)=>pi(t,e,((f,g,m,v,y,w,b,_,x,S,C)=>{let k,$,A=f.pxRound,T=n,L=i*q,R=a*q,E=l*q;0==v.ori?[k,$]=o(t,e):[$,k]=o(t,e);const M=v.dir*(0==v.ori?1:-1);let I,D,O,P=0==v.ori?$i:Ai,N=0==v.ori?u:(t,e,n,i,r,o,s)=>{u(t,e,n,r,i,s,o)},F=St(t.bands,ae).find((t=>t.series[0]==e)),W=null!=F?F.dir:0,H=f.fillTo(t,e,f.min,f.max,W),B=A(b(H,y,C,x)),z=S,U=A(f.width*q),j=!1,G=null,V=null,Y=null,K=null;null==h||0!=U&&null==d||(j=!0,G=h.values(t,e,r,p),V=new Map,new Set(G).forEach((t=>{null!=t&&V.set(t,new Path2D)})),U>0&&(Y=d.values(t,e,r,p),K=new Map,new Set(Y).forEach((t=>{null!=t&&K.set(t,new Path2D)}))));let{x0:X,size:Q}=c;if(null!=X&&null!=Q){T=1,g=X.values(t,e,r,p),2==X.unit&&(g=g.map((e=>t.posToVal(_+e*S,v.key,!0))));let n=Q.values(t,e,r,p);D=2==Q.unit?n[0]*S:w(n[0],v,S,_)-w(0,v,S,_),z=Fi(g,m,w,v,S,_,z);let i=z-D;O=i+L}else{z=Fi(g,m,w,v,S,_,z);let t=z*s;O=t+L,D=z-O}O<1&&(O=0),U>=D/2&&(U=0),O<5&&(A=Yt);let Z=O>0,J=z-O-(Z?U:0);D=A(jt(J,E,R)),I=(0==T?D/2:T==M?0:D)-T*M*((0==T?L/2:0)+(Z?U/2:0));const tt={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},et=j?null:new Path2D;let nt=null;if(null!=F)nt=t.data[F.series[1]];else{let{y0:n,y1:i}=c;null!=n&&null!=i&&(m=i.values(t,e,r,p),nt=n.values(t,e,r,p))}let it=k*D,rt=$*D;for(let n=1==M?r:p;n>=r&&n<=p;n+=M){let i=m[n];if(null==i)continue;if(null!=nt){let t=nt[n]??0;if(i-t==0)continue;B=b(t,y,C,x)}let r=2!=v.distr||null!=c?g[n]:n,o=w(r,v,S,_),s=b(St(i,H),y,C,x),a=A(o-I),l=A(Ot(s,B)),u=A(Dt(s,B)),h=l-u;if(null!=i){let r=i<0?rt:it,o=i<0?it:rt;j?(U>0&&null!=Y[n]&&P(K.get(Y[n]),a,u+Et(U/2),D,Ot(0,h-U),r,o),null!=G[n]&&P(V.get(G[n]),a,u+Et(U/2),D,Ot(0,h-U),r,o)):P(et,a,u+Et(U/2),D,Ot(0,h-U),r,o),N(t,e,n,a-U/2,u,D+U,h)}}return U>0?tt.stroke=j?K:et:j||(tt._fill=0==f.width?f._fill:f._stroke??f._fill,tt.width=0),tt.fill=j?V:et,tt}))}function Hi(t,e){const n=St(e?.alignGaps,0);return(e,i,r,o)=>pi(e,i,((s,a,l,c,u,h,d,p,f,g,m)=>{let v,y,w,b=s.pxRound,_=t=>b(h(t,c,g,p)),x=t=>b(d(t,u,m,f));0==c.ori?(v=xi,w=Ci,y=Ri):(v=Si,w=ki,y=Ei);const S=c.dir*(0==c.ori?1:-1);r=pt(l,r,o,1),o=pt(l,r,o,-1);let C=_(a[1==S?r:o]),k=C,$=[],A=[];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);$.push(k=n),A.push(x(l[t]))}}const T={stroke:t($,A,v,w,y,b),fill:null,clip:null,band:null,gaps:null,flags:hi},L=T.stroke;let[R,E]=fi(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,k,r),w(t,C,r)}if(!s.spanGaps){let t=[];t.push(...wi(a,l,r,o,S,_,n)),T.gaps=t=s.gaps(e,i,r,o,t),T.clip=vi(t,c.ori,p,f,g,m)}return 0!=E&&(T.band=2==E?[mi(e,i,r,o,L,-1),mi(e,i,r,o,L,1)]:mi(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=Pi(),Vi=Mi();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=$r!=xr||Ar!=Sr;e&&Nr.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=bi(lt);(t.plugins||[]).forEach((e=>{e.opts&&(t=e.opts(i,t)||t)}));const pt=t.ms||.001,bt=i.series=1==r?Yi(t.series||[],Hn,oi,!1):qi(t.series||[null],ri),_t=i.axes=Yi(t.axes||[],Nn,Jn,!0),kt=i.scales={},$t=i.bands=t.bands||[];$t.forEach((t=>{t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1)}));const At=2==r?bt[1].facets[0].scale:bt[0].scale,Tt={axes:fr,series:Hi},Et=(t.drawOrder||["axes","series"]).map((t=>Tt[t]));function Nt(e){let n=kt[e];if(null==n){let i=(t.scales||se)[e]||se;if(null!=i.from)Nt(i.from),kt[e]=ve({},kt[i.from],i,{key:e});else{n=kt[e]=ve({},e==At?ai:li,i),n.key=e;let t=n.time,o=n.range,s=ce(o);if((e!=At||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&&pe(o))){let t=o;o=(e,n,i)=>null==n?le:xt(n,i,t)}n.range=Gt(o||(t?Qi:e==At?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||si),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=kt[At],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 kt){let t=kt[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/pt))),oe=t.fmtDate||Pe,ue=1==pt?an(ee):un(ee),ge=dn(ee,hn(1==pt?sn:cn,oe)),ye=vn(ee,gn(mn,oe)),we=[],be=i.legend=ve({},bn,t.legend),_e=be.show,xe=be.markers;let Ce,ke,$e;be.idxs=we,xe.width=Gt(xe.width),xe.dash=Gt(xe.dash),xe.stroke=Gt(xe.stroke),xe.fill=Gt(xe.fill);let Ae,Te=[],Le=[],Re=!1,Ee={};if(be.live){const t=bt[1]?bt[1].values:null;Re=null!=t,Ae=Re?t(i,1,0):{_:0};for(let e in Ae)Ee[e]=U}if(_e)if(Ce=tt("table",y,Y),$e=tt("tbody",null,Ce),be.mount(i,Ce),Re){ke=tt("thead",null,Ce,$e);let t=tt("tr",null,ke);for(var Me in tt("th",null,t),Ae)tt("th",S,t).textContent=Me}else Q(Ce,b),be.live&&Q(Ce,w);const Ie={show:!0},De={show:!1};function Oe(t,e){if(0==e&&(Re||!be.live||2==r))return le;let n=[],o=tt("tr",_,$e,$e.childNodes[e]);Q(o,t.class),t.show||Q(o,p);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(Rn._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&&Gr(i,t?i==n?Ie:De:Ie,!0,Eo.setSeries)}))}else Gr(n,{show:!t.show},!0,Eo.setSeries)}),!1),Dn&&Fe(P,s,(e=>{Rn._lock||(En(e),Gr(bt.indexOf(t),Jr,!0,Eo.setSeries))}),!1)),Ae){let t=tt("td",C,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=Rn.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,fn=!1,yn=!1,wn=!1,_n=!1;function xn(t,e,n){(n||t!=i.width||e!=i.height)&&Sn(t,e),gr(!1),fn=!0,rn=!0,Mr()}function Sn(t,e){i.width=He=ze=t,i.height=Be=Ge=e,Ve=Ye=0,An(),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 Cn=3;function kn(){let t=!1,e=0;while(!t){e++;let n=dr(e),r=pr(e);t=e==Cn||n&&r,t||(Sn(i.width,i.height),rn=!0)}}function $n({width:t,height:e}){xn(t,e)}function An(){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))}})),ei[0]=t,ei[1]=n,ei[2]=e,ei[3]=i,ze-=pi[1]+pi[3],Ve+=pi[3],Ge-=pi[2]+pi[0],Ye+=pi[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=$n;const Rn=i.cursor=ve({},Ln,{drag:{y:2==r}},t.cursor);if(null==Rn.dataIdx){let t=Rn.hover,n=t.skip=new Set(t.skip??[]);n.add(void 0);let i=t.prox=Gt(t.prox),r=t.bias??(t.bias=0);Rn.dataIdx=(t,o,s,a)=>{if(0==o)return s;let l=s,c=i(t,o,s,a)??zt,u=c>=0&&c<zt,h=0==Wt.ori?ze:Ge,d=Rn.left,p=e[0],f=e[o];if(n.has(f[s])){l=null;let t,e=null,i=null;if(0==r||-1==r){t=s;while(null==e&&t-- >0)n.has(f[t])||(e=t)}if(0==r||1==r){t=s;while(null==i&&t++<f.length)n.has(f[t])||(i=t)}if(null!=e||null!=i)if(u){let t=null==e?-1/0:Vt(p[e],Wt,h,0),n=null==i?1/0:Vt(p[i],Wt,h,0),r=d-t,o=n-d;r<=o?r<=c&&(l=e):o<=c&&(l=i)}else l=null==i?e:null==e?i:s-e<=i-s?e:i}else if(u){let t=Rt(d-Vt(p[s],Wt,h,0));t>c&&(l=null)}return l}}const En=t=>{Rn.event=t};Rn.idxs=we,Rn._lock=!1;let Mn=Rn.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 In=i.focus=ve({},t.focus||{alpha:.3},Rn.focus),Dn=In.prox>=0;let On=[null],Pn=[null],Gn=[null];function Vn(t,e){if(e>0){let n=Rn.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&&kt[t.scale].time,n=t.value;t.value=e?de(n)?vn(ee,gn(n,oe)):n||ye:n||Zn,t.label=t.label||(e?Wn:Fn)}if(e>0){t.width=null==t.width?1:t.width,t.paths=t.paths||Gi||Kt,t.fillTo=Gt(t.fillTo||gi),t.pxAlign=+St(t.pxAlign,lt),t.pxRound=bi(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=ti(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(Rn.show){we.splice(e,0,null);let n=Vn(t,e);null!=n&&(On.splice(e,0,n),Pn.splice(e,0,0),Gn.splice(e,0,0))}Lo("addSeries",e)}function qn(t,e){e=null==e?bt.length:e,t=1==r?Ki(t,e,Hn,oi):Ki(t,e,null,ri),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()}Rn.show&&(we.splice(t,1),On.length>1&&(On.splice(t,1)[0].remove(),Pn.splice(t,1),Gn.splice(t,1))),Lo("delSeries",t)}i.addSeries=qn,i.delSeries=Kn;const ei=[!1,!1,!1,!1];function ni(t,e){if(t._show=t.show,t.show){let n=t.side%2,r=kt[t.scale];null==r&&(t.scale=n?bt[1].scale:At,r=kt[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==pt?on:ln:je)),t.splits=Gt(t.splits||(o&&1==r.distr?ue:3==r.distr?Un:4==r.distr?jn:zn)),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)?pn(ee,s):s||ge:s||Bn,t.filter=Gt(t.filter||(r.distr>=3&&10==r.log?Xn:3==r.distr&&2==r.log?Qn: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&&(ei[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(Nn.size/3):0),1==l&&(r||s)&&(c=1==e&&!o||3==e&&!a?Mt(Jn.size/2):0),c}const ci=i.padding=(t.padding||[ii,ii,ii,ii]).map((t=>Gt(St(t,ii)))),pi=i._padding=ci.map(((t,e)=>t(i,e,ei,0)));let fi,mi=null,vi=null;const yi=1==r?bt[0].idxs:null;let wi,_i,xi,Si,Ci,ki,$i,Ai,Ti,Li,Ri=null,Ei=!1;function Mi(t,n){if(e=null==t?[]:t,i.data=i._data=e,2==r){fi=0;for(let t=1;t<bt.length;t++)fi+=e[t][0].length}else{0==e.length&&(i.data=i._data=e=[[]]),Ri=e[0],fi=Ri.length;let t=e;if(2==Ut){t=e.slice();let n=t[0]=Array(fi);for(let t=0;t<fi;t++)n[t]=t}i._data=e=t}if(gr(!0),Lo("setData"),2==Ut&&(fn=!0),!1!==n){let t=Wt;t.auto(i,Ei)?Ii():jr(At,t.min,t.max),yn=yn||Rn.left>=0,_n=!0,Mr()}}function Ii(){let t,n;Ei=!0,1==r&&(fi>0?(mi=yi[0]=0,vi=yi[1]=fi-1,t=e[0][mi],n=e[0][vi],2==Ut?(t=mi,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/pt):[t,n]=xt(t,n,yt,!0))):(mi=yi[0]=t=null,vi=yi[1]=n=null)),jr(At,t,n)}function Di(t,e,n,i,r,o){t??(t=M),n??(n=ae),i??(i="butt"),r??(r=M),o??(o="round"),t!=wi&&(X.strokeStyle=wi=t),r!=_i&&(X.fillStyle=_i=r),e!=xi&&(X.lineWidth=xi=e),o!=Ci&&(X.lineJoin=Ci=o),i!=ki&&(X.lineCap=ki=i),n!=Si&&X.setLineDash(Si=n)}function Oi(t,e,n,i){e!=_i&&(X.fillStyle=_i=e),t!=$i&&(X.font=$i=t),n!=Ai&&(X.textAlign=Ai=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(mi,0),i=St(vi,r.length-1),s=null==n.min?3==t.distr?gt(r,e,i):ft(r,e,i,o):[n.min,n.max];t.min=Dt(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 kt){let t=kt[e];null==Zt[e]&&(null==t.min||null!=Zt[At]&&t.auto(i,Ei))&&(Zt[e]=Ni)}for(let e in kt){let t=kt[e];null==Zt[e]&&null!=t.from&&null!=Zt[t.from]&&(Zt[e]=Ni)}null!=Zt[At]&&gr(!0);let t={};for(let e in Zt){let n=Zt[e];if(null!=n){let o=t[e]=me(kt[e],fe);if(null!=n.min)ve(o,n);else if(e!=At||2==r)if(0==fi&&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(fi>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],mi=dt(a.min,e[0]),vi=dt(a.max,e[0]),vi-mi>1&&(e[0][mi]<a.min&&mi++,e[0][vi]>a.max&&vi--),n.min=Ri[mi],n.max=Ri[vi]}else n.show&&n.auto&&Pi(a,s,n,e[o],n.sorted);n.idxs[0]=mi,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],u=t[s],h=t[a];null!=u&&Pi(u,Zt[s],i,l,i.sorted),null!=h&&Pi(h,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=kt[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)fn=!0,Lo("setScale",t);Rn.show&&Rn.left>=0&&(yn=_n=!0)}for(let e in Zt)Zt[e]=null}function Wi(t){let e=jt(mi-1,0,fi-1),n=jt(vi+1,0,fi-1);while(null==t[e]&&e>0)e--;while(null==t[n]&&n<fi-1)n++;return[e,n]}function Hi(){fi>0&&(bt.forEach(((t,n)=>{if(n>0&&t.show&&(Bi(n,!1),Bi(n,!0),null==t._paths)){Li!=t.alpha&&(X.globalAlpha=Li=t.alpha);let o=2==r?[0,e[n][0].length-1]:Wi(e[n]);t._paths=t.paths(i,n,o[0],o[1]),1!=Li&&(X.globalAlpha=Li=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,mi,vi,n),o=t.points.filter(i,e,r,n);(r||o)&&(t.points._paths=t.points.paths(i,e,mi,vi,o),zi(e,!0))}1!=Li&&(X.globalAlpha=Li=1),Lo("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 p=!1;0!=u&&$t.forEach(((f,g)=>{if(f.series[0]==t){let t,m=bt[f.series[1]],v=e[f.series[1]],y=(m._paths||se).band;ce(y)&&(y=1==f.dir?y[0]:y[1]);let w=null;m.show&&y&&Ct(v,mi,vi)?(w=f.fill(i,g)||a,t=m._paths.clip):y=null,ar(n,r,o,s,w,l,c,u,h,d,t,y),p=!0}})),p||ar(n,r,o,s,a,l,c,u,h,d)}const sr=hi|di;function ar(t,e,n,i,r,o,s,a,l,c,u,h){Di(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&di?(cr(r,s),X.clip(h),lr(t,o,e)):a&hi&&(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=_i=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),Di(a,s,l,c,a),X.beginPath();let h,d,p,f,g=r+(0==i||3==i?-o:o);0==n?(d=r,f=g):(h=r,p=g);for(let m=0;m<t.length;m++)null!=e[m]&&(0==n?h=p=t[m]:d=f=t[m],X.moveTo(h,d),X.lineTo(p,f));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=kt[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,p=n._splits=n.splits(i,r,l,c,u,h,d),f=2==o.distr?p.map((t=>Ri[t])):p,g=2==o.distr?Ri[p[1]]-Ri[p[0]]:u,m=n._values=n.values(i,n.filter(i,f,r,h,g),r,h,g);n._rotate=2==s?n.rotate(i,m,r,h):0;let v=n._size;n._size=It(n.size(i,m,r,t)),null!=v&&n._size!=v&&(e=!1)})),e}function pr(t){let e=!0;return ci.forEach(((n,r)=>{let o=n(i,r,ei,t);o!=pi[r]&&(e=!1),pi[r]=o})),e}function fr(){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?A: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=kt[e.scale],d=0==s?tn:en,p=0==s?Ze:Je,f=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+f)*l,C=x+S;r=0==s?C:0,n=1==s?C:0;let k=e.font[0],$=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?A:T;Oi(k,a,$,E);let M=e.font[1]*e.lineGap,I=g.map((t=>ct(B(t,h,d,p)))),D=e._values;for(let t=0;t<D.length;t++){let e=D[t];if(null!=e){0==s?n=I[t]:r=I[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(I,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(I,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)}Lo("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,Cr,kr,$r,Ar,Tr=!1,Lr=!1,Rr=[];function Er(){Lr=!1;for(let t=0;t<Rr.length;t++)Lo(...Rr[t]);Rr.length=0}function Mr(){Tr||(Se(Dr),Tr=!0)}function Ir(t,e=!1){Tr=!0,Lr=e,t(i),Dr(),e&&Rr.length>0&&queueMicrotask(Er)}function Dr(){if(nn&&(Fi(),nn=!1),fn&&(kn(),fn=!1),rn){if(J(rt,L,Ve),J(rt,A,Ye),J(rt,k,ze),J(rt,$,Ge),J(st,L,Ve),J(st,A,Ye),J(st,k,ze),J(st,$,Ge),J(nt,k,He),J(nt,$,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,p)}else Q(t,p)})),wi=_i=xi=Ci=ki=$i=Ai=Ti=Si=null,Li=1,po(!0),Ve!=qe||Ye!=Ke||ze!=Xe||Ge!=Qe){gr(!1);let t=ze/Xe,e=Ge/Qe;if(Rn.show&&!yn&&Rn.left>=0){Rn.left*=t,Rn.top*=e,yr&&it(yr,Mt(Rn.left),0,ze,Ge),wr&&it(wr,0,Mt(Rn.top),ze,Ge);for(let n=1;n<On.length;n++)Pn[n]*=t,Gn[n]*=e,it(On[n],te(Pn[n],1),te(Gn[n],1),ze,Ge)}if(Hr.show&&!wn&&Hr.left>=0&&Hr.width>0){Hr.left*=t,Hr.width*=t,Hr.top*=e,Hr.height*=e;for(let t in mo)J(Br,t,Hr[t])}qe=Ve,Ke=Ye,Xe=ze,Qe=Ge}Lo("setSize"),rn=!1}He>0&&Be>0&&(X.clearRect(0,0,K.width,K.height),Lo("drawClear"),Et.forEach((t=>t())),Lo("draw")),Hr.show&&wn&&(zr(Hr),wn=!1),Rn.show&&yn&&(uo(null,!0,!1),yn=!1),be.show&&be.live&&_n&&(lo(),_n=!1),j||(j=!0,i.status=1,Lo("ready")),Ei=!1,Tr=!1}function Or(t,n){let r=kt[t];if(null==r.from){if(0==fi){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(fi>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;t==At&&2==r.distr&&fi>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,Mr()}}i.batch=Ir,i.redraw=(t,e)=>{fn=e||!1,!1!==t?jr(At,Wt.min,Wt.max):Mr()},i.setScale=Or;let Pr=!1;const Nr=Rn.drag;let Fr=Nr.x,Wr=Nr.y;Rn.show&&(Rn.x&&(mr=et(g,st)),Rn.y&&(vr=et(m,st)),0==Wt.ori?(yr=mr,wr=vr):(yr=vr,wr=mr),$r=Rn.left,Ar=Rn.top);const Hr=i.select=ve({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Br=Hr.show?et(f,Hr.over?st:rt):null;function zr(t,e){if(Hr.show){for(let e in t)Hr[e]=t[e],e in mo&&J(Br,e,t[e]);!1!==e&&Lo("setSelect")}}function Ur(t,e){let n=bt[t],i=_e?Te[t]:null;n.show?i&&Z(i,p):(i&&Q(i,p),On.length>1&&it(On[t],-10,-10,ze,Ge))}function jr(t,e,n){Or(t,{min:e,max:n})}function Gr(t,e,n,o){null!=e.focus&&to(t),null!=e.show&&bt.forEach(((n,i)=>{i>0&&(t==i||null==t)&&(n.show=e.show,Ur(i,e.show),2==r?(jr(n.facets[0].scale,null,null),jr(n.facets[1].scale,null,null)):jr(n.scale,null,null),Mr())})),!1!==n&&Lo("setSeries",t,e),o&&Do("setSeries",i,t,e)}function Vr(t,e){ve($t[t],e)}function Yr(t,e){t.fill=Gt(t.fill||null),t.dir=St(t.dir,-1),e=null==e?$t.length:e,$t.splice(e,0,t)}function qr(t){null==t?$t.length=0:$t.splice(t,1)}function Kr(t,e){bt[t].alpha=e,Rn.show&&On[t]&&(On[t].style.opacity=e),_e&&Te[t]&&(Te[t].style.opacity=e)}let Xr,Qr,Zr;i.setSelect=zr,i.setSeries=Gr,i.addBand=Yr,i.setBand=Vr,i.delBand=qr;const Jr={focus:!0};function to(t){if(t!=Zr){let e=null==t,n=1!=In.alpha;bt.forEach(((i,o)=>{if(1==r||o>0){let r=e||0==o||o==t;i._focus=e?null:r,n&&Kr(o,r?1:In.alpha)}})),Zr=t,n&&Mr()}}function eo(t,e,n){let i=kt[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 no(t,n){let i=eo(t,At,n);return dt(i,e[0],mi,vi)}function io(t,e){J(Br,L,Hr.left=t),J(Br,k,Hr.width=e)}function ro(t,e){J(Br,A,Hr.top=t),J(Br,$,Hr.height=e)}_e&&Dn&&Fe(N,Ce,(t=>{Rn._lock||(En(t),null!=Zr&&Gr(null,Jr,!0,Eo.setSeries))})),i.valToIdx=t=>dt(t,e[0]),i.posToIdx=no,i.posToVal=eo,i.valToPos=(t,e,n)=>0==kt[e].ori?W(t,kt[e],n?tn:ze,n?Ze:0):H(t,kt[e],n?en:Ge,n?Je:0),i.setCursor=(t,e,n)=>{$r=t.left,Ar=t.top,uo(null,e,n)};let oo=0==Wt.ori?io:ro,so=1==Wt.ori?io:ro;function ao(){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 lo(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)&&co(n,we[n]);_e&&be.live&&ao(),_n=!1,!1!==e&&Lo("setLegend")}function co(t,n){let r,o=bt[t],s=0==t&&2==Ut?Ri:e[t];Re?r=o.values(i,t,n)??Ee:(r=o.value(i,null==n?null:s[n],t,n),r=null==r?Ee:{_:r}),be.values[t]=r}function uo(t,n,o){let s;Cr=$r,kr=Ar,[$r,Ar]=Rn.move(i,$r,Ar),Rn.left=$r,Rn.top=Ar,Rn.show&&(yr&&it(yr,Mt($r),0,ze,Ge),wr&&it(wr,0,Mt(Ar),ze,Ge));let a=mi>vi;Xr=zt;let l=0==Wt.ori?ze:Ge,c=1==Wt.ori?ze:Ge;if($r<0||0==fi||a){s=Rn.idx=null;for(let t=0;t<bt.length;t++)t>0&&On.length>1&&it(On[t],-10,-10,ze,Ge);Dn&&Gr(null,Jr,!0,null==t&&Eo.setSeries),be.live&&(we.fill(s),_n=!0)}else{let t,n,o;1==r&&(t=0==Wt.ori?$r:Ar,n=eo(t,At),s=Rn.idx=dt(n,e[0],mi,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=Rn.dataIdx(i,a,s,n),p=null==d?null:1==r?e[a][d]:e[a][1][d];_n=_n||p!=h||d!=u,we[a]=d;let f=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==p?-10:Yt(p,1==r?kt[t.scale]:kt[t.facets[1].scale],c,0);if(Dn&&null!=p){let e=1==Wt.ori?$r:Ar,n=Rt(In.dist(i,a,d,o,e));if(n<Xr){let i=In.bias;if(0!=i){let r=eo(e,t.scale),o=p>=0?1:-1,s=r>=0?1:-1;s==o&&(1==s?1==i?p>=r:p<=r:1==i?p<=r:p>=r)&&(Xr=n,Qr=a)}else Xr=n,Qr=a}}if(0==Wt.ori?(e=f,n=o):(e=o,n=f),_n&&On.length>1){ot(On[a],Rn.points.fill(i,a),Rn.points.stroke(i,a));let t,r,o,s,l=!0,c=Rn.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=Rn.points.size(i,a);at(On[a],t,r,l),Pn[a]=o,Gn[a]=s,it(On[a],te(o,1),te(s,1),ze,Ge)}}}}if(Hr.show&&Pr)if(null!=t){let[e,n]=Eo.scales,[i,r]=Eo.match,[o,s]=t.cursor.sync.scales,a=t.cursor.drag;if(Fr=a._x,Wr=a._y,Fr||Wr){let a,u,h,d,p,{left:f,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&&Fr?(0==y?(a=f,u=m):(a=g,u=v),h=kt[e],d=Vt(w(a,o),h,l,0),p=Vt(w(a+u,o),h,l,0),oo(Dt(d,p),Rt(p-d))):oo(0,l),_&&Wr?(1==y?(a=f,u=m):(a=g,u=v),h=kt[n],d=Yt(w(a,s),h,c,0),p=Yt(w(a+u,s),h,c,0),so(Dt(d,p),Rt(p-d))):so(0,c)}else vo()}else{let t=Rt(Cr-br),e=Rt(kr-_r);if(1==Wt.ori){let n=t;t=e,e=n}Fr=Nr.x&&t>=Nr.dist,Wr=Nr.y&&e>=Nr.dist;let n,i,r=Nr.uni;null!=r?Fr&&Wr&&(Fr=t>=r,Wr=e>=r,Fr||Wr||(e>t?Wr=!0:Fr=!0)):Nr.x&&Nr.y&&(Fr||Wr)&&(Fr=Wr=!0),Fr&&(0==Wt.ori?(n=xr,i=$r):(n=Sr,i=Ar),oo(Dt(n,i),Rt(i-n)),Wr||so(0,c)),Wr&&(1==Wt.ori?(n=xr,i=$r):(n=Sr,i=Ar),so(Dt(n,i),Rt(i-n)),Fr||oo(0,l)),Fr||Wr||(oo(0,0),so(0,0))}if(Nr._x=Fr,Nr._y=Wr,null==t){if(o){if(null!=Mo){let[t,e]=Eo.scales;Eo.values[0]=null!=t?eo(0==Wt.ori?$r:Ar,t):null,Eo.values[1]=null!=e?eo(1==Wt.ori?$r:Ar,e):null}Do(I,i,$r,Ar,ze,Ge,s)}if(Dn){let t=o&&Eo.setSeries,e=In.prox;null==Zr?Xr<=e&&Gr(Qr,Jr,!0,t):Xr>e?Gr(null,Jr,!0,t):Qr!=Zr&&Gr(Qr,Jr,!0,t)}}_n&&(be.idx=s,lo()),!1!==n&&Lo("setCursor")}i.setLegend=lo;let ho=null;function po(t=!1){t?ho=null:(ho=st.getBoundingClientRect(),Lo("syncRect",ho))}function fo(t,e,n,i,r,o,s){Rn._lock||Pr&&null!=t&&0==t.movementX&&0==t.movementY||(go(t,e,n,i,r,o,s,!1,null!=t),null!=t?uo(null,!0,!0):uo(e,!0,!1))}function go(t,e,n,r,o,s,a,l,c){if(null==ho&&po(!1),En(t),null!=t)n=t.clientX-ho.left,r=t.clientY-ho.top;else{if(n<0||r<0)return $r=-10,void(Ar=-10);let[t,i]=Eo.scales,a=e.cursor.sync,[l,c]=a.values,[u,h]=a.scales,[d,p]=Eo.match,f=e.axes[0].side%2==1,g=0==Wt.ori?ze:Ge,m=1==Wt.ori?ze:Ge,v=f?s:o,y=f?o:s,w=f?r:n,b=f?n:r;if(n=null!=u?d(t,u)?B(l,kt[t],g,0):-10:g*(w/v),r=null!=h?p(i,h)?B(c,kt[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]=Rn.move(i,n,r)):($r=n,Ar=r)}Object.defineProperty(i,"rect",{get(){return null==ho&&po(!1),ho}});const mo={width:0,height:0,left:0,top:0};function vo(){zr(mo,!1)}let yo,wo,bo,_o;function xo(t,e,n,r,o,s,a){Pr=!0,Fr=Wr=Nr._x=Nr._y=!1,go(t,e,n,r,o,s,a,!0,!1),null!=t&&(Fe(O,G,So,!1),Do(D,i,xr,Sr,ze,Ge,null));let{left:l,top:c,width:u,height:h}=Hr;yo=l,wo=c,bo=u,_o=h,vo()}function So(t,e,n,r,o,s,a){Pr=Nr._x=Nr._y=!1,go(t,e,n,r,o,s,a,!1,!0);let{left:l,top:c,width:u,height:h}=Hr,d=u>0||h>0,p=yo!=l||wo!=c||bo!=u||_o!=h;if(d&&p&&zr(Hr),Nr.setScale&&d&&p){let t=l,e=u,n=c,i=h;if(1==Wt.ori&&(t=c,e=h,n=l,i=u),Fr&&jr(At,eo(t,At),eo(t+e,At)),Wr)for(let r in kt){let t=kt[r];r!=At&&null==t.from&&t.min!=zt&&jr(r,eo(n+i,r),eo(n,r))}vo()}else Rn.lock&&(Rn._lock=!Rn._lock,Rn._lock||uo(null,!0,!1));null!=t&&(We(O,G),Do(O,i,$r,Ar,ze,Ge,null))}function Co(t,e,n,i,r,o,s){if(Rn._lock)return;En(t);let a=Pr;if(Pr){let t,e,n=!0,i=!0,r=10;0==Wt.ori?(t=Fr,e=Wr):(t=Wr,e=Fr),t&&e&&(n=$r<=r||$r>=ze-r,i=Ar<=r||Ar>=Ge-r),t&&n&&($r=$r<xr?0:ze),e&&i&&(Ar=Ar<Sr?0:Ge),uo(null,!0,!0),Pr=!1}$r=-10,Ar=-10,uo(null,!0,!0),a&&(Pr=a)}function ko(t,e,n,r,o,s,a){Rn._lock||(En(t),Ii(),vo(),null!=t&&Do(F,i,$r,Ar,ze,Ge,null))}function $o(){_t.forEach(or),xn(i.width,i.height,!0)}ut(z,V,$o);const Ao={};Ao.mousedown=xo,Ao.mousemove=fo,Ao.mouseup=So,Ao.dblclick=ko,Ao["setSeries"]=(t,e,n,r)=>{let o=Eo.match[2];n=o(i,e,n),-1!=n&&Gr(n,r,!0,!1)},Rn.show&&(Fe(D,st,xo),Fe(I,st,fo),Fe(P,st,(t=>{En(t),po(!1)})),Fe(N,st,Co),Fe(F,st,ko),Ui.add(i),i.syncRect=po);const To=i.hooks=t.hooks||{};function Lo(t,e,n){Lr?Rr.push([t,e,n]):t in To&&To[t].forEach((t=>{t.call(null,i,e,n)}))}(t.plugins||[]).forEach((t=>{for(let e in t.hooks)To[e]=(To[e]||[]).concat(t.hooks[e])}));const Ro=(t,e,n)=>n,Eo=ve({key:null,setSeries:!1,filters:{pub:Xt,sub:Xt},scales:[At,bt[1]?bt[1].scale:null],match:[Qt,Qt,Ro],values:[null,null]},Rn.sync);2==Eo.match.length&&Eo.match.push(Ro),Rn.sync=Eo;const Mo=Eo.key,Io=ui(Mo);function Do(t,e,n,i,r,o,s){Eo.filters.pub(t,e,n,i,r,o,s)&&Io.pub(t,e,n,i,r,o,s)}function Oo(t,e,n,i,r,o,s){Eo.filters.sub(t,e,n,i,r,o,s)&&Ao[t](null,e,n,i,r,o,s)}function Po(){Io.unsub(i),Ui.delete(i),Ne.clear(),ht(z,V,$o),Y.remove(),Ce?.remove(),Lo("destroy")}function No(){Lo("init",t,e),Mi(e||t.data,!1),Zt[At]?Or(At,Zt[At]):Ii(),wn=Hr.show&&(Hr.width>0||Hr.height>0),yn=_n=!0,xn(t.width,t.height)}return Io.sub(i),i.pub=Oo,i.destroy=Po,bt.forEach(Yn),_t.forEach(ni),n?n instanceof HTMLElement?(n.appendChild(Y),No()):n(i,No):No(),i}sr.assign=ve,sr.fmtNum=At,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=ui;{sr.addGap=yi,sr.clipGaps=vi;let t=sr.paths={points:Mi};t.linear=Pi,t.stepped=Ni,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"),p={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"})};p.SELECTED_TEXT=p.SELECTION;var f=function(){function t(){this.snippetMap={},this.snippetNameMap={},this.variables=p}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(f.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 p=d.tabstopId,f=c[p],g=l.indexOf(d,h+1);if(u[p])u[p]===d&&(delete u[p],Object.keys(u).forEach((function(t){f.parents[t]=!0})));else{u[p]=d;var m=f.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===f.indexOf(d)&&f.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 p=this.session;!this.$inChange&&e&&1==p.getLength()&&!p.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),this.updateTabstopMarkers(),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,u=this.snippetId=(this.snippetId||0)+1;t.forEach((function(t,n){var r=this.$openTabstops[n]||t;r.snippetId=u;for(var o=0;o<t.length;o++){var h=t[o],d=l.fromPoints(h.start,h.end||h.start);v(d.start,e),v(d.end,e),d.original=h,d.tabstop=r,a.push(d),r!=t?r.unshift(d):r[o]=d,h.fmtString||r.firstNonLinked&&i?(d.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=d)}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.updateTabstopMarkers=function(){if(this.selectedTabstop){var t=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&t--,this.tabstops.forEach((function(e){e.snippetId===t?this.addTabstopMarkers(e):this.removeTabstopMarkers(e)}),this)}},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 f;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",p=u.isSafari?"menuitem":"option",f=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.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","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(f),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",p),i.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-label",n.getData(t).caption||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(f,"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,p=t.top-3*this.$borderSize;i||(i=p<=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 f=h.top>=0&&h.bottom<=a;if(!o&&!f)return!1;c.$maxPixelHeight=f?null:"top"===i?p: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 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,e){e=null==e?t.session.getPrecedingCharacter():e;return t.completers.some((function(t){if(t.triggerCharacters&&Array.isArray(t.triggerCharacters))return t.triggerCharacters.includes(e)}))}})),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"),p=t("./lib/scroll").preventParentScroll,f=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("autocomplete.loading","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||(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&&!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.getCompletionProvider().completions=this.completions,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),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}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_empty-message",!1),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",p));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",f),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")},Backspace:function(t){t.execCommand("backspace");var e=a.getCompletionPrefix(t);!e&&t.completer&&t.completer.detach()},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",f))),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 p=a.toLowerCase().indexOf(r);if(p>-1)d=p;else for(var f=0;f<e.length;f++){var g=a.indexOf(r[f],u+1),m=a.indexOf(i[f],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<<f),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 p,f={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){p=t;var i=t.editor.$liveAutocompletionDelay;i?w.delay(i):b(t)}},w=s.delayedCall((function(){b(p)}),0),b=function(t){var e=t.editor,n=a.getCompletionPrefix(e),i=t.args,o=a.triggerAutocomplete(e,i);if(n&&n.length>=e.$liveAutocompletionThreshold||o){var s=r.for(e);s.autoShown=!0,s.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(f),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(f),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-box.find.placeholder","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("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("search-box.toggle-replace.title","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("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("search-box.toggle-in-selection.title","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("search-box.search-counter","$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 p=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]);h.prototype.$searchBarKb=d,h.prototype.$closeSearchBarKb=p,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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},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
|
-
/*
|
3
|
-
* based on code from:
|
4
|
-
*
|
5
|
-
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
-
* Available via the MIT or new BSD license.
|
7
|
-
* see: http://github.com/jrburke/requirejs for details
|
8
|
-
*/
|
9
|
-
"use strict";var i=t("./dom");e.get=function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.responseText)},n.send(null)},e.loadScript=function(t,e){var n=i.getDocumentHead(),r=document.createElement("script");r.src=t,n.appendChild(r),r.onload=r.onreadystatechange=function(t,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||e())}},e.qualifyURL=function(t){var e=document.createElement("a");return e.href=t,e.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(t,e,n){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(t,e,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(t,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[t]||[],i=this._defaultHandlers[t];if(n.length||i){"object"==typeof e&&e||(e={}),e.type||(e.type=t),e.stopPropagation||(e.stopPropagation=r),e.preventDefault||(e.preventDefault=o),n=n.slice();for(var s=0;s<n.length;s++)if(n[s](e,this),e.propagationStopped)break;return i&&!e.defaultPrevented?i(e,this):void 0}},i._signal=function(t,e){var n=(this._eventRegistry||{})[t];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](e,this)}},i.once=function(t,e){var n=this;if(this.on(t,(function i(){n.off(t,i),e.apply(null,arguments)})),!e)return new Promise((function(t){e=t}))},i.setDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[t]){var i=n[t],r=n._disabled_[t];r||(n._disabled_[t]=r=[]),r.push(i);var o=r.indexOf(e);-1!=o&&r.splice(o,1)}n[t]=e},i.removeDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n){var i=n._disabled_[t];if(n[t]==e)i&&this.setDefaultHandler(t,i.pop());else if(i){var r=i.indexOf(e);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(t,e,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[t];return i||(i=this._eventRegistry[t]=[]),-1==i.indexOf(e)&&i[n?"unshift":"push"](e),e},i.off=i.removeListener=i.removeEventListener=function(t,e){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[t];if(n){var i=n.indexOf(e);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(t){t||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[t]=void 0),this._defaultHandlers&&(this._defaultHandlers[t]=void 0)},e.EventEmitter=i})),ace.define("ace/lib/report_error",["require","exports","module"],(function(t,e,n){e.reportError=function(t,e){var n=new Error(t);n["data"]=e,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}})),ace.define("ace/lib/default_english_messages",["require","exports","module"],(function(t,e,n){var i={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages"};e.defaultEnglishMessages=i})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],(function(t,e,n){var i,r,o=t("./oop"),s=t("./event_emitter").EventEmitter,a=t("./report_error").reportError,l=t("./default_english_messages").defaultEnglishMessages,c={setOptions:function(t){Object.keys(t).forEach((function(e){this.setOption(e,t[e])}),this)},getOptions:function(t){var e={};if(t)Array.isArray(t)||(e=t,t=Object.keys(e));else{var n=this.$options;t=Object.keys(n).filter((function(t){return!n[t].hidden}))}return t.forEach((function(t){e[t]=this.getOption(t)}),this),e},setOption:function(t,e){if(this["$"+t]!==e){var n=this.$options[t];if(!n)return u('misspelled option "'+t+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(t,e);n.handlesSet||(this["$"+t]=e),n&&n.set&&n.set.call(this,e)}},getOption:function(t){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].getOption(t):e&&e.get?e.get.call(this):this["$"+t]:u('misspelled option "'+t+'"')}};function u(t){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var h=function(){function t(){this.$defaultOptions={},i=l,r="dollarSigns"}return t.prototype.defineOptions=function(t,e,n){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(n).forEach((function(e){var i=n[e];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=e),t.$options[i.name]=i,"initialValue"in i&&(t["$"+i.name]=i.initialValue)})),o.implement(t,c),this},t.prototype.resetOptions=function(t){Object.keys(t.$options).forEach((function(e){var n=t.$options[e];"value"in n&&t.setOption(e,n.value)}))},t.prototype.setDefaultValue=function(t,e,n){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var i=this.$defaultOptions[t]||(this.$defaultOptions[t]={});i[e]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,e,n):i[e].value=n)},t.prototype.setDefaultValues=function(t,e){Object.keys(e).forEach((function(n){this.setDefaultValue(t,n,e[n])}),this)},t.prototype.setMessages=function(t,e){i=t,e&&e.placeholders&&(r=e.placeholders)},t.prototype.nls=function(t,e,n){i[t]||(u("No message found for the key '"+t+"' in the provided messages, trying to find a translation for the default string '"+e+"'."),i[e]||u("No message found for the default string '"+e+"' in the provided messages. Falling back to the default English message."));var o=i[t]||i[e]||e;return n&&("dollarSigns"===r&&(o=o.replace(/\$(\$|[\d]+)/g,(function(t,e){return"$"==e?"$":n[e]}))),"curlyBrackets"===r&&(o=o.replace(/\{([^\}]+)\}/g,(function(t,e){return n[e]})))),o},t}();h.prototype.warn=u,h.prototype.reportError=a,o.implement(h.prototype,s),e.AppConfig=h})),ace.define("ace/theme/textmate-css",["require","exports","module"],(function(t,e,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],(function(t,e,n){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText=t("./textmate-css"),e.$id="ace/theme/textmate";var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(t,e,n){var i=t("./lib/lang"),r=t("./lib/net"),o=t("./lib/dom"),s=t("./lib/app_config").AppConfig;n.exports=e=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};e.get=function(t){if(!a.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return a[t]},e.set=function(t,e){if(a.hasOwnProperty(t))a[t]=e;else if(0==this.setDefaultValue("",t,e))throw new Error("Unknown config key: "+t);"useStrictCSP"==t&&o.useStrictCSP(e)},e.all=function(){return i.copyObject(a)},e.$modes={},e.moduleUrl=function(t,e){if(a.$moduleUrls[t])return a.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var i="snippets"==e?"/":"-",r=n[n.length-1];if("worker"==e&&"-"==i){var o=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");r=r.replace(o,"")}(!r||r==e)&&n.length>1&&(r=n[n.length-2]);var s=a[e+"Path"];return null==s?s=a.basePath:"/"==i&&(e=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+e+i+r+this.get("suffix")},e.setModuleUrl=function(t,e){return a.$moduleUrls[t]=e};var l,c=function(e,n){return"ace/theme/textmate"===e||"./theme/textmate"===e?n(null,t("./theme/textmate")):l?l(e,n):void console.error("loader is not configured")};e.setLoader=function(t){l=t},e.dynamicModules=Object.create(null),e.$loading={},e.$loaded={},e.loadModule=function(t,n){var i;if(Array.isArray(t))var o=t[0],s=t[1];else if("string"==typeof t)s=t;var a=function(t){if(t&&!e.$loading[s])return n&&n(t);if(e.$loading[s]||(e.$loading[s]=[]),e.$loading[s].push(n),!(e.$loading[s].length>1)){var i=function(){c(s,(function(t,n){n&&(e.$loaded[s]=n),e._emit("load.module",{name:s,module:n});var i=e.$loading[s];e.$loading[s]=null,i.forEach((function(t){t&&t(n)}))}))};if(!e.get("packaged"))return i();r.loadScript(e.moduleUrl(s,o),i),u()}};if(e.dynamicModules[s])e.dynamicModules[s]().then((function(t){t.default?a(t.default):a(t)}));else{try{i=this.$require(s)}catch(l){}a(i||e.$loaded[s])}},e.$require=function(t){if("function"==typeof n["require"]){var e="require";return n[e](t)}},e.setModuleLoader=function(t,n){e.dynamicModules[t]=n};var u=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};e.version="1.35.4"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(t,e,i){"use strict";t("./lib/fixoldbrowsers");var r=t("./config");r.setLoader((function(e,n){t([e],(function(t){n(null,t)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function s(e){if(o&&o.document){r.set("packaged",e||t.packaged||i.packaged||o.define&&n.amdD.packaged);var s={},l="",c=document.currentScript||document._currentScript,u=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var h=u.getElementsByTagName("script"),d=0;d<h.length;d++){var p=h[d],f=p.src||p.getAttribute("src");if(f){for(var g=p.attributes,m=0,v=g.length;m<v;m++){var y=g[m];0===y.name.indexOf("data-ace-")&&(s[a(y.name.replace(/^data-ace-/,""))]=y.value)}var w=f.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(l=w[1])}}for(var b in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)"undefined"!==typeof s[b]&&r.set(b,s[b])}}function a(t){return t.replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}i.exports=function(e){r.init=s,r.$require=t,e.require=t,e.define=n.amdD},s(!0)})),ace.define("ace/range",["require","exports","module"],(function(t,e,n){"use strict";var i=function(){function t(t,e,n,i){this.start={row:t,column:e},this.end={row:n,column:i}}return t.prototype.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},t.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},t.prototype.contains=function(t,e){return 0==this.compare(t,e)},t.prototype.compareRange=function(t){var e,n=t.end,i=t.start;return e=this.compare(n.row,n.column),1==e?(e=this.compare(i.row,i.column),1==e?2:0==e?1:0):-1==e?-2:(e=this.compare(i.row,i.column),-1==e?-1:1==e?42:0)},t.prototype.comparePoint=function(t){return this.compare(t.row,t.column)},t.prototype.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},t.prototype.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},t.prototype.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},t.prototype.isStart=function(t,e){return this.start.row==t&&this.start.column==e},t.prototype.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},t.prototype.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},t.prototype.inside=function(t,e){return 0==this.compare(t,e)&&(!this.isEnd(t,e)&&!this.isStart(t,e))},t.prototype.insideStart=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)},t.prototype.insideEnd=function(t,e){return 0==this.compare(t,e)&&!this.isStart(t,e)},t.prototype.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?t<this.start.row?-1:t>this.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:e<this.start.column?-1:e>this.end.column?1:0},t.prototype.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},t.prototype.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},t.prototype.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},t.prototype.clipRows=function(e,n){if(this.end.row>n)var i={row:n+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>n)var r={row:n+1,column:0};else if(this.start.row<e)r={row:e,column:0};return t.fromPoints(r||this.start,i||this.end)},t.prototype.extend=function(e,n){var i=this.compare(e,n);if(0==i)return this;if(-1==i)var r={row:e,column:n};else var o={row:e,column:n};return t.fromPoints(r||this.start,o||this.end)},t.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},t.prototype.isMultiLine=function(){return this.start.row!==this.end.row},t.prototype.clone=function(){return t.fromPoints(this.start,this.end)},t.prototype.collapseRows=function(){return 0==this.end.column?new t(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new t(this.start.row,0,this.end.row,0)},t.prototype.toScreenRange=function(e){var n=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new t(n.row,n.column,i.row,i.column)},t.prototype.moveBy=function(t,e){this.start.row+=t,this.start.column+=e,this.end.row+=t,this.end.column+=e},t}();i.fromPoints=function(t,e){return new i(t.row,t.column,e.row,e.column)},i.comparePoints=function(t,e){return t.row-e.row||t.column-e.column},e.Range=i})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(t,e,n){"use strict";for(var i=t("./oop"),r={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","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},o={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)o["Digit"+s]=48+s,o["Numpad"+s]=96+s,r.PRINTABLE_KEYS[48+s]=""+s,r.FUNCTION_KEYS[96+s]="Numpad"+s;for(s=65;s<91;s++){var a=String.fromCharCode(s+32);o["Key"+a.toUpperCase()]=s,r.PRINTABLE_KEYS[s]=a}for(s=1;s<13;s++)o["F"+s]=111+s,r.FUNCTION_KEYS[111+s]="F"+s;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)o[c]=o[c+"Left"]=o[c+"Right"]=l[c];for(var u in e.$codeToKeyCode=o,r.PRINTABLE_KEYS[173]="-",r.FUNCTION_KEYS){var h=r.FUNCTION_KEYS[u].toLowerCase();r[h]=parseInt(u,10)}for(var u in r.PRINTABLE_KEYS){h=r.PRINTABLE_KEYS[u].toLowerCase();r[h]=parseInt(u,10)}i.mixin(r,r.MODIFIER_KEYS),i.mixin(r,r.PRINTABLE_KEYS),i.mixin(r,r.FUNCTION_KEYS),r.enter=r["return"],r.escape=r.esc,r.del=r["delete"],function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)r.KEY_MODS[e]=t.filter((function(t){return e&r.KEY_MODS[t]})).join("-")+"-"}(),r.KEY_MODS[0]="",r.KEY_MODS[-1]="input-",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())};function p(t){return(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)}function f(t,e,n){var i=p(e);if(!n&&e.code&&(n=r.$codeToKeyCode[e.code]||n),!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=e.location;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||3!==e.location||(t(e,i,-n),!e.defaultPrevented)){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.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 p(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",p,s)}))},e.getModifierString=function(t){return r.KEY_MODS[p(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=f(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,p=400,f=t("../lib/keys"),g=f.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,C=!1,k="",$=0,A=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("text-input.aria-roledescription","editor"));var i="";if(e.$textInputAriaLabel&&(i+="".concat(e.$textInputAriaLabel,", ")),e.session){var r=e.session.selection.cursor.row;i+=o("text-input.aria-label","Cursor at row $0",[r+1])}n.setAttribute("aria-label",i)}},this.setAriaOptions({role:"textbox"}),r.addListener(n,"blur",(function(t){C||(e.onBlur(t),M=!1)}),e),r.addListener(n,"focus",(function(t){if(!C){if(M=!0,s.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),s.isEdge?setTimeout(D):D()}}),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&&(k=n.value="",q()),D()}}));var I=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},D=m?function(t){if(M&&(!i||t)&&!_){t||(t="");var r="\n ab"+t+"cde fg\n";r!=n.value&&(n.value=k=r);var o=4,s=4+(t.length||(e.selection.isEmpty()?0:1));$==o&&A==s||n.setSelectionRange(o,s),$=o,A=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=I(s.start.row,s.start.column),i=I(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>p&&(t<p&&i<p?r=r.slice(0,p):(r="\n",t==i?t=i=0:(t=0,i=1)));var d=r+"\n\n";d!=k&&(n.value=k=d,$=A=d.length)}if(F&&($=n.selectionStart,A=n.selectionEnd),A!=i||$!=t||n.selectionEnd!=A)try{n.setSelectionRange(t,i),$=t,A=i}catch(nt){}b=!1}};this.resetSelection=D,M&&e.onFocus();var O=function(t){return 0===t.selectionStart&&t.selectionEnd>=k.length&&t.value===k&&k&&t.selectionEnd!==A},P=function(t){b||(i?i=!1:O(n)?(e.selectAll(),D()):y&&n.selectionStart!=$&&D())},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 D(),t&&e.onPaste(t),w=!1,"";var r=n.selectionStart,o=n.selectionEnd,a=$,l=k.length-A,c=t,u=t.length-r,h=t.length-o,d=0;while(a>0&&k[d]==t[d])d++,a--;c=c.slice(d),d=1;while(l>0&&k.length-d>$-1&&k[k.length-d]==t[t.length-d])d++,l--;u-=d-1,h-=d-1;var p=c.length-d+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!i&&!c&&!u&&!a&&!l&&!h)return"";_=!0;var f=!1;return s.isAndroid&&". "==c&&(c=" ",f=!0),c&&!a&&!l&&!u&&!h||S?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),_=!1,k=t,$=r,A=o,T=h,f?"\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>p+100||v.test(r)||y&&$<1&&$==A)&&D()},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&&(D(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,D(),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(D),r.preventDefault(t)):(n.value="",w=!0))};r.addCommandKeyListener(n,(function(t,n,i){if(!b)return e.onCommandKey(t,n,i)}),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=$,e.onCompositionStart(b),b.useTextareaForIME?(k=n.value="",$=0,A=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+A-b.selectionStart+T)}}},q=function(t){e.onCompositionEnd&&!e.$readOnly&&(b=!1,e.onCompositionEnd(),e.off("mousedown",K),t&&H())};function K(){C=!0,n.blur(),n.focus(),C=!1}var X,Q=l.delayedCall(Y,50).schedule.bind(null,null);function Z(t){27==t.keyCode&&n.value.length<n.selectionStart&&(b||(k=n.value),$=A=-1,D()),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,D(),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: -"+($+A)*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=f.up:1==r?a=f.home:s>A&&"\n"==k[s]?a=f.end:r<$&&" "==k[r-1]?(a=f.left,l=g.option):r<$||r==$&&A!=$&&r==s?a=f.left:s>A&&k.slice(0,s).split("\n").length>2?a=f.down:s>A&&" "==k[s-1]?(a=f.right,l=g.option):(s>A||s==A&&A!=$&&r==s)&&(a=f.right),r!==s&&(l|=g.shift),a){var c=e.onCommandKey({},l,a);if(!c&&e.commands){a=f.keyCodeToString(a);var u=e.commands.findKeyCommand(l,a);u&&e.execCommand(u)}$=r,A=s,D("")}}};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(p){n={error:p}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(f){t={error:f}}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,p=window.innerHeight-a.pageY-o.lineHeight,f=!0;a.pageY-u<0&&a.pageY<p&&(f=!1),c.style.maxHeight=(f?a.pageY:p)-r+"px",c.style.top=f?"":a.pageY+o.lineHeight+"px",c.style.bottom=f?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","ace/lib/lang"],(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;t("../lib/lang");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 p=d.element.querySelector(".ace_gutter_annotation"),f=p.getBoundingClientRect(),g=a.getElement().style;g.left=f.right+"px",g.top=f.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("gutter-tooltip.aria-label.error.singular","error"),plural:l("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:l("gutter-tooltip.aria-label.warning.singular","warning"),plural:l("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:l("gutter-tooltip.aria-label.info.singular","information message"),plural:l("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(t){var n,i,r=this.editor.renderer.$gutterLayer,s=r.$annotations[t];i=s?{displayText:Array.from(s.displayText),type:Array.from(s.type)}:{displayText:[],type:[]};var a=r.session.getFoldLine(t);if(a&&r.$showFoldedAnnotations){for(var l,c={error:[],warning:[],info:[]},u=t+1;u<=a.end.row;u++)if(r.$annotations[u])for(var h=0;h<r.$annotations[u].text.length;h++){var d=r.$annotations[u].type[h];c[d].push(r.$annotations[u].text[h]),"error"!==d?"warning"!==d||(l="warning_fold"):l="error_fold"}if("error_fold"===l||"warning_fold"===l){var p="".concat(e.annotationsToSummaryString(c)," in folded code.");i.displayText.push(p),i.type.push(l)}}if(0===i.displayText.length)return this.hide();var f={error:[],warning:[],info:[]},g=r.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(u=0;u<i.displayText.length;u++){var m=o.createElement("span"),v=o.createElement("span");(n=v.classList).add.apply(n,["ace_".concat(i.type[u]),g]),v.setAttribute("aria-label","".concat(e.annotationLabels[i.type[u].replace("_fold","")].singular)),v.setAttribute("role","img"),v.appendChild(o.createTextNode(" ")),m.appendChild(v),m.appendChild(o.createTextNode(i.displayText[u])),m.appendChild(o.createElement("br")),f[i.type[u].replace("_fold","")].push(m)}var y=this.getElement();o.removeChildren(y),f.error.forEach((function(t){return y.appendChild(t)})),f.warning.forEach((function(t){return y.appendChild(t)})),f.info.forEach((function(t){return y.appendChild(t)})),y.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,p,f,g,m,v,y,w,b,_,x=e.container,S=0;function C(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:p};else{var s=u(_.x,_.y,d,p);s>l?b=null:i-b>=a&&(e.renderer.scrollCursorIntoView(),b=null)}}function k(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:p-a.top,bottom:a.bottom-p}},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 f=t.row!=h.row,g=t.column!=h.column,m=!n||t.row!=n.row;f||g&&!m?w?i-w>=s&&e.renderer.scrollCursorIntoView(h):w=i:w=null}function $(){var t=m;m=e.renderer.screenToTextCoordinates(d,p),C(m,t),k(m,t)}function A(){g=e.selection.toOrientedRange(),h=e.session.addMarker(g,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),$(),f=setInterval($,20),S=0,r.addListener(document,"mousemove",R)}function T(){clearInterval(f),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,p=t.clientY,h||A(),S++,t.dataTransfer.dropEffect=v=M(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&E(t.dataTransfer))return d=t.clientX,p=t.clientY,h||(A(),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,p,f="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(),s=e.session.getUndoManager().hasUndo();p.replaceChild(o.buildDom(n?["span",!i&&r("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&r("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&r("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],t&&r("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],s&&r("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],r("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],r("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild)},r=function(t){return e.commands.canExecute(t,e)},s=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)),p.firstChild.style.display="none",n=!1,"openCommandPalette"!=o&&e.focus()};p=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){f="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),s(t)},onclick:s},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container)}function b(){if(e.getOption("enableMobileMenu")){p||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();p.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=i+r-o.left+"px"),p.style.display="",p.firstChild.style.display="none",e.on("input",_)}else p&&_()}function _(t){p&&(p.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()),f="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(),f="wait"}function C(){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(f="zoom");d=e.$mouseHandler.isMousePressed=!0;var o=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,p=t.timeStamp;l=p;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 C=new i(t,e);if(h=C.getDocumentPosition(),p-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,S();else{m=0;var k=e.selection.cursor,$=e.selection.isEmpty()?k:e.selection.anchor,A=e.renderer.$cursorLayer.getPixelPosition(k,!0),T=e.renderer.$cursorLayer.getPixelPosition($,!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(f="zoom");var I=M(t.clientX-L.left-A.left+E,t.clientY-L.top-A.top+R),D=M(t.clientX-L.left-T.left+E,t.clientY-L.top-T.top+R);I<3.5&&D<3.5&&(f=I>D?"cursor":"anchor"),f=D<3.5?"anchor":I<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p}),e),r.addListener(t,"touchend",(function(t){d=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==f?(f="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==f?(C(),_()):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"==f)){var o=r[0],a=n-o.clientX,u=s-o.clientY;if("wait"==f){if(!(a*a+u*u>4))return t.preventDefault();f="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"==f){var p=new i(t,e);p.speed=1,p.wheelX=a,p.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",p),p.propagationStopped||(v=y=0)}else{var g=new i(t,e),m=g.getDocumentPosition();"cursor"==f?e.selection.moveCursorToPosition(m):"anchor"==f&&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,p=1,f=2,g=3,m=4,v=5,y=6,w=7,b=8,_=9,x=10,S=11,C=12,k=13,$=14,A=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,_,_,f,f,f,f,f,f,f,f,f,f,_,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,f,f,m,d,m,m,m,f,d,m,m,m,m,m],M=[b,b,b,b,b,b,b,b,b,b,b,R,R,R,d,p,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,k,$,A,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 I(t,e,n,u){var h=i?c:l,d=null,p=null,f=null,g=0,m=null,w=null,_=-1,x=null,S=null,C=[];if(!u)for(x=0,u=[];x<n;x++)u[x]=P(t[x]);for(r=i,o=!1,s=!1,a=!1,S=0;S<n;S++){if(d=g,C[S]=p=O(t,u,C,S),g=h[d][p],m=240&g,g&=15,e[S]=f=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]=f;_=-1}u[S]==v&&(e[S]=0),r|=f}if(a)for(x=0;x<n;x++)if(u[x]==y){e[x]=i;for(var k=x-1;k>=0;k--){if(u[k]!=b)break;e[k]=i}}}function D(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 p:o=!1;case m:case g:return E;case f:return o?g:f;case w:return o=!0,p;case b:return m;case _:return r<1||r+1>=e.length||(l=n[r-1])!=f&&l!=g||(c=e[r+1])!=f&&c!=g?m:(o&&(c=g),c==l?c:m);case x:return l=r>0?n[r-1]:v,l==f&&r+1<e.length&&e[r+1]==f?f:m;case S:if(r>0&&n[r-1]==f)return f;if(o)return m;h=r+1,u=e.length;while(h<u&&e[h]==S)h++;return h<u&&e[h]==f?f:m;case C:u=e.length,h=r+1;while(h<u&&e[h]==C)h++;if(h<u){var M=t[r],I=M>=1425&&M<=2303||64286==M;if(l=e[h],I&&(l==p||l==w))return p}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 k:case $:case T:case L:case A: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)?p:d:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?C:/[\u0660-\u0669\u066b-\u066c]/.test(t)?g:1642==e?S:/[\u06f0-\u06f9]/.test(t)?f:w:32==n&&e<=8287?M[255&e]:254==n&&e>=65136?w:m}e.L=d,e.R=p,e.EN=f,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,I(o,l,o.length,n);for(var c=0;c<s.length;s[c]=c,c++);D(2,l,s),D(1,l,s);for(c=0;c<s.length-1;c++)n[c]===g?l[c]=e.AN:l[c]===p&&(n[c]>w&&n[c]<k||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]!=p&&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,p=0;p<r.length;p++)d=i.logicalFromVisual[p],n=r[p],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&&p===r.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var f=0;f<o.length;f++)o[f].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 p=s.defaultToken,f=null,g=l[0],m=a.lastIndex;if(m-g.length>u){var v=t.substring(u,m-g.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){f=o[s[y]],p=f.onMatch?f.onMatch(g,i,n,t):f.token,f.next&&(i="string"==typeof f.next?f.next:f.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),f.consumeLineEnd&&(u=m);break}if(g)if("string"===typeof p)f&&!1===f.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:g}):d.value+=g;else if(p){d.type&&c.push(d),d={type:null,value:""};for(y=0;y<p.length;y++)c.push(p[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 p="string"==typeof l?l:l.include;if(p&&("$self"===p&&(p="start"),c=Array.isArray(p)?p.map((function(t){return i[t]})):i[p]),c){var f=[a,1].concat(c);l.noEscape&&(f=f.filter((function(t){return!t.next}))),s.splice.apply(s,f),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={'"':'"',"'":"'"},p=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:""}},f=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){p(o);var h=o.getSelectionRange(),d=s.doc.getTextRange(h),g=s.getTokenAt(c.row,c.column);if(""!==d&&"{"!==d&&o.getWrapBehavioursEnabled())return f(h,d,"{","}");if(g&&/(?:string)\.quasi|\.xml/.test(g.type)){var m=[/tag\-(?:open|name)/,/attribute\-name/];if(m.some((function(t){return t.test(g.type)}))||/(string)\.quasi/.test(g.type)&&"$"!==g.value[c.column-g.start-1])return;return r.recordAutoInsert(o,s,"}"),{text:"{}",selection:[1,1]}}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){p(o);var v=u.substring(c.column,c.column+1);if("}"==v){var y=s.$findOpeningBracket("}",{column:c.column+1,row:c.row});if(null!==y&&r.isAutoInsertedClosing(c,u,a))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){p(o);var w="";r.isMaybeInsertedClosing(c,u)&&(w=l.stringRepeat("}",i.maybeInsertedBrackets),r.clearMaybeInsertedClosing());v=u.substring(c.column,c.column+1);if("}"===v){var b=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!b)return null;var _=this.$getIndent(s.getLine(b.row))}else{if(!w)return void r.clearMaybeInsertedClosing();_=this.$getIndent(u)}var x=_+s.getTabString();return{text:"\n"+x+"\n"+_+w,selection:[1,x.length,1,x.length]}}r.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){p(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){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"(",")");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){p(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){p(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){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return f(s,a,"[","]");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){p(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){p(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;p(n);var s=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return f(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),C=i.$mode.$pairQuotesAfter,k=C&&C[s]&&C[s].test(h);if(!k&&x||S)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var $=u[c.column-2];if(h==s&&($==s||_.test($)))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)){p(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();if(0===o.column)return;for(var s=i.doc.getLine(o.row),a=i.doc.getLine(o.row+1),l=i.getTokens(o.row),c=0,u=0;u<l.length;u++){c+=l[u].value.length;var h=l[u];if(c>=o.column){if(c===o.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var d=l[u+1];if(!d||!/\.doc/.test(d.type))return}}var p=o.column-(c-h.value.length),f=h.value.indexOf("*/"),g=h.value.indexOf("/**",f>-1?f+2:0);if(-1!==g&&p>g&&p<g+3)return;if(-1!==f&&-1!==g&&p>=f&&p<=g||!/\.doc/.test(h.type))return;break}}var m=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:r+m+"* ",selection:[1,2+m.length,1,2+m.length]}:{text:r+m+" * ",selection:[1,3+m.length,1,3+m.length]};if(/\/\*\*/.test(s.substring(0,o.column)))return{text:r+m+" * "+r+" "+m+"*/",selection:[1,4+m.length,1,4+m.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("|"),p=this.lineCommentStart[0];else g=c.escapeRegExp(this.lineCommentStart),p=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=p+" ",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},p))},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 p=this.blockComment.start,f=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(f)+")\\s*$"),v=function(t,e){w(t,e)||o&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},f),r.insertInLine({row:e,column:a},p))},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,p;while(l&&/comment/.test(l.type)){var f=l.value.indexOf(r.start);if(-1!=f){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;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)){f=l.value.indexOf(r.end);if(-1!=f){g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;p=new h(g,m,g,m+r.end.length);break}l=a.stepForward()}p&&e.remove(p),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),p=d.toString();l[p]||(l[p]=!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)f(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;f(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)f(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;f(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)f(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;f(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)f(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;f(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 p(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)s(t.start,e.start)<0?f(e,t,1):f(t,e,1);else if(n&&!i)s(t.start,e.end)>=0?f(t,e,-1):(s(t.start,e.start)<=0||f(t,o.fromPoints(e.start,t.start),-1),f(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?f(e,t,-1):(s(e.start,t.start)<=0||f(e,o.fromPoints(t.start,e.start),-1),f(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)f(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);f(t,e,-1)}return[e,t]}function f(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=p(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 p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(t){n.addSubFold(t)})));for(var f=0;f<i.length;f++){var g=i[f];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[f+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));o=r.stepForward()}c.start.row=r.getCurrentTokenRow(),c.start.column=r.getCurrentTokenColumn()+o.value.length,r=new s(this,t,e);var u=this.getState(r.$row);if(-1!=n){var h=-1;do{if(o=r.stepForward(),-1==h){var d=this.getState(r.$row);u.toString()!==d.toString()&&(h=r.$row)}else if(r.$row>h)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),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,-1!==n.type.indexOf("tag-close")&&!c){var u=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);c=!0}if(e=t.stepForward(),e){if(">"===e.value&&!c){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(-1===e.type.indexOf("tag-close")&&(e=t.stepForward()),!e||">"!==e.value)return;var p=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,p=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&&p&&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,p.end.row,p.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(-1===e.type.indexOf("tag-close")&&(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),p=new r(t.getCurrentTokenRow(),t.getCurrentTokenColumn(),t.getCurrentTokenRow(),t.getCurrentTokenColumn()+1);do{e=t.stepForward()}while(e&&">"!==e.value);var f=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 p&&f&&c&&h&&d&&u?{openTag:new r(p.start.row,p.start.column,f.end.row,f.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,p=t("./search_highlight").SearchHighlight,f=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 f;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 p(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 p=Array(a);p.unshift(o,0);var f=e?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,p);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 p=o+e-d;if(t[p-1]>=_&&t[p]>=_)h(p);else if(t[p]!=y&&t[p]!=w){var f=Math.max(p-(e-(e>>2)),o-1);while(p>f&&t[p]<y)p--;if(a){while(p>f&&t[p]<y)p--;while(p>f&&t[p]==b)p--}else while(p>f&&t[p]<_)p--;p>f?h(++p):(p=o+e,t[p]==v&&p--,h(p-d))}else{for(p;p!=o-1;p--)if(t[p]==y)break;if(p>o){h(p);continue}for(p=o+e,p;p<t.length;p++)if(t[p]!=w)break;if(p==t.length)break;h(p)}}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&&C(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&&C(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 p=this.getLength()-1,f=this.getNextFoldLine(o),g=f?f.start.row:1/0;while(a<=t){if(l=this.getRowLength(o),a+l>t||o>=p)break;a+=l,o++,o>g&&(o=f.end.row+1,f=this.getNextFoldLine(o,f),g=f?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a))}if(f&&f.start.row<=o)i=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=t||o>p)return{row:p,column:this.getLine(p).length};i=this.getLine(o),f=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),f?f.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),p=d?d.start.row:1/0;while(a<t){if(a>=p){if(s=d.end.row+1,s>t)break;d=this.getNextFoldLine(s,d),p=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 f="";d&&a>=p?(f=this.getFoldDisplayLine(d,t,e),r=d.start.row):(f=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(f.length>=m[v])i++,v++;f=f.substring(m[v-1]||0,f.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(f)[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.getPrecedingCharacter=function(){var t=this.selection.getCursor();if(0===t.column)return 0===t.row?"":this.doc.getNewLineCharacter();var e=this.getLine(t.row);return e[t.column-1]},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=C,i.implement(g.prototype,a);var m=1,v=2,y=3,w=4,b=9,_=10,x=11,S=12;function C(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 p=r[h],f=r[h+c-1],g=p.length-p.match(a[0])[0].length,m=f.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(n.regExp||(e=e.replace(/\$/g,"$$$$")),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(!p(n,l.column,t)){for(n--;n>=c;n--)if(p(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=u,c=l.row;n>=c;n--)if(p(n,Number.MAX_VALUE,t))return}};else h=function(t){var n=l.row;if(!p(n,l.column,t)){for(n+=1;n<=u;n++)if(p(n,0,t))return;if(0!=e.wrap)for(n=c,u=l.row;n<=u;n++)if(p(n,0,t))return}};if(e.$isMultiLine)var d=n.length,p=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)p=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 p=c[d-1];h=c[d];if(o(e,p,e,p+h))return!0}};else p=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]),!this.canExecute(t,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.canExecute=function(t,e){return"string"===typeof t&&(t=this.commands[t]),!!t&&(!(e&&e.$readOnly&&!t.readOnly)&&!(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e)))},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()},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,p=t("./search").Search,f=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"),C=t("./lib/keys"),k=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 p).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.isEmpty()?l.openTag:l.openTagName,l.closeTagName.isEmpty()?l.closeTag: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==f.comparePoints(o[0].end,o[1].start)?o=[f.fromPoints(o[0].start,o[1].end)]:0==f.comparePoints(o[0].start,o[1].end)&&(o=[f.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 f(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=f.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 f(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new f(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(){for(var t=this.session,e=t.getMode(),n=this.selection.isEmpty()?[new f(0,0,t.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",r="",o="",s=t.getTabString(),a=0;a<n.length;a++)for(var l=n[a].start.row,c=n[a].end.row,u=l;u<=c;u++){u>0&&(i=t.getState(u-1),r=t.getLine(u-1),o=e.getNextLineIndent(i,r,s));var h=t.getLine(u),d=e.$getIndent(h);if(o!==d){if(d.length>0){var p=new f(u,0,u,d.length);t.remove(p)}o.length>0&&t.insert({row:u,column:0},o)}e.autoOutdent(i,t,u)}},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 f(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new f(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 f(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 f(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 f(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 p=h[d],f=0;f<=1;f++){var g=+!f,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\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(p[f]),"i"),(function(t){var e=p[g];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+p[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 p=d.value;if(u=c+p.length,a>=c&&a<=u&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){l=p.replace(/[\s:.,'";}\]]+$/,"");break}c=u}}catch(f){n={error:f}}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,p=n.last;while(++u<c){l&&s[u].moveBy(l,0);var f=this.$getSelectedRows(s[u]);if(e&&f.first!=p)break;if(!e&&f.first>p+1)break;p=f.last}u--,a=this.session.$moveLines(d,p,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 p,g;if("bracket"===a)p=this.session.getBracketRange(n),p||(p=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1),g=p.start,(e||g.row===n.row&&Math.abs(g.column-n.column)<2)&&(p=this.session.getBracketRange(g)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(p=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===p.compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?(p=m.closeTag,g=p.start):(p=m.openTag,g=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?p.end:p.start))}g=g||p.start}g=p&&p.cursor||g,g&&(t?p&&e?this.selection.setRange(p):p&&p.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}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.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(k.prototype,g),y.defineOptions(k.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?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?$.attach(this):$.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===C["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.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","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.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","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.textInput.setAriaOptions({setLabel:!0})):(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},textInputAriaLabel:{set:function(t){this.$textInputAriaLabel=t},initialValue:""},enableMobileMenu:{set:function(t){this.$enableMobileMenu=t},initialValue:!0},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 $={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=k})),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:[],displayText:[]});var s=n.text,a=n.text,l=n.type;s=s?o.escapeHTML(s):n.html||"",a=a||(n.html||""),-1===r.text.indexOf(s)&&(r.text.push(s),r.type.push(l),r.displayText.push(a));var c=n.className;c?r.className=c:"error"==l?r.className=" ace_error":"warning"==l&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=l||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,p=s.$breakpoints,f=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)),p[r]&&(w+=p[r]),f[r]&&(w+=f[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,C="start"==x&&r==v&&r<n.end.row;if(C){S+=" ace_closed";for(var k="",$=!1,A=r+1;A<=n.end.row;A++)if(this.$annotations[A]){if(" ace_error"===this.$annotations[A].className){$=!0,k=" ace_error_fold";break}" ace_warning"!==this.$annotations[A].className||($=!0,k=" ace_warning_fold")}w+=k}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("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[T.start.row+1,T.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[r+1])),C?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(i.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));if($&&this.$showFoldedAnnotations){switch(u.className="ace_gutter_annotation",h.className=b,h.className+=k,i.setStyle(h.style,"height",y),i.setStyle(u.style,"display","block"),i.setStyle(u.style,"height",y),k){case" ace_error_fold":L=l("gutter.annotation.aria-label.error","Read annotations row $0",[_]);break;case" ace_warning_fold":L=l("gutter.annotation.aria-label.warning","Read annotations row $0",[_]);break}u.setAttribute("aria-label",L),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else if(this.$annotations[r]){var L;switch(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),this.$annotations[r].className){case" ace_error":L=l("gutter.annotation.aria-label.error","Read annotations row $0",[_]);break;case" ace_warning":L=l("gutter.annotation.aria-label.warning","Read annotations row $0",[_]);break;case" ace_info":L=l("gutter.annotation.aria-label.info","Read annotations row $0",[_]);break}u.setAttribute("aria-label",L),u.setAttribute("tabindex","-1"),u.setAttribute("role","button")}else i.setStyle(u.style,"display","none"),u.removeAttribute("aria-label"),u.removeAttribute("role"),u.setAttribute("tabindex","0");return _!==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,p=a.getScreenLastRowColumn(u),f=new i(u,e.start.column,u,d);u<=c;u++)f.start.row=f.end.row=u,f.start.column=u==l?e.start.column:a.getRowWrapIndent(u),f.end.column=p,h=d,d=p,p=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:e.end.column,this.drawSingleLineMarker(t,f,n+(u==l?" ace_start":"")+" ace_br"+s(u==l||u==l+1&&e.start.column,h<d,d>p,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 p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.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],p=r[2],f=r[3],g=r[4],m=r[5];if(s.showSpaces||!p){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(p)if(s.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(s.SPACE_CHAR,p.length),u.appendChild(w)}else u.appendChild(this.dom.createTextNode(p,this.element));else if(f){w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(s.SPACE_CHAR,f.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("inline-fold.closed.title","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?(Number(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]),p=i(r(d,c),r(d,u),r(o(c,u),o(d,l))),f=s(1+p[0],r(c,l)),g=s(1+p[1],r(u,l));if(e){var m=e,v=p[0]*m[0]/h+p[1]*m[1]/h+1,y=o(s(m[0],f),s(m[1],g));return o(s(1/v/h,y),l)}var w=r(t,l),b=i(r(f,s(p[0],w)),r(g,s(p[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 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 position: relative;\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 z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\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}\n\n.ace_hidden_token {\n display: none;\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),p=Math.round(((c-u)*this.lineHeight+this.lineHeight)*this.heightRatio),f=p-d;if(f<this.minDecorationHeight){var g=(d+p)/2|0;g<this.halfMinDecorationHeight?g=this.halfMinDecorationHeight:g+this.halfMinDecorationHeight>this.canvasHeight&&(g=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(g-this.halfMinDecorationHeight),p=Math.round(g+this.halfMinDecorationHeight)}i.fillStyle=e[o[l].type]||null,i.fillRect(0,h,this.canvasWidth,p-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","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("./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,p=t("./scrollbar_custom").HScrollBar,f=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"),_=t("./layer/text_util").isTextToken;r.importCssString(y,"ace_editor.css",!1);var x=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),!i&&this.$maxLines&&this.lineHeight>1&&(r.style.height&&"0px"!=r.style.height||(r.style.height="1px",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),p=l!==d;p&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,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),f=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-f*b;var x=0;return(this.layerConfig.width!=o||a)&&(x=this.CHANGE_H_SCROLL),(a||p)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),p&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:f,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 o=this.$calculateWrappedTextChunks(t,i);this.addToken(o[0].text,"ghost_text",i.row,i.column),this.$ghostText={text:t,position:{row:i.row,column:i.column}};var s=r.createElement("div");if(o.length>1){var a,l=this.hideTokensAfterPosition(i.row,i.column);o.slice(1).forEach((function(t){var e=r.createElement("div"),n=r.createElement("span");n.className="ace_ghost_text",t.wrapped&&(e.className="ghost_text_line_wrapped"),0===t.text.length&&(t.text=" "),n.appendChild(r.createTextNode(t.text)),e.appendChild(n),s.appendChild(e),a=e})),l.forEach((function(t){var e=r.createElement("span");_(t.type)||(e.className="ace_"+t.type.replace(/\./g," ace_")),e.appendChild(r.createTextNode(t.value)),a.appendChild(e)})),this.$ghostTextWidget={el:s,row:i.row,column:i.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(i,!0),u=this.container,h=u.getBoundingClientRect().height,d=o.length*this.lineHeight,p=d<h-c.top;if(p)return;d<h?this.scrollBy(0,(o.length-1)*this.lineHeight):this.scrollToRow(i.row)}},t.prototype.$calculateWrappedTextChunks=function(t,e){var n=this.$size.scrollerWidth-2*this.$padding,i=Math.floor(n/this.characterWidth)-2;i=i<=0?60:i;for(var r=t.split(/\r?\n/),o=[],s=0;s<r.length;s++){var a=this.session.$getDisplayTokens(r[s],e.column),l=this.session.$computeWrapSplits(a,i,this.session.$tabSize);if(l.length>0){var c=0;l.push(r[s].length);for(var u=0;u<l.length;u++){var h=r[s].slice(c,l[u]);o.push({text:h,wrapped:!0}),c=l[u]}}else o.push({text:r[s],wrapped:!1})}return o},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.hideTokensAfterPosition=function(t,e){for(var n=this.session.getTokens(t),i=0,r=!1,o=[],s=0;s<n.length;s++){var a=n[s];i+=a.value.length,"ghost_text"!==a.type&&(r?(o.push({type:a.type,value:a.value}),a.type="hidden_token"):i===e&&(r=!0))}return this.updateLines(t,t),o},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(),b.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},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 f(this.container,this),this.scrollBarH=new p(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}();x.prototype.CHANGE_CURSOR=1,x.prototype.CHANGE_MARKER=2,x.prototype.CHANGE_GUTTER=4,x.prototype.CHANGE_SCROLL=8,x.prototype.CHANGE_LINES=16,x.prototype.CHANGE_TEXT=32,x.prototype.CHANGE_SIZE=64,x.prototype.CHANGE_MARKER_BACK=128,x.prototype.CHANGE_MARKER_FRONT=256,x.prototype.CHANGE_FULL=512,x.prototype.CHANGE_H_SCROLL=1024,x.prototype.$changes=0,x.prototype.$padding=null,x.prototype.$frozen=!1,x.prototype.STEPS=8,i.implement(x.prototype,v),s.defineOptions(x.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=x})),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,p=h.inMultiSelectMode,f=t.getDocumentPosition(),g=d.getCursor(),m=t.inSelection()||d.isEmpty()&&o(f,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",!p&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&e.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&m)return;if(!p){var S=d.toOrientedRange();h.addSelectionMarker(S)}var C=d.rangeList.rangeAtPoint(f);h.inVirtualSelectionMode=!0,s&&(C=null,S=d.ranges[0]||S,h.removeSelectionMarker(S)),h.once("mouseup",(function(){var t=d.toOrientedRange();C&&t.isEmpty()&&o(C.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 k;t.stop(),h.inVirtualSelectionMode=!0;var $=[],A=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($),$=d.rectangularRangeBlock(x,_),h.$mouseHandler.$clickSelection&&1==$.length&&$[0].isEmpty()&&($[0]=h.$mouseHandler.$clickSelection.clone()),$.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers())};p&&!l?d.toSingleRange():!p&&l&&(k=d.toOrientedRange(),h.addSelectionMarker(k)),s?_=b.documentToScreenPosition(d.lead):d.moveToPosition(f),x={row:-1,column:-1};var T=function(t){A(),clearInterval(R),h.removeSelectionMarkers($),$.length||($=[d.toOrientedRange()]),k&&(h.removeSelectionMarker(k),d.toSingleRange(k));for(var e=0;e<$.length;e++)d.addRange($[e]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null},L=A;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 p=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.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,p=e.row;else d=e.row,p=t.row;s<0&&(s=0),d<0&&(d=0),d==p&&(n=!0);for(var f=d;f<=p;f++){var m=r.fromPoints(this.session.screenToDocumentPosition(f,s,l),this.session.screenToDocumentPosition(f,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 f=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 p=u.length;p--;){if(s)while(p>0&&u[p].start.row==u[p-1].end.row)p--;d.fromOrientedRange(u[p]),d.index=p,this.selection=a.selection=d;var f=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===f||(i=f),d.toOrientedRange(u[p])}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,p=h==d;if(p){var f,g=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<g);do{f=this.session.getLine(h)}while(/[=:]/.test(f)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,p),this.session.insert({row:h,column:0},m.join("\n")+"\n"),p||(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(f.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(f.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 p=t.getLine(u).length;return new i(c,a,u,p)}}},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={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var p={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=p.el.appendChild(r.createElement("div")),g=p.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",p.el.className="error_widget_wrapper",f.className="error_widget "+u.className,u.displayText.forEach((function(t,e){f.appendChild(r.createTextNode(t)),e<u.displayText.length-1&&f.appendChild(r.createElement("br"))})),f.appendChild(r.createElement("div"));var v=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(p),t.off("changeSelection",p.destroy),t.off("changeSession",p.destroy),t.off("mouseup",p.destroy),t.off("change",p.destroy))},t.keyBinding.addKeyboardHandler(v),t.on("changeSelection",p.destroy),t.on("changeSession",p.destroy),t.on("mouseup",p.destroy),t.on("change",p.destroy),t.session.widgetManager.addLineWidget(p),p.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:p.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},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}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",f="\\u200d",g=u+"?",m="["+s+"]?",v="(?:"+f+"(?:"+[h,d,p].join("|")+")"+m+g+")*",y=m+g+v,w="(?:"+[h+l+"?",l,d,p,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",p="\\ufe0e\\ufe0f",f=l+c+u+h,g="['’]",m="["+f+"]",v="["+o+"]",y="\\d+",w="["+s+"]",b="["+a+"]",_="[^"+e+f+y+s+a+d+"]",x="\\ud83c[\\udffb-\\udfff]",S="(?:"+v+"|"+x+")",C="[^"+e+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+d+"]",T="\\u200d",L="(?:"+b+"|"+_+")",R="(?:"+A+"|"+_+")",E="(?:"+g+"(?:d|ll|m|re|s|t|ve))?",M="(?:"+g+"(?:D|LL|M|RE|S|T|VE))?",I=S+"?",D="["+p+"]?",O="(?:"+T+"(?:"+[C,k,$].join("|")+")"+D+I+")*",P="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F=D+I+O,W="(?:"+[w,k,$].join("|")+")"+F,H=RegExp([A+"?"+b+"+"+E+"(?="+[m,A,"$"].join("|")+")",R+"+"+M+"(?="+[m,A+L,"$"].join("|")+")",A+"?"+L+"+"+E,A+"+"+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;
|
10
|
-
/**
|
11
|
-
* @license
|
12
|
-
* Lodash <https://lodash.com/>
|
13
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
14
|
-
* Released under MIT license <https://lodash.com/license>
|
15
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
16
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
17
|
-
*/t=n.nmd(t),function(){var r,o="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,f=2,g=4,m=1,v=2,y=1,w=2,b=4,_=8,x=16,S=32,C=64,k=128,$=256,A=512,T=30,L="...",R=800,E=16,M=1,I=2,D=3,O=1/0,P=9007199254740991,N=17976931348623157e292,F=NaN,W=4294967295,H=W-1,B=W>>>1,z=[["ary",k],["bind",y],["bindKey",w],["curry",_],["curryRight",x],["flip",A],["partial",S],["partialRight",C],["rearg",$]],U="[object Arguments]",j="[object Array]",G="[object AsyncFunction]",V="[object Boolean]",Y="[object Date]",q="[object DOMException]",K="[object Error]",X="[object Function]",Q="[object GeneratorFunction]",Z="[object Map]",J="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",it="[object Proxy]",rt="[object RegExp]",ot="[object Set]",st="[object String]",at="[object Symbol]",lt="[object Undefined]",ct="[object WeakMap]",ut="[object WeakSet]",ht="[object ArrayBuffer]",dt="[object DataView]",pt="[object Float32Array]",ft="[object Float64Array]",gt="[object Int8Array]",mt="[object Int16Array]",vt="[object Int32Array]",yt="[object Uint8Array]",wt="[object Uint8ClampedArray]",bt="[object Uint16Array]",_t="[object Uint32Array]",xt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,Ct=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kt=/&(?:amp|lt|gt|quot|#39);/g,$t=/[&<>"']/g,At=RegExp(kt.source),Tt=RegExp($t.source),Lt=/<%-([\s\S]+?)%>/g,Rt=/<%([\s\S]+?)%>/g,Et=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/[\\^$.*+?()[\]{}|]/g,Pt=RegExp(Ot.source),Nt=/^\s+/,Ft=/\s/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ht=/\{\n\/\* \[wrapped with (.+)\] \*/,Bt=/,? & /,zt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ut=/[()=,{}\[\]\/\s]/,jt=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,Yt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Xt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",ie="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",oe=ne+ie+re,se="\\u2700-\\u27bf",ae="a-z\\xdf-\\xf6\\xf8-\\xff",le="\\xac\\xb1\\xd7\\xf7",ce="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ue="\\u2000-\\u206f",he=" \\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",de="A-Z\\xc0-\\xd6\\xd8-\\xde",pe="\\ufe0e\\ufe0f",fe=le+ce+ue+he,ge="['’]",me="["+ee+"]",ve="["+fe+"]",ye="["+oe+"]",we="\\d+",be="["+se+"]",_e="["+ae+"]",xe="[^"+ee+fe+we+se+ae+de+"]",Se="\\ud83c[\\udffb-\\udfff]",Ce="(?:"+ye+"|"+Se+")",ke="[^"+ee+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="["+de+"]",Le="\\u200d",Re="(?:"+_e+"|"+xe+")",Ee="(?:"+Te+"|"+xe+")",Me="(?:"+ge+"(?:d|ll|m|re|s|t|ve))?",Ie="(?:"+ge+"(?:D|LL|M|RE|S|T|VE))?",De=Ce+"?",Oe="["+pe+"]?",Pe="(?:"+Le+"(?:"+[ke,$e,Ae].join("|")+")"+Oe+De+")*",Ne="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",We=Oe+De+Pe,He="(?:"+[be,$e,Ae].join("|")+")"+We,Be="(?:"+[ke+ye+"?",ye,$e,Ae,me].join("|")+")",ze=RegExp(ge,"g"),Ue=RegExp(ye,"g"),je=RegExp(Se+"(?="+Se+")|"+Be+We,"g"),Ge=RegExp([Te+"?"+_e+"+"+Me+"(?="+[ve,Te,"$"].join("|")+")",Ee+"+"+Ie+"(?="+[ve,Te+Re,"$"].join("|")+")",Te+"?"+Re+"+"+Me,Te+"+"+Ie,Fe,Ne,we,He].join("|"),"g"),Ve=RegExp("["+Le+ee+oe+pe+"]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,Xe={};Xe[pt]=Xe[ft]=Xe[gt]=Xe[mt]=Xe[vt]=Xe[yt]=Xe[wt]=Xe[bt]=Xe[_t]=!0,Xe[U]=Xe[j]=Xe[ht]=Xe[V]=Xe[dt]=Xe[Y]=Xe[K]=Xe[X]=Xe[Z]=Xe[J]=Xe[et]=Xe[rt]=Xe[ot]=Xe[st]=Xe[ct]=!1;var Qe={};Qe[U]=Qe[j]=Qe[ht]=Qe[dt]=Qe[V]=Qe[Y]=Qe[pt]=Qe[ft]=Qe[gt]=Qe[mt]=Qe[vt]=Qe[Z]=Qe[J]=Qe[et]=Qe[rt]=Qe[ot]=Qe[st]=Qe[at]=Qe[yt]=Qe[wt]=Qe[bt]=Qe[_t]=!0,Qe[K]=Qe[X]=Qe[ct]=!1;var Ze={À:"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"},Je={"&":"&","<":"<",">":">",'"':""","'":"'"},tn={"&":"&","<":"<",">":">",""":'"',"'":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,sn="object"==typeof self&&self&&self.Object===Object&&self,an=on||sn||Function("return this")(),ln=e&&!e.nodeType&&e,cn=ln&&t&&!t.nodeType&&t,un=cn&&cn.exports===ln,hn=un&&on.process,dn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||hn&&hn.binding&&hn.binding("util")}catch(e){}}(),pn=dn&&dn.isArrayBuffer,fn=dn&&dn.isDate,gn=dn&&dn.isMap,mn=dn&&dn.isRegExp,vn=dn&&dn.isSet,yn=dn&&dn.isTypedArray;function wn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function bn(t,e,n,i){var r=-1,o=null==t?0:t.length;while(++r<o){var s=t[r];e(i,s,n(s),t)}return i}function _n(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(!1===e(t[n],n,t))break;return t}function xn(t,e){var n=null==t?0:t.length;while(n--)if(!1===e(t[n],n,t))break;return t}function Sn(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(!e(t[n],n,t))return!1;return!0}function Cn(t,e){var n=-1,i=null==t?0:t.length,r=0,o=[];while(++n<i){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function kn(t,e){var n=null==t?0:t.length;return!!n&&Nn(t,e,0)>-1}function $n(t,e,n){var i=-1,r=null==t?0:t.length;while(++i<r)if(n(e,t[i]))return!0;return!1}function An(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}function Tn(t,e){var n=-1,i=e.length,r=t.length;while(++n<i)t[r+n]=e[n];return t}function Ln(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}function Rn(t,e,n,i){var r=null==t?0:t.length;i&&r&&(n=t[--r]);while(r--)n=e(n,t[r],r,t);return n}function En(t,e){var n=-1,i=null==t?0:t.length;while(++n<i)if(e(t[n],n,t))return!0;return!1}var Mn=Bn("length");function In(t){return t.split("")}function Dn(t){return t.match(zt)||[]}function On(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function Pn(t,e,n,i){var r=t.length,o=n+(i?1:-1);while(i?o--:++o<r)if(e(t[o],o,t))return o;return-1}function Nn(t,e,n){return e===e?pi(t,e,n):Pn(t,Wn,n)}function Fn(t,e,n,i){var r=n-1,o=t.length;while(++r<o)if(i(t[r],e))return r;return-1}function Wn(t){return t!==t}function Hn(t,e){var n=null==t?0:t.length;return n?Gn(t,e)/n:F}function Bn(t){return function(e){return null==e?r:e[t]}}function zn(t){return function(e){return null==t?r:t[e]}}function Un(t,e,n,i,r){return r(t,(function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)})),n}function jn(t,e){var n=t.length;t.sort(e);while(n--)t[n]=t[n].value;return t}function Gn(t,e){var n,i=-1,o=t.length;while(++i<o){var s=e(t[i]);s!==r&&(n=n===r?s:n+s)}return n}function Vn(t,e){var n=-1,i=Array(t);while(++n<t)i[n]=e(n);return i}function Yn(t,e){return An(e,(function(e){return[e,t[e]]}))}function qn(t){return t?t.slice(0,vi(t)+1).replace(Nt,""):t}function Kn(t){return function(e){return t(e)}}function Xn(t,e){return An(e,(function(e){return t[e]}))}function Qn(t,e){return t.has(e)}function Zn(t,e){var n=-1,i=t.length;while(++n<i&&Nn(e,t[n],0)>-1);return n}function Jn(t,e){var n=t.length;while(n--&&Nn(e,t[n],0)>-1);return n}function ti(t,e){var n=t.length,i=0;while(n--)t[n]===e&&++i;return i}var ei=zn(Ze),ni=zn(Je);function ii(t){return"\\"+en[t]}function ri(t,e){return null==t?r:t[e]}function oi(t){return Ve.test(t)}function si(t){return Ye.test(t)}function ai(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function li(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function ci(t,e){return function(n){return t(e(n))}}function ui(t,e){var n=-1,i=t.length,r=0,o=[];while(++n<i){var s=t[n];s!==e&&s!==d||(t[n]=d,o[r++]=n)}return o}function hi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function di(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pi(t,e,n){var i=n-1,r=t.length;while(++i<r)if(t[i]===e)return i;return-1}function fi(t,e,n){var i=n+1;while(i--)if(t[i]===e)return i;return i}function gi(t){return oi(t)?wi(t):Mn(t)}function mi(t){return oi(t)?bi(t):In(t)}function vi(t){var e=t.length;while(e--&&Ft.test(t.charAt(e)));return e}var yi=zn(tn);function wi(t){var e=je.lastIndex=0;while(je.test(t))++e;return e}function bi(t){return t.match(je)||[]}function _i(t){return t.match(Ge)||[]}var xi=function t(e){e=null==e?an:Si.defaults(an.Object(),e,Si.pick(an,qe));var n=e.Array,i=e.Date,Ft=e.Error,zt=e.Function,ee=e.Math,ne=e.Object,ie=e.RegExp,re=e.String,oe=e.TypeError,se=n.prototype,ae=zt.prototype,le=ne.prototype,ce=e["__core-js_shared__"],ue=ae.toString,he=le.hasOwnProperty,de=0,pe=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fe=le.toString,ge=ue.call(ne),me=an._,ve=ie("^"+ue.call(he).replace(Ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=un?e.Buffer:r,we=e.Symbol,be=e.Uint8Array,_e=ye?ye.allocUnsafe:r,xe=ci(ne.getPrototypeOf,ne),Se=ne.create,Ce=le.propertyIsEnumerable,ke=se.splice,$e=we?we.isConcatSpreadable:r,Ae=we?we.iterator:r,Te=we?we.toStringTag:r,Le=function(){try{var t=Ys(ne,"defineProperty");return t({},"",{}),t}catch(e){}}(),Re=e.clearTimeout!==an.clearTimeout&&e.clearTimeout,Ee=i&&i.now!==an.Date.now&&i.now,Me=e.setTimeout!==an.setTimeout&&e.setTimeout,Ie=ee.ceil,De=ee.floor,Oe=ne.getOwnPropertySymbols,Pe=ye?ye.isBuffer:r,Ne=e.isFinite,Fe=se.join,We=ci(ne.keys,ne),He=ee.max,Be=ee.min,je=i.now,Ge=e.parseInt,Ve=ee.random,Ye=se.reverse,Ze=Ys(e,"DataView"),Je=Ys(e,"Map"),tn=Ys(e,"Promise"),en=Ys(e,"Set"),on=Ys(e,"WeakMap"),sn=Ys(ne,"create"),ln=on&&new on,cn={},hn=Ma(Ze),dn=Ma(Je),Mn=Ma(tn),In=Ma(en),zn=Ma(on),pi=we?we.prototype:r,wi=pi?pi.valueOf:r,bi=pi?pi.toString:r;function xi(t){if(ku(t)&&!lu(t)&&!(t instanceof Ai)){if(t instanceof $i)return t;if(he.call(t,"__wrapped__"))return Da(t)}return new $i(t)}var Ci=function(){function t(){}return function(e){if(!Cu(e))return{};if(Se)return Se(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function ki(){}function $i(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function Ai(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function Ti(){var t=new Ai(this.__wrapped__);return t.__actions__=rs(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=rs(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=rs(this.__views__),t}function Li(){if(this.__filtered__){var t=new Ai(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ri(){var t=this.__wrapped__.value(),e=this.__dir__,n=lu(t),i=e<0,r=n?t.length:0,o=Zs(0,r,this.__views__),s=o.start,a=o.end,l=a-s,c=i?a:s-1,u=this.__iteratees__,h=u.length,d=0,p=Be(l,this.__takeCount__);if(!n||!i&&r==l&&p==l)return Wo(t,this.__actions__);var f=[];t:while(l--&&d<p){c+=e;var g=-1,m=t[c];while(++g<h){var v=u[g],y=v.iteratee,w=v.type,b=y(m);if(w==I)m=b;else if(!b){if(w==M)continue t;break t}}f[d++]=m}return f}function Ei(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function Mi(){this.__data__=sn?sn(null):{},this.size=0}function Ii(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Di(t){var e=this.__data__;if(sn){var n=e[t];return n===u?r:n}return he.call(e,t)?e[t]:r}function Oi(t){var e=this.__data__;return sn?e[t]!==r:he.call(e,t)}function Pi(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=sn&&e===r?u:e,this}function Ni(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function Fi(){this.__data__=[],this.size=0}function Wi(t){var e=this.__data__,n=ur(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():ke.call(e,n,1),--this.size,!0}function Hi(t){var e=this.__data__,n=ur(e,t);return n<0?r:e[n][1]}function Bi(t){return ur(this.__data__,t)>-1}function zi(t,e){var n=this.__data__,i=ur(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Ui(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var i=t[e];this.set(i[0],i[1])}}function ji(){this.size=0,this.__data__={hash:new Ei,map:new(Je||Ni),string:new Ei}}function Gi(t){var e=Gs(this,t)["delete"](t);return this.size-=e?1:0,e}function Vi(t){return Gs(this,t).get(t)}function Yi(t){return Gs(this,t).has(t)}function qi(t,e){var n=Gs(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function Ki(t){var e=-1,n=null==t?0:t.length;this.__data__=new Ui;while(++e<n)this.add(t[e])}function Xi(t){return this.__data__.set(t,u),this}function Qi(t){return this.__data__.has(t)}function Zi(t){var e=this.__data__=new Ni(t);this.size=e.size}function Ji(){this.__data__=new Ni,this.size=0}function tr(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function er(t){return this.__data__.get(t)}function nr(t){return this.__data__.has(t)}function ir(t,e){var n=this.__data__;if(n instanceof Ni){var i=n.__data__;if(!Je||i.length<s-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ui(i)}return n.set(t,e),this.size=n.size,this}function rr(t,e){var n=lu(t),i=!n&&au(t),r=!n&&!i&&pu(t),o=!n&&!i&&!r&&Hu(t),s=n||i||r||o,a=s?Vn(t.length,re):[],l=a.length;for(var c in t)!e&&!he.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,l))||a.push(c);return a}function or(t){var e=t.length;return e?t[yo(0,e-1)]:r}function sr(t,e){return La(rs(t),mr(e,0,t.length))}function ar(t){return La(rs(t))}function lr(t,e,n){(n!==r&&!ru(t[e],n)||n===r&&!(e in t))&&fr(t,e,n)}function cr(t,e,n){var i=t[e];he.call(t,e)&&ru(i,n)&&(n!==r||e in t)||fr(t,e,n)}function ur(t,e){var n=t.length;while(n--)if(ru(t[n][0],e))return n;return-1}function hr(t,e,n,i){return xr(t,(function(t,r,o){e(i,t,n(t),o)})),i}function dr(t,e){return t&&os(e,xh(e),t)}function pr(t,e){return t&&os(e,Sh(e),t)}function fr(t,e,n){"__proto__"==e&&Le?Le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function gr(t,e){var i=-1,o=e.length,s=n(o),a=null==t;while(++i<o)s[i]=a?r:mh(t,e[i]);return s}function mr(t,e,n){return t===t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function vr(t,e,n,i,o,s){var a,l=e&p,c=e&f,u=e&g;if(n&&(a=o?n(t,i,o,s):n(t)),a!==r)return a;if(!Cu(t))return t;var h=lu(t);if(h){if(a=ea(t),!l)return rs(t,a)}else{var d=Qs(t),m=d==X||d==Q;if(pu(t))return qo(t,l);if(d==et||d==U||m&&!o){if(a=c||m?{}:na(t),!l)return c?as(t,pr(a,t)):ss(t,dr(a,t))}else{if(!Qe[d])return o?t:{};a=ia(t,d,l)}}s||(s=new Zi);var v=s.get(t);if(v)return v;s.set(t,a),Nu(t)?t.forEach((function(i){a.add(vr(i,e,n,i,t,s))})):$u(t)&&t.forEach((function(i,r){a.set(r,vr(i,e,n,r,t,s))}));var y=u?c?Hs:Ws:c?Sh:xh,w=h?r:y(t);return _n(w||t,(function(i,r){w&&(r=i,i=t[r]),cr(a,r,vr(i,e,n,r,t,s))})),a}function yr(t){var e=xh(t);return function(n){return wr(n,t,e)}}function wr(t,e,n){var i=n.length;if(null==t)return!i;t=ne(t);while(i--){var o=n[i],s=e[o],a=t[o];if(a===r&&!(o in t)||!s(a))return!1}return!0}function br(t,e,n){if("function"!=typeof t)throw new oe(l);return ka((function(){t.apply(r,n)}),e)}function _r(t,e,n,i){var r=-1,o=kn,a=!0,l=t.length,c=[],u=e.length;if(!l)return c;n&&(e=An(e,Kn(n))),i?(o=$n,a=!1):e.length>=s&&(o=Qn,a=!1,e=new Ki(e));t:while(++r<l){var h=t[r],d=null==n?h:n(h);if(h=i||0!==h?h:0,a&&d===d){var p=u;while(p--)if(e[p]===d)continue t;c.push(h)}else o(e,d,i)||c.push(h)}return c}xi.templateSettings={escape:Lt,evaluate:Rt,interpolate:Et,variable:"",imports:{_:xi}},xi.prototype=ki.prototype,xi.prototype.constructor=xi,$i.prototype=Ci(ki.prototype),$i.prototype.constructor=$i,Ai.prototype=Ci(ki.prototype),Ai.prototype.constructor=Ai,Ei.prototype.clear=Mi,Ei.prototype["delete"]=Ii,Ei.prototype.get=Di,Ei.prototype.has=Oi,Ei.prototype.set=Pi,Ni.prototype.clear=Fi,Ni.prototype["delete"]=Wi,Ni.prototype.get=Hi,Ni.prototype.has=Bi,Ni.prototype.set=zi,Ui.prototype.clear=ji,Ui.prototype["delete"]=Gi,Ui.prototype.get=Vi,Ui.prototype.has=Yi,Ui.prototype.set=qi,Ki.prototype.add=Ki.prototype.push=Xi,Ki.prototype.has=Qi,Zi.prototype.clear=Ji,Zi.prototype["delete"]=tr,Zi.prototype.get=er,Zi.prototype.has=nr,Zi.prototype.set=ir;var xr=us(Er),Sr=us(Mr,!0);function Cr(t,e){var n=!0;return xr(t,(function(t,i,r){return n=!!e(t,i,r),n})),n}function kr(t,e,n){var i=-1,o=t.length;while(++i<o){var s=t[i],a=e(s);if(null!=a&&(l===r?a===a&&!Wu(a):n(a,l)))var l=a,c=s}return c}function $r(t,e,n,i){var o=t.length;n=qu(n),n<0&&(n=-n>o?0:o+n),i=i===r||i>o?o:qu(i),i<0&&(i+=o),i=n>i?0:Ku(i);while(n<i)t[n++]=e;return t}function Ar(t,e){var n=[];return xr(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n}function Tr(t,e,n,i,r){var o=-1,s=t.length;n||(n=oa),r||(r=[]);while(++o<s){var a=t[o];e>0&&n(a)?e>1?Tr(a,e-1,n,i,r):Tn(r,a):i||(r[r.length]=a)}return r}var Lr=hs(),Rr=hs(!0);function Er(t,e){return t&&Lr(t,e,xh)}function Mr(t,e){return t&&Rr(t,e,xh)}function Ir(t,e){return Cn(e,(function(e){return _u(t[e])}))}function Dr(t,e){e=jo(e,t);var n=0,i=e.length;while(null!=t&&n<i)t=t[Ea(e[n++])];return n&&n==i?t:r}function Or(t,e,n){var i=e(t);return lu(t)?i:Tn(i,n(t))}function Pr(t){return null==t?t===r?lt:tt:Te&&Te in ne(t)?qs(t):wa(t)}function Nr(t,e){return t>e}function Fr(t,e){return null!=t&&he.call(t,e)}function Wr(t,e){return null!=t&&e in ne(t)}function Hr(t,e,n){return t>=Be(e,n)&&t<He(e,n)}function Br(t,e,i){var o=i?$n:kn,s=t[0].length,a=t.length,l=a,c=n(a),u=1/0,h=[];while(l--){var d=t[l];l&&e&&(d=An(d,Kn(e))),u=Be(d.length,u),c[l]=!i&&(e||s>=120&&d.length>=120)?new Ki(l&&d):r}d=t[0];var p=-1,f=c[0];t:while(++p<s&&h.length<u){var g=d[p],m=e?e(g):g;if(g=i||0!==g?g:0,!(f?Qn(f,m):o(h,m,i))){l=a;while(--l){var v=c[l];if(!(v?Qn(v,m):o(t[l],m,i)))continue t}f&&f.push(m),h.push(g)}}return h}function zr(t,e,n,i){return Er(t,(function(t,r,o){e(i,n(t),r,o)})),i}function Ur(t,e,n){e=jo(e,t),t=_a(t,e);var i=null==t?t:t[Ea(ol(e))];return null==i?r:wn(i,t,n)}function jr(t){return ku(t)&&Pr(t)==U}function Gr(t){return ku(t)&&Pr(t)==ht}function Vr(t){return ku(t)&&Pr(t)==Y}function Yr(t,e,n,i,r){return t===e||(null==t||null==e||!ku(t)&&!ku(e)?t!==t&&e!==e:qr(t,e,n,i,Yr,r))}function qr(t,e,n,i,r,o){var s=lu(t),a=lu(e),l=s?j:Qs(t),c=a?j:Qs(e);l=l==U?et:l,c=c==U?et:c;var u=l==et,h=c==et,d=l==c;if(d&&pu(t)){if(!pu(e))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Zi),s||Hu(t)?Os(t,e,n,i,r,o):Ps(t,e,l,n,i,r,o);if(!(n&m)){var p=u&&he.call(t,"__wrapped__"),f=h&&he.call(e,"__wrapped__");if(p||f){var g=p?t.value():t,v=f?e.value():e;return o||(o=new Zi),r(g,v,n,i,o)}}return!!d&&(o||(o=new Zi),Ns(t,e,n,i,r,o))}function Kr(t){return ku(t)&&Qs(t)==Z}function Xr(t,e,n,i){var o=n.length,s=o,a=!i;if(null==t)return!s;t=ne(t);while(o--){var l=n[o];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}while(++o<s){l=n[o];var c=l[0],u=t[c],h=l[1];if(a&&l[2]){if(u===r&&!(c in t))return!1}else{var d=new Zi;if(i)var p=i(u,h,c,t,e,d);if(!(p===r?Yr(h,u,m|v,i,d):p))return!1}}return!0}function Qr(t){if(!Cu(t)||ha(t))return!1;var e=_u(t)?ve:Kt;return e.test(Ma(t))}function Zr(t){return ku(t)&&Pr(t)==rt}function Jr(t){return ku(t)&&Qs(t)==ot}function to(t){return ku(t)&&Su(t.length)&&!!Xe[Pr(t)]}function eo(t){return"function"==typeof t?t:null==t?Rd:"object"==typeof t?lu(t)?ao(t[0],t[1]):so(t):Ud(t)}function no(t){if(!pa(t))return We(t);var e=[];for(var n in ne(t))he.call(t,n)&&"constructor"!=n&&e.push(n);return e}function io(t){if(!Cu(t))return ya(t);var e=pa(t),n=[];for(var i in t)("constructor"!=i||!e&&he.call(t,i))&&n.push(i);return n}function ro(t,e){return t<e}function oo(t,e){var i=-1,r=uu(t)?n(t.length):[];return xr(t,(function(t,n,o){r[++i]=e(t,n,o)})),r}function so(t){var e=Vs(t);return 1==e.length&&e[0][2]?ga(e[0][0],e[0][1]):function(n){return n===t||Xr(n,t,e)}}function ao(t,e){return la(t)&&fa(e)?ga(Ea(t),e):function(n){var i=mh(n,t);return i===r&&i===e?yh(n,t):Yr(e,i,m|v)}}function lo(t,e,n,i,o){t!==e&&Lr(e,(function(s,a){if(o||(o=new Zi),Cu(s))co(t,e,a,n,lo,i,o);else{var l=i?i(Sa(t,a),s,a+"",t,e,o):r;l===r&&(l=s),lr(t,a,l)}}),Sh)}function co(t,e,n,i,o,s,a){var l=Sa(t,n),c=Sa(e,n),u=a.get(c);if(u)lr(t,n,u);else{var h=s?s(l,c,n+"",t,e,a):r,d=h===r;if(d){var p=lu(c),f=!p&&pu(c),g=!p&&!f&&Hu(c);h=c,p||f||g?lu(l)?h=l:hu(l)?h=rs(l):f?(d=!1,h=qo(c,!0)):g?(d=!1,h=Jo(c,!0)):h=[]:Du(c)||au(c)?(h=l,au(l)?h=Qu(l):Cu(l)&&!_u(l)||(h=na(c))):d=!1}d&&(a.set(c,h),o(h,c,i,s,a),a["delete"](c)),lr(t,n,h)}}function uo(t,e){var n=t.length;if(n)return e+=e<0?n:0,sa(e,n)?t[e]:r}function ho(t,e,n){e=e.length?An(e,(function(t){return lu(t)?function(e){return Dr(e,1===t.length?t[0]:t)}:t})):[Rd];var i=-1;e=An(e,Kn(js()));var r=oo(t,(function(t,n,r){var o=An(e,(function(e){return e(t)}));return{criteria:o,index:++i,value:t}}));return jn(r,(function(t,e){return es(t,e,n)}))}function po(t,e){return fo(t,e,(function(e,n){return yh(t,n)}))}function fo(t,e,n){var i=-1,r=e.length,o={};while(++i<r){var s=e[i],a=Dr(t,s);n(a,s)&&Co(o,jo(s,t),a)}return o}function go(t){return function(e){return Dr(e,t)}}function mo(t,e,n,i){var r=i?Fn:Nn,o=-1,s=e.length,a=t;t===e&&(e=rs(e)),n&&(a=An(t,Kn(n)));while(++o<s){var l=0,c=e[o],u=n?n(c):c;while((l=r(a,u,l,i))>-1)a!==t&&ke.call(a,l,1),ke.call(t,l,1)}return t}function vo(t,e){var n=t?e.length:0,i=n-1;while(n--){var r=e[n];if(n==i||r!==o){var o=r;sa(r)?ke.call(t,r,1):Po(t,r)}}return t}function yo(t,e){return t+De(Ve()*(e-t+1))}function wo(t,e,i,r){var o=-1,s=He(Ie((e-t)/(i||1)),0),a=n(s);while(s--)a[r?s:++o]=t,t+=i;return a}function bo(t,e){var n="";if(!t||e<1||e>P)return n;do{e%2&&(n+=t),e=De(e/2),e&&(t+=t)}while(e);return n}function _o(t,e){return $a(ba(t,e,Rd),t+"")}function xo(t){return or(Bh(t))}function So(t,e){var n=Bh(t);return La(n,mr(e,0,n.length))}function Co(t,e,n,i){if(!Cu(t))return t;e=jo(e,t);var o=-1,s=e.length,a=s-1,l=t;while(null!=l&&++o<s){var c=Ea(e[o]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=l[c];u=i?i(h,c,l):r,u===r&&(u=Cu(h)?h:sa(e[o+1])?[]:{})}cr(l,c,u),l=l[c]}return t}var ko=ln?function(t,e){return ln.set(t,e),t}:Rd,$o=Le?function(t,e){return Le(t,"toString",{configurable:!0,enumerable:!1,value:$d(e),writable:!0})}:Rd;function Ao(t){return La(Bh(t))}function To(t,e,i){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),i=i>o?o:i,i<0&&(i+=o),o=e>i?0:i-e>>>0,e>>>=0;var s=n(o);while(++r<o)s[r]=t[r+e];return s}function Lo(t,e){var n;return xr(t,(function(t,i,r){return n=e(t,i,r),!n})),!!n}function Ro(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e===e&&r<=B){while(i<r){var o=i+r>>>1,s=t[o];null!==s&&!Wu(s)&&(n?s<=e:s<e)?i=o+1:r=o}return r}return Eo(t,e,Rd,n)}function Eo(t,e,n,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;e=n(e);var a=e!==e,l=null===e,c=Wu(e),u=e===r;while(o<s){var h=De((o+s)/2),d=n(t[h]),p=d!==r,f=null===d,g=d===d,m=Wu(d);if(a)var v=i||g;else v=u?g&&(i||p):l?g&&p&&(i||!f):c?g&&p&&!f&&(i||!m):!f&&!m&&(i?d<=e:d<e);v?o=h+1:s=h}return Be(s,H)}function Mo(t,e){var n=-1,i=t.length,r=0,o=[];while(++n<i){var s=t[n],a=e?e(s):s;if(!n||!ru(a,l)){var l=a;o[r++]=0===s?0:s}}return o}function Io(t){return"number"==typeof t?t:Wu(t)?F:+t}function Do(t){if("string"==typeof t)return t;if(lu(t))return An(t,Do)+"";if(Wu(t))return bi?bi.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Oo(t,e,n){var i=-1,r=kn,o=t.length,a=!0,l=[],c=l;if(n)a=!1,r=$n;else if(o>=s){var u=e?null:Ls(t);if(u)return hi(u);a=!1,r=Qn,c=new Ki}else c=e?[]:l;t:while(++i<o){var h=t[i],d=e?e(h):h;if(h=n||0!==h?h:0,a&&d===d){var p=c.length;while(p--)if(c[p]===d)continue t;e&&c.push(d),l.push(h)}else r(c,d,n)||(c!==l&&c.push(d),l.push(h))}return l}function Po(t,e){return e=jo(e,t),t=_a(t,e),null==t||delete t[Ea(ol(e))]}function No(t,e,n,i){return Co(t,e,n(Dr(t,e)),i)}function Fo(t,e,n,i){var r=t.length,o=i?r:-1;while((i?o--:++o<r)&&e(t[o],o,t));return n?To(t,i?0:o,i?o+1:r):To(t,i?o+1:0,i?r:o)}function Wo(t,e){var n=t;return n instanceof Ai&&(n=n.value()),Ln(e,(function(t,e){return e.func.apply(e.thisArg,Tn([t],e.args))}),n)}function Ho(t,e,i){var r=t.length;if(r<2)return r?Oo(t[0]):[];var o=-1,s=n(r);while(++o<r){var a=t[o],l=-1;while(++l<r)l!=o&&(s[o]=_r(s[o]||a,t[l],e,i))}return Oo(Tr(s,1),e,i)}function Bo(t,e,n){var i=-1,o=t.length,s=e.length,a={};while(++i<o){var l=i<s?e[i]:r;n(a,t[i],l)}return a}function zo(t){return hu(t)?t:[]}function Uo(t){return"function"==typeof t?t:Rd}function jo(t,e){return lu(t)?t:la(t,e)?[t]:Ra(Ju(t))}var Go=_o;function Vo(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:To(t,e,n)}var Yo=Re||function(t){return an.clearTimeout(t)};function qo(t,e){if(e)return t.slice();var n=t.length,i=_e?_e(n):new t.constructor(n);return t.copy(i),i}function Ko(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function Xo(t,e){var n=e?Ko(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Qo(t){var e=new t.constructor(t.source,Vt.exec(t));return e.lastIndex=t.lastIndex,e}function Zo(t){return wi?ne(wi.call(t)):{}}function Jo(t,e){var n=e?Ko(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ts(t,e){if(t!==e){var n=t!==r,i=null===t,o=t===t,s=Wu(t),a=e!==r,l=null===e,c=e===e,u=Wu(e);if(!l&&!u&&!s&&t>e||s&&a&&c&&!l&&!u||i&&a&&c||!n&&c||!o)return 1;if(!i&&!s&&!u&&t<e||u&&n&&o&&!i&&!s||l&&n&&o||!a&&o||!c)return-1}return 0}function es(t,e,n){var i=-1,r=t.criteria,o=e.criteria,s=r.length,a=n.length;while(++i<s){var l=ts(r[i],o[i]);if(l){if(i>=a)return l;var c=n[i];return l*("desc"==c?-1:1)}}return t.index-e.index}function ns(t,e,i,r){var o=-1,s=t.length,a=i.length,l=-1,c=e.length,u=He(s-a,0),h=n(c+u),d=!r;while(++l<c)h[l]=e[l];while(++o<a)(d||o<s)&&(h[i[o]]=t[o]);while(u--)h[l++]=t[o++];return h}function is(t,e,i,r){var o=-1,s=t.length,a=-1,l=i.length,c=-1,u=e.length,h=He(s-l,0),d=n(h+u),p=!r;while(++o<h)d[o]=t[o];var f=o;while(++c<u)d[f+c]=e[c];while(++a<l)(p||o<s)&&(d[f+i[a]]=t[o++]);return d}function rs(t,e){var i=-1,r=t.length;e||(e=n(r));while(++i<r)e[i]=t[i];return e}function os(t,e,n,i){var o=!n;n||(n={});var s=-1,a=e.length;while(++s<a){var l=e[s],c=i?i(n[l],t[l],l,n,t):r;c===r&&(c=t[l]),o?fr(n,l,c):cr(n,l,c)}return n}function ss(t,e){return os(t,Ks(t),e)}function as(t,e){return os(t,Xs(t),e)}function ls(t,e){return function(n,i){var r=lu(n)?bn:hr,o=e?e():{};return r(n,t,js(i,2),o)}}function cs(t){return _o((function(e,n){var i=-1,o=n.length,s=o>1?n[o-1]:r,a=o>2?n[2]:r;s=t.length>3&&"function"==typeof s?(o--,s):r,a&&aa(n[0],n[1],a)&&(s=o<3?r:s,o=1),e=ne(e);while(++i<o){var l=n[i];l&&t(e,l,i,s)}return e}))}function us(t,e){return function(n,i){if(null==n)return n;if(!uu(n))return t(n,i);var r=n.length,o=e?r:-1,s=ne(n);while(e?o--:++o<r)if(!1===i(s[o],o,s))break;return n}}function hs(t){return function(e,n,i){var r=-1,o=ne(e),s=i(e),a=s.length;while(a--){var l=s[t?a:++r];if(!1===n(o[l],l,o))break}return e}}function ds(t,e,n){var i=e&y,r=gs(t);function o(){var e=this&&this!==an&&this instanceof o?r:t;return e.apply(i?n:this,arguments)}return o}function ps(t){return function(e){e=Ju(e);var n=oi(e)?mi(e):r,i=n?n[0]:e.charAt(0),o=n?Vo(n,1).join(""):e.slice(1);return i[t]()+o}}function fs(t){return function(e){return Ln(_d(qh(e).replace(ze,"")),t,"")}}function gs(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Ci(t.prototype),i=t.apply(n,e);return Cu(i)?i:n}}function ms(t,e,i){var o=gs(t);function s(){var a=arguments.length,l=n(a),c=a,u=Us(s);while(c--)l[c]=arguments[c];var h=a<3&&l[0]!==u&&l[a-1]!==u?[]:ui(l,u);if(a-=h.length,a<i)return As(t,e,ws,s.placeholder,r,l,h,r,r,i-a);var d=this&&this!==an&&this instanceof s?o:t;return wn(d,this,l)}return s}function vs(t){return function(e,n,i){var o=ne(e);if(!uu(e)){var s=js(n,3);e=xh(e),n=function(t){return s(o[t],t,o)}}var a=t(e,n,i);return a>-1?o[s?e[a]:a]:r}}function ys(t){return Fs((function(e){var n=e.length,i=n,o=$i.prototype.thru;t&&e.reverse();while(i--){var s=e[i];if("function"!=typeof s)throw new oe(l);if(o&&!a&&"wrapper"==zs(s))var a=new $i([],!0)}i=a?i:n;while(++i<n){s=e[i];var c=zs(s),u="wrapper"==c?Bs(s):r;a=u&&ua(u[0])&&u[1]==(k|_|S|$)&&!u[4].length&&1==u[9]?a[zs(u[0])].apply(a,u[3]):1==s.length&&ua(s)?a[c]():a.thru(s)}return function(){var t=arguments,i=t[0];if(a&&1==t.length&&lu(i))return a.plant(i).value();var r=0,o=n?e[r].apply(this,t):i;while(++r<n)o=e[r].call(this,o);return o}}))}function ws(t,e,i,o,s,a,l,c,u,h){var d=e&k,p=e&y,f=e&w,g=e&(_|x),m=e&A,v=f?r:gs(t);function b(){var r=arguments.length,y=n(r),w=r;while(w--)y[w]=arguments[w];if(g)var _=Us(b),x=ti(y,_);if(o&&(y=ns(y,o,s,g)),a&&(y=is(y,a,l,g)),r-=x,g&&r<h){var S=ui(y,_);return As(t,e,ws,b.placeholder,i,y,S,c,u,h-r)}var C=p?i:this,k=f?C[t]:t;return r=y.length,c?y=xa(y,c):m&&r>1&&y.reverse(),d&&u<r&&(y.length=u),this&&this!==an&&this instanceof b&&(k=v||gs(k)),k.apply(C,y)}return b}function bs(t,e){return function(n,i){return zr(n,t,e(i),{})}}function _s(t,e){return function(n,i){var o;if(n===r&&i===r)return e;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=Do(n),i=Do(i)):(n=Io(n),i=Io(i)),o=t(n,i)}return o}}function xs(t){return Fs((function(e){return e=An(e,Kn(js())),_o((function(n){var i=this;return t(e,(function(t){return wn(t,i,n)}))}))}))}function Ss(t,e){e=e===r?" ":Do(e);var n=e.length;if(n<2)return n?bo(e,t):e;var i=bo(e,Ie(t/gi(e)));return oi(e)?Vo(mi(i),0,t).join(""):i.slice(0,t)}function Cs(t,e,i,r){var o=e&y,s=gs(t);function a(){var e=-1,l=arguments.length,c=-1,u=r.length,h=n(u+l),d=this&&this!==an&&this instanceof a?s:t;while(++c<u)h[c]=r[c];while(l--)h[c++]=arguments[++e];return wn(d,o?i:this,h)}return a}function ks(t){return function(e,n,i){return i&&"number"!=typeof i&&aa(e,n,i)&&(n=i=r),e=Yu(e),n===r?(n=e,e=0):n=Yu(n),i=i===r?e<n?1:-1:Yu(i),wo(e,n,i,t)}}function $s(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Xu(e),n=Xu(n)),t(e,n)}}function As(t,e,n,i,o,s,a,l,c,u){var h=e&_,d=h?a:r,p=h?r:a,f=h?s:r,g=h?r:s;e|=h?S:C,e&=~(h?C:S),e&b||(e&=~(y|w));var m=[t,e,o,f,d,g,p,l,c,u],v=n.apply(r,m);return ua(t)&&Ca(v,m),v.placeholder=i,Aa(v,t,e)}function Ts(t){var e=ee[t];return function(t,n){if(t=Xu(t),n=null==n?0:Be(qu(n),292),n&&Ne(t)){var i=(Ju(t)+"e").split("e"),r=e(i[0]+"e"+(+i[1]+n));return i=(Ju(r)+"e").split("e"),+(i[0]+"e"+(+i[1]-n))}return e(t)}}var Ls=en&&1/hi(new en([,-0]))[1]==O?function(t){return new en(t)}:Fd;function Rs(t){return function(e){var n=Qs(e);return n==Z?li(e):n==ot?di(e):Yn(e,t(e))}}function Es(t,e,n,i,o,s,a,c){var u=e&w;if(!u&&"function"!=typeof t)throw new oe(l);var h=i?i.length:0;if(h||(e&=~(S|C),i=o=r),a=a===r?a:He(qu(a),0),c=c===r?c:qu(c),h-=o?o.length:0,e&C){var d=i,p=o;i=o=r}var f=u?r:Bs(t),g=[t,e,n,i,o,d,p,s,a,c];if(f&&va(g,f),t=g[0],e=g[1],n=g[2],i=g[3],o=g[4],c=g[9]=g[9]===r?u?0:t.length:He(g[9]-h,0),!c&&e&(_|x)&&(e&=~(_|x)),e&&e!=y)m=e==_||e==x?ms(t,e,c):e!=S&&e!=(y|S)||o.length?ws.apply(r,g):Cs(t,e,n,i);else var m=ds(t,e,n);var v=f?ko:Ca;return Aa(v(m,g),t,e)}function Ms(t,e,n,i){return t===r||ru(t,le[n])&&!he.call(i,n)?e:t}function Is(t,e,n,i,o,s){return Cu(t)&&Cu(e)&&(s.set(e,t),lo(t,e,r,Is,s),s["delete"](e)),t}function Ds(t){return Du(t)?r:t}function Os(t,e,n,i,o,s){var a=n&m,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(t),h=s.get(e);if(u&&h)return u==e&&h==t;var d=-1,p=!0,f=n&v?new Ki:r;s.set(t,e),s.set(e,t);while(++d<l){var g=t[d],y=e[d];if(i)var w=a?i(y,g,d,e,t,s):i(g,y,d,t,e,s);if(w!==r){if(w)continue;p=!1;break}if(f){if(!En(e,(function(t,e){if(!Qn(f,e)&&(g===t||o(g,t,n,i,s)))return f.push(e)}))){p=!1;break}}else if(g!==y&&!o(g,y,n,i,s)){p=!1;break}}return s["delete"](t),s["delete"](e),p}function Ps(t,e,n,i,r,o,s){switch(n){case dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ht:return!(t.byteLength!=e.byteLength||!o(new be(t),new be(e)));case V:case Y:case J:return ru(+t,+e);case K:return t.name==e.name&&t.message==e.message;case rt:case st:return t==e+"";case Z:var a=li;case ot:var l=i&m;if(a||(a=hi),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;i|=v,s.set(t,e);var u=Os(a(t),a(e),i,r,o,s);return s["delete"](t),u;case at:if(wi)return wi.call(t)==wi.call(e)}return!1}function Ns(t,e,n,i,o,s){var a=n&m,l=Ws(t),c=l.length,u=Ws(e),h=u.length;if(c!=h&&!a)return!1;var d=c;while(d--){var p=l[d];if(!(a?p in e:he.call(e,p)))return!1}var f=s.get(t),g=s.get(e);if(f&&g)return f==e&&g==t;var v=!0;s.set(t,e),s.set(e,t);var y=a;while(++d<c){p=l[d];var w=t[p],b=e[p];if(i)var _=a?i(b,w,p,e,t,s):i(w,b,p,t,e,s);if(!(_===r?w===b||o(w,b,n,i,s):_)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var x=t.constructor,S=e.constructor;x==S||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof S&&S instanceof S||(v=!1)}return s["delete"](t),s["delete"](e),v}function Fs(t){return $a(ba(t,r,qa),t+"")}function Ws(t){return Or(t,xh,Ks)}function Hs(t){return Or(t,Sh,Xs)}var Bs=ln?function(t){return ln.get(t)}:Fd;function zs(t){var e=t.name+"",n=cn[e],i=he.call(cn,e)?n.length:0;while(i--){var r=n[i],o=r.func;if(null==o||o==t)return r.name}return e}function Us(t){var e=he.call(xi,"placeholder")?xi:t;return e.placeholder}function js(){var t=xi.iteratee||Ed;return t=t===Ed?eo:t,arguments.length?t(arguments[0],arguments[1]):t}function Gs(t,e){var n=t.__data__;return ca(e)?n["string"==typeof e?"string":"hash"]:n.map}function Vs(t){var e=xh(t),n=e.length;while(n--){var i=e[n],r=t[i];e[n]=[i,r,fa(r)]}return e}function Ys(t,e){var n=ri(t,e);return Qr(n)?n:r}function qs(t){var e=he.call(t,Te),n=t[Te];try{t[Te]=r;var i=!0}catch(s){}var o=fe.call(t);return i&&(e?t[Te]=n:delete t[Te]),o}var Ks=Oe?function(t){return null==t?[]:(t=ne(t),Cn(Oe(t),(function(e){return Ce.call(t,e)})))}:Yd,Xs=Oe?function(t){var e=[];while(t)Tn(e,Ks(t)),t=xe(t);return e}:Yd,Qs=Pr;function Zs(t,e,n){var i=-1,r=n.length;while(++i<r){var o=n[i],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=Be(e,t+s);break;case"takeRight":t=He(t,e-s);break}}return{start:t,end:e}}function Js(t){var e=t.match(Ht);return e?e[1].split(Bt):[]}function ta(t,e,n){e=jo(e,t);var i=-1,r=e.length,o=!1;while(++i<r){var s=Ea(e[i]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++i!=r?o:(r=null==t?0:t.length,!!r&&Su(r)&&sa(s,r)&&(lu(t)||au(t)))}function ea(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&he.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function na(t){return"function"!=typeof t.constructor||pa(t)?{}:Ci(xe(t))}function ia(t,e,n){var i=t.constructor;switch(e){case ht:return Ko(t);case V:case Y:return new i(+t);case dt:return Xo(t,n);case pt:case ft:case gt:case mt:case vt:case yt:case wt:case bt:case _t:return Jo(t,n);case Z:return new i;case J:case st:return new i(t);case rt:return Qo(t);case ot:return new i;case at:return Zo(t)}}function ra(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(Wt,"{\n/* [wrapped with "+e+"] */\n")}function oa(t){return lu(t)||au(t)||!!($e&&t&&t[$e])}function sa(t,e){var n=typeof t;return e=null==e?P:e,!!e&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t<e}function aa(t,e,n){if(!Cu(n))return!1;var i=typeof e;return!!("number"==i?uu(n)&&sa(e,n.length):"string"==i&&e in n)&&ru(n[e],t)}function la(t,e){if(lu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Wu(t))||(It.test(t)||!Mt.test(t)||null!=e&&t in ne(e))}function ca(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ua(t){var e=zs(t),n=xi[e];if("function"!=typeof n||!(e in Ai.prototype))return!1;if(t===n)return!0;var i=Bs(n);return!!i&&t===i[0]}function ha(t){return!!pe&&pe in t}(Ze&&Qs(new Ze(new ArrayBuffer(1)))!=dt||Je&&Qs(new Je)!=Z||tn&&Qs(tn.resolve())!=nt||en&&Qs(new en)!=ot||on&&Qs(new on)!=ct)&&(Qs=function(t){var e=Pr(t),n=e==et?t.constructor:r,i=n?Ma(n):"";if(i)switch(i){case hn:return dt;case dn:return Z;case Mn:return nt;case In:return ot;case zn:return ct}return e});var da=ce?_u:qd;function pa(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||le;return t===n}function fa(t){return t===t&&!Cu(t)}function ga(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in ne(n)))}}function ma(t){var e=Hc(t,(function(t){return n.size===h&&n.clear(),t})),n=e.cache;return e}function va(t,e){var n=t[1],i=e[1],r=n|i,o=r<(y|w|k),s=i==k&&n==_||i==k&&n==$&&t[7].length<=e[8]||i==(k|$)&&e[7].length<=e[8]&&n==_;if(!o&&!s)return t;i&y&&(t[2]=e[2],r|=n&y?0:b);var a=e[3];if(a){var l=t[3];t[3]=l?ns(l,a,e[4]):a,t[4]=l?ui(t[3],d):e[4]}return a=e[5],a&&(l=t[5],t[5]=l?is(l,a,e[6]):a,t[6]=l?ui(t[5],d):e[6]),a=e[7],a&&(t[7]=a),i&k&&(t[8]=null==t[8]?e[8]:Be(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}function ya(t){var e=[];if(null!=t)for(var n in ne(t))e.push(n);return e}function wa(t){return fe.call(t)}function ba(t,e,i){return e=He(e===r?t.length-1:e,0),function(){var r=arguments,o=-1,s=He(r.length-e,0),a=n(s);while(++o<s)a[o]=r[e+o];o=-1;var l=n(e+1);while(++o<e)l[o]=r[o];return l[e]=i(a),wn(t,this,l)}}function _a(t,e){return e.length<2?t:Dr(t,To(e,0,-1))}function xa(t,e){var n=t.length,i=Be(e.length,n),o=rs(t);while(i--){var s=e[i];t[i]=sa(s,n)?o[s]:r}return t}function Sa(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var Ca=Ta(ko),ka=Me||function(t,e){return an.setTimeout(t,e)},$a=Ta($o);function Aa(t,e,n){var i=e+"";return $a(t,ra(i,Ia(Js(i),n)))}function Ta(t){var e=0,n=0;return function(){var i=je(),o=E-(i-n);if(n=i,o>0){if(++e>=R)return arguments[0]}else e=0;return t.apply(r,arguments)}}function La(t,e){var n=-1,i=t.length,o=i-1;e=e===r?i:e;while(++n<e){var s=yo(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ra=ma((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Dt,(function(t,n,i,r){e.push(i?r.replace(jt,"$1"):n||t)})),e}));function Ea(t){if("string"==typeof t||Wu(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function Ma(t){if(null!=t){try{return ue.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ia(t,e){return _n(z,(function(n){var i="_."+n[0];e&n[1]&&!kn(t,i)&&t.push(i)})),t.sort()}function Da(t){if(t instanceof Ai)return t.clone();var e=new $i(t.__wrapped__,t.__chain__);return e.__actions__=rs(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Oa(t,e,i){e=(i?aa(t,e,i):e===r)?1:He(qu(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];var s=0,a=0,l=n(Ie(o/e));while(s<o)l[a++]=To(t,s,s+=e);return l}function Pa(t){var e=-1,n=null==t?0:t.length,i=0,r=[];while(++e<n){var o=t[e];o&&(r[i++]=o)}return r}function Na(){var t=arguments.length;if(!t)return[];var e=n(t-1),i=arguments[0],r=t;while(r--)e[r-1]=arguments[r];return Tn(lu(i)?rs(i):[i],Tr(e,1))}var Fa=_o((function(t,e){return hu(t)?_r(t,Tr(e,1,hu,!0)):[]})),Wa=_o((function(t,e){var n=ol(e);return hu(n)&&(n=r),hu(t)?_r(t,Tr(e,1,hu,!0),js(n,2)):[]})),Ha=_o((function(t,e){var n=ol(e);return hu(n)&&(n=r),hu(t)?_r(t,Tr(e,1,hu,!0),r,n):[]}));function Ba(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:qu(e),To(t,e<0?0:e,i)):[]}function za(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:qu(e),e=i-e,To(t,0,e<0?0:e)):[]}function Ua(t,e){return t&&t.length?Fo(t,js(e,3),!0,!0):[]}function ja(t,e){return t&&t.length?Fo(t,js(e,3),!0):[]}function Ga(t,e,n,i){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&aa(t,e,n)&&(n=0,i=r),$r(t,e,n,i)):[]}function Va(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:qu(n);return r<0&&(r=He(i+r,0)),Pn(t,js(e,3),r)}function Ya(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==r&&(o=qu(n),o=n<0?He(i+o,0):Be(o,i-1)),Pn(t,js(e,3),o,!0)}function qa(t){var e=null==t?0:t.length;return e?Tr(t,1):[]}function Ka(t){var e=null==t?0:t.length;return e?Tr(t,O):[]}function Xa(t,e){var n=null==t?0:t.length;return n?(e=e===r?1:qu(e),Tr(t,e)):[]}function Qa(t){var e=-1,n=null==t?0:t.length,i={};while(++e<n){var r=t[e];i[r[0]]=r[1]}return i}function Za(t){return t&&t.length?t[0]:r}function Ja(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:qu(n);return r<0&&(r=He(i+r,0)),Nn(t,e,r)}function tl(t){var e=null==t?0:t.length;return e?To(t,0,-1):[]}var el=_o((function(t){var e=An(t,zo);return e.length&&e[0]===t[0]?Br(e):[]})),nl=_o((function(t){var e=ol(t),n=An(t,zo);return e===ol(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Br(n,js(e,2)):[]})),il=_o((function(t){var e=ol(t),n=An(t,zo);return e="function"==typeof e?e:r,e&&n.pop(),n.length&&n[0]===t[0]?Br(n,r,e):[]}));function rl(t,e){return null==t?"":Fe.call(t,e)}function ol(t){var e=null==t?0:t.length;return e?t[e-1]:r}function sl(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==r&&(o=qu(n),o=o<0?He(i+o,0):Be(o,i-1)),e===e?fi(t,e,o):Pn(t,Wn,o,!0)}function al(t,e){return t&&t.length?uo(t,qu(e)):r}var ll=_o(cl);function cl(t,e){return t&&t.length&&e&&e.length?mo(t,e):t}function ul(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,js(n,2)):t}function hl(t,e,n){return t&&t.length&&e&&e.length?mo(t,e,r,n):t}var dl=Fs((function(t,e){var n=null==t?0:t.length,i=gr(t,e);return vo(t,An(e,(function(t){return sa(t,n)?+t:t})).sort(ts)),i}));function pl(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],o=t.length;e=js(e,3);while(++i<o){var s=t[i];e(s,i,t)&&(n.push(s),r.push(i))}return vo(t,r),n}function fl(t){return null==t?t:Ye.call(t)}function gl(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&aa(t,e,n)?(e=0,n=i):(e=null==e?0:qu(e),n=n===r?i:qu(n)),To(t,e,n)):[]}function ml(t,e){return Ro(t,e)}function vl(t,e,n){return Eo(t,e,js(n,2))}function yl(t,e){var n=null==t?0:t.length;if(n){var i=Ro(t,e);if(i<n&&ru(t[i],e))return i}return-1}function wl(t,e){return Ro(t,e,!0)}function bl(t,e,n){return Eo(t,e,js(n,2),!0)}function _l(t,e){var n=null==t?0:t.length;if(n){var i=Ro(t,e,!0)-1;if(ru(t[i],e))return i}return-1}function xl(t){return t&&t.length?Mo(t):[]}function Sl(t,e){return t&&t.length?Mo(t,js(e,2)):[]}function Cl(t){var e=null==t?0:t.length;return e?To(t,1,e):[]}function kl(t,e,n){return t&&t.length?(e=n||e===r?1:qu(e),To(t,0,e<0?0:e)):[]}function $l(t,e,n){var i=null==t?0:t.length;return i?(e=n||e===r?1:qu(e),e=i-e,To(t,e<0?0:e,i)):[]}function Al(t,e){return t&&t.length?Fo(t,js(e,3),!1,!0):[]}function Tl(t,e){return t&&t.length?Fo(t,js(e,3)):[]}var Ll=_o((function(t){return Oo(Tr(t,1,hu,!0))})),Rl=_o((function(t){var e=ol(t);return hu(e)&&(e=r),Oo(Tr(t,1,hu,!0),js(e,2))})),El=_o((function(t){var e=ol(t);return e="function"==typeof e?e:r,Oo(Tr(t,1,hu,!0),r,e)}));function Ml(t){return t&&t.length?Oo(t):[]}function Il(t,e){return t&&t.length?Oo(t,js(e,2)):[]}function Dl(t,e){return e="function"==typeof e?e:r,t&&t.length?Oo(t,r,e):[]}function Ol(t){if(!t||!t.length)return[];var e=0;return t=Cn(t,(function(t){if(hu(t))return e=He(t.length,e),!0})),Vn(e,(function(e){return An(t,Bn(e))}))}function Pl(t,e){if(!t||!t.length)return[];var n=Ol(t);return null==e?n:An(n,(function(t){return wn(e,r,t)}))}var Nl=_o((function(t,e){return hu(t)?_r(t,e):[]})),Fl=_o((function(t){return Ho(Cn(t,hu))})),Wl=_o((function(t){var e=ol(t);return hu(e)&&(e=r),Ho(Cn(t,hu),js(e,2))})),Hl=_o((function(t){var e=ol(t);return e="function"==typeof e?e:r,Ho(Cn(t,hu),r,e)})),Bl=_o(Ol);function zl(t,e){return Bo(t||[],e||[],cr)}function Ul(t,e){return Bo(t||[],e||[],Co)}var jl=_o((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,Pl(t,n)}));function Gl(t){var e=xi(t);return e.__chain__=!0,e}function Vl(t,e){return e(t),t}function Yl(t,e){return e(t)}var ql=Fs((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,o=function(e){return gr(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Ai&&sa(n)?(i=i.slice(n,+n+(e?1:0)),i.__actions__.push({func:Yl,args:[o],thisArg:r}),new $i(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(o)}));function Kl(){return Gl(this)}function Xl(){return new $i(this.value(),this.__chain__)}function Ql(){this.__values__===r&&(this.__values__=Vu(this.value()));var t=this.__index__>=this.__values__.length,e=t?r:this.__values__[this.__index__++];return{done:t,value:e}}function Zl(){return this}function Jl(t){var e,n=this;while(n instanceof ki){var i=Da(n);i.__index__=0,i.__values__=r,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e}function tc(){var t=this.__wrapped__;if(t instanceof Ai){var e=t;return this.__actions__.length&&(e=new Ai(this)),e=e.reverse(),e.__actions__.push({func:Yl,args:[fl],thisArg:r}),new $i(e,this.__chain__)}return this.thru(fl)}function ec(){return Wo(this.__wrapped__,this.__actions__)}var nc=ls((function(t,e,n){he.call(t,n)?++t[n]:fr(t,n,1)}));function ic(t,e,n){var i=lu(t)?Sn:Cr;return n&&aa(t,e,n)&&(e=r),i(t,js(e,3))}function rc(t,e){var n=lu(t)?Cn:Ar;return n(t,js(e,3))}var oc=vs(Va),sc=vs(Ya);function ac(t,e){return Tr(mc(t,e),1)}function lc(t,e){return Tr(mc(t,e),O)}function cc(t,e,n){return n=n===r?1:qu(n),Tr(mc(t,e),n)}function uc(t,e){var n=lu(t)?_n:xr;return n(t,js(e,3))}function hc(t,e){var n=lu(t)?xn:Sr;return n(t,js(e,3))}var dc=ls((function(t,e,n){he.call(t,n)?t[n].push(e):fr(t,n,[e])}));function pc(t,e,n,i){t=uu(t)?t:Bh(t),n=n&&!i?qu(n):0;var r=t.length;return n<0&&(n=He(r+n,0)),Fu(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&Nn(t,e,n)>-1}var fc=_o((function(t,e,i){var r=-1,o="function"==typeof e,s=uu(t)?n(t.length):[];return xr(t,(function(t){s[++r]=o?wn(e,t,i):Ur(t,e,i)})),s})),gc=ls((function(t,e,n){fr(t,n,e)}));function mc(t,e){var n=lu(t)?An:oo;return n(t,js(e,3))}function vc(t,e,n,i){return null==t?[]:(lu(e)||(e=null==e?[]:[e]),n=i?r:n,lu(n)||(n=null==n?[]:[n]),ho(t,e,n))}var yc=ls((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function wc(t,e,n){var i=lu(t)?Ln:Un,r=arguments.length<3;return i(t,js(e,4),n,r,xr)}function bc(t,e,n){var i=lu(t)?Rn:Un,r=arguments.length<3;return i(t,js(e,4),n,r,Sr)}function _c(t,e){var n=lu(t)?Cn:Ar;return n(t,Bc(js(e,3)))}function xc(t){var e=lu(t)?or:xo;return e(t)}function Sc(t,e,n){e=(n?aa(t,e,n):e===r)?1:qu(e);var i=lu(t)?sr:So;return i(t,e)}function Cc(t){var e=lu(t)?ar:Ao;return e(t)}function kc(t){if(null==t)return 0;if(uu(t))return Fu(t)?gi(t):t.length;var e=Qs(t);return e==Z||e==ot?t.size:no(t).length}function $c(t,e,n){var i=lu(t)?En:Lo;return n&&aa(t,e,n)&&(e=r),i(t,js(e,3))}var Ac=_o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&aa(t,e[0],e[1])?e=[]:n>2&&aa(e[0],e[1],e[2])&&(e=[e[0]]),ho(t,Tr(e,1),[])})),Tc=Ee||function(){return an.Date.now()};function Lc(t,e){if("function"!=typeof e)throw new oe(l);return t=qu(t),function(){if(--t<1)return e.apply(this,arguments)}}function Rc(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,Es(t,k,r,r,r,r,e)}function Ec(t,e){var n;if("function"!=typeof e)throw new oe(l);return t=qu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Mc=_o((function(t,e,n){var i=y;if(n.length){var r=ui(n,Us(Mc));i|=S}return Es(t,i,e,n,r)})),Ic=_o((function(t,e,n){var i=y|w;if(n.length){var r=ui(n,Us(Ic));i|=S}return Es(e,i,t,n,r)}));function Dc(t,e,n){e=n?r:e;var i=Es(t,_,r,r,r,r,r,e);return i.placeholder=Dc.placeholder,i}function Oc(t,e,n){e=n?r:e;var i=Es(t,x,r,r,r,r,r,e);return i.placeholder=Oc.placeholder,i}function Pc(t,e,n){var i,o,s,a,c,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof t)throw new oe(l);function g(e){var n=i,s=o;return i=o=r,h=e,a=t.apply(s,n),a}function m(t){return h=t,c=ka(w,e),d?g(t):a}function v(t){var n=t-u,i=t-h,r=e-n;return p?Be(r,s-i):r}function y(t){var n=t-u,i=t-h;return u===r||n>=e||n<0||p&&i>=s}function w(){var t=Tc();if(y(t))return b(t);c=ka(w,v(t))}function b(t){return c=r,f&&i?g(t):(i=o=r,a)}function _(){c!==r&&Yo(c),h=0,i=u=o=c=r}function x(){return c===r?a:b(Tc())}function S(){var t=Tc(),n=y(t);if(i=arguments,o=this,u=t,n){if(c===r)return m(u);if(p)return Yo(c),c=ka(w,e),g(u)}return c===r&&(c=ka(w,e)),a}return e=Xu(e)||0,Cu(n)&&(d=!!n.leading,p="maxWait"in n,s=p?He(Xu(n.maxWait)||0,e):s,f="trailing"in n?!!n.trailing:f),S.cancel=_,S.flush=x,S}var Nc=_o((function(t,e){return br(t,1,e)})),Fc=_o((function(t,e,n){return br(t,Xu(e)||0,n)}));function Wc(t){return Es(t,A)}function Hc(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new oe(l);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(Hc.Cache||Ui),n}function Bc(t){if("function"!=typeof t)throw new oe(l);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function zc(t){return Ec(2,t)}Hc.Cache=Ui;var Uc=Go((function(t,e){e=1==e.length&&lu(e[0])?An(e[0],Kn(js())):An(Tr(e,1),Kn(js()));var n=e.length;return _o((function(i){var r=-1,o=Be(i.length,n);while(++r<o)i[r]=e[r].call(this,i[r]);return wn(t,this,i)}))})),jc=_o((function(t,e){var n=ui(e,Us(jc));return Es(t,S,r,e,n)})),Gc=_o((function(t,e){var n=ui(e,Us(Gc));return Es(t,C,r,e,n)})),Vc=Fs((function(t,e){return Es(t,$,r,r,r,e)}));function Yc(t,e){if("function"!=typeof t)throw new oe(l);return e=e===r?e:qu(e),_o(t,e)}function qc(t,e){if("function"!=typeof t)throw new oe(l);return e=null==e?0:He(qu(e),0),_o((function(n){var i=n[e],r=Vo(n,0,e);return i&&Tn(r,i),wn(t,this,r)}))}function Kc(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new oe(l);return Cu(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Pc(t,e,{leading:i,maxWait:e,trailing:r})}function Xc(t){return Rc(t,1)}function Qc(t,e){return jc(Uo(e),t)}function Zc(){if(!arguments.length)return[];var t=arguments[0];return lu(t)?t:[t]}function Jc(t){return vr(t,g)}function tu(t,e){return e="function"==typeof e?e:r,vr(t,g,e)}function eu(t){return vr(t,p|g)}function nu(t,e){return e="function"==typeof e?e:r,vr(t,p|g,e)}function iu(t,e){return null==e||wr(t,e,xh(e))}function ru(t,e){return t===e||t!==t&&e!==e}var ou=$s(Nr),su=$s((function(t,e){return t>=e})),au=jr(function(){return arguments}())?jr:function(t){return ku(t)&&he.call(t,"callee")&&!Ce.call(t,"callee")},lu=n.isArray,cu=pn?Kn(pn):Gr;function uu(t){return null!=t&&Su(t.length)&&!_u(t)}function hu(t){return ku(t)&&uu(t)}function du(t){return!0===t||!1===t||ku(t)&&Pr(t)==V}var pu=Pe||qd,fu=fn?Kn(fn):Vr;function gu(t){return ku(t)&&1===t.nodeType&&!Du(t)}function mu(t){if(null==t)return!0;if(uu(t)&&(lu(t)||"string"==typeof t||"function"==typeof t.splice||pu(t)||Hu(t)||au(t)))return!t.length;var e=Qs(t);if(e==Z||e==ot)return!t.size;if(pa(t))return!no(t).length;for(var n in t)if(he.call(t,n))return!1;return!0}function vu(t,e){return Yr(t,e)}function yu(t,e,n){n="function"==typeof n?n:r;var i=n?n(t,e):r;return i===r?Yr(t,e,r,n):!!i}function wu(t){if(!ku(t))return!1;var e=Pr(t);return e==K||e==q||"string"==typeof t.message&&"string"==typeof t.name&&!Du(t)}function bu(t){return"number"==typeof t&&Ne(t)}function _u(t){if(!Cu(t))return!1;var e=Pr(t);return e==X||e==Q||e==G||e==it}function xu(t){return"number"==typeof t&&t==qu(t)}function Su(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=P}function Cu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ku(t){return null!=t&&"object"==typeof t}var $u=gn?Kn(gn):Kr;function Au(t,e){return t===e||Xr(t,e,Vs(e))}function Tu(t,e,n){return n="function"==typeof n?n:r,Xr(t,e,Vs(e),n)}function Lu(t){return Iu(t)&&t!=+t}function Ru(t){if(da(t))throw new Ft(a);return Qr(t)}function Eu(t){return null===t}function Mu(t){return null==t}function Iu(t){return"number"==typeof t||ku(t)&&Pr(t)==J}function Du(t){if(!ku(t)||Pr(t)!=et)return!1;var e=xe(t);if(null===e)return!0;var n=he.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==ge}var Ou=mn?Kn(mn):Zr;function Pu(t){return xu(t)&&t>=-P&&t<=P}var Nu=vn?Kn(vn):Jr;function Fu(t){return"string"==typeof t||!lu(t)&&ku(t)&&Pr(t)==st}function Wu(t){return"symbol"==typeof t||ku(t)&&Pr(t)==at}var Hu=yn?Kn(yn):to;function Bu(t){return t===r}function zu(t){return ku(t)&&Qs(t)==ct}function Uu(t){return ku(t)&&Pr(t)==ut}var ju=$s(ro),Gu=$s((function(t,e){return t<=e}));function Vu(t){if(!t)return[];if(uu(t))return Fu(t)?mi(t):rs(t);if(Ae&&t[Ae])return ai(t[Ae]());var e=Qs(t),n=e==Z?li:e==ot?hi:Bh;return n(t)}function Yu(t){if(!t)return 0===t?t:0;if(t=Xu(t),t===O||t===-O){var e=t<0?-1:1;return e*N}return t===t?t:0}function qu(t){var e=Yu(t),n=e%1;return e===e?n?e-n:e:0}function Ku(t){return t?mr(qu(t),0,W):0}function Xu(t){if("number"==typeof t)return t;if(Wu(t))return F;if(Cu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Cu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qn(t);var n=qt.test(t);return n||Xt.test(t)?rn(t.slice(2),n?2:8):Yt.test(t)?F:+t}function Qu(t){return os(t,Sh(t))}function Zu(t){return t?mr(qu(t),-P,P):0===t?t:0}function Ju(t){return null==t?"":Do(t)}var th=cs((function(t,e){if(pa(e)||uu(e))os(e,xh(e),t);else for(var n in e)he.call(e,n)&&cr(t,n,e[n])})),eh=cs((function(t,e){os(e,Sh(e),t)})),nh=cs((function(t,e,n,i){os(e,Sh(e),t,i)})),ih=cs((function(t,e,n,i){os(e,xh(e),t,i)})),rh=Fs(gr);function oh(t,e){var n=Ci(t);return null==e?n:dr(n,e)}var sh=_o((function(t,e){t=ne(t);var n=-1,i=e.length,o=i>2?e[2]:r;o&&aa(e[0],e[1],o)&&(i=1);while(++n<i){var s=e[n],a=Sh(s),l=-1,c=a.length;while(++l<c){var u=a[l],h=t[u];(h===r||ru(h,le[u])&&!he.call(t,u))&&(t[u]=s[u])}}return t})),ah=_o((function(t){return t.push(r,Is),wn(Ah,r,t)}));function lh(t,e){return On(t,js(e,3),Er)}function ch(t,e){return On(t,js(e,3),Mr)}function uh(t,e){return null==t?t:Lr(t,js(e,3),Sh)}function hh(t,e){return null==t?t:Rr(t,js(e,3),Sh)}function dh(t,e){return t&&Er(t,js(e,3))}function ph(t,e){return t&&Mr(t,js(e,3))}function fh(t){return null==t?[]:Ir(t,xh(t))}function gh(t){return null==t?[]:Ir(t,Sh(t))}function mh(t,e,n){var i=null==t?r:Dr(t,e);return i===r?n:i}function vh(t,e){return null!=t&&ta(t,e,Fr)}function yh(t,e){return null!=t&&ta(t,e,Wr)}var wh=bs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=fe.call(e)),t[e]=n}),$d(Rd)),bh=bs((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=fe.call(e)),he.call(t,e)?t[e].push(n):t[e]=[n]}),js),_h=_o(Ur);function xh(t){return uu(t)?rr(t):no(t)}function Sh(t){return uu(t)?rr(t,!0):io(t)}function Ch(t,e){var n={};return e=js(e,3),Er(t,(function(t,i,r){fr(n,e(t,i,r),t)})),n}function kh(t,e){var n={};return e=js(e,3),Er(t,(function(t,i,r){fr(n,i,e(t,i,r))})),n}var $h=cs((function(t,e,n){lo(t,e,n)})),Ah=cs((function(t,e,n,i){lo(t,e,n,i)})),Th=Fs((function(t,e){var n={};if(null==t)return n;var i=!1;e=An(e,(function(e){return e=jo(e,t),i||(i=e.length>1),e})),os(t,Hs(t),n),i&&(n=vr(n,p|f|g,Ds));var r=e.length;while(r--)Po(n,e[r]);return n}));function Lh(t,e){return Eh(t,Bc(js(e)))}var Rh=Fs((function(t,e){return null==t?{}:po(t,e)}));function Eh(t,e){if(null==t)return{};var n=An(Hs(t),(function(t){return[t]}));return e=js(e),fo(t,n,(function(t,n){return e(t,n[0])}))}function Mh(t,e,n){e=jo(e,t);var i=-1,o=e.length;o||(o=1,t=r);while(++i<o){var s=null==t?r:t[Ea(e[i])];s===r&&(i=o,s=n),t=_u(s)?s.call(t):s}return t}function Ih(t,e,n){return null==t?t:Co(t,e,n)}function Dh(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Co(t,e,n,i)}var Oh=Rs(xh),Ph=Rs(Sh);function Nh(t,e,n){var i=lu(t),r=i||pu(t)||Hu(t);if(e=js(e,4),null==n){var o=t&&t.constructor;n=r?i?new o:[]:Cu(t)&&_u(o)?Ci(xe(t)):{}}return(r?_n:Er)(t,(function(t,i,r){return e(n,t,i,r)})),n}function Fh(t,e){return null==t||Po(t,e)}function Wh(t,e,n){return null==t?t:No(t,e,Uo(n))}function Hh(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:No(t,e,Uo(n),i)}function Bh(t){return null==t?[]:Xn(t,xh(t))}function zh(t){return null==t?[]:Xn(t,Sh(t))}function Uh(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=Xu(n),n=n===n?n:0),e!==r&&(e=Xu(e),e=e===e?e:0),mr(Xu(t),e,n)}function jh(t,e,n){return e=Yu(e),n===r?(n=e,e=0):n=Yu(n),t=Xu(t),Hr(t,e,n)}function Gh(t,e,n){if(n&&"boolean"!=typeof n&&aa(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=Yu(t),e===r?(e=t,t=0):e=Yu(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=Ve();return Be(t+o*(e-t+nn("1e-"+((o+"").length-1))),e)}return yo(t,e)}var Vh=fs((function(t,e,n){return e=e.toLowerCase(),t+(n?Yh(e):e)}));function Yh(t){return bd(Ju(t).toLowerCase())}function qh(t){return t=Ju(t),t&&t.replace(Zt,ei).replace(Ue,"")}function Kh(t,e,n){t=Ju(t),e=Do(e);var i=t.length;n=n===r?i:mr(qu(n),0,i);var o=n;return n-=e.length,n>=0&&t.slice(n,o)==e}function Xh(t){return t=Ju(t),t&&Tt.test(t)?t.replace($t,ni):t}function Qh(t){return t=Ju(t),t&&Pt.test(t)?t.replace(Ot,"\\$&"):t}var Zh=fs((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Jh=fs((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),td=ps("toLowerCase");function ed(t,e,n){t=Ju(t),e=qu(e);var i=e?gi(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Ss(De(r),n)+t+Ss(Ie(r),n)}function nd(t,e,n){t=Ju(t),e=qu(e);var i=e?gi(t):0;return e&&i<e?t+Ss(e-i,n):t}function id(t,e,n){t=Ju(t),e=qu(e);var i=e?gi(t):0;return e&&i<e?Ss(e-i,n)+t:t}function rd(t,e,n){return n||null==e?e=0:e&&(e=+e),Ge(Ju(t).replace(Nt,""),e||0)}function od(t,e,n){return e=(n?aa(t,e,n):e===r)?1:qu(e),bo(Ju(t),e)}function sd(){var t=arguments,e=Ju(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var ad=fs((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));function ld(t,e,n){return n&&"number"!=typeof n&&aa(t,e,n)&&(e=n=r),n=n===r?W:n>>>0,n?(t=Ju(t),t&&("string"==typeof e||null!=e&&!Ou(e))&&(e=Do(e),!e&&oi(t))?Vo(mi(t),0,n):t.split(e,n)):[]}var cd=fs((function(t,e,n){return t+(n?" ":"")+bd(e)}));function ud(t,e,n){return t=Ju(t),n=null==n?0:mr(qu(n),0,t.length),e=Do(e),t.slice(n,n+e.length)==e}function hd(t,e,n){var i=xi.templateSettings;n&&aa(t,e,n)&&(e=r),t=Ju(t),e=nh({},e,i,Ms);var o,s,a=nh({},e.imports,i.imports,Ms),l=xh(a),u=Xn(a,l),h=0,d=e.interpolate||Jt,p="__p += '",f=ie((e.escape||Jt).source+"|"+d.source+"|"+(d===Et?Gt:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),g="//# sourceURL="+(he.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";t.replace(f,(function(e,n,i,r,a,l){return i||(i=r),p+=t.slice(h,l).replace(te,ii),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),i&&(p+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),h=l+e.length,e})),p+="';\n";var m=he.call(e,"variable")&&e.variable;if(m){if(Ut.test(m))throw new Ft(c)}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(xt,""):p).replace(St,"$1").replace(Ct,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=xd((function(){return zt(l,g+"return "+p).apply(r,u)}));if(v.source=p,wu(v))throw v;return v}function dd(t){return Ju(t).toLowerCase()}function pd(t){return Ju(t).toUpperCase()}function fd(t,e,n){if(t=Ju(t),t&&(n||e===r))return qn(t);if(!t||!(e=Do(e)))return t;var i=mi(t),o=mi(e),s=Zn(i,o),a=Jn(i,o)+1;return Vo(i,s,a).join("")}function gd(t,e,n){if(t=Ju(t),t&&(n||e===r))return t.slice(0,vi(t)+1);if(!t||!(e=Do(e)))return t;var i=mi(t),o=Jn(i,mi(e))+1;return Vo(i,0,o).join("")}function md(t,e,n){if(t=Ju(t),t&&(n||e===r))return t.replace(Nt,"");if(!t||!(e=Do(e)))return t;var i=mi(t),o=Zn(i,mi(e));return Vo(i,o).join("")}function vd(t,e){var n=T,i=L;if(Cu(e)){var o="separator"in e?e.separator:o;n="length"in e?qu(e.length):n,i="omission"in e?Do(e.omission):i}t=Ju(t);var s=t.length;if(oi(t)){var a=mi(t);s=a.length}if(n>=s)return t;var l=n-gi(i);if(l<1)return i;var c=a?Vo(a,0,l).join(""):t.slice(0,l);if(o===r)return c+i;if(a&&(l+=c.length-l),Ou(o)){if(t.slice(l).search(o)){var u,h=c;o.global||(o=ie(o.source,Ju(Vt.exec(o))+"g")),o.lastIndex=0;while(u=o.exec(h))var d=u.index;c=c.slice(0,d===r?l:d)}}else if(t.indexOf(Do(o),l)!=l){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+i}function yd(t){return t=Ju(t),t&&At.test(t)?t.replace(kt,yi):t}var wd=fs((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),bd=ps("toUpperCase");function _d(t,e,n){return t=Ju(t),e=n?r:e,e===r?si(t)?_i(t):Dn(t):t.match(e)||[]}var xd=_o((function(t,e){try{return wn(t,r,e)}catch(n){return wu(n)?n:new Ft(n)}})),Sd=Fs((function(t,e){return _n(e,(function(e){e=Ea(e),fr(t,e,Mc(t[e],t))})),t}));function Cd(t){var e=null==t?0:t.length,n=js();return t=e?An(t,(function(t){if("function"!=typeof t[1])throw new oe(l);return[n(t[0]),t[1]]})):[],_o((function(n){var i=-1;while(++i<e){var r=t[i];if(wn(r[0],this,n))return wn(r[1],this,n)}}))}function kd(t){return yr(vr(t,p))}function $d(t){return function(){return t}}function Ad(t,e){return null==t||t!==t?e:t}var Td=ys(),Ld=ys(!0);function Rd(t){return t}function Ed(t){return eo("function"==typeof t?t:vr(t,p))}function Md(t){return so(vr(t,p))}function Id(t,e){return ao(t,vr(e,p))}var Dd=_o((function(t,e){return function(n){return Ur(n,t,e)}})),Od=_o((function(t,e){return function(n){return Ur(t,n,e)}}));function Pd(t,e,n){var i=xh(e),r=Ir(e,i);null!=n||Cu(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=Ir(e,xh(e)));var o=!(Cu(n)&&"chain"in n)||!!n.chain,s=_u(t);return _n(r,(function(n){var i=e[n];t[n]=i,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),r=n.__actions__=rs(this.__actions__);return r.push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Tn([this.value()],arguments))})})),t}function Nd(){return an._===this&&(an._=me),this}function Fd(){}function Wd(t){return t=qu(t),_o((function(e){return uo(e,t)}))}var Hd=xs(An),Bd=xs(Sn),zd=xs(En);function Ud(t){return la(t)?Bn(Ea(t)):go(t)}function jd(t){return function(e){return null==t?r:Dr(t,e)}}var Gd=ks(),Vd=ks(!0);function Yd(){return[]}function qd(){return!1}function Kd(){return{}}function Xd(){return""}function Qd(){return!0}function Zd(t,e){if(t=qu(t),t<1||t>P)return[];var n=W,i=Be(t,W);e=js(e),t-=W;var r=Vn(i,e);while(++n<t)e(n);return r}function Jd(t){return lu(t)?An(t,Ea):Wu(t)?[t]:rs(Ra(Ju(t)))}function tp(t){var e=++de;return Ju(t)+e}var ep=_s((function(t,e){return t+e}),0),np=Ts("ceil"),ip=_s((function(t,e){return t/e}),1),rp=Ts("floor");function op(t){return t&&t.length?kr(t,Rd,Nr):r}function sp(t,e){return t&&t.length?kr(t,js(e,2),Nr):r}function ap(t){return Hn(t,Rd)}function lp(t,e){return Hn(t,js(e,2))}function cp(t){return t&&t.length?kr(t,Rd,ro):r}function up(t,e){return t&&t.length?kr(t,js(e,2),ro):r}var hp=_s((function(t,e){return t*e}),1),dp=Ts("round"),pp=_s((function(t,e){return t-e}),0);function fp(t){return t&&t.length?Gn(t,Rd):0}function gp(t,e){return t&&t.length?Gn(t,js(e,2)):0}return xi.after=Lc,xi.ary=Rc,xi.assign=th,xi.assignIn=eh,xi.assignInWith=nh,xi.assignWith=ih,xi.at=rh,xi.before=Ec,xi.bind=Mc,xi.bindAll=Sd,xi.bindKey=Ic,xi.castArray=Zc,xi.chain=Gl,xi.chunk=Oa,xi.compact=Pa,xi.concat=Na,xi.cond=Cd,xi.conforms=kd,xi.constant=$d,xi.countBy=nc,xi.create=oh,xi.curry=Dc,xi.curryRight=Oc,xi.debounce=Pc,xi.defaults=sh,xi.defaultsDeep=ah,xi.defer=Nc,xi.delay=Fc,xi.difference=Fa,xi.differenceBy=Wa,xi.differenceWith=Ha,xi.drop=Ba,xi.dropRight=za,xi.dropRightWhile=Ua,xi.dropWhile=ja,xi.fill=Ga,xi.filter=rc,xi.flatMap=ac,xi.flatMapDeep=lc,xi.flatMapDepth=cc,xi.flatten=qa,xi.flattenDeep=Ka,xi.flattenDepth=Xa,xi.flip=Wc,xi.flow=Td,xi.flowRight=Ld,xi.fromPairs=Qa,xi.functions=fh,xi.functionsIn=gh,xi.groupBy=dc,xi.initial=tl,xi.intersection=el,xi.intersectionBy=nl,xi.intersectionWith=il,xi.invert=wh,xi.invertBy=bh,xi.invokeMap=fc,xi.iteratee=Ed,xi.keyBy=gc,xi.keys=xh,xi.keysIn=Sh,xi.map=mc,xi.mapKeys=Ch,xi.mapValues=kh,xi.matches=Md,xi.matchesProperty=Id,xi.memoize=Hc,xi.merge=$h,xi.mergeWith=Ah,xi.method=Dd,xi.methodOf=Od,xi.mixin=Pd,xi.negate=Bc,xi.nthArg=Wd,xi.omit=Th,xi.omitBy=Lh,xi.once=zc,xi.orderBy=vc,xi.over=Hd,xi.overArgs=Uc,xi.overEvery=Bd,xi.overSome=zd,xi.partial=jc,xi.partialRight=Gc,xi.partition=yc,xi.pick=Rh,xi.pickBy=Eh,xi.property=Ud,xi.propertyOf=jd,xi.pull=ll,xi.pullAll=cl,xi.pullAllBy=ul,xi.pullAllWith=hl,xi.pullAt=dl,xi.range=Gd,xi.rangeRight=Vd,xi.rearg=Vc,xi.reject=_c,xi.remove=pl,xi.rest=Yc,xi.reverse=fl,xi.sampleSize=Sc,xi.set=Ih,xi.setWith=Dh,xi.shuffle=Cc,xi.slice=gl,xi.sortBy=Ac,xi.sortedUniq=xl,xi.sortedUniqBy=Sl,xi.split=ld,xi.spread=qc,xi.tail=Cl,xi.take=kl,xi.takeRight=$l,xi.takeRightWhile=Al,xi.takeWhile=Tl,xi.tap=Vl,xi.throttle=Kc,xi.thru=Yl,xi.toArray=Vu,xi.toPairs=Oh,xi.toPairsIn=Ph,xi.toPath=Jd,xi.toPlainObject=Qu,xi.transform=Nh,xi.unary=Xc,xi.union=Ll,xi.unionBy=Rl,xi.unionWith=El,xi.uniq=Ml,xi.uniqBy=Il,xi.uniqWith=Dl,xi.unset=Fh,xi.unzip=Ol,xi.unzipWith=Pl,xi.update=Wh,xi.updateWith=Hh,xi.values=Bh,xi.valuesIn=zh,xi.without=Nl,xi.words=_d,xi.wrap=Qc,xi.xor=Fl,xi.xorBy=Wl,xi.xorWith=Hl,xi.zip=Bl,xi.zipObject=zl,xi.zipObjectDeep=Ul,xi.zipWith=jl,xi.entries=Oh,xi.entriesIn=Ph,xi.extend=eh,xi.extendWith=nh,Pd(xi,xi),xi.add=ep,xi.attempt=xd,xi.camelCase=Vh,xi.capitalize=Yh,xi.ceil=np,xi.clamp=Uh,xi.clone=Jc,xi.cloneDeep=eu,xi.cloneDeepWith=nu,xi.cloneWith=tu,xi.conformsTo=iu,xi.deburr=qh,xi.defaultTo=Ad,xi.divide=ip,xi.endsWith=Kh,xi.eq=ru,xi.escape=Xh,xi.escapeRegExp=Qh,xi.every=ic,xi.find=oc,xi.findIndex=Va,xi.findKey=lh,xi.findLast=sc,xi.findLastIndex=Ya,xi.findLastKey=ch,xi.floor=rp,xi.forEach=uc,xi.forEachRight=hc,xi.forIn=uh,xi.forInRight=hh,xi.forOwn=dh,xi.forOwnRight=ph,xi.get=mh,xi.gt=ou,xi.gte=su,xi.has=vh,xi.hasIn=yh,xi.head=Za,xi.identity=Rd,xi.includes=pc,xi.indexOf=Ja,xi.inRange=jh,xi.invoke=_h,xi.isArguments=au,xi.isArray=lu,xi.isArrayBuffer=cu,xi.isArrayLike=uu,xi.isArrayLikeObject=hu,xi.isBoolean=du,xi.isBuffer=pu,xi.isDate=fu,xi.isElement=gu,xi.isEmpty=mu,xi.isEqual=vu,xi.isEqualWith=yu,xi.isError=wu,xi.isFinite=bu,xi.isFunction=_u,xi.isInteger=xu,xi.isLength=Su,xi.isMap=$u,xi.isMatch=Au,xi.isMatchWith=Tu,xi.isNaN=Lu,xi.isNative=Ru,xi.isNil=Mu,xi.isNull=Eu,xi.isNumber=Iu,xi.isObject=Cu,xi.isObjectLike=ku,xi.isPlainObject=Du,xi.isRegExp=Ou,xi.isSafeInteger=Pu,xi.isSet=Nu,xi.isString=Fu,xi.isSymbol=Wu,xi.isTypedArray=Hu,xi.isUndefined=Bu,xi.isWeakMap=zu,xi.isWeakSet=Uu,xi.join=rl,xi.kebabCase=Zh,xi.last=ol,xi.lastIndexOf=sl,xi.lowerCase=Jh,xi.lowerFirst=td,xi.lt=ju,xi.lte=Gu,xi.max=op,xi.maxBy=sp,xi.mean=ap,xi.meanBy=lp,xi.min=cp,xi.minBy=up,xi.stubArray=Yd,xi.stubFalse=qd,xi.stubObject=Kd,xi.stubString=Xd,xi.stubTrue=Qd,xi.multiply=hp,xi.nth=al,xi.noConflict=Nd,xi.noop=Fd,xi.now=Tc,xi.pad=ed,xi.padEnd=nd,xi.padStart=id,xi.parseInt=rd,xi.random=Gh,xi.reduce=wc,xi.reduceRight=bc,xi.repeat=od,xi.replace=sd,xi.result=Mh,xi.round=dp,xi.runInContext=t,xi.sample=xc,xi.size=kc,xi.snakeCase=ad,xi.some=$c,xi.sortedIndex=ml,xi.sortedIndexBy=vl,xi.sortedIndexOf=yl,xi.sortedLastIndex=wl,xi.sortedLastIndexBy=bl,xi.sortedLastIndexOf=_l,xi.startCase=cd,xi.startsWith=ud,xi.subtract=pp,xi.sum=fp,xi.sumBy=gp,xi.template=hd,xi.times=Zd,xi.toFinite=Yu,xi.toInteger=qu,xi.toLength=Ku,xi.toLower=dd,xi.toNumber=Xu,xi.toSafeInteger=Zu,xi.toString=Ju,xi.toUpper=pd,xi.trim=fd,xi.trimEnd=gd,xi.trimStart=md,xi.truncate=vd,xi.unescape=yd,xi.uniqueId=tp,xi.upperCase=wd,xi.upperFirst=bd,xi.each=uc,xi.eachRight=hc,xi.first=Za,Pd(xi,function(){var t={};return Er(xi,(function(e,n){he.call(xi.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),xi.VERSION=o,_n(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){xi[t].placeholder=xi})),_n(["drop","take"],(function(t,e){Ai.prototype[t]=function(n){n=n===r?1:He(qu(n),0);var i=this.__filtered__&&!e?new Ai(this):this.clone();return i.__filtered__?i.__takeCount__=Be(n,i.__takeCount__):i.__views__.push({size:Be(n,W),type:t+(i.__dir__<0?"Right":"")}),i},Ai.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_n(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=n==M||n==D;Ai.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:js(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),_n(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Ai.prototype[t]=function(){return this[n](1).value()[0]}})),_n(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Ai.prototype[t]=function(){return this.__filtered__?new Ai(this):this[n](1)}})),Ai.prototype.compact=function(){return this.filter(Rd)},Ai.prototype.find=function(t){return this.filter(t).head()},Ai.prototype.findLast=function(t){return this.reverse().find(t)},Ai.prototype.invokeMap=_o((function(t,e){return"function"==typeof t?new Ai(this):this.map((function(n){return Ur(n,t,e)}))})),Ai.prototype.reject=function(t){return this.filter(Bc(js(t)))},Ai.prototype.slice=function(t,e){t=qu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Ai(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(e=qu(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},Ai.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ai.prototype.toArray=function(){return this.take(W)},Er(Ai.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=xi[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);o&&(xi.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,l=e instanceof Ai,c=a[0],u=l||lu(e),h=function(t){var e=o.apply(xi,Tn([t],a));return i&&d?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,p=!!this.__actions__.length,f=s&&!d,g=l&&!p;if(!s&&u){e=g?e:new Ai(this);var m=t.apply(e,a);return m.__actions__.push({func:Yl,args:[h],thisArg:r}),new $i(m,d)}return f&&g?t.apply(this,a):(m=this.thru(h),f?i?m.value()[0]:m.value():m)})})),_n(["pop","push","shift","sort","splice","unshift"],(function(t){var e=se[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);xi.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(lu(r)?r:[],t)}return this[n]((function(n){return e.apply(lu(n)?n:[],t)}))}})),Er(Ai.prototype,(function(t,e){var n=xi[e];if(n){var i=n.name+"";he.call(cn,i)||(cn[i]=[]),cn[i].push({name:e,func:n})}})),cn[ws(r,w).name]=[{name:"wrapper",func:r}],Ai.prototype.clone=Ti,Ai.prototype.reverse=Li,Ai.prototype.value=Ri,xi.prototype.at=ql,xi.prototype.chain=Kl,xi.prototype.commit=Xl,xi.prototype.next=Ql,xi.prototype.plant=Jl,xi.prototype.reverse=tc,xi.prototype.toJSON=xi.prototype.valueOf=xi.prototype.value=ec,xi.prototype.first=xi.prototype.head,Ae&&(xi.prototype[Ae]=Zl),xi},Si=xi();an._=Si,i=function(){return Si}.call(e,n,e,t),i===r||(t.exports=i)}.call(this)},5243:(t,e,n)=>{var i=n(2291);function r(t){return null==t?"":i(t)}t.exports=r},5485:(t,e,n)=>{var i=n(4326),r=i("toUpperCase");t.exports=r},9850:(t,e,n)=>{var i=n(9546),r=n(5813),o=n(5243),s=n(482);function a(t,e,n){return t=o(t),e=n?void 0:e,void 0===e?r(t)?s(t):i(t):t.match(e)||[]}t.exports=a},8893:(t,e,n)=>{"use strict";n.d(e,{A:()=>Ai});
|
18
|
-
/**
|
19
|
-
* Muuri v0.9.5
|
20
|
-
* https://muuri.dev/
|
21
|
-
* Copyright (c) 2015-present, Haltu Oy
|
22
|
-
* Released under the MIT license
|
23
|
-
* https://github.com/haltu/muuri/blob/master/LICENSE.md
|
24
|
-
* @license MIT
|
25
|
-
*
|
26
|
-
* Muuri Packer
|
27
|
-
* Copyright (c) 2016-present, Niklas Rämö <inramo@gmail.com>
|
28
|
-
* @license MIT
|
29
|
-
*
|
30
|
-
* Muuri Ticker / Muuri Emitter / Muuri Dragger
|
31
|
-
* Copyright (c) 2018-present, Niklas Rämö <inramo@gmail.com>
|
32
|
-
* @license MIT
|
33
|
-
*
|
34
|
-
* Muuri AutoScroller
|
35
|
-
* Copyright (c) 2019-present, Niklas Rämö <inramo@gmail.com>
|
36
|
-
* @license MIT
|
37
|
-
*/
|
38
|
-
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",p="showStart",f="showEnd",g="hideStart",m="hideEnd",v="filter",y="sort",w="move",b="send",_="beforeSend",x="receive",S="beforeReceive",C="dragInit",k="dragStart",$="dragMove",A="dragScroll",T="dragEnd",L="dragReleaseStart",R="dragReleaseEnd",E="destroy",M="ontouchstart"in window,I=!!window.PointerEvent,D=!!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=I?"pointerout":D?"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)&&(I||D)&&(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:I?J._pointerEvents:D?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",pt="dragScrollWrite",ft="dragSortRead",gt="placeholderLayoutRead",mt="placeholderLayoutWrite",vt="placeholderResizeWrite",yt="autoScrollRead",wt="autoScrollWrite",bt="debounceRead",_t=0,xt=1,St=2,Ct=new nt(3);function kt(t,e,n){Ct.add(_t,rt+t,e),Ct.add(St,ot+t,n)}function $t(t){Ct.remove(_t,rt+t),Ct.remove(St,ot+t)}function At(t,e,n){Ct.add(_t,st+t,e),Ct.add(St,at+t,n)}function Tt(t){Ct.remove(_t,st+t),Ct.remove(St,at+t)}function Lt(t,e,n){Ct.add(_t,lt+t,e),Ct.add(St,ct+t,n)}function Rt(t){Ct.remove(_t,lt+t),Ct.remove(St,ct+t)}function Et(t,e,n){Ct.add(_t,ut+t,e),Ct.add(St,ht+t,n)}function Mt(t){Ct.remove(_t,ut+t),Ct.remove(St,ht+t)}function It(t,e,n){Ct.add(_t,dt+t,e),Ct.add(St,pt+t,n)}function Dt(t){Ct.remove(_t,dt+t),Ct.remove(St,pt+t)}function Ot(t,e){Ct.add(xt,ft+t,e)}function Pt(t){Ct.remove(xt,ft+t)}function Nt(t,e,n){Ct.add(_t,gt+t,e),Ct.add(St,mt+t,n)}function Ft(t){Ct.remove(_t,gt+t),Ct.remove(St,mt+t)}function Wt(t,e){Ct.add(St,vt+t,e)}function Ht(t){Ct.remove(St,vt+t)}function Bt(t,e){Ct.add(_t,yt,t),Ct.add(St,wt,e)}function zt(){Ct.remove(_t,yt),Ct.remove(St,wt)}function Ut(t,e){Ct.add(_t,bt+t,e)}function jt(t){Ct.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 pe(t){return t._drag._getGrid()._settings.dragAutoScroll}function fe(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=pe(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=pe(t).onStart;te(e)&&e(t,this.element,this.direction)},ve.prototype.onStop=function(){var t=this.item,e=pe(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},Ce={width:0,height:0,left:0,right:0,top:0,bottom:0};function ke(){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)}ke.AXIS_X=Gt,ke.AXIS_Y=Vt,ke.FORWARD=Yt,ke.BACKWARD=qt,ke.LEFT=Kt,ke.RIGHT=Xt,ke.UP=Qt,ke.DOWN=Zt,ke.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))}},ke.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}},ke.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))},ke.prototype._writeTick=function(){this._isDestroyed||(this._applyActions(),Bt(this._readTick,this._writeTick))},ke.prototype._startTicking=function(){this._isTicking=!0,Bt(this._readTick,this._writeTick)},ke.prototype._stopTicking=function(){this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,zt()},ke.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},ke.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},ke.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])},ke.prototype._checkItemOverlap=function(t,e,n){var i=pe(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=Ce,d=null,p=null,f=!0,g=!0,m=0,v=0,y=null,w=null,b=0,_=0,x=0,S=null,C=-1/0,k=0,$=0,A=null,T=0,L=0,R=null,E=-1/0,M=0,I=0,D=null,O=0,P=0,N=0;N<r.length;N++)d=r[N],f=e&&l&&d.axis!==Vt,g=n&&c&&d.axis!==Gt,v=d.priority||0,(!f||v<C)&&(!g||v<E)||(p=ae(d.element||d),_=f?ue(p):-1,x=g?he(p):-1,(_||x)&&(h=de(p,h),m=xe(u,h),m<=0||(f&&v>=C&&_>0&&(v>C||m>$)&&(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(p)<_&&(w=Xt)):l===Kt&&(b=u.left-(h.left-y.offset),b<=y.value&&le(p)>0&&(w=Kt)),null!==w&&(S=p,C=v,k=y.value,$=m,A=w,T=b,L=_)),g&&v>=E&&x>0&&(v>E||m>I)&&(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(p)<x&&(w=Zt)):c===Qt&&(b=u.top-(h.top-y.offset),b<=y.value&&ce(p)>0&&(w=Qt)),null!==w&&(R=p,E=v,M=y.value,I=m,D=w,O=b,P=x)))));e&&(S?this._requestItemScroll(t,Gt,S,A,k,T,L):this._cancelItemScroll(t,Gt)),n&&(R?this._requestItemScroll(t,Vt,R,D,M,O,P):this._cancelItemScroll(t,Vt))},ke.prototype._updateScrollRequest=function(t){for(var e=t.item,n=pe(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=Ce,c=null,u=null,h=!1,d=null,p=null,f=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(p=me("number"===typeof c.threshold?c.threshold:o,s,h?a.width:a.height,h?l.width:l.height),f=t.direction===Kt?a.left-(l.left-p.offset):t.direction===Xt?l.right+p.offset-a.right:t.direction===Qt?a.top-(l.top-p.offset):l.bottom+p.offset-a.bottom,f>p.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=p.value,t.distance=f,t.isEnding=!1,!0}return!0===n.smoothStop&&t.speed>0?(null===v&&(v=t.hasReachedEnd()),t.isEnding=!v):t.isEnding=!1,t.isEnding},ke.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))},ke.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)},ke.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()},ke.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++)fe(n[t]);for(t=0;t<n.length;t++)ge(n[t])}},ke.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},ke.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())}},ke.prototype.updateItem=function(t){this._isDestroyed||this._dragDirections[t._id]&&(this._updateDragDirection(t),this._requestOverlapCheck[t._id]||(this._requestOverlapCheck[t._id]=this._tickTime))},ke.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()}}},ke.prototype.isItemScrollingX=function(t){var e=this._requests[Gt][t._id];return!(!e||!e.isActive)},ke.prototype.isItemScrollingY=function(t){var e=this._requests[Vt][t._id];return!(!e||!e.isActive)},ke.prototype.isItemScrolling=function(t){return this.isItemScrollingX(t)||this.isItemScrollingY(t)},ke.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 $e=window.Element.prototype,Ae=$e.matches||$e.matchesSelector||$e.webkitMatchesSelector||$e.mozMatchesSelector||$e.msMatchesSelector||$e.oMatchesSelector||function(){return!1};function Te(t,e){return Ae.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 Ie(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 De(t,e,n){if(!(t.length<2)){var i=Ie(t,e),r=Ie(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=Ie(t,e),o=Ie(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,pn=1,fn=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 ke,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,p,f,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),p=Math.min(window.innerWidth,l._right),f=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),p=Math.min(p,u.right),f=Math.min(f,u.bottom)),"fixed"===ne(c,"position"))break;c=c.parentNode}h>=p||d>=f||(e.left=h,e.top=d,e.width=p-h,e.height=f-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,p=c&&c.action===o?o:s,f=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,C=!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&&(C=!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=C?S:0,x=d),x>=d?(n.grid=g,n.index=S,n.action=w?f:p,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),Dt(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!==pn||(this._startPredicateState=fn,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=Ie(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:De)(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,p=o?l.itemVisibleClass:l.itemHiddenClass;this._isMigrating=!1,this.destroy(),u.itemClass!==l.itemClass&&(un(r,u.itemClass),Le(r,l.itemClass)),d!==p&&(un(r,d),Le(r,p)),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=pn),this._startPredicateState===pn?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=fn,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=dn)):this._startPredicateState===fn&&this._isActive&&this._onMove(t)},mn.prototype._preEndCheck=function(t){var e=this._startPredicateState===fn;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(C,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(k,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($,t,this._dragMoveEvent),mn.autoScroller.updateItem(t))}},mn.prototype._onScroll=function(t){var e=this._item;e._isActive?(this._scrollEvent=t,It(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(A,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),Dt(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 Cn(t,e){for(var n in e)t.style[n]=e[n]}var kn=!(!Element||!te(Element.prototype.animate)),$n=!(!Element||!Sn(Element.prototype.animate));function An(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 An,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}An.prototype.start=function(t,e,n){if(!this._isDestroyed){var i=this._element,r=n||{};if(!kn)return Cn(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",p=!1;if(l&&(s=0,h===this._duration&&d===this._easing||(p=!0),!p)){for(o in e)if(++s,a=c.indexOf(o),-1===a||e[o]!==u[a]){p=!0;break}s!==c.length&&(p=!0)}if(p&&l.cancel(),this._callback=te(r.onFinish)?r.onFinish:null,!l||p){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,$n),Tn(e,$n)],{duration:h,easing:d}),this._animation.onfinish=this._onFinish,Cn(i,e)}}},An.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},An.prototype.getCurrentStyles=function(){return yn(element,currentProps)},An.prototype.isAnimating=function(){return!!this._animation},An.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},An.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()&&Cn(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),Cn(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 In(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 An(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function Dn(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 An(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)}In.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&&($t(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,kt(n._id,this._setupAnimation,this._startAnimation)}},In.prototype.stop=function(t,e,n){if(!this._isDestroyed&&this._isActive){var i=this._item;if($t(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)}},In.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}},In.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}},In.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)}},In.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}},In.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)},Dn.prototype.start=function(t,e,n){if(!this._isDestroyed){var i,r,o,s,a,l,c,u,h,d,p=this._item,f=p._element,g=p.isActive(),m=p.isVisible(),v=p.getGrid(),y=v._settings,w=t._settings,C=t._element,k=t._items,$=v._items.indexOf(p),A=n||document.body;if("number"===typeof e)i=Ie(k,e,1);else{if(r=t.getItem(e),!r)return;i=k.indexOf(r)}(p.isPositioning()||this._isActive||p.isReleasing())&&(l=cn(f),c=l.x,u=l.y),p.isPositioning()&&p._layout.stop(!0,c,u),this._isActive&&(c-=this._containerDiffX,u-=this._containerDiffY,this.stop(!0,c,u)),p.isReleasing()&&(c-=p._dragRelease._containerDiffX,u-=p._dragRelease._containerDiffY,p._dragRelease.stop(!0,c,u)),p._visibility.stop(!0),p._drag&&p._drag.destroy(),v._hasListeners(_)&&v._emit(_,{item:p,fromGrid:v,fromIndex:$,toGrid:t,toIndex:i}),t._hasListeners(S)&&t._emit(S,{item:p,fromGrid:v,fromIndex:$,toGrid:t,toIndex:i}),y.itemClass!==w.itemClass&&(un(f,y.itemClass),Le(f,w.itemClass)),h=m?y.itemVisibleClass:y.itemHiddenClass,d=m?w.itemVisibleClass:w.itemHiddenClass,h!==d&&(un(f,h),Le(f,d)),v._items.splice($,1),Me(k,p,i),p._gridId=t._id,g?(o=f.parentNode,A!==o&&(A.appendChild(f),s=Ze(A,o,!0),l||(l=cn(f),c=l.x,u=l.y),p._setTranslate(c+s.left,u+s.top))):C.appendChild(f),p._visibility.setStyles(m?w.visibleStyles:w.hiddenStyles),g&&(a=Ze(A,C,!0)),p._refreshDimensions(),p._sortData=null,p._drag=w.dragEnabled?new mn(p):null,g?(this._isActive=!0,this._container=A,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:p,fromGrid:v,fromIndex:$,toGrid:t,toIndex:i}),t._hasListeners(x)&&t._emit(x,{item:p,fromGrid:v,fromIndex:$,toGrid:t,toIndex:i})}},Dn.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}},Dn.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 Cn(s,l),o.stop(),void(n&&n());o.isAnimating()&&(o._animation.onfinish=null),At(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 In(this),this._migrate=new Dn(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,p,f=t.items,g=t.slots,m=!!(s&e),v=!!(s&n),y=!!(s&i),w=!!(s&r),b=!!(s&o),_="number"===typeof f[0];if(!f.length)return t;for(c=_?2:1,a=0;a<f.length;a+=c)_?(h=f[a],d=f[a+1]):(u=f[a],h=u._width+u._marginLeft+u._marginRight,d=u._height+u._marginTop+u._marginBottom),b&&(h=l(h),d=l(d)),p=this.computeNextSlot(t,h,d,m,v),v?p.left+p.width>t.width&&(t.width=p.left+p.width):p.top+p.height>t.height&&(t.height=p.top+p.height),g[++this.slotIndex]=p.left,g[++this.slotIndex]=p.top,(y||w)&&this.slotSizes.push(p.width,p.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,p=this.currentRects,f=this.nextRects,g=!1;for(f.length=0,d.left=null,d.top=null,d.width=e,d.height=n,u=0;u<p.length;u++)if(l=p[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&&f.push(this.addRect(0,t.height,d.left,1/0)),d.left+d.width<t.width-a&&f.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&&f.push(this.addRect(t.width,0,1/0,d.top)),d.top+d.height<t.height-a&&f.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<p.length;u++)if(l=p[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)&&f.push(l);return f.length>1&&this.purgeRects(f).sort(r?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=f,this.nextRects=p,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,p=4,f=new c;self.onmessage=function(t){var e=new Float32Array(t.data),n=e.subarray(p,e.length),i=new Float32Array(n.length),r=e[d],o={items:n,slots:i,width:e[u],height:e[h]};f.computeLayout(o,r),e[u]=o.width,e[h]=o.height,e.set(o.slots,p),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 pi(t){return ai(t)?Array.prototype.slice.call(t):Array.prototype.concat(t)}var fi="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=Ci(r.visibleStyles),r.hiddenStyles=Ci(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!==fi&&(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 Ci(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 ki(t){for(var e={},n=0;n<t.length;n++)e[t[n]._id]=n;return e}function $i(t,e,n){var i=t[e._id],r=t[n._id];return i-r}yi.Item=Fn,yi.ItemLayout=In,yi.ItemVisibility=On,yi.ItemMigrate=Dn,yi.ItemDrag=mn,yi.ItemDragRelease=En,yi.ItemDragPlaceholder=Rn,yi.Emitter=P,yi.Animator=An,yi.Dragger=J,yi.Packer=ni,yi.AutoScroller=ke,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:ke.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===fi)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=pi(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,p=-1,f=di;if(d&&(f=function(){++p&&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:f,layout:!1}):f(),o.length?this.hide(o,{instant:c,syncWithLayout:u,onFinish:f,layout:!1}):f(),(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=ki(n)),u=e?$i(i,o,r):$i(i,r,o)),u}function o(r,o){var s=e?-t(r,o):t(r,o);return s||(i||(i=ki(n)),s=e?$i(i,o,r):$i(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),p=this.getItem(e);return d&&p&&d!==p&&(i=a.indexOf(d),r=a.indexOf(p),u?Oe(a,i,r):De(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,p=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)?--p:(n._left=i,n._top=r,n.isActive()&&!n.isDragging()?t.push(n):--p)):--p;if(e.styles&&Cn(this._element,e.styles),!this._hasListeners(l)||(this._emit(l,e.items.slice(0),!0===a),this._layout.id===e.id)){var f=function(){if(!(--p>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 f(),this;for(this._isLayoutFinished=!1,o=0;o<t.length;o++){if(this._layout.id!==e.id)break;t[o]._layout.start(!0===a,f)}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?p:g,y=e?f: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 Ai=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,p=1,f=t.length,g="";for(i=0;i<f;i++)if("string"===typeof t[i])g+=t[i];else if("object"===typeof t[i]){if(a=t[i],a.keys)for(n=e[p],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[p++];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}"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})},1361:(t,e,n)=>{"use strict";var i=n(866),r=n(3174),o=TypeError;t.exports=function(t){if(i(t))return t;throw new o(r(t)+" is not a constructor")}},2937:(t,e,n)=>{"use strict";var i=n(3243).has;t.exports=function(t){return i(t),t}},5458:(t,e,n)=>{"use strict";var i=n(4282),r=n(7065),o=n(4466).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},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(9117),r=n(1025),o=n(8689),s=i.ArrayBuffer,a=i.TypeError;t.exports=s&&r(s.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==o(t))throw new a("ArrayBuffer expected");return t.byteLength}},6821:(t,e,n)=>{"use strict";var i=n(9117),r=n(5691),o=n(1617),s=i.ArrayBuffer,a=s&&s.prototype,l=a&&r(a.slice);t.exports=function(t){if(0!==o(t))return!1;if(!l)return!1;try{return l(t,0,0),!1}catch(e){return!0}}},2676:(t,e,n)=>{"use strict";var i=n(6821),r=TypeError;t.exports=function(t){if(i(t))throw new r("ArrayBuffer is detached");return t}},5677:(t,e,n)=>{"use strict";var i=n(9117),r=n(6881),o=n(1025),s=n(4579),a=n(2676),l=n(1617),c=n(8850),u=n(9059),h=i.structuredClone,d=i.ArrayBuffer,p=i.DataView,f=Math.min,g=d.prototype,m=p.prototype,v=r(g.slice),y=o(g,"resizable","get"),w=o(g,"maxByteLength","get"),b=r(m.getInt8),_=r(m.setInt8);t.exports=(u||c)&&function(t,e,n){var i,r=l(t),o=void 0===e?r:s(e),g=!y||!y(t);if(a(t),u&&(t=h(t,{transfer:[t]}),r===o&&(n||g)))return t;if(r>=o&&(!n||g))i=v(t,0,o);else{var m=n&&!g&&w?{maxByteLength:w(t)}:void 0;i=new d(o,m);for(var x=new p(t),S=new p(i),C=f(o,r),k=0;k<C;k++)_(S,k,b(x,k))}return u||c(t),i}},7223:(t,e,n)=>{"use strict";var i,r,o,s=n(8732),a=n(6893),l=n(9117),c=n(4188),u=n(831),h=n(4418),d=n(5438),p=n(3174),f=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,C=x.get,k=l.Int8Array,$=k&&k.prototype,A=l.Uint8ClampedArray,T=A&&A.prototype,L=k&&y(k),R=$&&y($),E=Object.prototype,M=l.TypeError,I=b("toStringTag"),D=_("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=C(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(p(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&&$[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,I))for(i in N=!0,m(R,I,{configurable:!0,get:function(){return u(this)?this[D]:void 0}}),F)l[i]&&f(l[i],D,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:N&&D,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(9117),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),p=n(6744),f=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),C=n(3754),k=n(3086),$=a.PROPER,A=a.CONFIGURABLE,T="ArrayBuffer",L="DataView",R="prototype",E="Wrong length",M="Wrong index",I=k.getterFor(T),D=k.getterFor(L),O=k.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=D(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=D(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=$&&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&&!A}))?it&&A&&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=I(t),r=i.byteLength,s=p(e);if(s<0||s>r)throw new U("Wrong offset");if(n=void 0===n?r-s:f(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",I),tt(W,"buffer",D),tt(W,"byteLength",D),tt(W,"byteOffset",D)),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])}});C(N,T),C(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),p=Array;t.exports=function(t){var e=o(t),n=l(this),f=arguments.length,g=f>1?arguments[1]:void 0,m=void 0!==g;m&&(g=i(g,f>2?arguments[2]:void 0));var v,y,w,b,_,x,S=d(e),C=0;if(!S||this===p&&a(S))for(v=c(e),y=n?new this(v):p(v);v>C;C++)x=m?g(e[C],C):e[C],u(y,C,x);else for(y=n?new this:[],b=h(e,S),_=b.next;!(w=r(_,b)).done;C++)x=m?s(b,g,[w.value,C],!0):w.value,u(y,C,x);return y.length=C,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),p=s(d),f=i(a,l);while(p-- >0)if(c=d[p],u=f(c,p,h),u)switch(t){case 0:return c;case 1:return p}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,p=5===t||h;return function(f,g,m,v){for(var y,w,b=s(f),_=o(b),x=a(_),S=i(g,m),C=0,k=v||l,$=e?k(f,x):n||d?k(f,0):void 0;x>C;C++)if((p||C in _)&&(y=_[C],w=S(y,C,b),t))if(e)$[C]=w;else if(w)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:c($,y)}else switch(t){case 4:return!1;case 7:c($,y)}return h?-1:r||u?u:$}};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,p=h.length,f=0,g=0;while(f<d||g<p)t[f+g]=f<d&&g<p?e(u[f],h[g])<=0?u[f++]:h[g++]:f<d?u[f++]: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}},680:(t,e,n)=>{"use strict";var i=n(5234);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6224:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},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(9117),l=n(9822),c=n(9059),u=a.structuredClone,h=a.ArrayBuffer,d=a.MessageChannel,p=!1;if(c)p=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&&(p=s)))}catch(f){}t.exports=p},2222:(t,e,n)=>{"use strict";var i=n(8060),r=i.match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},4598:(t,e,n)=>{"use strict";var i=n(8060);t.exports=/MSIE|Trident/.test(i)},7340:(t,e,n)=>{"use strict";var i=n(8060),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)}},9822:(t,e,n)=>{"use strict";var i=n(9117),r=n(3940);t.exports=function(t){if(r){try{return i.process.getBuiltinModule(t)}catch(e){}try{return Function('return require("'+t+'")')()}catch(e){}}}},6002:t=>{"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},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")}},5558:(t,e,n)=>{"use strict";var i=n(4977),r=n(3770),o=n(9944),s=n(6744),a=n(6002),l="Invalid size",c=RangeError,u=TypeError,h=Math.max,d=function(t,e){this.set=t,this.size=h(e,0),this.has=i(t.has),this.keys=i(t.keys)};d.prototype={getIterator:function(){return a(r(o(this.keys,this.set)))},includes:function(t){return o(this.has,this.set,t)}},t.exports=function(t){r(t);var e=+t.size;if(e!==e)throw new u(l);var n=s(e);if(n<0)throw new c(l);return new d(t,n)}},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),p=8*l-a-1,f=(1<<p)-1,g=f>>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=f):(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>=f?(u=0,c=f):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,p+=a;while(p>0)d[y++]=255&c,c/=256,p-=8;return d[y-1]|=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}},866:(t,e,n)=>{"use strict";var i=n(6881),r=n(5234),o=n(4188),s=n(5438),a=n(5604),l=n(3029),c=function(){},u=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=i(h.exec),p=!h.test(c),f=function(t){if(!o(t))return!1;try{return u(c,[],t),!0}catch(e){return!1}},g=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,l(t))}catch(e){return!0}};g.sham=!0,t.exports=!u||r((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?g:f},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))}},7032:(t,e,n)=>{"use strict";var i=n(9944);t.exports=function(t,e,n){var r,o,s=n?t:t.iterator,a=t.next;while(!(r=i(a,s)).done)if(o=e(r.value),void 0!==o)return o}},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}},9383:(t,e,n)=>{"use strict";var i=n(2037).IteratorPrototype,r=n(7065),o=n(9123),s=n(3754),a=n(9164),l=function(){return this};t.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=r(i,{next:o(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},3217:(t,e,n)=>{"use strict";var i=n(5613),r=n(9944),o=n(1942),s=n(2735),a=n(4188),l=n(9383),c=n(1786),u=n(5054),h=n(3754),d=n(8088),p=n(7509),f=n(4282),g=n(9164),m=n(2037),v=s.PROPER,y=s.CONFIGURABLE,w=m.IteratorPrototype,b=m.BUGGY_SAFARI_ITERATORS,_=f("iterator"),x="keys",S="values",C="entries",k=function(){return this};t.exports=function(t,e,n,s,f,m,$){l(n,e,s);var A,T,L,R=function(t){if(t===f&&O)return O;if(!b&&t&&t in I)return I[t];switch(t){case x:return function(){return new n(this,t)};case S:return function(){return new n(this,t)};case C:return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",M=!1,I=t.prototype,D=I[_]||I["@@iterator"]||f&&I[f],O=!b&&D||R(f),P="Array"===e&&I.entries||D;if(P&&(A=c(P.call(new t)),A!==Object.prototype&&A.next&&(o||c(A)===w||(u?u(A,w):a(A[_])||p(A,_,k)),h(A,E,!0,!0),o&&(g[E]=k))),v&&f===S&&D&&D.name!==S&&(!o&&y?d(I,"name",S):(M=!0,O=function(){return r(D,this)})),f)if(T={values:R(S),keys:m?O:R(x),entries:R(C)},$)for(L in T)(b||M||!(L in I))&&p(I,L,T[L]);else i({target:e,proto:!0,forced:b||M},T);return o&&!$||I[_]===O||p(I,_,O,{name:f}),g[e]=O,T}},2037:(t,e,n)=>{"use strict";var i,r,o,s=n(5234),a=n(4188),l=n(831),c=n(7065),u=n(1786),h=n(7509),d=n(4282),p=n(1942),f=d("iterator"),g=!1;[].keys&&(o=[].keys(),"next"in o?(r=u(u(o)),r!==Object.prototype&&(i=r)):g=!0);var m=!l(i)||s((function(){var t={};return i[f].call(t)!==t}));m?i={}:p&&(i=c(i)),a(i[f])||h(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},9164:t=>{"use strict";t.exports={}},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,p=Object.defineProperty,f=r([].concat);t.exports=!d||s((function(){if(i&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(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,p=c.f;while(r>s){var g,m=h(arguments[s++]),v=d?f(a(m),d(m)):a(m),y=v.length,w=0;while(y>w)g=v[w++],i&&!o(p,m,g)||(n[g]=m[g])}return n}:d},1786:(t,e,n)=>{"use strict";var i=n(4418),r=n(4188),o=n(3628),s=n(168),a=n(680),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=o(t);if(i(e,l))return e[l];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},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(9117),r=n(6893),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!r)return i[t];var e=o(i,t);return e&&e.value}},679:(t,e,n)=>{"use strict";var i=n(3243),r=n(9800),o=i.Set,s=i.add;t.exports=function(t){var e=new o;return r(t,(function(t){s(e,t)})),e}},7059:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243),o=n(679),s=n(7173),a=n(5558),l=n(9800),c=n(7032),u=r.has,h=r.remove;t.exports=function(t){var e=i(this),n=a(t),r=o(e);return s(e)<=n.size?l(e,(function(t){n.includes(t)&&h(r,t)})):c(n.getIterator(),(function(t){u(e,t)&&h(r,t)})),r}},3243:(t,e,n)=>{"use strict";var i=n(6881),r=Set.prototype;t.exports={Set,add:i(r.add),has:i(r.has),remove:i(r["delete"]),proto:r}},3721:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243),o=n(7173),s=n(5558),a=n(9800),l=n(7032),c=r.Set,u=r.add,h=r.has;t.exports=function(t){var e=i(this),n=s(t),r=new c;return o(e)>n.size?l(n.getIterator(),(function(t){h(e,t)&&u(r,t)})):a(e,(function(t){n.includes(t)&&u(r,t)})),r}},9978:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243).has,o=n(7173),s=n(5558),a=n(9800),l=n(7032),c=n(8500);t.exports=function(t){var e=i(this),n=s(t);if(o(e)<=n.size)return!1!==a(e,(function(t){if(n.includes(t))return!1}),!0);var u=n.getIterator();return!1!==l(u,(function(t){if(r(e,t))return c(u,"normal",!1)}))}},4361:(t,e,n)=>{"use strict";var i=n(2937),r=n(7173),o=n(9800),s=n(5558);t.exports=function(t){var e=i(this),n=s(t);return!(r(e)>n.size)&&!1!==o(e,(function(t){if(!n.includes(t))return!1}),!0)}},7528:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243).has,o=n(7173),s=n(5558),a=n(7032),l=n(8500);t.exports=function(t){var e=i(this),n=s(t);if(o(e)<n.size)return!1;var c=n.getIterator();return!1!==a(c,(function(t){if(!r(e,t))return l(c,"normal",!1)}))}},9800:(t,e,n)=>{"use strict";var i=n(6881),r=n(7032),o=n(3243),s=o.Set,a=o.proto,l=i(a.forEach),c=i(a.keys),u=c(new s).next;t.exports=function(t,e,n){return n?r({iterator:c(t),next:u},e):l(t,e)}},4471:(t,e,n)=>{"use strict";var i=n(5604),r=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=i("Set");try{(new e)[t](r(0));try{return(new e)[t](r(-1)),!1}catch(n){return!0}}catch(o){return!1}}},7173:(t,e,n)=>{"use strict";var i=n(1025),r=n(3243);t.exports=i(r.proto,"size","get")||function(t){return t.size}},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}})}},1657:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243),o=n(679),s=n(5558),a=n(7032),l=r.add,c=r.has,u=r.remove;t.exports=function(t){var e=i(this),n=s(t).getIterator(),r=o(e);return a(n,(function(t){c(e,t)?u(r,t):l(r,t)})),r}},3754:(t,e,n)=>{"use strict";var i=n(4466).f,r=n(4418),o=n(4282),s=o("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!r(t,s)&&i(t,s,{configurable:!0,value:e})}},5077:(t,e,n)=>{"use strict";var i=n(2937),r=n(3243).add,o=n(679),s=n(5558),a=n(7032);t.exports=function(t){var e=i(this),n=s(t).getIterator(),l=o(e);return a(n,(function(t){r(l,t)})),l}},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="-",p=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,g="Overflow: input needs wider integers to process",m=o-s,v=RangeError,y=i(f.exec),w=Math.floor,b=String.fromCharCode,_=i("".charCodeAt),x=i([].join),S=i([].push),C=i("".replace),k=i("".split),$=i("".toLowerCase),A=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=A(t);var n,i,l=t.length,c=h,p=0,f=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 C=y+1;if(_-c>w((r-p)/C))throw new v(g);for(p+=(_-c)*C,c=_,n=0;n<t.length;n++){if(i=t[n],i<c&&++p>r)throw new v(g);if(i===c){var k=p,$=o;while(1){var R=$<=f?s:$>=f+a?a:$-f;if(k<R)break;var E=k-R,M=o-R;S(e,b(T(R+E%M))),k=w(E/M),$+=o}S(e,b(T(k))),f=L(p,C,y===m),p=0,y++}}p++,c++}return x(e,"")};t.exports=function(t){var e,n,i=[],r=k(C($(t),f,"."),".");for(e=0;e<r.length;e++)n=r[e],S(i,y(p,n)?"xn--"+R(n):n);return x(i,".")}},9059:(t,e,n)=>{"use strict";var i=n(9117),r=n(5234),o=n(3008),s=n(1078),a=i.structuredClone;t.exports=!!a&&!r((function(){if("DENO"===s&&o>92||"NODE"===s&&o>94||"BROWSER"===s&&o>97)return!1;var t=new ArrayBuffer(8),e=a(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}},3978:(t,e,n)=>{"use strict";var i=n(5613),r=n(9117),o=n(9944),s=n(6893),a=n(5772),l=n(7223),c=n(8633),u=n(286),h=n(9123),d=n(8088),p=n(4752),f=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),C=n(4578),k=n(5054),$=n(5629).f,A=n(3292),T=n(4104).forEach,L=n(3900),R=n(997),E=n(4466),M=n(9304),I=n(6759),D=n(3086),O=n(4166),P=D.get,N=D.set,F=D.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 C(U,t)||"ArrayBuffer"===(e=b(t))||"SharedArrayBuffer"===e},tt=function(t,e){return K(t)&&!x(e)&&e in t&&p(+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,p=r[l],y=p,w=y&&y.prototype,b={},x=function(t,e){var n=P(t);return n.view[c](e*s+n.byteOffset,!0)},C=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 C(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 p(e,m(n,s),i):void 0!==n?new p(e,m(n,s)):new p(e):K(e)?I(y,e):o(A,y,e):new p(g(e))}(),t,y)})),k&&k(y,Y),T($(p),(function(t){t in y||d(y,t,p[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)?I(y,e):o(A,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=f(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++)})),k&&k(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!==p;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(9117),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,p=n(7429);t.exports=function(t){var e,n,f,g,m,v,y,w,b=o(this),_=s(t),x=arguments.length,S=x>1?arguments[1]:void 0,C=void 0!==S,k=c(_);if(k&&!u(k)){y=l(_,k),w=y.next,_=[];while(!(v=r(w,y)).done)_.push(v.value)}for(C&&x>2&&(S=i(S,arguments[2])),n=a(_),f=new(d(b))(n),g=h(f),e=0;n>e;e++)m=C?S(_[e],e):_[e],f[e]=g?p(m):+m;return f}},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","https://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||"https://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("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==i||"x"!==new URL("https://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)}})},3873:(t,e,n)=>{"use strict";var i=n(380),r=n(5458),o=n(9164),s=n(3086),a=n(4466).f,l=n(3217),c=n(6224),u=n(1942),h=n(6893),d="Array Iterator",p=s.set,f=s.getterFor(d);t.exports=l(Array,"Array",(function(t,e){p(this,{type:d,target:i(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)}),"values");var g=o.Arguments=o.Array;if(r("keys"),r("values"),r("entries"),!u&&h&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(m){}},7146:(t,e,n)=>{"use strict";var i=n(9117),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})},9033:(t,e,n)=>{"use strict";var i=n(5613),r=n(7059),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("difference")},{difference:r})},8903:(t,e,n)=>{"use strict";var i=n(5613),r=n(5234),o=n(3721),s=n(4471),a=!s("intersection")||r((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));i({target:"Set",proto:!0,real:!0,forced:a},{intersection:o})},1018:(t,e,n)=>{"use strict";var i=n(5613),r=n(9978),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("isDisjointFrom")},{isDisjointFrom:r})},1415:(t,e,n)=>{"use strict";var i=n(5613),r=n(4361),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("isSubsetOf")},{isSubsetOf:r})},4448:(t,e,n)=>{"use strict";var i=n(5613),r=n(7528),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("isSupersetOf")},{isSupersetOf:r})},8871:(t,e,n)=>{"use strict";var i=n(5613),r=n(1657),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("symmetricDifference")},{symmetricDifference:r})},6539:(t,e,n)=>{"use strict";var i=n(5613),r=n(5077),o=n(4471);i({target:"Set",proto:!0,real:!0,forced:!o("union")},{union:r})},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),p=n(1113),f=n(4282),g=n(1942),m=f("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,f,x,S,C,k,$,A,T=s(this),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,T,e);if(g&&n)return w(u(T),t,e)}f=u(T),x=u(t),S=a(e),S||(e=u(e)),C=x.length,k=_(1,C),$=y(f,x);while(-1!==$)A=S?u(e(x,$,f)):p(x,f,$,[],void 0,e),R+=b(f,L,$)+A,L=$+C,$=$+k>f.length?-1:y(f,x,$+k);return L<f.length&&(R+=b(f,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),p=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)}),p)},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(9117),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,p=d&&d.set,f=o.aTypedArray,g=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return r(p,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){f(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return r(p,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(9117),r=n(5691),o=n(5234),s=n(4977),a=n(9295),l=n(7223),c=n(2222),u=n(4598),h=n(3008),d=n(7340),p=l.aTypedArray,f=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}};f("sort",(function(t){return void 0!==t&&s(t),y?m(this,t):a(p(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(9117),o=n(5268),s=n(9944),a=n(6881),l=n(6893),c=n(6301),u=n(7509),h=n(997),d=n(4320),p=n(3754),f=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),C=n(7065),k=n(9123),$=n(2350),A=n(9874),T=n(6224),L=n(9445),R=n(4282),E=n(9295),M=R("iterator"),I="URLSearchParams",D=I+"Iterator",O=g.set,P=g.getterFor(I),N=g.getterFor(D),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=f((function(t,e){O(this,{type:D,target:P(t).entries,index:0,kind:e})}),I,(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:I,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,o,a,l,c=this.entries,u=A(t);if(u){e=$(t,u),n=e.next;while(!(i=s(n,e)).done){if(r=$(_(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,pt);var t=arguments.length>0?arguments[0]:void 0,e=O(this,new ht(t));l||(this.size=e.entries.length)},pt=dt.prototype;if(d(pt,{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(pt,M,pt.entries,{name:"entries"}),u(pt,"toString",(function(){return P(this).serialize()}),{enumerable:!0}),l&&h(pt,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),p(dt,I),i({global:!0,constructor:!0,forced:!c},{URLSearchParams:dt}),!c&&v(H)){var ft=a(z.has),gt=a(z.set),mt=function(t){if(x(t)){var e,n=t.body;if(b(n)===I)return e=t.headers?new H(t.headers):new H,ft(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),C(t,{body:k(0,S(n)),headers:k(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),p=new a("a=1&a=2&b=3");p["delete"]("a",1),p["delete"]("b",void 0),p+""!=="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),p=0,f=0,g=!1,m=i.length;while(p<m)r=i[p++],g||r.key===a?(g=!0,u(this,r.key)):f++;while(f<m)r=i[f++],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(9117),l=n(5821),c=n(6881),u=n(7509),h=n(997),d=n(286),p=n(4418),f=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),C=S.set,k=S.getterFor("URL"),$=x.URLSearchParams,A=x.getState,T=a.URL,L=a.TypeError,R=a.parseInt,E=Math.floor,M=Math.pow,I=c("".charAt),D=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"===I(r,0)&&(o=D(Z,r)?16:8,r=z(r,8===o?1:2)),""===r)s=0;else{if(!D(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 I(t,h)};if(":"===d()){if(":"!==I(t,1))return;h+=2,c++,u=c}while(d()){if(8===c)return;if(":"!==d()){e=n=0;while(n<4&&D(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(!D(Q,d()))return;while(D(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?i: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=f({},ht,{" ":1,'"':1,"<":1,">":1,"`":1}),pt=f({},dt,{"#":1,"?":1,"{":1,"}":1}),ft=f({},pt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gt=function(t,e){var n=v(t,0);return n>32&&n<127&&!p(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&&D(K,I(t,0))&&(":"===(n=I(t,1))||!e&&"|"===n)},yt=function(t){var e;return t.length>1&&vt(z(t,0,2))&&(2===t.length||"/"===(e=I(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={},Ct={},kt={},$t={},At={},Tt={},Lt={},Rt={},Et={},Mt={},It={},Dt={},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=A(new $),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,f=!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||!D(K,o)){if(e)return V;c=St;continue}h+=U(o),c=xt;break;case xt:if(o&&(D(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()!==p(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=Dt:l.isSpecial()&&n&&n.scheme===l.scheme?c=Ct:l.isSpecial()?c=Tt:"/"===r[u+1]?(c=kt,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?Dt:$t;continue;case Ct:if("/"!==o||"/"!==r[u+1]){c=$t;continue}c=Lt,u++;break;case kt:if("/"===o){c=Rt;break}c=Ft;continue;case $t: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=At;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 At: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||"/"!==I(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,ft);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||f){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?f=!0:"]"===o&&(f=!1),h+=o}else{if(""===h)return Y;if(a=l.parseHost(h),a)return a;if(h="",c=It,e===Mt)return}break;case It:if(!D(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 Dt: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=I(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,pt);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("["===I(t,0)){if("]"!==I(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),D(nt,t))return Y;if(e=at(t),null===e)return Y;this.host=e}else{if(D(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 p(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],ft)}},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],ft)}},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,It))},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:("?"===I(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?("#"===I(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=C(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 k(this)[t]()},set:e&&function(t){return k(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 k(this).serialize()}),{enumerable:!0}),u(jt,"toString",(function(){return k(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)}})},3816:(t,e,n)=>{"use strict";n.d(e,{A:()=>vn});var i={};function r(t,e){return function(){return t.apply(e,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>Ft,hasStandardBrowserEnv:()=>Wt,hasStandardBrowserWebWorkerEnv:()=>Ht,origin:()=>Bt});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 p=l("ArrayBuffer");function f(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(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"),C=l("FileList"),k=t=>y(t)&&m(t.pipe),$=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()))},A=l("URLSearchParams"),[T,L,R,E]=["ReadableStream","Request","Response","Headers"].map(l),M=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function I(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 D(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 O=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),P=t=>!h(t)&&t!==O;function N(){const{caseless:t}=P(this)&&this||{},e={},n=(n,i)=>{const r=t&&D(e,i)||i;b(e[r])&&b(n)?e[r]=N(e[r],n):b(n)?e[r]=N({},n):u(n)?e[r]=n.slice():e[r]=n};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&I(arguments[i],n);return e}const F=(t,e,n,{allOwnKeys:i}={})=>(I(e,((e,i)=>{n&&m(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),W=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),H=(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)},B=(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},z=(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},U=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},j=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&s(Uint8Array)),G=(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])}},V=(t,e)=>{let n;const i=[];while(null!==(n=t.exec(e)))i.push(n);return i},Y=l("HTMLFormElement"),q=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),K=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),X=l("RegExp"),Q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};I(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},Z=t=>{Q(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+"'")}))}))},J=(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return u(t)?i(t):i(String(t).split(e)),n},tt=()=>{},et=(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,nt="abcdefghijklmnopqrstuvwxyz",it="0123456789",rt={DIGIT:it,ALPHA:nt,ALPHA_DIGIT:nt+nt.toUpperCase()+it},ot=(t=16,e=rt.ALPHA_DIGIT)=>{let n="";const{length:i}=e;while(t--)n+=e[Math.random()*i|0];return n};function st(t){return!!(t&&m(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const at=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 I(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)},lt=l("AsyncFunction"),ct=t=>t&&(y(t)||m(t))&&m(t.then)&&m(t.catch),ut=((t,e)=>t?setImmediate:e?((t,e)=>(O.addEventListener("message",(({source:n,data:i})=>{n===O&&i===t&&e.length&&e.shift()()}),!1),n=>{e.push(n),O.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))("function"===typeof setImmediate,m(O.postMessage)),ht="undefined"!==typeof queueMicrotask?queueMicrotask.bind(O):"undefined"!==typeof process&&process.nextTick||ut,dt={isArray:u,isArrayBuffer:p,isBuffer:d,isFormData:$,isArrayBufferView:f,isString:g,isNumber:v,isBoolean:w,isObject:y,isPlainObject:b,isReadableStream:T,isRequest:L,isResponse:R,isHeaders:E,isUndefined:h,isDate:_,isFile:x,isBlob:S,isRegExp:X,isFunction:m,isStream:k,isURLSearchParams:A,isTypedArray:j,isFileList:C,forEach:I,merge:N,extend:F,trim:M,stripBOM:W,inherits:H,toFlatObject:B,kindOf:a,kindOfTest:l,endsWith:z,toArray:U,forEachEntry:G,matchAll:V,isHTMLForm:Y,hasOwnProperty:K,hasOwnProp:K,reduceDescriptors:Q,freezeMethods:Z,toObjectSet:J,toCamelCase:q,noop:tt,toFiniteNumber:et,findKey:D,global:O,isContextDefined:P,ALPHABET:rt,generateString:ot,isSpecCompliantForm:st,toJSONObject:at,isAsyncFn:lt,isThenable:ct,setImmediate:ut,asap:ht};function pt(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)}dt.inherits(pt,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:dt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ft=pt.prototype,gt={};["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=>{gt[t]={value:t}})),Object.defineProperties(pt,gt),Object.defineProperty(ft,"isAxiosError",{value:!0}),pt.from=(t,e,n,i,r,o)=>{const s=Object.create(ft);return dt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),pt.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const mt=pt,vt=null;function yt(t){return dt.isPlainObject(t)||dt.isArray(t)}function wt(t){return dt.endsWith(t,"[]")?t.slice(0,-2):t}function bt(t,e,n){return t?t.concat(e).map((function(t,e){return t=wt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function _t(t){return dt.isArray(t)&&!t.some(yt)}const xt=dt.toFlatObject(dt,{},null,(function(t){return/^is[A-Z]/.test(t)}));function St(t,e,n){if(!dt.isObject(t))throw new TypeError("target must be an object");e=e||new(vt||FormData),n=dt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!dt.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&&dt.isSpecCompliantForm(e);if(!dt.isFunction(r))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(dt.isDate(t))return t.toISOString();if(!l&&dt.isBlob(t))throw new mt("Blob is not supported. Use a Buffer instead.");return dt.isArrayBuffer(t)||dt.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(dt.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(dt.isArray(t)&&_t(t)||(dt.isFileList(t)||dt.endsWith(n,"[]"))&&(a=dt.toArray(t)))return n=wt(n),a.forEach((function(t,i){!dt.isUndefined(t)&&null!==t&&e.append(!0===s?bt([n],i,o):null===s?n:n+"[]",c(t))})),!1;return!!yt(t)||(e.append(bt(r,n,o),c(t)),!1)}const h=[],d=Object.assign(xt,{defaultVisitor:u,convertValue:c,isVisitable:yt});function p(t,n){if(!dt.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),dt.forEach(t,(function(t,i){const o=!(dt.isUndefined(t)||null===t)&&r.call(e,t,dt.isString(i)?i.trim():i,n,d);!0===o&&p(t,n?n.concat(i):[i])})),h.pop()}}if(!dt.isObject(t))throw new TypeError("data must be an object");return p(t),e}const Ct=St;function kt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function $t(t,e){this._pairs=[],t&&Ct(t,this,e)}const At=$t.prototype;At.append=function(t,e){this._pairs.push([t,e])},At.toString=function(t){const e=t?function(e){return t.call(this,e,kt)}:kt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const Tt=$t;function Lt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Rt(t,e,n){if(!e)return t;const i=n&&n.encode||Lt,r=n&&n.serialize;let o;if(o=r?r(e,n):dt.isURLSearchParams(e)?e.toString():new Tt(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class Et{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){dt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Mt=Et,It={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dt="undefined"!==typeof URLSearchParams?URLSearchParams:Tt,Ot="undefined"!==typeof FormData?FormData:null,Pt="undefined"!==typeof Blob?Blob:null,Nt={isBrowser:!0,classes:{URLSearchParams:Dt,FormData:Ot,Blob:Pt},protocols:["http","https","file","blob","url","data"]},Ft="undefined"!==typeof window&&"undefined"!==typeof document,Wt=(t=>Ft&&["ReactNative","NativeScript","NS"].indexOf(t)<0)("undefined"!==typeof navigator&&navigator.product),Ht=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Bt=Ft&&window.location.href||"http://localhost",zt={...i,...Nt};function Ut(t,e){return Ct(t,new zt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return zt.isNode&&dt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function jt(t){return dt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Gt(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 Vt(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&&dt.isArray(i)?i.length:o,a)return dt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&dt.isObject(i[o])||(i[o]=[]);const l=e(t,n,i[o],r);return l&&dt.isArray(i[o])&&(i[o]=Gt(i[o])),!s}if(dt.isFormData(t)&&dt.isFunction(t.entries)){const n={};return dt.forEachEntry(t,((t,i)=>{e(jt(t),i,n,0)})),n}return null}const Yt=Vt;function qt(t,e,n){if(dt.isString(t))try{return(e||JSON.parse)(t),dt.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}const Kt={transitional:It,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=dt.isObject(t);r&&dt.isHTMLForm(t)&&(t=new FormData(t));const o=dt.isFormData(t);if(o)return i?JSON.stringify(Yt(t)):t;if(dt.isArrayBuffer(t)||dt.isBuffer(t)||dt.isStream(t)||dt.isFile(t)||dt.isBlob(t)||dt.isReadableStream(t))return t;if(dt.isArrayBufferView(t))return t.buffer;if(dt.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 Ut(t,this.formSerializer).toString();if((s=dt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ct(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),qt(t)):t}],transformResponse:[function(t){const e=this.transitional||Kt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(dt.isResponse(t)||dt.isReadableStream(t))return t;if(t&&dt.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 mt.from(r,mt.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:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};dt.forEach(["delete","get","head","post","put","patch"],(t=>{Kt.headers[t]={}}));const Xt=Kt,Qt=dt.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"]),Zt=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]&&Qt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e},Jt=Symbol("internals");function te(t){return t&&String(t).trim().toLowerCase()}function ee(t){return!1===t||null==t?t:dt.isArray(t)?t.map(ee):String(t)}function ne(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 ie=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function re(t,e,n,i,r){return dt.isFunction(i)?i.call(this,e,n):(r&&(e=n),dt.isString(e)?dt.isString(i)?-1!==e.indexOf(i):dt.isRegExp(i)?i.test(e):void 0:void 0)}function oe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function se(t,e){const n=dt.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 ae{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=te(e);if(!r)throw new Error("header name must be a non-empty string");const o=dt.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=ee(t))}const o=(t,e)=>dt.forEach(t,((t,n)=>r(t,n,e)));if(dt.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(dt.isString(t)&&(t=t.trim())&&!ie(t))o(Zt(t),e);else if(dt.isHeaders(t))for(const[s,a]of t.entries())r(a,s,n);else null!=t&&r(e,t,n);return this}get(t,e){if(t=te(t),t){const n=dt.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return ne(t);if(dt.isFunction(e))return e.call(this,t,n);if(dt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=te(t),t){const n=dt.findKey(this,t);return!(!n||void 0===this[n]||e&&!re(this,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=te(t),t){const r=dt.findKey(n,t);!r||e&&!re(n,n[r],r,e)||(delete n[r],i=!0)}}return dt.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&&!re(this,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return dt.forEach(this,((i,r)=>{const o=dt.findKey(n,r);if(o)return e[o]=ee(i),void delete e[r];const s=t?oe(r):String(r).trim();s!==r&&delete e[r],e[s]=ee(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return dt.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&dt.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[Jt]=this[Jt]={accessors:{}},n=e.accessors,i=this.prototype;function r(t){const e=te(t);n[e]||(se(i,t),n[e]=!0)}return dt.isArray(t)?t.forEach(r):r(t),this}}ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),dt.reduceDescriptors(ae.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),dt.freezeMethods(ae);const le=ae;function ce(t,e){const n=this||Xt,i=e||n,r=le.from(i.headers);let o=i.data;return dt.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function ue(t){return!(!t||!t.__CANCEL__)}function he(t,e,n){mt.call(this,null==t?"canceled":t,mt.ERR_CANCELED,e,n),this.name="CanceledError"}dt.inherits(he,mt,{__CANCEL__:!0});const de=he;function pe(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new mt("Request failed with status code "+n.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}function fe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ge(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 me=ge;function ve(t,e){let n,i,r=0,o=1e3/e;const s=(e,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)},a=(...t)=>{const e=Date.now(),a=e-r;a>=o?s(t,e):(n=t,i||(i=setTimeout((()=>{i=null,s(n)}),o-a)))},l=()=>n&&s(n);return[a,l]}const ye=ve,we=(t,e,n=3)=>{let i=0;const r=me(50,250);return ye((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,l=r(a),c=o<=s;i=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:n,lengthComputable:null!=s,[e?"download":"upload"]:!0};t(u)}),n)},be=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},_e=t=>(...e)=>dt.asap((()=>t(...e))),xe=zt.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=dt.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}(),Se=zt.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const s=[t+"="+encodeURIComponent(e)];dt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),dt.isString(i)&&s.push("path="+i),dt.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 Ce(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ke(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function $e(t,e){return t&&!Ce(e)?ke(t,e):e}const Ae=t=>t instanceof le?{...t}:t;function Te(t,e){e=e||{};const n={};function i(t,e,n){return dt.isPlainObject(t)&&dt.isPlainObject(e)?dt.merge.call({caseless:n},t,e):dt.isPlainObject(e)?dt.merge({},e):dt.isArray(e)?e.slice():e}function r(t,e,n){return dt.isUndefined(e)?dt.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!dt.isUndefined(e))return i(void 0,e)}function s(t,e){return dt.isUndefined(e)?dt.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 dt.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,s=o(t[i],e[i],i);dt.isUndefined(s)&&o!==a||(n[i]=s)})),n}const Le=t=>{const e=Te({},t);let n,{data:i,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=e;if(e.headers=a=le.from(a),e.url=Rt($e(e.baseURL,e.url),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),dt.isFormData(i))if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(zt.hasStandardBrowserEnv&&(r&&dt.isFunction(r)&&(r=r(e)),r||!1!==r&&xe(e.url))){const t=o&&s&&Se.read(s);t&&a.set(o,t)}return e},Re="undefined"!==typeof XMLHttpRequest,Ee=Re&&function(t){return new Promise((function(e,n){const i=Le(t);let r=i.data;const o=le.from(i.headers).normalize();let s,a,l,c,u,{responseType:h,onUploadProgress:d,onDownloadProgress:p}=i;function f(){c&&c(),u&&u(),i.cancelToken&&i.cancelToken.unsubscribe(s),i.signal&&i.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const i=le.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),r=h&&"text"!==h&&"json"!==h?g.response:g.responseText,o={data:r,status:g.status,statusText:g.statusText,headers:i,config:t,request:g};pe((function(t){e(t),f()}),(function(t){n(t),f()}),o),g=null}g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new mt("Request aborted",mt.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new mt("Network Error",mt.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||It;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new mt(e,r.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,t,g)),g=null},void 0===r&&o.setContentType(null),"setRequestHeader"in g&&dt.forEach(o.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),dt.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),h&&"json"!==h&&(g.responseType=i.responseType),p&&([l,u]=we(p,!0),g.addEventListener("progress",l)),d&&g.upload&&([a,c]=we(d),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=e=>{g&&(n(!e||e.type?new de(null,t,g):e),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const v=fe(i.url);v&&-1===zt.protocols.indexOf(v)?n(new mt("Unsupported protocol "+v+":",mt.ERR_BAD_REQUEST,t)):g.send(r||null)}))},Me=(t,e)=>{let n,i=new AbortController;const r=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;i.abort(e instanceof mt?e:new de(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{r(new mt(`timeout ${e} of ms exceeded`,mt.ETIMEDOUT))}),e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t&&(t.removeEventListener?t.removeEventListener("abort",r):t.unsubscribe(r))})),t=null)};t.forEach((t=>t&&t.addEventListener&&t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=s,[a,()=>{o&&clearTimeout(o),o=null}]},Ie=Me,De=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let i,r=0;while(r<n)i=r+e,yield t.slice(r,i),r=i},Oe=async function*(t,e,n){for await(const i of t)yield*De(ArrayBuffer.isView(i)?i:await n(String(i)),e)},Pe=(t,e,n,i,r)=>{const o=Oe(t,e,r);let s,a=0,l=t=>{s||(s=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await o.next();if(e)return l(),void t.close();let r=i.byteLength;if(n){let t=a+=r;n(t)}t.enqueue(new Uint8Array(i))}catch(e){throw l(e),e}},cancel(t){return l(t),o.return()}},{highWaterMark:2})},Ne="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Fe=Ne&&"function"===typeof ReadableStream,We=Ne&&("function"===typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),He=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},Be=Fe&&He((()=>{let t=!1;const e=new Request(zt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),ze=65536,Ue=Fe&&He((()=>dt.isReadableStream(new Response("").body))),je={stream:Ue&&(t=>t.body)};Ne&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!je[e]&&(je[e]=dt.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new mt(`Response type '${e}' is not supported`,mt.ERR_NOT_SUPPORT,n)})}))})(new Response);const Ge=async t=>null==t?0:dt.isBlob(t)?t.size:dt.isSpecCompliantForm(t)?(await new Request(t).arrayBuffer()).byteLength:dt.isArrayBufferView(t)||dt.isArrayBuffer(t)?t.byteLength:(dt.isURLSearchParams(t)&&(t+=""),dt.isString(t)?(await We(t)).byteLength:void 0),Ve=async(t,e)=>{const n=dt.toFiniteNumber(t.getContentLength());return null==n?Ge(e):n},Ye=Ne&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=Le(t);c=c?(c+"").toLowerCase():"text";let p,f,[g,m]=r||o||s?Ie([r,o],s):[];const v=()=>{!p&&setTimeout((()=>{g&&g.unsubscribe()})),p=!0};let y;try{if(l&&Be&&"get"!==n&&"head"!==n&&0!==(y=await Ve(u,i))){let t,n=new Request(e,{method:"POST",body:i,duplex:"half"});if(dt.isFormData(i)&&(t=n.headers.get("content-type"))&&u.setContentType(t),n.body){const[t,e]=be(y,we(_e(l)));i=Pe(n.body,ze,t,e,We)}}dt.isString(h)||(h=h?"include":"omit"),f=new Request(e,{...d,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:i,duplex:"half",credentials:h});let r=await fetch(f);const o=Ue&&("stream"===c||"response"===c);if(Ue&&(a||o)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=r[e]}));const e=dt.toFiniteNumber(r.headers.get("content-length")),[n,i]=a&&be(e,we(_e(a),!0))||[];r=new Response(Pe(r.body,ze,n,(()=>{i&&i(),o&&v()}),We),t)}c=c||"text";let s=await je[dt.findKey(je,c)||"text"](r,t);return!o&&v(),m&&m(),await new Promise(((e,n)=>{pe(e,n,{data:s,headers:le.from(r.headers),status:r.status,statusText:r.statusText,config:t,request:f})}))}catch(w){if(v(),w&&"TypeError"===w.name&&/fetch/i.test(w.message))throw Object.assign(new mt("Network Error",mt.ERR_NETWORK,t,f),{cause:w.cause||w});throw mt.from(w,w&&w.code,t,f)}}),qe={http:vt,xhr:Ee,fetch:Ye};dt.forEach(qe,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const Ke=t=>`- ${t}`,Xe=t=>dt.isFunction(t)||null===t||!1===t,Qe={getAdapter:t=>{t=dt.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,!Xe(n)&&(i=qe[(e=String(n)).toLowerCase()],void 0===i))throw new mt(`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(Ke).join("\n"):" "+Ke(t[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:qe};function Ze(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new de(null,t)}function Je(t){Ze(t),t.headers=le.from(t.headers),t.data=ce.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=Qe.getAdapter(t.adapter||Xt.adapter);return e(t).then((function(e){return Ze(t),e.data=ce.call(t,t.transformResponse,e),e.headers=le.from(e.headers),e}),(function(e){return ue(e)||(Ze(t),e&&e.response&&(e.response.data=ce.call(t,t.transformResponse,e.response),e.response.headers=le.from(e.response.headers))),Promise.reject(e)}))}const tn="1.7.4",en={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{en[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const nn={};function rn(t,e,n){if("object"!==typeof t)throw new mt("options must be an object",mt.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 mt("option "+o+" must be "+n,mt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new mt("Unknown option "+o,mt.ERR_BAD_OPTION)}}en.transitional=function(t,e,n){function i(t,e){return"[Axios v"+tn+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new mt(i(r," has been removed"+(e?" in "+e:"")),mt.ERR_DEPRECATED);return e&&!nn[r]&&(nn[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 on={assertOptions:rn,validators:en},sn=on.validators;class an{constructor(t){this.defaults=t,this.interceptors={request:new Mt,response:new Mt}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(i){}}throw n}}_request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=Te(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&on.assertOptions(n,{silentJSONParsing:sn.transitional(sn.boolean),forcedJSONParsing:sn.transitional(sn.boolean),clarifyTimeoutError:sn.transitional(sn.boolean)},!1),null!=i&&(dt.isFunction(i)?e.paramsSerializer={serialize:i}:on.assertOptions(i,{encode:sn.function,serialize:sn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&dt.merge(r.common,r[e.method]);r&&dt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=le.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=[Je.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(p){e.call(this,p);break}}try{c=Je.call(this,d)}catch(p){return Promise.reject(p)}h=0,u=l.length;while(h<u)c=c.then(l[h++],l[h++]);return c}getUri(t){t=Te(this.defaults,t);const e=$e(t.baseURL,t.url);return Rt(e,t.params,t.paramsSerializer)}}dt.forEach(["delete","get","head","options"],(function(t){an.prototype[t]=function(e,n){return this.request(Te(n||{},{method:t,url:e,data:(n||{}).data}))}})),dt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(Te(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}an.prototype[t]=e(),an.prototype[t+"Form"]=e(!0)}));const ln=an;class cn{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 de(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 cn((function(e){t=e}));return{token:e,cancel:t}}}const un=cn;function hn(t){return function(e){return t.apply(null,e)}}function dn(t){return dt.isObject(t)&&!0===t.isAxiosError}const pn={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(pn).forEach((([t,e])=>{pn[e]=t}));const fn=pn;function gn(t){const e=new ln(t),n=r(ln.prototype.request,e);return dt.extend(n,ln.prototype,e,{allOwnKeys:!0}),dt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return gn(Te(t,e))},n}const mn=gn(Xt);mn.Axios=ln,mn.CanceledError=de,mn.CancelToken=un,mn.isCancel=ue,mn.VERSION=tn,mn.toFormData=Ct,mn.AxiosError=mt,mn.Cancel=mn.CanceledError,mn.all=function(t){return Promise.all(t)},mn.spread=hn,mn.isAxiosError=dn,mn.mergeConfig=Te,mn.AxiosHeaders=le,mn.formToJSON=t=>Yt(dt.isHTMLForm(t)?new FormData(t):t),mn.getAdapter=Qe.getAdapter,mn.HttpStatusCode=fn,mn.default=mn;const vn=mn},3702:(t,e,n)=>{"use strict";n.d(e,{q:()=>r});let i={};function r(){return i}},1964:(t,e,n)=>{"use strict";n.d(e,{m:()=>s});const i=(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=(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=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],o=n[1],s=n[2];if(!s)return i(t,e);let a;switch(o){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;case"PPPP":default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",i(o,e)).replace("{{time}}",r(s,e))},s={p:r,P:o}},9356:(t,e,n)=>{"use strict";n.d(e,{G:()=>r});var i=n(2509);function r(t){const e=(0,i.a)(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}},5399:(t,e,n)=>{"use strict";n.d(e,{Ss:()=>l,ef:()=>s,xM:()=>a});const i=/^D+$/,r=/^Y+$/,o=["D","DD","YY","YYYY"];function s(t){return i.test(t)}function a(t){return r.test(t)}function l(t,e,n){const i=c(t,e,n);if(console.warn(i),o.includes(t))throw new RangeError(i)}function c(t,e,n){const i="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}},9406:(t,e,n)=>{"use strict";n.d(e,{f:()=>o});var i=n(2509),r=n(8989);function o(t,e){const n=(0,i.a)(t);return isNaN(e)?(0,r.w)(t,NaN):e?(n.setDate(n.getDate()+e),n):n}},8997:(t,e,n)=>{"use strict";n.d(e,{Cg:()=>o,_m:()=>a,my:()=>i,s0:()=>s,w4:()=>r});Math.pow(10,8);const i=6048e5,r=864e5,o=6e4,s=36e5,a=1e3},8989:(t,e,n)=>{"use strict";function i(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}n.d(e,{w:()=>i})},3769:(t,e,n)=>{"use strict";n.d(e,{GP:()=>M});var i=n(588),r=n(3702),o=n(8997),s=n(2509);function a(t){const e=(0,s.a)(t);return e.setHours(0,0,0,0),e}var l=n(9356);function c(t,e){const n=a(t),i=a(e),r=+n-(0,l.G)(n),s=+i-(0,l.G)(i);return Math.round((r-s)/o.w4)}var u=n(8989);function h(t){const e=(0,s.a)(t),n=(0,u.w)(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function d(t){const e=(0,s.a)(t),n=c(e,h(e)),i=n+1;return i}var p=n(9795),f=n(4962),g=n(9960),m=n(8897);function v(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const y={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return v("yy"===e?i%100:i,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):v(n+1,2)},d(t,e){return v(t.getDate(),e.length)},a(t,e){const n=t.getHours()/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(t,e){return v(t.getHours()%12||12,e.length)},H(t,e){return v(t.getHours(),e.length)},m(t,e){return v(t.getMinutes(),e.length)},s(t,e){return v(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),r=Math.trunc(i*Math.pow(10,n-3));return v(r,e.length)}},w={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},b={G:function(t,e,n){const i=t.getFullYear()>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){const e=t.getFullYear(),i=e>0?e:1-e;return n.ordinalNumber(i,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,i){const r=(0,m.h)(t,i),o=r>0?r:1-r;if("YY"===e){const t=o%100;return v(t,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):v(o,e.length)},R:function(t,e){const n=(0,f.p)(t);return v(n,e.length)},u:function(t,e){const n=t.getFullYear();return v(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return v(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){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return v(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){const i=t.getMonth();switch(e){case"M":case"MM":return y.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){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return v(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){const r=(0,g.N)(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):v(r,e.length)},I:function(t,e,n){const i=(0,p.s)(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):v(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const i=d(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):v(i,e.length)},E:function(t,e,n){const i=t.getDay();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){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return v(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){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return v(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){const i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return v(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){const i=t.getHours(),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){const i=t.getHours();let r;switch(r=12===i?w.noon:0===i?w.midnight:i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let r;switch(r=i>=17?w.evening:i>=12?w.afternoon:i>=4?w.morning:w.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):v(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):v(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return x(i);case"XXXX":case"XX":return S(i);case"XXXXX":case"XXX":default:return S(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return x(i);case"xxxx":case"xx":return S(i);case"xxxxx":case"xxx":default:return S(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_(i,":");case"OOOO":default:return"GMT"+S(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_(i,":");case"zzzz":default:return"GMT"+S(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return v(i,e.length)},T:function(t,e,n){const i=t.getTime();return v(i,e.length)}};function _(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+v(o,2)}function x(t,e){if(t%60===0){const e=t>0?"-":"+";return e+v(Math.abs(t)/60,2)}return S(t,e)}function S(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=v(Math.trunc(i/60),2),o=v(i%60,2);return n+r+e+o}var C=n(1964),k=n(5399),$=n(6375);const A=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,T=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L=/^'([^]*?)'?$/,R=/''/g,E=/[a-zA-Z]/;function M(t,e,n){const o=(0,r.q)(),a=n?.locale??o.locale??i.c,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,u=(0,s.a)(t);if(!(0,$.f)(u))throw new RangeError("Invalid time value");let h=e.match(T).map((t=>{const e=t[0];if("p"===e||"P"===e){const n=C.m[e];return n(t,a.formatLong)}return t})).join("").match(A).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:I(t)};if(b[e])return{isToken:!0,value:t};if(e.match(E))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));a.localize.preprocessor&&(h=a.localize.preprocessor(u,h));const d={firstWeekContainsDate:l,weekStartsOn:c,locale:a};return h.map((i=>{if(!i.isToken)return i.value;const r=i.value;(!n?.useAdditionalWeekYearTokens&&(0,k.xM)(r)||!n?.useAdditionalDayOfYearTokens&&(0,k.ef)(r))&&(0,k.Ss)(r,e,String(t));const o=b[r[0]];return o(u,r,a.localize,d)})).join("")}function I(t){const e=t.match(L);return e?e[1].replace(R,"'"):t}},9795:(t,e,n)=>{"use strict";n.d(e,{s:()=>c});var i=n(8997),r=n(9628),o=n(4962),s=n(8989);function a(t){const e=(0,o.p)(t),n=(0,s.w)(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),(0,r.b)(n)}var l=n(2509);function c(t){const e=(0,l.a)(t),n=+(0,r.b)(e)-+a(e);return Math.round(n/i.my)+1}},4962:(t,e,n)=>{"use strict";n.d(e,{p:()=>s});var i=n(8989),r=n(9628),o=n(2509);function s(t){const e=(0,o.a)(t),n=e.getFullYear(),s=(0,i.w)(t,0);s.setFullYear(n+1,0,4),s.setHours(0,0,0,0);const a=(0,r.b)(s),l=(0,i.w)(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const c=(0,r.b)(l);return e.getTime()>=a.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},9960:(t,e,n)=>{"use strict";n.d(e,{N:()=>u});var i=n(8997),r=n(3957),o=n(8989),s=n(8897),a=n(3702);function l(t,e){const n=(0,a.q)(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,l=(0,s.h)(t,e),c=(0,o.w)(t,0);c.setFullYear(l,0,i),c.setHours(0,0,0,0);const u=(0,r.k)(c,e);return u}var c=n(2509);function u(t,e){const n=(0,c.a)(t),o=+(0,r.k)(n,e)-+l(n,e);return Math.round(o/i.my)+1}},8897:(t,e,n)=>{"use strict";n.d(e,{h:()=>a});var i=n(8989),r=n(3957),o=n(2509),s=n(3702);function a(t,e){const n=(0,o.a)(t),a=n.getFullYear(),l=(0,s.q)(),c=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??l.firstWeekContainsDate??l.locale?.options?.firstWeekContainsDate??1,u=(0,i.w)(t,0);u.setFullYear(a+1,0,c),u.setHours(0,0,0,0);const h=(0,r.k)(u,e),d=(0,i.w)(t,0);d.setFullYear(a,0,c),d.setHours(0,0,0,0);const p=(0,r.k)(d,e);return n.getTime()>=h.getTime()?a+1:n.getTime()>=p.getTime()?a:a-1}},6375:(t,e,n)=>{"use strict";function i(t){return t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}n.d(e,{f:()=>o});var r=n(2509);function o(t){if(!i(t)&&"number"!==typeof t)return!1;const e=(0,r.a)(t);return!isNaN(Number(e))}},588:(t,e,n)=>{"use strict";n.d(e,{c:()=>F});const 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=(t,e,n)=>{let r;const o=i[t];return r="string"===typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function o(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}const s={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},l={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},c={date:o({formats:s,defaultWidth:"full"}),time:o({formats:a,defaultWidth:"full"}),dateTime:o({formats:l,defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},h=(t,e,n,i)=>u[t];function d(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let r;if("formatting"===i&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=n?.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=n?.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}const o=t.argumentCallback?t.argumentCallback(e):e;return r[o]}}const p={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},f={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},g={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"]},m={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"]},v={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"}},y={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"}},w=(t,e)=>{const 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"},b={ordinalNumber:w,era:d({values:p,defaultWidth:"wide"}),quarter:d({values:f,defaultWidth:"wide",argumentCallback:t=>t-1}),month:d({values:g,defaultWidth:"wide"}),day:d({values:m,defaultWidth:"wide"}),dayPeriod:d({values:v,defaultWidth:"wide",formattingValues:y,defaultFormattingWidth:"wide"})};function _(t){return(e,n={})=>{const i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const s=o[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?S(a,(t=>t.test(s))):x(a,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(s.length);return{value:c,rest:u}}}function x(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function S(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function C(t){return(e,n={})=>{const i=e.match(t.matchPattern);if(!i)return null;const r=i[0],o=e.match(t.parsePattern);if(!o)return null;let s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=e.slice(r.length);return{value:s,rest:a}}}const k=/^(\d+)(th|st|nd|rd)?/i,$=/\d+/i,A={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},T={any:[/^b/i,/^(a|c)/i]},L={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},R={any:[/1/i,/2/i,/3/i,/4/i]},E={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},M={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]},I={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},D={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]},O={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},P={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}},N={ordinalNumber:C({matchPattern:k,parsePattern:$,valueCallback:t=>parseInt(t,10)}),era:_({matchPatterns:A,defaultMatchWidth:"wide",parsePatterns:T,defaultParseWidth:"any"}),quarter:_({matchPatterns:L,defaultMatchWidth:"wide",parsePatterns:R,defaultParseWidth:"any",valueCallback:t=>t+1}),month:_({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:M,defaultParseWidth:"any"}),day:_({matchPatterns:I,defaultMatchWidth:"wide",parsePatterns:D,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:O,defaultMatchWidth:"any",parsePatterns:P,defaultParseWidth:"any"})},F={code:"en-US",formatDistance:r,formatLong:c,formatRelative:h,localize:b,match:N,options:{weekStartsOn:0,firstWeekContainsDate:1}}},4554:(t,e,n)=>{"use strict";n.d(e,{qg:()=>$t});var i=n(8989),r=n(3702);function o(){return Object.assign({},(0,r.q)())}var s=n(588),a=n(2509),l=n(1964),c=n(5399);function u(t,e){const n=e instanceof Date?(0,i.w)(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const h=10;class d{subPriority=0;validate(t,e){return!0}}class p extends d{constructor(t,e,n,i,r){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class f extends d{priority=h;subPriority=-1;set(t,e){return e.timestampIsSet?t:(0,i.w)(t,u(t,Date))}}class g{run(t,e,n,i){const r=this.parse(t,e,n,i);return r?{setter:new p(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,n){return!0}}class m extends g{priority=140;parse(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"})}}set(t,e,n){return e.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}var v=n(8997);const y={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}/},w={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 b(t,e){return t?{value:e(t.value),rest:t.rest}:t}function _(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function x(t,e){const n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};const 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*v.s0+o*v.Cg+s*v._m),rest:e.slice(n[0].length)}}function S(t){return _(y.anyDigitsSigned,t)}function C(t,e){switch(t){case 1:return _(y.singleDigit,e);case 2:return _(y.twoDigits,e);case 3:return _(y.threeDigits,e);case 4:return _(y.fourDigits,e);default:return _(new RegExp("^\\d{1,"+t+"}"),e)}}function k(t,e){switch(t){case 1:return _(y.singleDigitSigned,e);case 2:return _(y.twoDigitsSigned,e);case 3:return _(y.threeDigitsSigned,e);case 4:return _(y.fourDigitsSigned,e);default:return _(new RegExp("^-?\\d{1,"+t+"}"),e)}}function $(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 A(t,e){const n=e>0,i=n?e:1-e;let r;if(i<=50)r=t||100;else{const e=i+50,n=100*Math.trunc(e/100),o=t>=e%100;r=t+n-(o?100:0)}return n?r:1-r}function T(t){return t%400===0||t%4===0&&t%100!==0}class L extends g{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return b(C(4,t),i);case"yo":return b(n.ordinalNumber(t,{unit:"year"}),i);default:return b(C(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){const i=t.getFullYear();if(n.isTwoDigitYear){const e=A(n.year,i);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const r="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}var R=n(8897),E=n(3957);class M extends g{priority=130;parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return b(C(4,t),i);case"Yo":return b(n.ordinalNumber(t,{unit:"year"}),i);default:return b(C(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,i){const r=(0,R.h)(t,i);if(n.isTwoDigitYear){const e=A(n.year,r);return t.setFullYear(e,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),(0,E.k)(t,i)}const o="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(o,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),(0,E.k)(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}var I=n(9628);class D extends g{priority=130;parse(t,e){return k("R"===e?4:e.length,t)}set(t,e,n){const r=(0,i.w)(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),(0,I.b)(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class O extends g{priority=130;parse(t,e){return k("u"===e?4:e.length,t)}set(t,e,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class P extends g{priority=120;parse(t,e,n){switch(e){case"Q":case"QQ":return C(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"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class N extends g{priority=120;parse(t,e,n){switch(e){case"q":case"qq":return C(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"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class F extends g{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"M":return b(_(y.month,t),i);case"MM":return b(C(2,t),i);case"Mo":return b(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"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}}class W extends g{priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"L":return b(_(y.month,t),i);case"LL":return b(C(2,t),i);case"Lo":return b(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"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}var H=n(9960);function B(t,e,n){const i=(0,a.a)(t),r=(0,H.N)(i,n)-e;return i.setDate(i.getDate()-7*r),i}class z extends g{priority=100;parse(t,e,n){switch(e){case"w":return _(y.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return C(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,i){return(0,E.k)(B(t,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}var U=n(9795);function j(t,e){const n=(0,a.a)(t),i=(0,U.s)(n)-e;return n.setDate(n.getDate()-7*i),n}class G extends g{priority=100;parse(t,e,n){switch(e){case"I":return _(y.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return C(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return(0,I.b)(j(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const V=[31,28,31,30,31,30,31,31,30,31,30,31],Y=[31,29,31,30,31,30,31,31,30,31,30,31];class q extends g{priority=90;subPriority=1;parse(t,e,n){switch(e){case"d":return _(y.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return C(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=T(n),r=t.getMonth();return i?e>=1&&e<=Y[r]:e>=1&&e<=V[r]}set(t,e,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class K extends g{priority=90;subpriority=1;parse(t,e,n){switch(e){case"D":case"DD":return _(y.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return C(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=T(n);return i?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}var X=n(9406);function Q(t,e,n){const i=(0,r.q)(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,s=(0,a.a)(t),l=s.getDay(),c=e%7,u=(c+7)%7,h=7-o,d=e<0||e>6?e-(l+h)%7:(u+h)%7-(l+h)%7;return(0,X.f)(s,d)}class Z extends g{priority=90;parse(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Q(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class J extends g{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return b(C(e.length,t),r);case"eo":return b(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Q(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class tt extends g{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return b(C(e.length,t),r);case"co":return b(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"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Q(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function et(t){const e=(0,a.a)(t);let n=e.getDay();return 0===n&&(n=7),n}function nt(t,e){const n=(0,a.a)(t),i=et(n),r=e-i;return(0,X.f)(n,r)}class it extends g{priority=90;parse(t,e,n){const i=t=>0===t?7:t;switch(e){case"i":case"ii":return C(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return b(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 b(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return b(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return b(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)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return t=nt(t,n),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class rt extends g{priority=80;parse(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"})}}set(t,e,n){return t.setHours($(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class ot extends g{priority=80;parse(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"})}}set(t,e,n){return t.setHours($(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class st extends g{priority=80;parse(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"})}}set(t,e,n){return t.setHours($(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class at extends g{priority=70;parse(t,e,n){switch(e){case"h":return _(y.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return C(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):i||12!==n?t.setHours(n,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class lt extends g{priority=70;parse(t,e,n){switch(e){case"H":return _(y.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return C(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class ct extends g{priority=70;parse(t,e,n){switch(e){case"K":return _(y.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return C(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):t.setHours(n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class ut extends g{priority=70;parse(t,e,n){switch(e){case"k":return _(y.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return C(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){const i=n<=24?n%24:n;return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class ht extends g{priority=60;parse(t,e,n){switch(e){case"m":return _(y.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return C(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]}class dt extends g{priority=50;parse(t,e,n){switch(e){case"s":return _(y.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return C(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]}class pt extends g{priority=30;parse(t,e){const n=t=>Math.trunc(t*Math.pow(10,3-e.length));return b(C(e.length,t),n)}set(t,e,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]}var ft=n(9356);class gt extends g{priority=10;parse(t,e){switch(e){case"X":return x(w.basicOptionalMinutes,t);case"XX":return x(w.basic,t);case"XXXX":return x(w.basicOptionalSeconds,t);case"XXXXX":return x(w.extendedOptionalSeconds,t);case"XXX":default:return x(w.extended,t)}}set(t,e,n){return e.timestampIsSet?t:(0,i.w)(t,t.getTime()-(0,ft.G)(t)-n)}incompatibleTokens=["t","T","x"]}class mt extends g{priority=10;parse(t,e){switch(e){case"x":return x(w.basicOptionalMinutes,t);case"xx":return x(w.basic,t);case"xxxx":return x(w.basicOptionalSeconds,t);case"xxxxx":return x(w.extendedOptionalSeconds,t);case"xxx":default:return x(w.extended,t)}}set(t,e,n){return e.timestampIsSet?t:(0,i.w)(t,t.getTime()-(0,ft.G)(t)-n)}incompatibleTokens=["t","T","X"]}class vt extends g{priority=40;parse(t){return S(t)}set(t,e,n){return[(0,i.w)(t,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"}class yt extends g{priority=20;parse(t){return S(t)}set(t,e,n){return[(0,i.w)(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const wt={G:new m,y:new L,Y:new M,R:new D,u:new O,Q:new P,q:new N,M:new F,L:new W,w:new z,I:new G,d:new q,D:new K,E:new Z,e:new J,c:new tt,i:new it,a:new rt,b:new ot,B:new st,h:new at,H:new lt,K:new ct,k:new ut,m:new ht,s:new dt,S:new pt,X:new gt,x:new mt,t:new vt,T:new yt},bt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xt=/^'([^]*?)'?$/,St=/''/g,Ct=/\S/,kt=/[a-zA-Z]/;function $t(t,e,n,r){const u=o(),h=r?.locale??u.locale??s.c,d=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,p=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0;if(""===e)return""===t?(0,a.a)(n):(0,i.w)(n,NaN);const g={firstWeekContainsDate:d,weekStartsOn:p,locale:h},m=[new f],v=e.match(_t).map((t=>{const e=t[0];if(e in l.m){const n=l.m[e];return n(t,h.formatLong)}return t})).join("").match(bt),y=[];for(let o of v){!r?.useAdditionalWeekYearTokens&&(0,c.xM)(o)&&(0,c.Ss)(o,e,t),!r?.useAdditionalDayOfYearTokens&&(0,c.ef)(o)&&(0,c.Ss)(o,e,t);const s=o[0],a=wt[s];if(a){const{incompatibleTokens:e}=a;if(Array.isArray(e)){const t=y.find((t=>e.includes(t.token)||t.token===s));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${o}\` at the same time`)}else if("*"===a.incompatibleTokens&&y.length>0)throw new RangeError(`The format string mustn't contain \`${o}\` and any other token at the same time`);y.push({token:s,fullToken:o});const r=a.run(t,o,h.match,g);if(!r)return(0,i.w)(n,NaN);m.push(r.setter),t=r.rest}else{if(s.match(kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===o?o="'":"'"===s&&(o=At(o)),0!==t.indexOf(o))return(0,i.w)(n,NaN);t=t.slice(o.length)}}if(t.length>0&&Ct.test(t))return(0,i.w)(n,NaN);const w=m.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,n)=>n.indexOf(t)===e)).map((t=>m.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let b=(0,a.a)(n);if(isNaN(b.getTime()))return(0,i.w)(n,NaN);const _={};for(const o of w){if(!o.validate(b,g))return(0,i.w)(n,NaN);const t=o.set(b,_,g);Array.isArray(t)?(b=t[0],Object.assign(_,t[1])):b=t}return(0,i.w)(n,b)}function At(t){return t.match(xt)[1].replace(St,"'")}},9628:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var i=n(3957);function r(t){return(0,i.k)(t,{weekStartsOn:1})}},3957:(t,e,n)=>{"use strict";n.d(e,{k:()=>o});var i=n(2509),r=n(3702);function o(t,e){const n=(0,r.q)(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=(0,i.a)(t),a=s.getDay(),l=(a<o?7:0)+a-o;return s.setDate(s.getDate()-l),s.setHours(0,0,0,0),s}},6444:(t,e,n)=>{"use strict";n.d(e,{j:()=>c});var i=n(9406);function r(t,e){return(0,i.f)(t,-e)}var o=n(2509),s=n(8989);function a(t,e){const n=(0,o.a)(t);if(isNaN(e))return(0,s.w)(t,NaN);if(!e)return n;const i=n.getDate(),r=(0,s.w)(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);const a=r.getDate();return i>=a?r:(n.setFullYear(r.getFullYear(),r.getMonth(),i),n)}function l(t,e){return a(t,-e)}function c(t,e){const{years:n=0,months:i=0,weeks:o=0,days:a=0,hours:c=0,minutes:u=0,seconds:h=0}=e,d=l(t,i+12*n),p=r(d,a+7*o),f=u+60*c,g=h+60*f,m=1e3*g,v=(0,s.w)(t,p.getTime()-m);return v}},2509:(t,e,n)=>{"use strict";function i(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"===typeof t&&"[object Date]"===e?new t.constructor(+t):"number"===typeof t||"[object Number]"===e||"string"===typeof t||"[object String]"===e?new Date(t):new Date(NaN)}n.d(e,{a:()=>i})}}]);
|
39
|
-
//# sourceMappingURL=564.js.map
|