@unocss/inspector 0.31.8 → 0.31.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
- var yg=Object.defineProperty,bg=Object.defineProperties;var wg=Object.getOwnPropertyDescriptors;var Wf=Object.getOwnPropertySymbols;var xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable;var Bf=(r,s,l)=>s in r?yg(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Il=(r,s)=>{for(var l in s||(s={}))xg.call(s,l)&&Bf(r,l,s[l]);if(Wf)for(var l of Wf(s))kg.call(s,l)&&Bf(r,l,s[l]);return r},jf=(r,s)=>bg(r,wg(s));const Sg=function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const v of d.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&u(v)}).observe(document,{childList:!0,subtree:!0});function l(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerpolicy&&(d.referrerPolicy=f.referrerpolicy),f.crossorigin==="use-credentials"?d.credentials="include":f.crossorigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=l(f);fetch(f.href,d)}};Sg();const Cg="modulepreload",Uf={},_g="/__unocss/",da=function(s,l){return!l||l.length===0?s():Promise.all(l.map(u=>{if(u=`${_g}${u}`,u in Uf)return;Uf[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":Cg,f||(v.as="script",v.crossOrigin=""),v.href=u,document.head.appendChild(v),f)return new Promise((b,y)=>{v.addEventListener("load",b),v.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>s())};function ha(r,s){const l=Object.create(null),u=r.split(",");for(let f=0;f<u.length;f++)l[u[f]]=!0;return s?f=>!!l[f.toLowerCase()]:f=>!!l[f]}const Tg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Lg=ha(Tg);function Gc(r){return!!r||r===""}function To(r){if(je(r)){const s={};for(let l=0;l<r.length;l++){const u=r[l],f=Nt(u)?Mg(u):To(u);if(f)for(const d in f)s[d]=f[d]}return s}else{if(Nt(r))return r;if(Lt(r))return r}}const Pg=/;(?![^(]*\))/g,Og=/:(.+)/;function Mg(r){const s={};return r.split(Pg).forEach(l=>{if(l){const u=l.split(Og);u.length>1&&(s[u[0].trim()]=u[1].trim())}}),s}function vi(r){let s="";if(Nt(r))s=r;else if(je(r))for(let l=0;l<r.length;l++){const u=vi(r[l]);u&&(s+=u+" ")}else if(Lt(r))for(const l in r)r[l]&&(s+=l+" ");return s.trim()}const tr=r=>Nt(r)?r:r==null?"":je(r)||Lt(r)&&(r.toString===Jc||!qe(r.toString))?JSON.stringify(r,Yc,2):String(r),Yc=(r,s)=>s&&s.__v_isRef?Yc(r,s.value):pi(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((l,[u,f])=>(l[`${u} =>`]=f,l),{})}:Xc(s)?{[`Set(${s.size})`]:[...s.values()]}:Lt(s)&&!je(s)&&!Qc(s)?String(s):s,st={},hi=[],xr=()=>{},Eg=()=>!1,Ag=/^on[^a-z]/,As=r=>Ag.test(r),pa=r=>r.startsWith("onUpdate:"),Zt=Object.assign,ga=(r,s)=>{const l=r.indexOf(s);l>-1&&r.splice(l,1)},Ng=Object.prototype.hasOwnProperty,Ye=(r,s)=>Ng.call(r,s),je=Array.isArray,pi=r=>Ns(r)==="[object Map]",Xc=r=>Ns(r)==="[object Set]",qe=r=>typeof r=="function",Nt=r=>typeof r=="string",va=r=>typeof r=="symbol",Lt=r=>r!==null&&typeof r=="object",Zc=r=>Lt(r)&&qe(r.then)&&qe(r.catch),Jc=Object.prototype.toString,Ns=r=>Jc.call(r),zg=r=>Ns(r).slice(8,-1),Qc=r=>Ns(r)==="[object Object]",ma=r=>Nt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,gs=ha(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zs=r=>{const s=Object.create(null);return l=>s[l]||(s[l]=r(l))},Rg=/-(\w)/g,zr=zs(r=>r.replace(Rg,(s,l)=>l?l.toUpperCase():"")),Dg=/\B([A-Z])/g,xi=zs(r=>r.replace(Dg,"-$1").toLowerCase()),Rs=zs(r=>r.charAt(0).toUpperCase()+r.slice(1)),Hl=zs(r=>r?`on${Rs(r)}`:""),bo=(r,s)=>!Object.is(r,s),Wl=(r,s)=>{for(let l=0;l<r.length;l++)r[l](s)},bs=(r,s,l)=>{Object.defineProperty(r,s,{configurable:!0,enumerable:!1,value:l})},Fg=r=>{const s=parseFloat(r);return isNaN(s)?r:s};let Kf;const Ig=()=>Kf||(Kf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let ar;class Hg{constructor(s=!1){this.active=!0,this.effects=[],this.cleanups=[],!s&&ar&&(this.parent=ar,this.index=(ar.scopes||(ar.scopes=[])).push(this)-1)}run(s){if(this.active){const l=ar;try{return ar=this,s()}finally{ar=l}}}on(){ar=this}off(){ar=this.parent}stop(s){if(this.active){let l,u;for(l=0,u=this.effects.length;l<u;l++)this.effects[l].stop();for(l=0,u=this.cleanups.length;l<u;l++)this.cleanups[l]();if(this.scopes)for(l=0,u=this.scopes.length;l<u;l++)this.scopes[l].stop(!0);if(this.parent&&!s){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.active=!1}}}function Wg(r,s=ar){s&&s.active&&s.effects.push(r)}function Bg(){return ar}function jg(r){ar&&ar.cleanups.push(r)}const ya=r=>{const s=new Set(r);return s.w=0,s.n=0,s},Vc=r=>(r.w&vn)>0,ed=r=>(r.n&vn)>0,Ug=({deps:r})=>{if(r.length)for(let s=0;s<r.length;s++)r[s].w|=vn},Kg=r=>{const{deps:s}=r;if(s.length){let l=0;for(let u=0;u<s.length;u++){const f=s[u];Vc(f)&&!ed(f)?f.delete(r):s[l++]=f,f.w&=~vn,f.n&=~vn}s.length=l}},Yl=new WeakMap;let uo=0,vn=1;const Xl=30;let wr;const Rn=Symbol(""),Zl=Symbol("");class ba{constructor(s,l=null,u){this.fn=s,this.scheduler=l,this.active=!0,this.deps=[],this.parent=void 0,Wg(this,u)}run(){if(!this.active)return this.fn();let s=wr,l=hn;for(;s;){if(s===this)return;s=s.parent}try{return this.parent=wr,wr=this,hn=!0,vn=1<<++uo,uo<=Xl?Ug(this):qf(this),this.fn()}finally{uo<=Xl&&Kg(this),vn=1<<--uo,wr=this.parent,hn=l,this.parent=void 0,this.deferStop&&this.stop()}}stop(){wr===this?this.deferStop=!0:this.active&&(qf(this),this.onStop&&this.onStop(),this.active=!1)}}function qf(r){const{deps:s}=r;if(s.length){for(let l=0;l<s.length;l++)s[l].delete(r);s.length=0}}let hn=!0;const td=[];function ki(){td.push(hn),hn=!1}function Si(){const r=td.pop();hn=r===void 0?!0:r}function fr(r,s,l){if(hn&&wr){let u=Yl.get(r);u||Yl.set(r,u=new Map);let f=u.get(l);f||u.set(l,f=ya()),rd(f)}}function rd(r,s){let l=!1;uo<=Xl?ed(r)||(r.n|=vn,l=!Vc(r)):l=!r.has(wr),l&&(r.add(wr),wr.deps.push(r))}function $r(r,s,l,u,f,d){const v=Yl.get(r);if(!v)return;let b=[];if(s==="clear")b=[...v.values()];else if(l==="length"&&je(r))v.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(l!==void 0&&b.push(v.get(l)),s){case"add":je(r)?ma(l)&&b.push(v.get("length")):(b.push(v.get(Rn)),pi(r)&&b.push(v.get(Zl)));break;case"delete":je(r)||(b.push(v.get(Rn)),pi(r)&&b.push(v.get(Zl)));break;case"set":pi(r)&&b.push(v.get(Rn));break}if(b.length===1)b[0]&&Jl(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);Jl(ya(y))}}function Jl(r,s){for(const l of je(r)?r:[...r])(l!==wr||l.allowRecurse)&&(l.scheduler?l.scheduler():l.run())}const qg=ha("__proto__,__v_isRef,__isVue"),nd=new Set(Object.getOwnPropertyNames(Symbol).map(r=>Symbol[r]).filter(va)),$g=wa(),Gg=wa(!1,!0),Yg=wa(!0),$f=Xg();function Xg(){const r={};return["includes","indexOf","lastIndexOf"].forEach(s=>{r[s]=function(...l){const u=Ve(this);for(let d=0,v=this.length;d<v;d++)fr(u,"get",d+"");const f=u[s](...l);return f===-1||f===!1?u[s](...l.map(Ve)):f}}),["push","pop","shift","unshift","splice"].forEach(s=>{r[s]=function(...l){ki();const u=Ve(this)[s].apply(this,l);return Si(),u}}),r}function wa(r=!1,s=!1){return function(u,f,d){if(f==="__v_isReactive")return!r;if(f==="__v_isReadonly")return r;if(f==="__v_isShallow")return s;if(f==="__v_raw"&&d===(r?s?cv:ad:s?ld:sd).get(u))return u;const v=je(u);if(!r&&v&&Ye($f,f))return Reflect.get($f,f,d);const b=Reflect.get(u,f,d);return(va(f)?nd.has(f):qg(f))||(r||fr(u,"get",f),s)?b:bt(b)?!v||!ma(f)?b.value:b:Lt(b)?r?ud(b):Ci(b):b}}const Zg=id(),Jg=id(!0);function id(r=!1){return function(l,u,f,d){let v=l[u];if(wo(v)&&bt(v)&&!bt(f))return!1;if(!r&&!wo(f)&&(fd(f)||(f=Ve(f),v=Ve(v)),!je(l)&&bt(v)&&!bt(f)))return v.value=f,!0;const b=je(l)&&ma(u)?Number(u)<l.length:Ye(l,u),y=Reflect.set(l,u,f,d);return l===Ve(d)&&(b?bo(f,v)&&$r(l,"set",u,f):$r(l,"add",u,f)),y}}function Qg(r,s){const l=Ye(r,s);r[s];const u=Reflect.deleteProperty(r,s);return u&&l&&$r(r,"delete",s,void 0),u}function Vg(r,s){const l=Reflect.has(r,s);return(!va(s)||!nd.has(s))&&fr(r,"has",s),l}function ev(r){return fr(r,"iterate",je(r)?"length":Rn),Reflect.ownKeys(r)}const od={get:$g,set:Zg,deleteProperty:Qg,has:Vg,ownKeys:ev},tv={get:Yg,set(r,s){return!0},deleteProperty(r,s){return!0}},rv=Zt({},od,{get:Gg,set:Jg}),xa=r=>r,Ds=r=>Reflect.getPrototypeOf(r);function ls(r,s,l=!1,u=!1){r=r.__v_raw;const f=Ve(r),d=Ve(s);s!==d&&!l&&fr(f,"get",s),!l&&fr(f,"get",d);const{has:v}=Ds(f),b=u?xa:l?Ca:xo;if(v.call(f,s))return b(r.get(s));if(v.call(f,d))return b(r.get(d));r!==f&&r.get(s)}function as(r,s=!1){const l=this.__v_raw,u=Ve(l),f=Ve(r);return r!==f&&!s&&fr(u,"has",r),!s&&fr(u,"has",f),r===f?l.has(r):l.has(r)||l.has(f)}function us(r,s=!1){return r=r.__v_raw,!s&&fr(Ve(r),"iterate",Rn),Reflect.get(r,"size",r)}function Gf(r){r=Ve(r);const s=Ve(this);return Ds(s).has.call(s,r)||(s.add(r),$r(s,"add",r,r)),this}function Yf(r,s){s=Ve(s);const l=Ve(this),{has:u,get:f}=Ds(l);let d=u.call(l,r);d||(r=Ve(r),d=u.call(l,r));const v=f.call(l,r);return l.set(r,s),d?bo(s,v)&&$r(l,"set",r,s):$r(l,"add",r,s),this}function Xf(r){const s=Ve(this),{has:l,get:u}=Ds(s);let f=l.call(s,r);f||(r=Ve(r),f=l.call(s,r)),u&&u.call(s,r);const d=s.delete(r);return f&&$r(s,"delete",r,void 0),d}function Zf(){const r=Ve(this),s=r.size!==0,l=r.clear();return s&&$r(r,"clear",void 0,void 0),l}function fs(r,s){return function(u,f){const d=this,v=d.__v_raw,b=Ve(v),y=s?xa:r?Ca:xo;return!r&&fr(b,"iterate",Rn),v.forEach((x,S)=>u.call(f,y(x),y(S),d))}}function cs(r,s,l){return function(...u){const f=this.__v_raw,d=Ve(f),v=pi(d),b=r==="entries"||r===Symbol.iterator&&v,y=r==="keys"&&v,x=f[r](...u),S=l?xa:s?Ca:xo;return!s&&fr(d,"iterate",y?Zl:Rn),{next(){const{value:T,done:O}=x.next();return O?{value:T,done:O}:{value:b?[S(T[0]),S(T[1])]:S(T),done:O}},[Symbol.iterator](){return this}}}}function ln(r){return function(...s){return r==="delete"?!1:this}}function nv(){const r={get(d){return ls(this,d)},get size(){return us(this)},has:as,add:Gf,set:Yf,delete:Xf,clear:Zf,forEach:fs(!1,!1)},s={get(d){return ls(this,d,!1,!0)},get size(){return us(this)},has:as,add:Gf,set:Yf,delete:Xf,clear:Zf,forEach:fs(!1,!0)},l={get(d){return ls(this,d,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear"),forEach:fs(!0,!1)},u={get(d){return ls(this,d,!0,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear"),forEach:fs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{r[d]=cs(d,!1,!1),l[d]=cs(d,!0,!1),s[d]=cs(d,!1,!0),u[d]=cs(d,!0,!0)}),[r,l,s,u]}const[iv,ov,sv,lv]=nv();function ka(r,s){const l=s?r?lv:sv:r?ov:iv;return(u,f,d)=>f==="__v_isReactive"?!r:f==="__v_isReadonly"?r:f==="__v_raw"?u:Reflect.get(Ye(l,f)&&f in u?l:u,f,d)}const av={get:ka(!1,!1)},uv={get:ka(!1,!0)},fv={get:ka(!0,!1)},sd=new WeakMap,ld=new WeakMap,ad=new WeakMap,cv=new WeakMap;function dv(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hv(r){return r.__v_skip||!Object.isExtensible(r)?0:dv(zg(r))}function Ci(r){return wo(r)?r:Sa(r,!1,od,av,sd)}function pv(r){return Sa(r,!1,rv,uv,ld)}function ud(r){return Sa(r,!0,tv,fv,ad)}function Sa(r,s,l,u,f){if(!Lt(r)||r.__v_raw&&!(s&&r.__v_isReactive))return r;const d=f.get(r);if(d)return d;const v=hv(r);if(v===0)return r;const b=new Proxy(r,v===2?u:l);return f.set(r,b),b}function gi(r){return wo(r)?gi(r.__v_raw):!!(r&&r.__v_isReactive)}function wo(r){return!!(r&&r.__v_isReadonly)}function fd(r){return!!(r&&r.__v_isShallow)}function cd(r){return gi(r)||wo(r)}function Ve(r){const s=r&&r.__v_raw;return s?Ve(s):r}function dd(r){return bs(r,"__v_skip",!0),r}const xo=r=>Lt(r)?Ci(r):r,Ca=r=>Lt(r)?ud(r):r;function hd(r){hn&&wr&&(r=Ve(r),rd(r.dep||(r.dep=ya())))}function pd(r,s){r=Ve(r),r.dep&&Jl(r.dep)}function bt(r){return!!(r&&r.__v_isRef===!0)}function At(r){return gd(r,!1)}function co(r){return gd(r,!0)}function gd(r,s){return bt(r)?r:new gv(r,s)}class gv{constructor(s,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?s:Ve(s),this._value=l?s:xo(s)}get value(){return hd(this),this._value}set value(s){s=this.__v_isShallow?s:Ve(s),bo(s,this._rawValue)&&(this._rawValue=s,this._value=this.__v_isShallow?s:xo(s),pd(this))}}function Re(r){return bt(r)?r.value:r}const vv={get:(r,s,l)=>Re(Reflect.get(r,s,l)),set:(r,s,l,u)=>{const f=r[s];return bt(f)&&!bt(l)?(f.value=l,!0):Reflect.set(r,s,l,u)}};function vd(r){return gi(r)?r:new Proxy(r,vv)}function mv(r){const s=je(r)?new Array(r.length):{};for(const l in r)s[l]=bv(r,l);return s}class yv{constructor(s,l,u){this._object=s,this._key=l,this._defaultValue=u,this.__v_isRef=!0}get value(){const s=this._object[this._key];return s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}}function bv(r,s,l){const u=r[s];return bt(u)?u:new yv(r,s,l)}class wv{constructor(s,l,u,f){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ba(s,()=>{this._dirty||(this._dirty=!0,pd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=u}get value(){const s=Ve(this);return hd(s),(s._dirty||!s._cacheable)&&(s._dirty=!1,s._value=s.effect.run()),s._value}set value(s){this._setter(s)}}function xv(r,s,l=!1){let u,f;const d=qe(r);return d?(u=r,f=xr):(u=r.get,f=r.set),new wv(u,f,d||!f,l)}function pn(r,s,l,u){let f;try{f=u?r(...u):r()}catch(d){Fs(d,s,l)}return f}function kr(r,s,l,u){if(qe(r)){const d=pn(r,s,l,u);return d&&Zc(d)&&d.catch(v=>{Fs(v,s,l)}),d}const f=[];for(let d=0;d<r.length;d++)f.push(kr(r[d],s,l,u));return f}function Fs(r,s,l,u=!0){const f=s?s.vnode:null;if(s){let d=s.parent;const v=s.proxy,b=l;for(;d;){const x=d.ec;if(x){for(let S=0;S<x.length;S++)if(x[S](r,v,b)===!1)return}d=d.parent}const y=s.appContext.config.errorHandler;if(y){pn(y,null,10,[r,v,b]);return}}kv(r,l,f,u)}function kv(r,s,l,u=!0){console.error(r)}let ws=!1,Ql=!1;const ur=[];let Kr=0;const ho=[];let fo=null,ui=0;const po=[];let fn=null,fi=0;const md=Promise.resolve();let _a=null,Vl=null;function Is(r){const s=_a||md;return r?s.then(this?r.bind(this):r):s}function Sv(r){let s=Kr+1,l=ur.length;for(;s<l;){const u=s+l>>>1;ko(ur[u])<r?s=u+1:l=u}return s}function yd(r){(!ur.length||!ur.includes(r,ws&&r.allowRecurse?Kr+1:Kr))&&r!==Vl&&(r.id==null?ur.push(r):ur.splice(Sv(r.id),0,r),bd())}function bd(){!ws&&!Ql&&(Ql=!0,_a=md.then(kd))}function Cv(r){const s=ur.indexOf(r);s>Kr&&ur.splice(s,1)}function wd(r,s,l,u){je(r)?l.push(...r):(!s||!s.includes(r,r.allowRecurse?u+1:u))&&l.push(r),bd()}function _v(r){wd(r,fo,ho,ui)}function Tv(r){wd(r,fn,po,fi)}function Ta(r,s=null){if(ho.length){for(Vl=s,fo=[...new Set(ho)],ho.length=0,ui=0;ui<fo.length;ui++)fo[ui]();fo=null,ui=0,Vl=null,Ta(r,s)}}function xd(r){if(po.length){const s=[...new Set(po)];if(po.length=0,fn){fn.push(...s);return}for(fn=s,fn.sort((l,u)=>ko(l)-ko(u)),fi=0;fi<fn.length;fi++)fn[fi]();fn=null,fi=0}}const ko=r=>r.id==null?1/0:r.id;function kd(r){Ql=!1,ws=!0,Ta(r),ur.sort((l,u)=>ko(l)-ko(u));const s=xr;try{for(Kr=0;Kr<ur.length;Kr++){const l=ur[Kr];l&&l.active!==!1&&pn(l,null,14)}}finally{Kr=0,ur.length=0,xd(),ws=!1,_a=null,(ur.length||ho.length||po.length)&&kd(r)}}function Lv(r,s,...l){if(r.isUnmounted)return;const u=r.vnode.props||st;let f=l;const d=s.startsWith("update:"),v=d&&s.slice(7);if(v&&v in u){const S=`${v==="modelValue"?"model":v}Modifiers`,{number:T,trim:O}=u[S]||st;O?f=l.map(A=>A.trim()):T&&(f=l.map(Fg))}let b,y=u[b=Hl(s)]||u[b=Hl(zr(s))];!y&&d&&(y=u[b=Hl(xi(s))]),y&&kr(y,r,6,f);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,kr(x,r,6,f)}}function Sd(r,s,l=!1){const u=s.emitsCache,f=u.get(r);if(f!==void 0)return f;const d=r.emits;let v={},b=!1;if(!qe(r)){const y=x=>{const S=Sd(x,s,!0);S&&(b=!0,Zt(v,S))};!l&&s.mixins.length&&s.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!d&&!b?(u.set(r,null),null):(je(d)?d.forEach(y=>v[y]=null):Zt(v,d),u.set(r,v),v)}function Hs(r,s){return!r||!As(s)?!1:(s=s.slice(2).replace(/Once$/,""),Ye(r,s[0].toLowerCase()+s.slice(1))||Ye(r,xi(s))||Ye(r,s))}let Xt=null,Cd=null;function xs(r){const s=Xt;return Xt=r,Cd=r&&r.type.__scopeId||null,s}function gn(r,s=Xt,l){if(!s||r._n)return r;const u=(...f)=>{u._d&&sc(-1);const d=xs(s),v=r(...f);return xs(d),u._d&&sc(1),v};return u._n=!0,u._c=!0,u._d=!0,u}function Bl(r){const{type:s,vnode:l,proxy:u,withProxy:f,props:d,propsOptions:[v],slots:b,attrs:y,emit:x,render:S,renderCache:T,data:O,setupState:A,ctx:H,inheritAttrs:re}=r;let V,N;const D=xs(r);try{if(l.shapeFlag&4){const B=f||u;V=Nr(S.call(B,B,T,d,A,O,H)),N=y}else{const B=s;V=Nr(B.length>1?B(d,{attrs:y,slots:b,emit:x}):B(d,null)),N=s.props?y:Pv(y)}}catch(B){go.length=0,Fs(B,r,1),V=ot(mn)}let I=V;if(N&&re!==!1){const B=Object.keys(N),{shapeFlag:oe}=I;B.length&&oe&7&&(v&&B.some(pa)&&(N=Ov(N,v)),I=So(I,N))}return l.dirs&&(I.dirs=I.dirs?I.dirs.concat(l.dirs):l.dirs),l.transition&&(I.transition=l.transition),V=I,xs(D),V}const Pv=r=>{let s;for(const l in r)(l==="class"||l==="style"||As(l))&&((s||(s={}))[l]=r[l]);return s},Ov=(r,s)=>{const l={};for(const u in r)(!pa(u)||!(u.slice(9)in s))&&(l[u]=r[u]);return l};function Mv(r,s,l){const{props:u,children:f,component:d}=r,{props:v,children:b,patchFlag:y}=s,x=d.emitsOptions;if(s.dirs||s.transition)return!0;if(l&&y>=0){if(y&1024)return!0;if(y&16)return u?Jf(u,v,x):!!v;if(y&8){const S=s.dynamicProps;for(let T=0;T<S.length;T++){const O=S[T];if(v[O]!==u[O]&&!Hs(x,O))return!0}}}else return(f||b)&&(!b||!b.$stable)?!0:u===v?!1:u?v?Jf(u,v,x):!0:!!v;return!1}function Jf(r,s,l){const u=Object.keys(s);if(u.length!==Object.keys(r).length)return!0;for(let f=0;f<u.length;f++){const d=u[f];if(s[d]!==r[d]&&!Hs(l,d))return!0}return!1}function Ev({vnode:r,parent:s},l){for(;s&&s.subTree===r;)(r=s.vnode).el=l,s=s.parent}const Av=r=>r.__isSuspense;function Nv(r,s){s&&s.pendingBranch?je(r)?s.effects.push(...r):s.effects.push(r):Tv(r)}function vs(r,s){if(Et){let l=Et.provides;const u=Et.parent&&Et.parent.provides;u===l&&(l=Et.provides=Object.create(u)),l[r]=s}}function qr(r,s,l=!1){const u=Et||Xt;if(u){const f=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(f&&r in f)return f[r];if(arguments.length>1)return l&&qe(s)?s.call(u.proxy):s}}function zv(r,s){return La(r,null,s)}const Qf={};function It(r,s,l){return La(r,s,l)}function La(r,s,{immediate:l,deep:u,flush:f,onTrack:d,onTrigger:v}=st){const b=Et;let y,x=!1,S=!1;if(bt(r)?(y=()=>r.value,x=fd(r)):gi(r)?(y=()=>r,u=!0):je(r)?(S=!0,x=r.some(gi),y=()=>r.map(N=>{if(bt(N))return N.value;if(gi(N))return di(N);if(qe(N))return pn(N,b,2)})):qe(r)?s?y=()=>pn(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return T&&T(),kr(r,b,3,[O])}:y=xr,s&&u){const N=y;y=()=>di(N())}let T,O=N=>{T=V.onStop=()=>{pn(N,b,4)}};if(Co)return O=xr,s?l&&kr(s,b,3,[y(),S?[]:void 0,O]):y(),xr;let A=S?[]:Qf;const H=()=>{if(!!V.active)if(s){const N=V.run();(u||x||(S?N.some((D,I)=>bo(D,A[I])):bo(N,A)))&&(T&&T(),kr(s,b,3,[N,A===Qf?void 0:A,O]),A=N)}else V.run()};H.allowRecurse=!!s;let re;f==="sync"?re=H:f==="post"?re=()=>er(H,b&&b.suspense):re=()=>{!b||b.isMounted?_v(H):H()};const V=new ba(y,re);return s?l?H():A=V.run():f==="post"?er(V.run.bind(V),b&&b.suspense):V.run(),()=>{V.stop(),b&&b.scope&&ga(b.scope.effects,V)}}function Rv(r,s,l){const u=this.proxy,f=Nt(r)?r.includes(".")?_d(u,r):()=>u[r]:r.bind(u,u);let d;qe(s)?d=s:(d=s.handler,l=s);const v=Et;yi(this);const b=La(f,d.bind(u),l);return v?yi(v):Fn(),b}function _d(r,s){const l=s.split(".");return()=>{let u=r;for(let f=0;f<l.length&&u;f++)u=u[l[f]];return u}}function di(r,s){if(!Lt(r)||r.__v_skip||(s=s||new Set,s.has(r)))return r;if(s.add(r),bt(r))di(r.value,s);else if(je(r))for(let l=0;l<r.length;l++)di(r[l],s);else if(Xc(r)||pi(r))r.forEach(l=>{di(l,s)});else if(Qc(r))for(const l in r)di(r[l],s);return r}function Rr(r){return qe(r)?{setup:r,name:r.name}:r}const ks=r=>!!r.type.__asyncLoader,Td=r=>r.type.__isKeepAlive;function Dv(r,s){Ld(r,"a",s)}function Fv(r,s){Ld(r,"da",s)}function Ld(r,s,l=Et){const u=r.__wdc||(r.__wdc=()=>{let f=l;for(;f;){if(f.isDeactivated)return;f=f.parent}return r()});if(Ws(s,u,l),l){let f=l.parent;for(;f&&f.parent;)Td(f.parent.vnode)&&Iv(u,s,l,f),f=f.parent}}function Iv(r,s,l,u){const f=Ws(s,r,u,!0);Od(()=>{ga(u[s],f)},l)}function Ws(r,s,l=Et,u=!1){if(l){const f=l[r]||(l[r]=[]),d=s.__weh||(s.__weh=(...v)=>{if(l.isUnmounted)return;ki(),yi(l);const b=kr(s,l,r,v);return Fn(),Si(),b});return u?f.unshift(d):f.push(d),d}}const Gr=r=>(s,l=Et)=>(!Co||r==="sp")&&Ws(r,s,l),Pd=Gr("bm"),Pa=Gr("m"),Hv=Gr("bu"),Wv=Gr("u"),Bv=Gr("bum"),Od=Gr("um"),jv=Gr("sp"),Uv=Gr("rtg"),Kv=Gr("rtc");function qv(r,s=Et){Ws("ec",r,s)}let ea=!0;function $v(r){const s=Ed(r),l=r.proxy,u=r.ctx;ea=!1,s.beforeCreate&&Vf(s.beforeCreate,r,"bc");const{data:f,computed:d,methods:v,watch:b,provide:y,inject:x,created:S,beforeMount:T,mounted:O,beforeUpdate:A,updated:H,activated:re,deactivated:V,beforeDestroy:N,beforeUnmount:D,destroyed:I,unmounted:B,render:oe,renderTracked:pe,renderTriggered:ye,errorCaptured:We,serverPrefetch:Ee,expose:be,inheritAttrs:de,components:Ne,directives:j,filters:$}=s;if(x&&Gv(x,u,null,r.appContext.config.unwrapInjectedRef),v)for(const Y in v){const ue=v[Y];qe(ue)&&(u[Y]=ue.bind(l))}if(f){const Y=f.call(l,l);Lt(Y)&&(r.data=Ci(Y))}if(ea=!0,d)for(const Y in d){const ue=d[Y],ze=qe(ue)?ue.bind(l,l):qe(ue.get)?ue.get.bind(l,l):xr,Ge=!qe(ue)&&qe(ue.set)?ue.set.bind(l):xr,nt=ct({get:ze,set:Ge});Object.defineProperty(u,Y,{enumerable:!0,configurable:!0,get:()=>nt.value,set:lt=>nt.value=lt})}if(b)for(const Y in b)Md(b[Y],u,l,Y);if(y){const Y=qe(y)?y.call(l):y;Reflect.ownKeys(Y).forEach(ue=>{vs(ue,Y[ue])})}S&&Vf(S,r,"c");function ee(Y,ue){je(ue)?ue.forEach(ze=>Y(ze.bind(l))):ue&&Y(ue.bind(l))}if(ee(Pd,T),ee(Pa,O),ee(Hv,A),ee(Wv,H),ee(Dv,re),ee(Fv,V),ee(qv,We),ee(Kv,pe),ee(Uv,ye),ee(Bv,D),ee(Od,B),ee(jv,Ee),je(be))if(be.length){const Y=r.exposed||(r.exposed={});be.forEach(ue=>{Object.defineProperty(Y,ue,{get:()=>l[ue],set:ze=>l[ue]=ze})})}else r.exposed||(r.exposed={});oe&&r.render===xr&&(r.render=oe),de!=null&&(r.inheritAttrs=de),Ne&&(r.components=Ne),j&&(r.directives=j)}function Gv(r,s,l=xr,u=!1){je(r)&&(r=ta(r));for(const f in r){const d=r[f];let v;Lt(d)?"default"in d?v=qr(d.from||f,d.default,!0):v=qr(d.from||f):v=qr(d),bt(v)&&u?Object.defineProperty(s,f,{enumerable:!0,configurable:!0,get:()=>v.value,set:b=>v.value=b}):s[f]=v}}function Vf(r,s,l){kr(je(r)?r.map(u=>u.bind(s.proxy)):r.bind(s.proxy),s,l)}function Md(r,s,l,u){const f=u.includes(".")?_d(l,u):()=>l[u];if(Nt(r)){const d=s[r];qe(d)&&It(f,d)}else if(qe(r))It(f,r.bind(l));else if(Lt(r))if(je(r))r.forEach(d=>Md(d,s,l,u));else{const d=qe(r.handler)?r.handler.bind(l):s[r.handler];qe(d)&&It(f,d,r)}}function Ed(r){const s=r.type,{mixins:l,extends:u}=s,{mixins:f,optionsCache:d,config:{optionMergeStrategies:v}}=r.appContext,b=d.get(s);let y;return b?y=b:!f.length&&!l&&!u?y=s:(y={},f.length&&f.forEach(x=>Ss(y,x,v,!0)),Ss(y,s,v)),d.set(s,y),y}function Ss(r,s,l,u=!1){const{mixins:f,extends:d}=s;d&&Ss(r,d,l,!0),f&&f.forEach(v=>Ss(r,v,l,!0));for(const v in s)if(!(u&&v==="expose")){const b=Yv[v]||l&&l[v];r[v]=b?b(r[v],s[v]):s[v]}return r}const Yv={data:ec,props:Nn,emits:Nn,methods:Nn,computed:Nn,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:Nn,directives:Nn,watch:Zv,provide:ec,inject:Xv};function ec(r,s){return s?r?function(){return Zt(qe(r)?r.call(this,this):r,qe(s)?s.call(this,this):s)}:s:r}function Xv(r,s){return Nn(ta(r),ta(s))}function ta(r){if(je(r)){const s={};for(let l=0;l<r.length;l++)s[r[l]]=r[l];return s}return r}function Yt(r,s){return r?[...new Set([].concat(r,s))]:s}function Nn(r,s){return r?Zt(Zt(Object.create(null),r),s):s}function Zv(r,s){if(!r)return s;if(!s)return r;const l=Zt(Object.create(null),r);for(const u in s)l[u]=Yt(r[u],s[u]);return l}function Jv(r,s,l,u=!1){const f={},d={};bs(d,Bs,1),r.propsDefaults=Object.create(null),Ad(r,s,f,d);for(const v in r.propsOptions[0])v in f||(f[v]=void 0);l?r.props=u?f:pv(f):r.type.props?r.props=f:r.props=d,r.attrs=d}function Qv(r,s,l,u){const{props:f,attrs:d,vnode:{patchFlag:v}}=r,b=Ve(f),[y]=r.propsOptions;let x=!1;if((u||v>0)&&!(v&16)){if(v&8){const S=r.vnode.dynamicProps;for(let T=0;T<S.length;T++){let O=S[T];if(Hs(r.emitsOptions,O))continue;const A=s[O];if(y)if(Ye(d,O))A!==d[O]&&(d[O]=A,x=!0);else{const H=zr(O);f[H]=ra(y,b,H,A,r,!1)}else A!==d[O]&&(d[O]=A,x=!0)}}}else{Ad(r,s,f,d)&&(x=!0);let S;for(const T in b)(!s||!Ye(s,T)&&((S=xi(T))===T||!Ye(s,S)))&&(y?l&&(l[T]!==void 0||l[S]!==void 0)&&(f[T]=ra(y,b,T,void 0,r,!0)):delete f[T]);if(d!==b)for(const T in d)(!s||!Ye(s,T)&&!0)&&(delete d[T],x=!0)}x&&$r(r,"set","$attrs")}function Ad(r,s,l,u){const[f,d]=r.propsOptions;let v=!1,b;if(s)for(let y in s){if(gs(y))continue;const x=s[y];let S;f&&Ye(f,S=zr(y))?!d||!d.includes(S)?l[S]=x:(b||(b={}))[S]=x:Hs(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,v=!0)}if(d){const y=Ve(l),x=b||st;for(let S=0;S<d.length;S++){const T=d[S];l[T]=ra(f,y,T,x[T],r,!Ye(x,T))}}return v}function ra(r,s,l,u,f,d){const v=r[l];if(v!=null){const b=Ye(v,"default");if(b&&u===void 0){const y=v.default;if(v.type!==Function&&qe(y)){const{propsDefaults:x}=f;l in x?u=x[l]:(yi(f),u=x[l]=y.call(null,s),Fn())}else u=y}v[0]&&(d&&!b?u=!1:v[1]&&(u===""||u===xi(l))&&(u=!0))}return u}function Nd(r,s,l=!1){const u=s.propsCache,f=u.get(r);if(f)return f;const d=r.props,v={},b=[];let y=!1;if(!qe(r)){const S=T=>{y=!0;const[O,A]=Nd(T,s,!0);Zt(v,O),A&&b.push(...A)};!l&&s.mixins.length&&s.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!d&&!y)return u.set(r,hi),hi;if(je(d))for(let S=0;S<d.length;S++){const T=zr(d[S]);tc(T)&&(v[T]=st)}else if(d)for(const S in d){const T=zr(S);if(tc(T)){const O=d[S],A=v[T]=je(O)||qe(O)?{type:O}:O;if(A){const H=ic(Boolean,A.type),re=ic(String,A.type);A[0]=H>-1,A[1]=re<0||H<re,(H>-1||Ye(A,"default"))&&b.push(T)}}}const x=[v,b];return u.set(r,x),x}function tc(r){return r[0]!=="$"}function rc(r){const s=r&&r.toString().match(/^\s*function (\w+)/);return s?s[1]:r===null?"null":""}function nc(r,s){return rc(r)===rc(s)}function ic(r,s){return je(s)?s.findIndex(l=>nc(l,r)):qe(s)&&nc(s,r)?0:-1}const zd=r=>r[0]==="_"||r==="$stable",Oa=r=>je(r)?r.map(Nr):[Nr(r)],Vv=(r,s,l)=>{const u=gn((...f)=>Oa(s(...f)),l);return u._c=!1,u},Rd=(r,s,l)=>{const u=r._ctx;for(const f in r){if(zd(f))continue;const d=r[f];if(qe(d))s[f]=Vv(f,d,u);else if(d!=null){const v=Oa(d);s[f]=()=>v}}},Dd=(r,s)=>{const l=Oa(s);r.slots.default=()=>l},em=(r,s)=>{if(r.vnode.shapeFlag&32){const l=s._;l?(r.slots=Ve(s),bs(s,"_",l)):Rd(s,r.slots={})}else r.slots={},s&&Dd(r,s);bs(r.slots,Bs,1)},tm=(r,s,l)=>{const{vnode:u,slots:f}=r;let d=!0,v=st;if(u.shapeFlag&32){const b=s._;b?l&&b===1?d=!1:(Zt(f,s),!l&&b===1&&delete f._):(d=!s.$stable,Rd(s,f)),v=s}else s&&(Dd(r,s),v={default:1});if(d)for(const b in f)!zd(b)&&!(b in v)&&delete f[b]};function En(r,s,l,u){const f=r.dirs,d=s&&s.dirs;for(let v=0;v<f.length;v++){const b=f[v];d&&(b.oldValue=d[v].value);let y=b.dir[u];y&&(ki(),kr(y,l,8,[r.el,b,r,s]),Si())}}function Fd(){return{app:null,config:{isNativeTag:Eg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let rm=0;function nm(r,s){return function(u,f=null){qe(u)||(u=Object.assign({},u)),f!=null&&!Lt(f)&&(f=null);const d=Fd(),v=new Set;let b=!1;const y=d.app={_uid:rm++,_component:u,_props:f,_container:null,_context:d,_instance:null,version:Cm,get config(){return d.config},set config(x){},use(x,...S){return v.has(x)||(x&&qe(x.install)?(v.add(x),x.install(y,...S)):qe(x)&&(v.add(x),x(y,...S))),y},mixin(x){return d.mixins.includes(x)||d.mixins.push(x),y},component(x,S){return S?(d.components[x]=S,y):d.components[x]},directive(x,S){return S?(d.directives[x]=S,y):d.directives[x]},mount(x,S,T){if(!b){const O=ot(u,f);return O.appContext=d,S&&s?s(O,x):r(O,x,T),b=!0,y._container=x,x.__vue_app__=y,Na(O.component)||O.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,S){return d.provides[x]=S,y}};return y}}function na(r,s,l,u,f=!1){if(je(r)){r.forEach((O,A)=>na(O,s&&(je(s)?s[A]:s),l,u,f));return}if(ks(u)&&!f)return;const d=u.shapeFlag&4?Na(u.component)||u.component.proxy:u.el,v=f?null:d,{i:b,r:y}=r,x=s&&s.r,S=b.refs===st?b.refs={}:b.refs,T=b.setupState;if(x!=null&&x!==y&&(Nt(x)?(S[x]=null,Ye(T,x)&&(T[x]=null)):bt(x)&&(x.value=null)),qe(y))pn(y,b,12,[v,S]);else{const O=Nt(y),A=bt(y);if(O||A){const H=()=>{if(r.f){const re=O?S[y]:y.value;f?je(re)&&ga(re,d):je(re)?re.includes(d)||re.push(d):O?(S[y]=[d],Ye(T,y)&&(T[y]=S[y])):(y.value=[d],r.k&&(S[r.k]=y.value))}else O?(S[y]=v,Ye(T,y)&&(T[y]=v)):bt(y)&&(y.value=v,r.k&&(S[r.k]=v))};v?(H.id=-1,er(H,l)):H()}}}const er=Nv;function im(r){return om(r)}function om(r,s){const l=Ig();l.__VUE__=!0;const{insert:u,remove:f,patchProp:d,createElement:v,createText:b,createComment:y,setText:x,setElementText:S,parentNode:T,nextSibling:O,setScopeId:A=xr,cloneNode:H,insertStaticContent:re}=r,V=(_,E,F,G=null,J=null,ne=null,fe=!1,ce=null,te=!!E.dynamicChildren)=>{if(_===E)return;_&&!lo(_,E)&&(G=se(_),Ie(_,J,ne,!0),_=null),E.patchFlag===-2&&(te=!1,E.dynamicChildren=null);const{type:L,ref:W,shapeFlag:z}=E;switch(L){case Ma:N(_,E,F,G);break;case mn:D(_,E,F,G);break;case jl:_==null&&I(E,F,G,fe);break;case rr:j(_,E,F,G,J,ne,fe,ce,te);break;default:z&1?pe(_,E,F,G,J,ne,fe,ce,te):z&6?$(_,E,F,G,J,ne,fe,ce,te):(z&64||z&128)&&L.process(_,E,F,G,J,ne,fe,ce,te,Se)}W!=null&&J&&na(W,_&&_.ref,ne,E||_,!E)},N=(_,E,F,G)=>{if(_==null)u(E.el=b(E.children),F,G);else{const J=E.el=_.el;E.children!==_.children&&x(J,E.children)}},D=(_,E,F,G)=>{_==null?u(E.el=y(E.children||""),F,G):E.el=_.el},I=(_,E,F,G)=>{[_.el,_.anchor]=re(_.children,E,F,G,_.el,_.anchor)},B=({el:_,anchor:E},F,G)=>{let J;for(;_&&_!==E;)J=O(_),u(_,F,G),_=J;u(E,F,G)},oe=({el:_,anchor:E})=>{let F;for(;_&&_!==E;)F=O(_),f(_),_=F;f(E)},pe=(_,E,F,G,J,ne,fe,ce,te)=>{fe=fe||E.type==="svg",_==null?ye(E,F,G,J,ne,fe,ce,te):be(_,E,J,ne,fe,ce,te)},ye=(_,E,F,G,J,ne,fe,ce)=>{let te,L;const{type:W,props:z,shapeFlag:he,transition:Le,patchFlag:Be,dirs:tt}=_;if(_.el&&H!==void 0&&Be===-1)te=_.el=H(_.el);else{if(te=_.el=v(_.type,ne,z&&z.is,z),he&8?S(te,_.children):he&16&&Ee(_.children,te,null,G,J,ne&&W!=="foreignObject",fe,ce),tt&&En(_,null,G,"created"),z){for(const He in z)He!=="value"&&!gs(He)&&d(te,He,null,z[He],ne,_.children,G,J,K);"value"in z&&d(te,"value",null,z.value),(L=z.onVnodeBeforeMount)&&Er(L,G,_)}We(te,_,_.scopeId,fe,G)}tt&&En(_,null,G,"beforeMount");const Ke=(!J||J&&!J.pendingBranch)&&Le&&!Le.persisted;Ke&&Le.beforeEnter(te),u(te,E,F),((L=z&&z.onVnodeMounted)||Ke||tt)&&er(()=>{L&&Er(L,G,_),Ke&&Le.enter(te),tt&&En(_,null,G,"mounted")},J)},We=(_,E,F,G,J)=>{if(F&&A(_,F),G)for(let ne=0;ne<G.length;ne++)A(_,G[ne]);if(J){let ne=J.subTree;if(E===ne){const fe=J.vnode;We(_,fe,fe.scopeId,fe.slotScopeIds,J.parent)}}},Ee=(_,E,F,G,J,ne,fe,ce,te=0)=>{for(let L=te;L<_.length;L++){const W=_[L]=ce?cn(_[L]):Nr(_[L]);V(null,W,E,F,G,J,ne,fe,ce)}},be=(_,E,F,G,J,ne,fe)=>{const ce=E.el=_.el;let{patchFlag:te,dynamicChildren:L,dirs:W}=E;te|=_.patchFlag&16;const z=_.props||st,he=E.props||st;let Le;F&&An(F,!1),(Le=he.onVnodeBeforeUpdate)&&Er(Le,F,E,_),W&&En(E,_,F,"beforeUpdate"),F&&An(F,!0);const Be=J&&E.type!=="foreignObject";if(L?de(_.dynamicChildren,L,ce,F,G,Be,ne):fe||ze(_,E,ce,null,F,G,Be,ne,!1),te>0){if(te&16)Ne(ce,E,z,he,F,G,J);else if(te&2&&z.class!==he.class&&d(ce,"class",null,he.class,J),te&4&&d(ce,"style",z.style,he.style,J),te&8){const tt=E.dynamicProps;for(let Ke=0;Ke<tt.length;Ke++){const He=tt[Ke],xt=z[He],vt=he[He];(vt!==xt||He==="value")&&d(ce,He,xt,vt,J,_.children,F,G,K)}}te&1&&_.children!==E.children&&S(ce,E.children)}else!fe&&L==null&&Ne(ce,E,z,he,F,G,J);((Le=he.onVnodeUpdated)||W)&&er(()=>{Le&&Er(Le,F,E,_),W&&En(E,_,F,"updated")},G)},de=(_,E,F,G,J,ne,fe)=>{for(let ce=0;ce<E.length;ce++){const te=_[ce],L=E[ce],W=te.el&&(te.type===rr||!lo(te,L)||te.shapeFlag&70)?T(te.el):F;V(te,L,W,null,G,J,ne,fe,!0)}},Ne=(_,E,F,G,J,ne,fe)=>{if(F!==G){for(const ce in G){if(gs(ce))continue;const te=G[ce],L=F[ce];te!==L&&ce!=="value"&&d(_,ce,L,te,fe,E.children,J,ne,K)}if(F!==st)for(const ce in F)!gs(ce)&&!(ce in G)&&d(_,ce,F[ce],null,fe,E.children,J,ne,K);"value"in G&&d(_,"value",F.value,G.value)}},j=(_,E,F,G,J,ne,fe,ce,te)=>{const L=E.el=_?_.el:b(""),W=E.anchor=_?_.anchor:b("");let{patchFlag:z,dynamicChildren:he,slotScopeIds:Le}=E;Le&&(ce=ce?ce.concat(Le):Le),_==null?(u(L,F,G),u(W,F,G),Ee(E.children,F,W,J,ne,fe,ce,te)):z>0&&z&64&&he&&_.dynamicChildren?(de(_.dynamicChildren,he,F,J,ne,fe,ce),(E.key!=null||J&&E===J.subTree)&&Id(_,E,!0)):ze(_,E,F,W,J,ne,fe,ce,te)},$=(_,E,F,G,J,ne,fe,ce,te)=>{E.slotScopeIds=ce,_==null?E.shapeFlag&512?J.ctx.activate(E,F,G,fe,te):w(E,F,G,J,ne,fe,te):ee(_,E,te)},w=(_,E,F,G,J,ne,fe)=>{const ce=_.component=mm(_,G,J);if(Td(_)&&(ce.ctx.renderer=Se),ym(ce),ce.asyncDep){if(J&&J.registerDep(ce,Y),!_.el){const te=ce.subTree=ot(mn);D(null,te,E,F)}return}Y(ce,_,E,F,J,ne,fe)},ee=(_,E,F)=>{const G=E.component=_.component;if(Mv(_,E,F))if(G.asyncDep&&!G.asyncResolved){ue(G,E,F);return}else G.next=E,Cv(G.update),G.update();else E.component=_.component,E.el=_.el,G.vnode=E},Y=(_,E,F,G,J,ne,fe)=>{const ce=()=>{if(_.isMounted){let{next:W,bu:z,u:he,parent:Le,vnode:Be}=_,tt=W,Ke;An(_,!1),W?(W.el=Be.el,ue(_,W,fe)):W=Be,z&&Wl(z),(Ke=W.props&&W.props.onVnodeBeforeUpdate)&&Er(Ke,Le,W,Be),An(_,!0);const He=Bl(_),xt=_.subTree;_.subTree=He,V(xt,He,T(xt.el),se(xt),_,J,ne),W.el=He.el,tt===null&&Ev(_,He.el),he&&er(he,J),(Ke=W.props&&W.props.onVnodeUpdated)&&er(()=>Er(Ke,Le,W,Be),J)}else{let W;const{el:z,props:he}=E,{bm:Le,m:Be,parent:tt}=_,Ke=ks(E);if(An(_,!1),Le&&Wl(Le),!Ke&&(W=he&&he.onVnodeBeforeMount)&&Er(W,tt,E),An(_,!0),z&&Te){const He=()=>{_.subTree=Bl(_),Te(z,_.subTree,_,J,null)};Ke?E.type.__asyncLoader().then(()=>!_.isUnmounted&&He()):He()}else{const He=_.subTree=Bl(_);V(null,He,F,G,_,J,ne),E.el=He.el}if(Be&&er(Be,J),!Ke&&(W=he&&he.onVnodeMounted)){const He=E;er(()=>Er(W,tt,He),J)}E.shapeFlag&256&&_.a&&er(_.a,J),_.isMounted=!0,E=F=G=null}},te=_.effect=new ba(ce,()=>yd(_.update),_.scope),L=_.update=te.run.bind(te);L.id=_.uid,An(_,!0),L()},ue=(_,E,F)=>{E.component=_;const G=_.vnode.props;_.vnode=E,_.next=null,Qv(_,E.props,G,F),tm(_,E.children,F),ki(),Ta(void 0,_.update),Si()},ze=(_,E,F,G,J,ne,fe,ce,te=!1)=>{const L=_&&_.children,W=_?_.shapeFlag:0,z=E.children,{patchFlag:he,shapeFlag:Le}=E;if(he>0){if(he&128){nt(L,z,F,G,J,ne,fe,ce,te);return}else if(he&256){Ge(L,z,F,G,J,ne,fe,ce,te);return}}Le&8?(W&16&&K(L,J,ne),z!==L&&S(F,z)):W&16?Le&16?nt(L,z,F,G,J,ne,fe,ce,te):K(L,J,ne,!0):(W&8&&S(F,""),Le&16&&Ee(z,F,G,J,ne,fe,ce,te))},Ge=(_,E,F,G,J,ne,fe,ce,te)=>{_=_||hi,E=E||hi;const L=_.length,W=E.length,z=Math.min(L,W);let he;for(he=0;he<z;he++){const Le=E[he]=te?cn(E[he]):Nr(E[he]);V(_[he],Le,F,null,J,ne,fe,ce,te)}L>W?K(_,J,ne,!0,!1,z):Ee(E,F,G,J,ne,fe,ce,te,z)},nt=(_,E,F,G,J,ne,fe,ce,te)=>{let L=0;const W=E.length;let z=_.length-1,he=W-1;for(;L<=z&&L<=he;){const Le=_[L],Be=E[L]=te?cn(E[L]):Nr(E[L]);if(lo(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;L++}for(;L<=z&&L<=he;){const Le=_[z],Be=E[he]=te?cn(E[he]):Nr(E[he]);if(lo(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;z--,he--}if(L>z){if(L<=he){const Le=he+1,Be=Le<W?E[Le].el:G;for(;L<=he;)V(null,E[L]=te?cn(E[L]):Nr(E[L]),F,Be,J,ne,fe,ce,te),L++}}else if(L>he)for(;L<=z;)Ie(_[L],J,ne,!0),L++;else{const Le=L,Be=L,tt=new Map;for(L=Be;L<=he;L++){const et=E[L]=te?cn(E[L]):Nr(E[L]);et.key!=null&&tt.set(et.key,L)}let Ke,He=0;const xt=he-Be+1;let vt=!1,cr=0;const Pe=new Array(xt);for(L=0;L<xt;L++)Pe[L]=0;for(L=Le;L<=z;L++){const et=_[L];if(He>=xt){Ie(et,J,ne,!0);continue}let Oe;if(et.key!=null)Oe=tt.get(et.key);else for(Ke=Be;Ke<=he;Ke++)if(Pe[Ke-Be]===0&&lo(et,E[Ke])){Oe=Ke;break}Oe===void 0?Ie(et,J,ne,!0):(Pe[Oe-Be]=L+1,Oe>=cr?cr=Oe:vt=!0,V(et,E[Oe],F,null,J,ne,fe,ce,te),He++)}const Dr=vt?sm(Pe):hi;for(Ke=Dr.length-1,L=xt-1;L>=0;L--){const et=Be+L,Oe=E[et],ut=et+1<W?E[et+1].el:G;Pe[L]===0?V(null,Oe,F,ut,J,ne,fe,ce,te):vt&&(Ke<0||L!==Dr[Ke]?lt(Oe,F,ut,2):Ke--)}}},lt=(_,E,F,G,J=null)=>{const{el:ne,type:fe,transition:ce,children:te,shapeFlag:L}=_;if(L&6){lt(_.component.subTree,E,F,G);return}if(L&128){_.suspense.move(E,F,G);return}if(L&64){fe.move(_,E,F,Se);return}if(fe===rr){u(ne,E,F);for(let z=0;z<te.length;z++)lt(te[z],E,F,G);u(_.anchor,E,F);return}if(fe===jl){B(_,E,F);return}if(G!==2&&L&1&&ce)if(G===0)ce.beforeEnter(ne),u(ne,E,F),er(()=>ce.enter(ne),J);else{const{leave:z,delayLeave:he,afterLeave:Le}=ce,Be=()=>u(ne,E,F),tt=()=>{z(ne,()=>{Be(),Le&&Le()})};he?he(ne,Be,tt):tt()}else u(ne,E,F)},Ie=(_,E,F,G=!1,J=!1)=>{const{type:ne,props:fe,ref:ce,children:te,dynamicChildren:L,shapeFlag:W,patchFlag:z,dirs:he}=_;if(ce!=null&&na(ce,null,F,_,!0),W&256){E.ctx.deactivate(_);return}const Le=W&1&&he,Be=!ks(_);let tt;if(Be&&(tt=fe&&fe.onVnodeBeforeUnmount)&&Er(tt,E,_),W&6)Z(_.component,F,G);else{if(W&128){_.suspense.unmount(F,G);return}Le&&En(_,null,E,"beforeUnmount"),W&64?_.type.remove(_,E,F,J,Se,G):L&&(ne!==rr||z>0&&z&64)?K(L,E,F,!1,!0):(ne===rr&&z&384||!J&&W&16)&&K(te,E,F),G&&Je(_)}(Be&&(tt=fe&&fe.onVnodeUnmounted)||Le)&&er(()=>{tt&&Er(tt,E,_),Le&&En(_,null,E,"unmounted")},F)},Je=_=>{const{type:E,el:F,anchor:G,transition:J}=_;if(E===rr){q(F,G);return}if(E===jl){oe(_);return}const ne=()=>{f(F),J&&!J.persisted&&J.afterLeave&&J.afterLeave()};if(_.shapeFlag&1&&J&&!J.persisted){const{leave:fe,delayLeave:ce}=J,te=()=>fe(F,ne);ce?ce(_.el,ne,te):te()}else ne()},q=(_,E)=>{let F;for(;_!==E;)F=O(_),f(_),_=F;f(E)},Z=(_,E,F)=>{const{bum:G,scope:J,update:ne,subTree:fe,um:ce}=_;G&&Wl(G),J.stop(),ne&&(ne.active=!1,Ie(fe,_,E,F)),ce&&er(ce,E),er(()=>{_.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},K=(_,E,F,G=!1,J=!1,ne=0)=>{for(let fe=ne;fe<_.length;fe++)Ie(_[fe],E,F,G,J)},se=_=>_.shapeFlag&6?se(_.component.subTree):_.shapeFlag&128?_.suspense.next():O(_.anchor||_.el),Ce=(_,E,F)=>{_==null?E._vnode&&Ie(E._vnode,null,null,!0):V(E._vnode||null,_,E,null,null,null,F),xd(),E._vnode=_},Se={p:V,um:Ie,m:lt,r:Je,mt:w,mc:Ee,pc:ze,pbc:de,n:se,o:r};let ge,Te;return s&&([ge,Te]=s(Se)),{render:Ce,hydrate:ge,createApp:nm(Ce,ge)}}function An({effect:r,update:s},l){r.allowRecurse=s.allowRecurse=l}function Id(r,s,l=!1){const u=r.children,f=s.children;if(je(u)&&je(f))for(let d=0;d<u.length;d++){const v=u[d];let b=f[d];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=f[d]=cn(f[d]),b.el=v.el),l||Id(v,b))}}function sm(r){const s=r.slice(),l=[0];let u,f,d,v,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(f=l[l.length-1],r[f]<x){s[u]=f,l.push(u);continue}for(d=0,v=l.length-1;d<v;)b=d+v>>1,r[l[b]]<x?d=b+1:v=b;x<r[l[d]]&&(d>0&&(s[u]=l[d-1]),l[d]=u)}}for(d=l.length,v=l[d-1];d-- >0;)l[d]=v,v=s[v];return l}const lm=r=>r.__isTeleport,Hd="components";function Cs(r,s){return um(Hd,r,!0,s)||r}const am=Symbol();function um(r,s,l=!0,u=!1){const f=Xt||Et;if(f){const d=f.type;if(r===Hd){const b=km(d);if(b&&(b===s||b===zr(s)||b===Rs(zr(s))))return d}const v=oc(f[r]||d[r],s)||oc(f.appContext[r],s);return!v&&u?d:v}}function oc(r,s){return r&&(r[s]||r[zr(s)]||r[Rs(zr(s))])}const rr=Symbol(void 0),Ma=Symbol(void 0),mn=Symbol(void 0),jl=Symbol(void 0),go=[];let Dn=null;function gt(r=!1){go.push(Dn=r?null:[])}function fm(){go.pop(),Dn=go[go.length-1]||null}let _s=1;function sc(r){_s+=r}function Wd(r){return r.dynamicChildren=_s>0?Dn||hi:null,fm(),_s>0&&Dn&&Dn.push(r),r}function Bt(r,s,l,u,f,d){return Wd(Fe(r,s,l,u,f,d,!0))}function mi(r,s,l,u,f){return Wd(ot(r,s,l,u,f,!0))}function Ts(r){return r?r.__v_isVNode===!0:!1}function lo(r,s){return r.type===s.type&&r.key===s.key}const Bs="__vInternal",Bd=({key:r})=>r!=null?r:null,ms=({ref:r,ref_key:s,ref_for:l})=>r!=null?Nt(r)||bt(r)||qe(r)?{i:Xt,r,k:s,f:!!l}:r:null;function Fe(r,s=null,l=null,u=0,f=null,d=r===rr?0:1,v=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:s,key:s&&Bd(s),ref:s&&ms(s),scopeId:Cd,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:u,dynamicProps:f,dynamicChildren:null,appContext:null};return b?(Ea(y,l),d&128&&r.normalize(y)):l&&(y.shapeFlag|=Nt(l)?8:16),_s>0&&!v&&Dn&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&Dn.push(y),y}const ot=cm;function cm(r,s=null,l=null,u=0,f=null,d=!1){if((!r||r===am)&&(r=mn),Ts(r)){const b=So(r,s,!0);return l&&Ea(b,l),b}if(Sm(r)&&(r=r.__vccOpts),s){s=dm(s);let{class:b,style:y}=s;b&&!Nt(b)&&(s.class=vi(b)),Lt(y)&&(cd(y)&&!je(y)&&(y=Zt({},y)),s.style=To(y))}const v=Nt(r)?1:Av(r)?128:lm(r)?64:Lt(r)?4:qe(r)?2:0;return Fe(r,s,l,u,f,v,d,!0)}function dm(r){return r?cd(r)||Bs in r?Zt({},r):r:null}function So(r,s,l=!1){const{props:u,ref:f,patchFlag:d,children:v}=r,b=s?hm(u||{},s):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&Bd(b),ref:s&&s.ref?l&&f?je(f)?f.concat(ms(s)):[f,ms(s)]:ms(s):f,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:v,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:s&&r.type!==rr?d===-1?16:d|16:d,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&So(r.ssContent),ssFallback:r.ssFallback&&So(r.ssFallback),el:r.el,anchor:r.anchor}}function Ar(r=" ",s=0){return ot(Ma,null,r,s)}function Ls(r="",s=!1){return s?(gt(),mi(mn,null,r)):ot(mn,null,r)}function Nr(r){return r==null||typeof r=="boolean"?ot(mn):je(r)?ot(rr,null,r.slice()):typeof r=="object"?cn(r):ot(Ma,null,String(r))}function cn(r){return r.el===null||r.memo?r:So(r)}function Ea(r,s){let l=0;const{shapeFlag:u}=r;if(s==null)s=null;else if(je(s))l=16;else if(typeof s=="object")if(u&65){const f=s.default;f&&(f._c&&(f._d=!1),Ea(r,f()),f._c&&(f._d=!0));return}else{l=32;const f=s._;!f&&!(Bs in s)?s._ctx=Xt:f===3&&Xt&&(Xt.slots._===1?s._=1:(s._=2,r.patchFlag|=1024))}else qe(s)?(s={default:s,_ctx:Xt},l=32):(s=String(s),u&64?(l=16,s=[Ar(s)]):l=8);r.children=s,r.shapeFlag|=l}function hm(...r){const s={};for(let l=0;l<r.length;l++){const u=r[l];for(const f in u)if(f==="class")s.class!==u.class&&(s.class=vi([s.class,u.class]));else if(f==="style")s.style=To([s.style,u.style]);else if(As(f)){const d=s[f],v=u[f];v&&d!==v&&!(je(d)&&d.includes(v))&&(s[f]=d?[].concat(d,v):v)}else f!==""&&(s[f]=u[f])}return s}function Er(r,s,l,u=null){kr(r,s,7,[l,u])}function lc(r,s,l,u){let f;const d=l&&l[u];if(je(r)||Nt(r)){f=new Array(r.length);for(let v=0,b=r.length;v<b;v++)f[v]=s(r[v],v,void 0,d&&d[v])}else if(typeof r=="number"){f=new Array(r);for(let v=0;v<r;v++)f[v]=s(v+1,v,void 0,d&&d[v])}else if(Lt(r))if(r[Symbol.iterator])f=Array.from(r,(v,b)=>s(v,b,void 0,d&&d[b]));else{const v=Object.keys(r);f=new Array(v.length);for(let b=0,y=v.length;b<y;b++){const x=v[b];f[b]=s(r[x],x,b,d&&d[b])}}else f=[];return l&&(l[u]=f),f}function jd(r,s,l={},u,f){if(Xt.isCE||Xt.parent&&ks(Xt.parent)&&Xt.parent.isCE)return ot("slot",s==="default"?null:{name:s},u&&u());let d=r[s];d&&d._c&&(d._d=!1),gt();const v=d&&Ud(d(l)),b=mi(rr,{key:l.key||`_${s}`},v||(u?u():[]),v&&r._===1?64:-2);return!f&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function Ud(r){return r.some(s=>Ts(s)?!(s.type===mn||s.type===rr&&!Ud(s.children)):!0)?r:null}const ia=r=>r?Kd(r)?Na(r)||r.proxy:ia(r.parent):null,Ps=Zt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>ia(r.parent),$root:r=>ia(r.root),$emit:r=>r.emit,$options:r=>Ed(r),$forceUpdate:r=>()=>yd(r.update),$nextTick:r=>Is.bind(r.proxy),$watch:r=>Rv.bind(r)}),pm={get({_:r},s){const{ctx:l,setupState:u,data:f,props:d,accessCache:v,type:b,appContext:y}=r;let x;if(s[0]!=="$"){const A=v[s];if(A!==void 0)switch(A){case 1:return u[s];case 2:return f[s];case 4:return l[s];case 3:return d[s]}else{if(u!==st&&Ye(u,s))return v[s]=1,u[s];if(f!==st&&Ye(f,s))return v[s]=2,f[s];if((x=r.propsOptions[0])&&Ye(x,s))return v[s]=3,d[s];if(l!==st&&Ye(l,s))return v[s]=4,l[s];ea&&(v[s]=0)}}const S=Ps[s];let T,O;if(S)return s==="$attrs"&&fr(r,"get",s),S(r);if((T=b.__cssModules)&&(T=T[s]))return T;if(l!==st&&Ye(l,s))return v[s]=4,l[s];if(O=y.config.globalProperties,Ye(O,s))return O[s]},set({_:r},s,l){const{data:u,setupState:f,ctx:d}=r;return f!==st&&Ye(f,s)?(f[s]=l,!0):u!==st&&Ye(u,s)?(u[s]=l,!0):Ye(r.props,s)||s[0]==="$"&&s.slice(1)in r?!1:(d[s]=l,!0)},has({_:{data:r,setupState:s,accessCache:l,ctx:u,appContext:f,propsOptions:d}},v){let b;return!!l[v]||r!==st&&Ye(r,v)||s!==st&&Ye(s,v)||(b=d[0])&&Ye(b,v)||Ye(u,v)||Ye(Ps,v)||Ye(f.config.globalProperties,v)},defineProperty(r,s,l){return l.get!=null?r._.accessCache[s]=0:Ye(l,"value")&&this.set(r,s,l.value,null),Reflect.defineProperty(r,s,l)}},gm=Fd();let vm=0;function mm(r,s,l){const u=r.type,f=(s?s.appContext:r.appContext)||gm,d={uid:vm++,vnode:r,type:u,parent:s,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new Hg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:s?s.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Nd(u,f),emitsOptions:Sd(u,f),emit:null,emitted:null,propsDefaults:st,inheritAttrs:u.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:l,suspenseId:l?l.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=s?s.root:d,d.emit=Lv.bind(null,d),r.ce&&r.ce(d),d}let Et=null;const Aa=()=>Et||Xt,yi=r=>{Et=r,r.scope.on()},Fn=()=>{Et&&Et.scope.off(),Et=null};function Kd(r){return r.vnode.shapeFlag&4}let Co=!1;function ym(r,s=!1){Co=s;const{props:l,children:u}=r.vnode,f=Kd(r);Jv(r,l,f,s),em(r,u);const d=f?bm(r,s):void 0;return Co=!1,d}function bm(r,s){const l=r.type;r.accessCache=Object.create(null),r.proxy=dd(new Proxy(r.ctx,pm));const{setup:u}=l;if(u){const f=r.setupContext=u.length>1?xm(r):null;yi(r),ki();const d=pn(u,r,0,[r.props,f]);if(Si(),Fn(),Zc(d)){if(d.then(Fn,Fn),s)return d.then(v=>{ac(r,v,s)}).catch(v=>{Fs(v,r,0)});r.asyncDep=d}else ac(r,d,s)}else qd(r,s)}function ac(r,s,l){qe(s)?r.type.__ssrInlineRender?r.ssrRender=s:r.render=s:Lt(s)&&(r.setupState=vd(s)),qd(r,l)}let uc;function qd(r,s,l){const u=r.type;if(!r.render){if(!s&&uc&&!u.render){const f=u.template;if(f){const{isCustomElement:d,compilerOptions:v}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Zt(Zt({isCustomElement:d,delimiters:b},v),y);u.render=uc(f,x)}}r.render=u.render||xr}yi(r),ki(),$v(r),Si(),Fn()}function wm(r){return new Proxy(r.attrs,{get(s,l){return fr(r,"get","$attrs"),s[l]}})}function xm(r){const s=u=>{r.exposed=u||{}};let l;return{get attrs(){return l||(l=wm(r))},slots:r.slots,emit:r.emit,expose:s}}function Na(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(vd(dd(r.exposed)),{get(s,l){if(l in s)return s[l];if(l in Ps)return Ps[l](r)}}))}function km(r){return qe(r)&&r.displayName||r.name}function Sm(r){return qe(r)&&"__vccOpts"in r}const ct=(r,s)=>xv(r,s,Co);function za(r,s,l){const u=arguments.length;return u===2?Lt(s)&&!je(s)?Ts(s)?ot(r,null,[s]):ot(r,s):ot(r,null,s):(u>3?l=Array.prototype.slice.call(arguments,2):u===3&&Ts(l)&&(l=[l]),ot(r,s,l))}const Cm="3.2.33",_m="http://www.w3.org/2000/svg",zn=typeof document!="undefined"?document:null,fc=zn&&zn.createElement("template"),Tm={insert:(r,s,l)=>{s.insertBefore(r,l||null)},remove:r=>{const s=r.parentNode;s&&s.removeChild(r)},createElement:(r,s,l,u)=>{const f=s?zn.createElementNS(_m,r):zn.createElement(r,l?{is:l}:void 0);return r==="select"&&u&&u.multiple!=null&&f.setAttribute("multiple",u.multiple),f},createText:r=>zn.createTextNode(r),createComment:r=>zn.createComment(r),setText:(r,s)=>{r.nodeValue=s},setElementText:(r,s)=>{r.textContent=s},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>zn.querySelector(r),setScopeId(r,s){r.setAttribute(s,"")},cloneNode(r){const s=r.cloneNode(!0);return"_value"in r&&(s._value=r._value),s},insertStaticContent(r,s,l,u,f,d){const v=l?l.previousSibling:s.lastChild;if(f&&(f===d||f.nextSibling))for(;s.insertBefore(f.cloneNode(!0),l),!(f===d||!(f=f.nextSibling)););else{fc.innerHTML=u?`<svg>${r}</svg>`:r;const b=fc.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}s.insertBefore(b,l)}return[v?v.nextSibling:s.firstChild,l?l.previousSibling:s.lastChild]}};function Lm(r,s,l){const u=r._vtc;u&&(s=(s?[s,...u]:[...u]).join(" ")),s==null?r.removeAttribute("class"):l?r.setAttribute("class",s):r.className=s}function Pm(r,s,l){const u=r.style,f=Nt(l);if(l&&!f){for(const d in l)oa(u,d,l[d]);if(s&&!Nt(s))for(const d in s)l[d]==null&&oa(u,d,"")}else{const d=u.display;f?s!==l&&(u.cssText=l):s&&r.removeAttribute("style"),"_vod"in r&&(u.display=d)}}const cc=/\s*!important$/;function oa(r,s,l){if(je(l))l.forEach(u=>oa(r,s,u));else if(l==null&&(l=""),s.startsWith("--"))r.setProperty(s,l);else{const u=Om(r,s);cc.test(l)?r.setProperty(xi(u),l.replace(cc,""),"important"):r[u]=l}}const dc=["Webkit","Moz","ms"],Ul={};function Om(r,s){const l=Ul[s];if(l)return l;let u=zr(s);if(u!=="filter"&&u in r)return Ul[s]=u;u=Rs(u);for(let f=0;f<dc.length;f++){const d=dc[f]+u;if(d in r)return Ul[s]=d}return s}const hc="http://www.w3.org/1999/xlink";function Mm(r,s,l,u,f){if(u&&s.startsWith("xlink:"))l==null?r.removeAttributeNS(hc,s.slice(6,s.length)):r.setAttributeNS(hc,s,l);else{const d=Lg(s);l==null||d&&!Gc(l)?r.removeAttribute(s):r.setAttribute(s,d?"":l)}}function Em(r,s,l,u,f,d,v){if(s==="innerHTML"||s==="textContent"){u&&v(u,f,d),r[s]=l==null?"":l;return}if(s==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=l;const y=l==null?"":l;(r.value!==y||r.tagName==="OPTION")&&(r.value=y),l==null&&r.removeAttribute(s);return}let b=!1;if(l===""||l==null){const y=typeof r[s];y==="boolean"?l=Gc(l):l==null&&y==="string"?(l="",b=!0):y==="number"&&(l=0,b=!0)}try{r[s]=l}catch{}b&&r.removeAttribute(s)}const[$d,Am]=(()=>{let r=Date.now,s=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(r=()=>performance.now());const l=navigator.userAgent.match(/firefox\/(\d+)/i);s=!!(l&&Number(l[1])<=53)}return[r,s]})();let sa=0;const Nm=Promise.resolve(),zm=()=>{sa=0},Rm=()=>sa||(Nm.then(zm),sa=$d());function Dm(r,s,l,u){r.addEventListener(s,l,u)}function Fm(r,s,l,u){r.removeEventListener(s,l,u)}function Im(r,s,l,u,f=null){const d=r._vei||(r._vei={}),v=d[s];if(u&&v)v.value=u;else{const[b,y]=Hm(s);if(u){const x=d[s]=Wm(u,f);Dm(r,b,x,y)}else v&&(Fm(r,b,v,y),d[s]=void 0)}}const pc=/(?:Once|Passive|Capture)$/;function Hm(r){let s;if(pc.test(r)){s={};let l;for(;l=r.match(pc);)r=r.slice(0,r.length-l[0].length),s[l[0].toLowerCase()]=!0}return[xi(r.slice(2)),s]}function Wm(r,s){const l=u=>{const f=u.timeStamp||$d();(Am||f>=l.attached-1)&&kr(Bm(u,l.value),s,5,[u])};return l.value=r,l.attached=Rm(),l}function Bm(r,s){if(je(s)){const l=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{l.call(r),r._stopped=!0},s.map(u=>f=>!f._stopped&&u&&u(f))}else return s}const gc=/^on[a-z]/,jm=(r,s,l,u,f=!1,d,v,b,y)=>{s==="class"?Lm(r,u,f):s==="style"?Pm(r,l,u):As(s)?pa(s)||Im(r,s,l,u,v):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):Um(r,s,u,f))?Em(r,s,u,d,v,b,y):(s==="true-value"?r._trueValue=u:s==="false-value"&&(r._falseValue=u),Mm(r,s,u,f))};function Um(r,s,l,u){return u?!!(s==="innerHTML"||s==="textContent"||s in r&&gc.test(s)&&qe(l)):s==="spellcheck"||s==="draggable"||s==="translate"||s==="form"||s==="list"&&r.tagName==="INPUT"||s==="type"&&r.tagName==="TEXTAREA"||gc.test(s)&&Nt(l)?!1:s in r}const Km=Zt({patchProp:jm},Tm);let vc;function qm(){return vc||(vc=im(Km))}const $m=(...r)=>{const s=qm().createApp(...r),{mount:l}=s;return s.mount=u=>{const f=Gm(u);if(!f)return;const d=s._component;!qe(d)&&!d.render&&!d.template&&(d.template=f.innerHTML),f.innerHTML="";const v=l(f,!1,f instanceof SVGElement);return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),v},s};function Gm(r){return Nt(r)?document.querySelector(r):r}function vo(){const r=[],s=f=>{const d=r.indexOf(f);d!==-1&&r.splice(d,1)};return{on:f=>(r.push(f),{off:()=>s(f)}),off:s,trigger:f=>{r.forEach(d=>d(f))}}}function js(r){return Bg()?(jg(r),!0):!1}const Ra=typeof window!="undefined",Ym=r=>typeof r=="string",ys=()=>{};function Gd(r,s){function l(...u){r(()=>s.apply(this,u),{fn:s,thisArg:this,args:u})}return l}const Yd=r=>r();function Xm(r,s={}){let l,u;return d=>{const v=Re(r),b=Re(s.maxWait);if(l&&clearTimeout(l),v<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),d();b&&!u&&(u=setTimeout(()=>{l&&clearTimeout(l),u=null,d()},b)),l=setTimeout(()=>{u&&clearTimeout(u),u=null,d()},v)}}function Zm(r=Yd){const s=At(!0);function l(){s.value=!1}function u(){s.value=!0}return{isActive:s,pause:l,resume:u,eventFilter:(...d)=>{s.value&&r(...d)}}}function Jm(r,s=!1,l="Timeout"){return new Promise((u,f)=>{setTimeout(s?()=>f(l):u,r)})}function Qm(r,...s){return s.some(l=>l in r)}function Vm(r,s=200,l={}){return Gd(Xm(s,l),r)}function ey(r,s=200,l={}){if(s<=0)return r;const u=At(r.value),f=Vm(()=>{u.value=r.value},s,l);return It(r,()=>f()),u}function ty(r,s=!0){Aa()?Pd(r):s?r():Is(r)}function ry(r,s=!0){Aa()?Pa(r):s?r():Is(r)}function ny(r){let s=!1;function l(T,{flush:O="sync",deep:A=!1,timeout:H,throwOnTimeout:re}={}){let V=null;const D=[new Promise(I=>{V=It(r,B=>{T(B)===!s&&(V==null||V(),I())},{flush:O,deep:A,immediate:!0})})];return H&&D.push(Jm(H,re).finally(()=>{V==null||V()})),Promise.race(D)}function u(T,O){return l(A=>A===Re(T),O)}function f(T){return l(O=>Boolean(O),T)}function d(T){return u(null,T)}function v(T){return u(void 0,T)}function b(T){return l(Number.isNaN,T)}function y(T,O){return l(A=>{const H=Array.from(A);return H.includes(T)||H.includes(Re(T))},O)}function x(T){return S(1,T)}function S(T=1,O){let A=-1;return l(()=>(A+=1,A>=T),O)}return Array.isArray(Re(r))?{toMatch:l,toContains:y,changed:x,changedTimes:S,get not(){return s=!s,this}}:{toMatch:l,toBe:u,toBeTruthy:f,toBeNull:d,toBeNaN:b,toBeUndefined:v,changed:x,changedTimes:S,get not(){return s=!s,this}}}function iy(r,s,l={}){const{immediate:u=!0}=l,f=At(!1);let d=null;function v(){d&&(clearTimeout(d),d=null)}function b(){f.value=!1,v()}function y(...x){v(),f.value=!0,d=setTimeout(()=>{f.value=!1,d=null,r(...x)},Re(s))}return u&&(f.value=!0,Ra&&y()),js(b),{isPending:f,start:y,stop:b}}function oy(r=!1){if(bt(r))return s=>(r.value=typeof s=="boolean"?s:!r.value,r.value);{const s=At(r);return[s,u=>(s.value=typeof u=="boolean"?u:!s.value,s.value)]}}var mc=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,ay=(r,s)=>{var l={};for(var u in r)sy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&mc)for(var u of mc(r))s.indexOf(u)<0&&ly.call(r,u)&&(l[u]=r[u]);return l};function uy(r,s,l={}){const u=l,{eventFilter:f=Yd}=u,d=ay(u,["eventFilter"]);return It(r,Gd(f,s),d)}var fy=Object.defineProperty,cy=Object.defineProperties,dy=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Zd=Object.prototype.propertyIsEnumerable,yc=(r,s,l)=>s in r?fy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,hy=(r,s)=>{for(var l in s||(s={}))Xd.call(s,l)&&yc(r,l,s[l]);if(Os)for(var l of Os(s))Zd.call(s,l)&&yc(r,l,s[l]);return r},py=(r,s)=>cy(r,dy(s)),gy=(r,s)=>{var l={};for(var u in r)Xd.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Os)for(var u of Os(r))s.indexOf(u)<0&&Zd.call(r,u)&&(l[u]=r[u]);return l};function vy(r,s,l={}){const u=l,{eventFilter:f}=u,d=gy(u,["eventFilter"]),{eventFilter:v,pause:b,resume:y,isActive:x}=Zm(f);return{stop:uy(r,s,py(hy({},d),{eventFilter:v})),pause:b,resume:y,isActive:x}}function Pw(r,s,l){let u;bt(l)?u={evaluating:l}:u=l||{};const{lazy:f=!1,evaluating:d=void 0,onError:v=ys}=u,b=At(!f),y=At(s);let x=0;return zv(async S=>{if(!b.value)return;x++;const T=x;let O=!1;d&&Promise.resolve().then(()=>{d.value=!0});try{const A=await r(H=>{S(()=>{d&&(d.value=!1),O||H()})});T===x&&(y.value=A)}catch(A){v(A)}finally{d&&(d.value=!1),O=!0}}),f?ct(()=>(b.value=!0,y.value)):y}function Da(r){var s;const l=Re(r);return(s=l==null?void 0:l.$el)!=null?s:l}const yn=Ra?window:void 0;function my(...r){let s,l,u,f;if(Ym(r[0])?([l,u,f]=r,s=yn):[s,l,u,f]=r,!s)return ys;let d=ys;const v=It(()=>Da(s),y=>{d(),y&&(y.addEventListener(l,u,f),d=()=>{y.removeEventListener(l,u,f),d=ys})},{immediate:!0,flush:"post"}),b=()=>{v(),d()};return js(b),b}function yy(r,s={}){const{window:l=yn}=s;let u;const f=At(!1),d=()=>{!l||(u||(u=l.matchMedia(r)),f.value=u.matches)};return ty(()=>{d(),u&&("addEventListener"in u?u.addEventListener("change",d):u.addListener(d),js(()=>{"removeEventListener"in u?u.removeEventListener("change",d):u.removeListener(d)}))}),f}const la=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},aa="__vueuse_ssr_handlers__";la[aa]=la[aa]||{};const by=la[aa];function Jd(r,s){return by[r]||s}function wy(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":r instanceof Date?"date":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const xy={boolean:{read:r=>r==="true",write:r=>String(r)},object:{read:r=>JSON.parse(r),write:r=>JSON.stringify(r)},number:{read:r=>Number.parseFloat(r),write:r=>String(r)},any:{read:r=>r,write:r=>String(r)},string:{read:r=>r,write:r=>String(r)},map:{read:r=>new Map(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r.entries()))},set:{read:r=>new Set(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r))},date:{read:r=>new Date(r),write:r=>r.toISOString()}};function ky(r,s,l,u={}){var f;const{flush:d="pre",deep:v=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:S=yn,eventFilter:T,onError:O=pe=>{console.error(pe)}}=u,A=(x?co:At)(s);if(!l)try{l=Jd("getDefaultStorage",()=>{var pe;return(pe=yn)==null?void 0:pe.localStorage})()}catch(pe){O(pe)}if(!l)return A;const H=Re(s),re=wy(H),V=(f=u.serializer)!=null?f:xy[re],{pause:N,resume:D}=vy(A,()=>I(A.value),{flush:d,deep:v,eventFilter:T});return S&&b&&my(S,"storage",oe),oe(),A;function I(pe){try{pe==null?l.removeItem(r):l.setItem(r,V.write(pe))}catch(ye){O(ye)}}function B(pe){if(!(pe&&pe.key!==r)){N();try{const ye=pe?pe.newValue:l.getItem(r);return ye==null?(y&&H!==null&&l.setItem(r,V.write(H)),H):typeof ye!="string"?ye:V.read(ye)}catch(ye){O(ye)}finally{D()}}}function oe(pe){pe&&pe.key!==r||(A.value=B(pe))}}function Qd(r){return yy("(prefers-color-scheme: dark)",r)}var Sy=Object.defineProperty,bc=Object.getOwnPropertySymbols,Cy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,wc=(r,s,l)=>s in r?Sy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Ty=(r,s)=>{for(var l in s||(s={}))Cy.call(s,l)&&wc(r,l,s[l]);if(bc)for(var l of bc(s))_y.call(s,l)&&wc(r,l,s[l]);return r};function Ly(r={}){const{selector:s="html",attribute:l="class",window:u=yn,storage:f,storageKey:d="vueuse-color-scheme",listenToStorageChanges:v=!0,storageRef:b}=r,y=Ty({auto:"",light:"light",dark:"dark"},r.modes||{}),x=Qd({window:u}),S=ct(()=>x.value?"dark":"light"),T=b||(d==null?At("auto"):ky(d,"auto",f,{window:u,listenToStorageChanges:v})),O=ct({get(){return T.value==="auto"?S.value:T.value},set(V){T.value=V}}),A=Jd("updateHTMLAttrs",(V,N,D)=>{const I=u==null?void 0:u.document.querySelector(V);if(!!I)if(N==="class"){const B=D.split(/\s/g);Object.values(y).flatMap(oe=>(oe||"").split(/\s/g)).filter(Boolean).forEach(oe=>{B.includes(oe)?I.classList.add(oe):I.classList.remove(oe)})}else I.setAttribute(N,D)});function H(V){var N;A(s,l,(N=y[V])!=null?N:V)}function re(V){r.onChanged?r.onChanged(V,H):H(V)}return It(O,re,{flush:"post",immediate:!0}),ry(()=>re(O.value)),O}var Py=Object.defineProperty,Oy=Object.defineProperties,My=Object.getOwnPropertyDescriptors,xc=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Ay=Object.prototype.propertyIsEnumerable,kc=(r,s,l)=>s in r?Py(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Ny=(r,s)=>{for(var l in s||(s={}))Ey.call(s,l)&&kc(r,l,s[l]);if(xc)for(var l of xc(s))Ay.call(s,l)&&kc(r,l,s[l]);return r},zy=(r,s)=>Oy(r,My(s));function Ry(r={}){const{valueDark:s="dark",valueLight:l="",window:u=yn}=r,f=Ly(zy(Ny({},r),{onChanged:(b,y)=>{var x;r.onChanged?(x=r.onChanged)==null||x.call(r,b==="dark"):y(b)},modes:{dark:s,light:l}})),d=Qd({window:u});return ct({get(){return f.value==="dark"},set(b){b===d.value?f.value="auto":f.value=b?"dark":"light"}})}var Sc=Object.getOwnPropertySymbols,Dy=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,Iy=(r,s)=>{var l={};for(var u in r)Dy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Sc)for(var u of Sc(r))s.indexOf(u)<0&&Fy.call(r,u)&&(l[u]=r[u]);return l};function Hy(r,s,l={}){const u=l,{window:f=yn}=u,d=Iy(u,["window"]);let v;const b=f&&"ResizeObserver"in f,y=()=>{v&&(v.disconnect(),v=void 0)},x=It(()=>Da(r),T=>{y(),b&&f&&T&&(v=new ResizeObserver(s),v.observe(T,d))},{immediate:!0,flush:"post"}),S=()=>{y(),x()};return js(S),{isSupported:b,stop:S}}var Wy=Object.defineProperty,By=Object.defineProperties,jy=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Uy=Object.prototype.hasOwnProperty,Ky=Object.prototype.propertyIsEnumerable,_c=(r,s,l)=>s in r?Wy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,br=(r,s)=>{for(var l in s||(s={}))Uy.call(s,l)&&_c(r,l,s[l]);if(Cc)for(var l of Cc(s))Ky.call(s,l)&&_c(r,l,s[l]);return r},ds=(r,s)=>By(r,jy(s));const qy={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function Tc(r){return Qm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError")}function Kl(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function Us(r,...s){var l;const u=typeof AbortController=="function";let f={},d={immediate:!0,refetch:!1,timeout:0};const v={method:"GET",type:"text",payload:void 0};s.length>0&&(Tc(s[0])?d=br(br({},d),s[0]):f=s[0]),s.length>1&&Tc(s[1])&&(d=br(br({},d),s[1]));const{fetch:b=(l=yn)==null?void 0:l.fetch,initialData:y,timeout:x}=d,S=vo(),T=vo(),O=vo(),A=At(!1),H=At(!1),re=At(!1),V=At(null),N=co(null),D=co(null),I=co(y),B=ct(()=>u&&H.value);let oe,pe;const ye=()=>{u&&oe&&oe.abort()},We=$=>{H.value=$,A.value=!$};x&&(pe=iy(ye,x,{immediate:!1}));const Ee=async($=!1)=>{var w;We(!0),D.value=null,V.value=null,re.value=!1,oe=void 0,u&&(oe=new AbortController,oe.signal.onabort=()=>re.value=!0,f=ds(br({},f),{signal:oe.signal}));const ee={method:v.method,headers:{}};if(v.payload){const Ge=Kl(ee.headers);v.payloadType&&(Ge["Content-Type"]=(w=qy[v.payloadType])!=null?w:v.payloadType),ee.body=v.payloadType==="json"?JSON.stringify(Re(v.payload)):Re(v.payload)}let Y=!1;const ue={url:Re(r),options:f,cancel:()=>{Y=!0}};if(d.beforeFetch&&Object.assign(ue,await d.beforeFetch(ue)),Y||!b)return We(!1),Promise.resolve(null);let ze=null;return pe&&pe.start(),new Promise((Ge,nt)=>{var lt;b(ue.url,ds(br(br({},ee),ue.options),{headers:br(br({},Kl(ee.headers)),Kl((lt=ue.options)==null?void 0:lt.headers))})).then(async Ie=>{if(N.value=Ie,V.value=Ie.status,ze=await Ie[v.type](),d.afterFetch&&V.value>=200&&V.value<300&&({data:ze}=await d.afterFetch({data:ze,response:Ie})),I.value=ze,!Ie.ok)throw new Error(Ie.statusText);return S.trigger(Ie),Ge(Ie)}).catch(async Ie=>{let Je=Ie.message||Ie.name;return d.onFetchError&&({data:ze,error:Je}=await d.onFetchError({data:ze,error:Ie,response:N.value})),I.value=ze,D.value=Je,T.trigger(Ie),$?nt(Ie):Ge(null)}).finally(()=>{We(!1),pe&&pe.stop(),O.trigger(null)})})};It(()=>[Re(r),Re(d.refetch)],()=>Re(d.refetch)&&Ee(),{deep:!0});const be={isFinished:A,statusCode:V,response:N,error:D,data:I,isFetching:H,canAbort:B,aborted:re,abort:ye,execute:Ee,onFetchResponse:S.on,onFetchError:T.on,onFetchFinally:O.on,get:de("GET"),put:de("PUT"),post:de("POST"),delete:de("DELETE"),patch:de("PATCH"),head:de("HEAD"),options:de("OPTIONS"),json:j("json"),text:j("text"),blob:j("blob"),arrayBuffer:j("arrayBuffer"),formData:j("formData")};function de($){return(w,ee)=>{if(!H.value)return v.method=$,v.payload=w,v.payloadType=ee,bt(v.payload)&&It(()=>[Re(v.payload),Re(d.refetch)],()=>Re(d.refetch)&&Ee(),{deep:!0}),!ee&&Re(w)&&Object.getPrototypeOf(Re(w))===Object.prototype&&(v.payloadType="json"),be}}function Ne(){return new Promise(($,w)=>{ny(A).toBe(!0).then(()=>$(be)).catch(ee=>w(ee))})}function j($){return()=>{if(!H.value)return v.type=$,ds(br({},be),{then(w,ee){return Ne().then(w,ee)}})}}return d.immediate&&setTimeout(Ee,0),ds(br({},be),{then($,w){return Ne().then($,w)}})}var Lc,Pc;Ra&&(window==null?void 0:window.navigator)&&((Lc=window==null?void 0:window.navigator)==null?void 0:Lc.platform)&&/iP(ad|hone|od)/.test((Pc=window==null?void 0:window.navigator)==null?void 0:Pc.platform);function $y(r,s,l,u={}){var f;const{passive:d=!1,eventName:v,deep:b=!1}=u,y=Aa(),x=l||(y==null?void 0:y.emit)||((f=y==null?void 0:y.$emit)==null?void 0:f.bind(y));let S=v;if(s||(s="modelValue"),S=v||S||`update:${s}`,d){const T=At(r[s]);return It(()=>r[s],O=>T.value=O),It(T,O=>{(O!==r[s]||b)&&x(S,O)},{deep:b}),T}else return ct({get(){return r[s]},set(T){x(S,T)}})}function Oc(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Gy=/^\[(.+?)~?="(.*)"\]$/,Yy=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function Xy(r){return r.match(Gy)}function Ow(r=""){return Yy.test(r)}function Zy(r,s){const l=[],u=[],f=new Set;Array.from(s).forEach(v=>{const b=Xy(v);b?b[2]?u.push(b):f.add(b[1]):f.add(v)});let d=0;return r.split(/[\s"';<>]/g).forEach(v=>{const b=d+v.length;f.has(v)&&l.push([d,b,v]),d=b+1}),u.forEach(([,v,b])=>{const y=new RegExp(`${Oc(v)}=(['"])[^\\1]*?${Oc(b)}[^\\1]*?\\1`,"g");Array.from(r.matchAll(y)).forEach(x=>{const S=x.index+x[0].indexOf(b),T=S+b.length;l.push([S,T,`[${v}="${b}"]`])})}),l}var Jy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Yr={exports:{}};(function(r,s){(function(l,u){r.exports=u()})(Jy,function(){var l=navigator.userAgent,u=navigator.platform,f=/gecko\/\d/i.test(l),d=/MSIE \d/.test(l),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),y=d||v||b,x=y&&(d?document.documentMode||6:+(b||v)[1]),S=!b&&/WebKit\//.test(l),T=S&&/Qt\/\d+\.\d+/.test(l),O=!b&&/Chrome\//.test(l),A=/Opera\//.test(l),H=/Apple Computer/.test(navigator.vendor),re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),V=/PhantomJS/.test(l),N=H&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),D=/Android/.test(l),I=N||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),B=N||/Mac/.test(u),oe=/\bCrOS\b/.test(l),pe=/win/i.test(u),ye=A&&l.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(A=!1,S=!0);var We=B&&(T||A&&(ye==null||ye<12.11)),Ee=f||y&&x>=9;function be(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var de=function(e,t){var i=e.className,n=be(t).exec(i);if(n){var o=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(o?n[1]+o:"")}};function Ne(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return Ne(e).appendChild(t)}function $(e,t,i,n){var o=document.createElement(e);if(i&&(o.className=i),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)o.appendChild(t[a]);return o}function w(e,t,i,n){var o=$(e,t,i,n);return o.setAttribute("role","presentation"),o}var ee;document.createRange?ee=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:ee=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch{return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function Y(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ue(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ze(e,t){var i=e.className;be(t).test(i)||(e.className+=(i?" ":"")+t)}function Ge(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!be(i[n]).test(t)&&(t+=" "+i[n]);return t}var nt=function(e){e.select()};N?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(nt=function(e){try{e.select()}catch{}});function lt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ie(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Je(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,c=o||0;;){var h=e.indexOf(" ",a);if(h<0||h>=t)return c+(t-a);c+=h-a,c+=i-c%i,a=h+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=lt(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function Z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var K=50,se={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},Se={origin:"*mouse"},ge={origin:"+move"};function Te(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var c=a-n;if(a==e.length||o+c>=t)return n+Math.min(c,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var _=[""];function E(e){for(;_.length<=e;)_.push(F(_)+" ");return _[e]}function F(e){return e[e.length-1]}function G(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function J(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function ne(){}function fe(e,t){var i;return Object.create?i=Object.create(e):(ne.prototype=e,i=new ne),t&&Ie(t,i),i}var ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ce.test(e))}function L(e,t){return t?t.source.indexOf("\\w")>-1&&te(e)?!0:t.test(e):te(e)}function W(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var z=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function he(e){return e.charCodeAt(0)>=768&&z.test(e)}function Le(e,t,i){for(;(i<0?t>0:t<e.length)&&he(e.charAt(t));)t+=i;return t}function Be(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var o=(t+i)/2,a=n<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+n}}function tt(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var c=e[a];(c.from<i&&c.to>t||t==i&&c.to==t)&&(n(Math.max(c.from,t),Math.min(c.to,i),c.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ke=null;function He(e,t,i){var n;Ke=null;for(var o=0;o<e.length;++o){var a=e[o];if(a.from<t&&a.to>t)return o;a.to==t&&(a.from!=a.to&&i=="before"?n=o:Ke=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ke=o)}return n!=null?n:Ke}var xt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,c=/[Lb1n]/,h=/[1n]/;function p(g,k,C){this.level=g,this.from=k,this.to=C}return function(g,k){var C=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!n.test(g))return!1;for(var R=g.length,M=[],U=0;U<R;++U)M.push(i(g.charCodeAt(U)));for(var Q=0,ae=C;Q<R;++Q){var ve=M[Q];ve=="m"?M[Q]=ae:ae=ve}for(var we=0,me=C;we<R;++we){var ke=M[we];ke=="1"&&me=="r"?M[we]="n":a.test(ke)&&(me=ke,ke=="r"&&(M[we]="R"))}for(var Ae=1,Me=M[0];Ae<R-1;++Ae){var Ue=M[Ae];Ue=="+"&&Me=="1"&&M[Ae+1]=="1"?M[Ae]="1":Ue==","&&Me==M[Ae+1]&&(Me=="1"||Me=="n")&&(M[Ae]=Me),Me=Ue}for(var rt=0;rt<R;++rt){var _t=M[rt];if(_t==",")M[rt]="N";else if(_t=="%"){var ft=void 0;for(ft=rt+1;ft<R&&M[ft]=="%";++ft);for(var Vt=rt&&M[rt-1]=="!"||ft<R&&M[ft]=="1"?"1":"N",qt=rt;qt<ft;++qt)M[qt]=Vt;rt=ft-1}}for(var mt=0,$t=C;mt<R;++mt){var Ot=M[mt];$t=="L"&&Ot=="1"?M[mt]="L":a.test(Ot)&&($t=Ot)}for(var wt=0;wt<R;++wt)if(o.test(M[wt])){var yt=void 0;for(yt=wt+1;yt<R&&o.test(M[yt]);++yt);for(var ht=(wt?M[wt-1]:C)=="L",Gt=(yt<R?M[yt]:C)=="L",si=ht==Gt?ht?"L":"R":C,sn=wt;sn<yt;++sn)M[sn]=si;wt=yt-1}for(var Ft=[],Mr,Tt=0;Tt<R;)if(c.test(M[Tt])){var Dl=Tt;for(++Tt;Tt<R&&c.test(M[Tt]);++Tt);Ft.push(new p(0,Dl,Tt))}else{var Ur=Tt,On=Ft.length,Mn=k=="rtl"?1:0;for(++Tt;Tt<R&&M[Tt]!="L";++Tt);for(var Wt=Ur;Wt<Tt;)if(h.test(M[Wt])){Ur<Wt&&(Ft.splice(On,0,new p(1,Ur,Wt)),On+=Mn);var li=Wt;for(++Wt;Wt<Tt&&h.test(M[Wt]);++Wt);Ft.splice(On,0,new p(2,li,Wt)),On+=Mn,Ur=Wt}else++Wt;Ur<Tt&&Ft.splice(On,0,new p(1,Ur,Tt))}return k=="ltr"&&(Ft[0].level==1&&(Mr=g.match(/^\s+/))&&(Ft[0].from=Mr[0].length,Ft.unshift(new p(0,0,Mr[0].length))),F(Ft).level==1&&(Mr=g.match(/\s+$/))&&(F(Ft).to-=Mr[0].length,Ft.push(new p(0,R-Mr[0].length,R)))),k=="rtl"?Ft.reverse():Ft}}();function vt(e,t){var i=e.order;return i==null&&(i=e.order=xt(e.text,t)),i}var cr=[],Pe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||cr).concat(i)}};function Dr(e,t){return e._handlers&&e._handlers[t]||cr}function et(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,o=n&&n[t];if(o){var a=Z(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Oe(e,t){var i=Dr(e,t);if(!!i.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<i.length;++o)i[o].apply(null,n)}function ut(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,i||t.type,e,t),nr(t)||t.codemirrorIgnore}function In(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Z(i,t[n])==-1&&i.push(t[n])}function Pt(e,t){return Dr(e,t).length>0}function Sr(e){e.prototype.on=function(t,i){Pe(this,t,i)},e.prototype.off=function(t,i){et(this,t,i)}}function zt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function nr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function bn(e){zt(e),Hn(e)}function Xr(e){return e.target||e.srcElement}function Lo(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var Ti=function(){if(y&&x<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}(),jt;function Po(e){if(jt==null){var t=$("span","\u200B");j(e,$("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(jt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=jt?$("span","\u200B"):$("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Li;function Cr(e){if(Li!=null)return Li;var t=j(e,document.createTextNode("A\u062EA")),i=ee(t,0,1).getBoundingClientRect(),n=ee(t,1,2).getBoundingClientRect();return Ne(e),!i||i.left==i.right?!1:Li=n.right-i.right<3}var Pi=`
1
+ var yg=Object.defineProperty,bg=Object.defineProperties;var wg=Object.getOwnPropertyDescriptors;var Wf=Object.getOwnPropertySymbols;var xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable;var Bf=(r,s,l)=>s in r?yg(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Il=(r,s)=>{for(var l in s||(s={}))xg.call(s,l)&&Bf(r,l,s[l]);if(Wf)for(var l of Wf(s))kg.call(s,l)&&Bf(r,l,s[l]);return r},jf=(r,s)=>bg(r,wg(s));const Sg=function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const v of d.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&u(v)}).observe(document,{childList:!0,subtree:!0});function l(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerpolicy&&(d.referrerPolicy=f.referrerpolicy),f.crossorigin==="use-credentials"?d.credentials="include":f.crossorigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(f){if(f.ep)return;f.ep=!0;const d=l(f);fetch(f.href,d)}};Sg();const Cg="modulepreload",Uf={},_g="/__unocss/",da=function(s,l){return!l||l.length===0?s():Promise.all(l.map(u=>{if(u=`${_g}${u}`,u in Uf)return;Uf[u]=!0;const f=u.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":Cg,f||(v.as="script",v.crossOrigin=""),v.href=u,document.head.appendChild(v),f)return new Promise((b,y)=>{v.addEventListener("load",b),v.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>s())};function ha(r,s){const l=Object.create(null),u=r.split(",");for(let f=0;f<u.length;f++)l[u[f]]=!0;return s?f=>!!l[f.toLowerCase()]:f=>!!l[f]}const Tg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Lg=ha(Tg);function Gc(r){return!!r||r===""}function To(r){if(je(r)){const s={};for(let l=0;l<r.length;l++){const u=r[l],f=Nt(u)?Mg(u):To(u);if(f)for(const d in f)s[d]=f[d]}return s}else{if(Nt(r))return r;if(Lt(r))return r}}const Pg=/;(?![^(]*\))/g,Og=/:(.+)/;function Mg(r){const s={};return r.split(Pg).forEach(l=>{if(l){const u=l.split(Og);u.length>1&&(s[u[0].trim()]=u[1].trim())}}),s}function vi(r){let s="";if(Nt(r))s=r;else if(je(r))for(let l=0;l<r.length;l++){const u=vi(r[l]);u&&(s+=u+" ")}else if(Lt(r))for(const l in r)r[l]&&(s+=l+" ");return s.trim()}const tr=r=>Nt(r)?r:r==null?"":je(r)||Lt(r)&&(r.toString===Jc||!qe(r.toString))?JSON.stringify(r,Yc,2):String(r),Yc=(r,s)=>s&&s.__v_isRef?Yc(r,s.value):pi(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((l,[u,f])=>(l[`${u} =>`]=f,l),{})}:Xc(s)?{[`Set(${s.size})`]:[...s.values()]}:Lt(s)&&!je(s)&&!Qc(s)?String(s):s,st={},hi=[],xr=()=>{},Eg=()=>!1,Ag=/^on[^a-z]/,As=r=>Ag.test(r),pa=r=>r.startsWith("onUpdate:"),Zt=Object.assign,ga=(r,s)=>{const l=r.indexOf(s);l>-1&&r.splice(l,1)},Ng=Object.prototype.hasOwnProperty,Ye=(r,s)=>Ng.call(r,s),je=Array.isArray,pi=r=>Ns(r)==="[object Map]",Xc=r=>Ns(r)==="[object Set]",qe=r=>typeof r=="function",Nt=r=>typeof r=="string",va=r=>typeof r=="symbol",Lt=r=>r!==null&&typeof r=="object",Zc=r=>Lt(r)&&qe(r.then)&&qe(r.catch),Jc=Object.prototype.toString,Ns=r=>Jc.call(r),zg=r=>Ns(r).slice(8,-1),Qc=r=>Ns(r)==="[object Object]",ma=r=>Nt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,gs=ha(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),zs=r=>{const s=Object.create(null);return l=>s[l]||(s[l]=r(l))},Rg=/-(\w)/g,zr=zs(r=>r.replace(Rg,(s,l)=>l?l.toUpperCase():"")),Dg=/\B([A-Z])/g,xi=zs(r=>r.replace(Dg,"-$1").toLowerCase()),Rs=zs(r=>r.charAt(0).toUpperCase()+r.slice(1)),Hl=zs(r=>r?`on${Rs(r)}`:""),bo=(r,s)=>!Object.is(r,s),Wl=(r,s)=>{for(let l=0;l<r.length;l++)r[l](s)},bs=(r,s,l)=>{Object.defineProperty(r,s,{configurable:!0,enumerable:!1,value:l})},Fg=r=>{const s=parseFloat(r);return isNaN(s)?r:s};let Kf;const Ig=()=>Kf||(Kf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let ur;class Hg{constructor(s=!1){this.active=!0,this.effects=[],this.cleanups=[],!s&&ur&&(this.parent=ur,this.index=(ur.scopes||(ur.scopes=[])).push(this)-1)}run(s){if(this.active){const l=ur;try{return ur=this,s()}finally{ur=l}}}on(){ur=this}off(){ur=this.parent}stop(s){if(this.active){let l,u;for(l=0,u=this.effects.length;l<u;l++)this.effects[l].stop();for(l=0,u=this.cleanups.length;l<u;l++)this.cleanups[l]();if(this.scopes)for(l=0,u=this.scopes.length;l<u;l++)this.scopes[l].stop(!0);if(this.parent&&!s){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.active=!1}}}function Wg(r,s=ur){s&&s.active&&s.effects.push(r)}function Bg(){return ur}function jg(r){ur&&ur.cleanups.push(r)}const ya=r=>{const s=new Set(r);return s.w=0,s.n=0,s},Vc=r=>(r.w&vn)>0,ed=r=>(r.n&vn)>0,Ug=({deps:r})=>{if(r.length)for(let s=0;s<r.length;s++)r[s].w|=vn},Kg=r=>{const{deps:s}=r;if(s.length){let l=0;for(let u=0;u<s.length;u++){const f=s[u];Vc(f)&&!ed(f)?f.delete(r):s[l++]=f,f.w&=~vn,f.n&=~vn}s.length=l}},Yl=new WeakMap;let uo=0,vn=1;const Xl=30;let wr;const Rn=Symbol(""),Zl=Symbol("");class ba{constructor(s,l=null,u){this.fn=s,this.scheduler=l,this.active=!0,this.deps=[],this.parent=void 0,Wg(this,u)}run(){if(!this.active)return this.fn();let s=wr,l=hn;for(;s;){if(s===this)return;s=s.parent}try{return this.parent=wr,wr=this,hn=!0,vn=1<<++uo,uo<=Xl?Ug(this):qf(this),this.fn()}finally{uo<=Xl&&Kg(this),vn=1<<--uo,wr=this.parent,hn=l,this.parent=void 0,this.deferStop&&this.stop()}}stop(){wr===this?this.deferStop=!0:this.active&&(qf(this),this.onStop&&this.onStop(),this.active=!1)}}function qf(r){const{deps:s}=r;if(s.length){for(let l=0;l<s.length;l++)s[l].delete(r);s.length=0}}let hn=!0;const td=[];function ki(){td.push(hn),hn=!1}function Si(){const r=td.pop();hn=r===void 0?!0:r}function cr(r,s,l){if(hn&&wr){let u=Yl.get(r);u||Yl.set(r,u=new Map);let f=u.get(l);f||u.set(l,f=ya()),rd(f)}}function rd(r,s){let l=!1;uo<=Xl?ed(r)||(r.n|=vn,l=!Vc(r)):l=!r.has(wr),l&&(r.add(wr),wr.deps.push(r))}function $r(r,s,l,u,f,d){const v=Yl.get(r);if(!v)return;let b=[];if(s==="clear")b=[...v.values()];else if(l==="length"&&je(r))v.forEach((y,x)=>{(x==="length"||x>=u)&&b.push(y)});else switch(l!==void 0&&b.push(v.get(l)),s){case"add":je(r)?ma(l)&&b.push(v.get("length")):(b.push(v.get(Rn)),pi(r)&&b.push(v.get(Zl)));break;case"delete":je(r)||(b.push(v.get(Rn)),pi(r)&&b.push(v.get(Zl)));break;case"set":pi(r)&&b.push(v.get(Rn));break}if(b.length===1)b[0]&&Jl(b[0]);else{const y=[];for(const x of b)x&&y.push(...x);Jl(ya(y))}}function Jl(r,s){for(const l of je(r)?r:[...r])(l!==wr||l.allowRecurse)&&(l.scheduler?l.scheduler():l.run())}const qg=ha("__proto__,__v_isRef,__isVue"),nd=new Set(Object.getOwnPropertyNames(Symbol).map(r=>Symbol[r]).filter(va)),$g=wa(),Gg=wa(!1,!0),Yg=wa(!0),$f=Xg();function Xg(){const r={};return["includes","indexOf","lastIndexOf"].forEach(s=>{r[s]=function(...l){const u=Ve(this);for(let d=0,v=this.length;d<v;d++)cr(u,"get",d+"");const f=u[s](...l);return f===-1||f===!1?u[s](...l.map(Ve)):f}}),["push","pop","shift","unshift","splice"].forEach(s=>{r[s]=function(...l){ki();const u=Ve(this)[s].apply(this,l);return Si(),u}}),r}function wa(r=!1,s=!1){return function(u,f,d){if(f==="__v_isReactive")return!r;if(f==="__v_isReadonly")return r;if(f==="__v_isShallow")return s;if(f==="__v_raw"&&d===(r?s?cv:ad:s?ld:sd).get(u))return u;const v=je(u);if(!r&&v&&Ye($f,f))return Reflect.get($f,f,d);const b=Reflect.get(u,f,d);return(va(f)?nd.has(f):qg(f))||(r||cr(u,"get",f),s)?b:bt(b)?!v||!ma(f)?b.value:b:Lt(b)?r?ud(b):Ci(b):b}}const Zg=id(),Jg=id(!0);function id(r=!1){return function(l,u,f,d){let v=l[u];if(wo(v)&&bt(v)&&!bt(f))return!1;if(!r&&!wo(f)&&(fd(f)||(f=Ve(f),v=Ve(v)),!je(l)&&bt(v)&&!bt(f)))return v.value=f,!0;const b=je(l)&&ma(u)?Number(u)<l.length:Ye(l,u),y=Reflect.set(l,u,f,d);return l===Ve(d)&&(b?bo(f,v)&&$r(l,"set",u,f):$r(l,"add",u,f)),y}}function Qg(r,s){const l=Ye(r,s);r[s];const u=Reflect.deleteProperty(r,s);return u&&l&&$r(r,"delete",s,void 0),u}function Vg(r,s){const l=Reflect.has(r,s);return(!va(s)||!nd.has(s))&&cr(r,"has",s),l}function ev(r){return cr(r,"iterate",je(r)?"length":Rn),Reflect.ownKeys(r)}const od={get:$g,set:Zg,deleteProperty:Qg,has:Vg,ownKeys:ev},tv={get:Yg,set(r,s){return!0},deleteProperty(r,s){return!0}},rv=Zt({},od,{get:Gg,set:Jg}),xa=r=>r,Ds=r=>Reflect.getPrototypeOf(r);function ls(r,s,l=!1,u=!1){r=r.__v_raw;const f=Ve(r),d=Ve(s);s!==d&&!l&&cr(f,"get",s),!l&&cr(f,"get",d);const{has:v}=Ds(f),b=u?xa:l?Ca:xo;if(v.call(f,s))return b(r.get(s));if(v.call(f,d))return b(r.get(d));r!==f&&r.get(s)}function as(r,s=!1){const l=this.__v_raw,u=Ve(l),f=Ve(r);return r!==f&&!s&&cr(u,"has",r),!s&&cr(u,"has",f),r===f?l.has(r):l.has(r)||l.has(f)}function us(r,s=!1){return r=r.__v_raw,!s&&cr(Ve(r),"iterate",Rn),Reflect.get(r,"size",r)}function Gf(r){r=Ve(r);const s=Ve(this);return Ds(s).has.call(s,r)||(s.add(r),$r(s,"add",r,r)),this}function Yf(r,s){s=Ve(s);const l=Ve(this),{has:u,get:f}=Ds(l);let d=u.call(l,r);d||(r=Ve(r),d=u.call(l,r));const v=f.call(l,r);return l.set(r,s),d?bo(s,v)&&$r(l,"set",r,s):$r(l,"add",r,s),this}function Xf(r){const s=Ve(this),{has:l,get:u}=Ds(s);let f=l.call(s,r);f||(r=Ve(r),f=l.call(s,r)),u&&u.call(s,r);const d=s.delete(r);return f&&$r(s,"delete",r,void 0),d}function Zf(){const r=Ve(this),s=r.size!==0,l=r.clear();return s&&$r(r,"clear",void 0,void 0),l}function fs(r,s){return function(u,f){const d=this,v=d.__v_raw,b=Ve(v),y=s?xa:r?Ca:xo;return!r&&cr(b,"iterate",Rn),v.forEach((x,S)=>u.call(f,y(x),y(S),d))}}function cs(r,s,l){return function(...u){const f=this.__v_raw,d=Ve(f),v=pi(d),b=r==="entries"||r===Symbol.iterator&&v,y=r==="keys"&&v,x=f[r](...u),S=l?xa:s?Ca:xo;return!s&&cr(d,"iterate",y?Zl:Rn),{next(){const{value:T,done:O}=x.next();return O?{value:T,done:O}:{value:b?[S(T[0]),S(T[1])]:S(T),done:O}},[Symbol.iterator](){return this}}}}function ln(r){return function(...s){return r==="delete"?!1:this}}function nv(){const r={get(d){return ls(this,d)},get size(){return us(this)},has:as,add:Gf,set:Yf,delete:Xf,clear:Zf,forEach:fs(!1,!1)},s={get(d){return ls(this,d,!1,!0)},get size(){return us(this)},has:as,add:Gf,set:Yf,delete:Xf,clear:Zf,forEach:fs(!1,!0)},l={get(d){return ls(this,d,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear"),forEach:fs(!0,!1)},u={get(d){return ls(this,d,!0,!0)},get size(){return us(this,!0)},has(d){return as.call(this,d,!0)},add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear"),forEach:fs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(d=>{r[d]=cs(d,!1,!1),l[d]=cs(d,!0,!1),s[d]=cs(d,!1,!0),u[d]=cs(d,!0,!0)}),[r,l,s,u]}const[iv,ov,sv,lv]=nv();function ka(r,s){const l=s?r?lv:sv:r?ov:iv;return(u,f,d)=>f==="__v_isReactive"?!r:f==="__v_isReadonly"?r:f==="__v_raw"?u:Reflect.get(Ye(l,f)&&f in u?l:u,f,d)}const av={get:ka(!1,!1)},uv={get:ka(!1,!0)},fv={get:ka(!0,!1)},sd=new WeakMap,ld=new WeakMap,ad=new WeakMap,cv=new WeakMap;function dv(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hv(r){return r.__v_skip||!Object.isExtensible(r)?0:dv(zg(r))}function Ci(r){return wo(r)?r:Sa(r,!1,od,av,sd)}function pv(r){return Sa(r,!1,rv,uv,ld)}function ud(r){return Sa(r,!0,tv,fv,ad)}function Sa(r,s,l,u,f){if(!Lt(r)||r.__v_raw&&!(s&&r.__v_isReactive))return r;const d=f.get(r);if(d)return d;const v=hv(r);if(v===0)return r;const b=new Proxy(r,v===2?u:l);return f.set(r,b),b}function gi(r){return wo(r)?gi(r.__v_raw):!!(r&&r.__v_isReactive)}function wo(r){return!!(r&&r.__v_isReadonly)}function fd(r){return!!(r&&r.__v_isShallow)}function cd(r){return gi(r)||wo(r)}function Ve(r){const s=r&&r.__v_raw;return s?Ve(s):r}function dd(r){return bs(r,"__v_skip",!0),r}const xo=r=>Lt(r)?Ci(r):r,Ca=r=>Lt(r)?ud(r):r;function hd(r){hn&&wr&&(r=Ve(r),rd(r.dep||(r.dep=ya())))}function pd(r,s){r=Ve(r),r.dep&&Jl(r.dep)}function bt(r){return!!(r&&r.__v_isRef===!0)}function At(r){return gd(r,!1)}function co(r){return gd(r,!0)}function gd(r,s){return bt(r)?r:new gv(r,s)}class gv{constructor(s,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?s:Ve(s),this._value=l?s:xo(s)}get value(){return hd(this),this._value}set value(s){s=this.__v_isShallow?s:Ve(s),bo(s,this._rawValue)&&(this._rawValue=s,this._value=this.__v_isShallow?s:xo(s),pd(this))}}function Re(r){return bt(r)?r.value:r}const vv={get:(r,s,l)=>Re(Reflect.get(r,s,l)),set:(r,s,l,u)=>{const f=r[s];return bt(f)&&!bt(l)?(f.value=l,!0):Reflect.set(r,s,l,u)}};function vd(r){return gi(r)?r:new Proxy(r,vv)}function mv(r){const s=je(r)?new Array(r.length):{};for(const l in r)s[l]=bv(r,l);return s}class yv{constructor(s,l,u){this._object=s,this._key=l,this._defaultValue=u,this.__v_isRef=!0}get value(){const s=this._object[this._key];return s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}}function bv(r,s,l){const u=r[s];return bt(u)?u:new yv(r,s,l)}class wv{constructor(s,l,u,f){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ba(s,()=>{this._dirty||(this._dirty=!0,pd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=u}get value(){const s=Ve(this);return hd(s),(s._dirty||!s._cacheable)&&(s._dirty=!1,s._value=s.effect.run()),s._value}set value(s){this._setter(s)}}function xv(r,s,l=!1){let u,f;const d=qe(r);return d?(u=r,f=xr):(u=r.get,f=r.set),new wv(u,f,d||!f,l)}function pn(r,s,l,u){let f;try{f=u?r(...u):r()}catch(d){Fs(d,s,l)}return f}function kr(r,s,l,u){if(qe(r)){const d=pn(r,s,l,u);return d&&Zc(d)&&d.catch(v=>{Fs(v,s,l)}),d}const f=[];for(let d=0;d<r.length;d++)f.push(kr(r[d],s,l,u));return f}function Fs(r,s,l,u=!0){const f=s?s.vnode:null;if(s){let d=s.parent;const v=s.proxy,b=l;for(;d;){const x=d.ec;if(x){for(let S=0;S<x.length;S++)if(x[S](r,v,b)===!1)return}d=d.parent}const y=s.appContext.config.errorHandler;if(y){pn(y,null,10,[r,v,b]);return}}kv(r,l,f,u)}function kv(r,s,l,u=!0){console.error(r)}let ws=!1,Ql=!1;const fr=[];let Kr=0;const ho=[];let fo=null,ui=0;const po=[];let fn=null,fi=0;const md=Promise.resolve();let _a=null,Vl=null;function Is(r){const s=_a||md;return r?s.then(this?r.bind(this):r):s}function Sv(r){let s=Kr+1,l=fr.length;for(;s<l;){const u=s+l>>>1;ko(fr[u])<r?s=u+1:l=u}return s}function yd(r){(!fr.length||!fr.includes(r,ws&&r.allowRecurse?Kr+1:Kr))&&r!==Vl&&(r.id==null?fr.push(r):fr.splice(Sv(r.id),0,r),bd())}function bd(){!ws&&!Ql&&(Ql=!0,_a=md.then(kd))}function Cv(r){const s=fr.indexOf(r);s>Kr&&fr.splice(s,1)}function wd(r,s,l,u){je(r)?l.push(...r):(!s||!s.includes(r,r.allowRecurse?u+1:u))&&l.push(r),bd()}function _v(r){wd(r,fo,ho,ui)}function Tv(r){wd(r,fn,po,fi)}function Ta(r,s=null){if(ho.length){for(Vl=s,fo=[...new Set(ho)],ho.length=0,ui=0;ui<fo.length;ui++)fo[ui]();fo=null,ui=0,Vl=null,Ta(r,s)}}function xd(r){if(po.length){const s=[...new Set(po)];if(po.length=0,fn){fn.push(...s);return}for(fn=s,fn.sort((l,u)=>ko(l)-ko(u)),fi=0;fi<fn.length;fi++)fn[fi]();fn=null,fi=0}}const ko=r=>r.id==null?1/0:r.id;function kd(r){Ql=!1,ws=!0,Ta(r),fr.sort((l,u)=>ko(l)-ko(u));const s=xr;try{for(Kr=0;Kr<fr.length;Kr++){const l=fr[Kr];l&&l.active!==!1&&pn(l,null,14)}}finally{Kr=0,fr.length=0,xd(),ws=!1,_a=null,(fr.length||ho.length||po.length)&&kd(r)}}function Lv(r,s,...l){if(r.isUnmounted)return;const u=r.vnode.props||st;let f=l;const d=s.startsWith("update:"),v=d&&s.slice(7);if(v&&v in u){const S=`${v==="modelValue"?"model":v}Modifiers`,{number:T,trim:O}=u[S]||st;O?f=l.map(A=>A.trim()):T&&(f=l.map(Fg))}let b,y=u[b=Hl(s)]||u[b=Hl(zr(s))];!y&&d&&(y=u[b=Hl(xi(s))]),y&&kr(y,r,6,f);const x=u[b+"Once"];if(x){if(!r.emitted)r.emitted={};else if(r.emitted[b])return;r.emitted[b]=!0,kr(x,r,6,f)}}function Sd(r,s,l=!1){const u=s.emitsCache,f=u.get(r);if(f!==void 0)return f;const d=r.emits;let v={},b=!1;if(!qe(r)){const y=x=>{const S=Sd(x,s,!0);S&&(b=!0,Zt(v,S))};!l&&s.mixins.length&&s.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}return!d&&!b?(u.set(r,null),null):(je(d)?d.forEach(y=>v[y]=null):Zt(v,d),u.set(r,v),v)}function Hs(r,s){return!r||!As(s)?!1:(s=s.slice(2).replace(/Once$/,""),Ye(r,s[0].toLowerCase()+s.slice(1))||Ye(r,xi(s))||Ye(r,s))}let Xt=null,Cd=null;function xs(r){const s=Xt;return Xt=r,Cd=r&&r.type.__scopeId||null,s}function gn(r,s=Xt,l){if(!s||r._n)return r;const u=(...f)=>{u._d&&sc(-1);const d=xs(s),v=r(...f);return xs(d),u._d&&sc(1),v};return u._n=!0,u._c=!0,u._d=!0,u}function Bl(r){const{type:s,vnode:l,proxy:u,withProxy:f,props:d,propsOptions:[v],slots:b,attrs:y,emit:x,render:S,renderCache:T,data:O,setupState:A,ctx:H,inheritAttrs:re}=r;let V,N;const D=xs(r);try{if(l.shapeFlag&4){const B=f||u;V=Nr(S.call(B,B,T,d,A,O,H)),N=y}else{const B=s;V=Nr(B.length>1?B(d,{attrs:y,slots:b,emit:x}):B(d,null)),N=s.props?y:Pv(y)}}catch(B){go.length=0,Fs(B,r,1),V=ot(mn)}let I=V;if(N&&re!==!1){const B=Object.keys(N),{shapeFlag:oe}=I;B.length&&oe&7&&(v&&B.some(pa)&&(N=Ov(N,v)),I=So(I,N))}return l.dirs&&(I.dirs=I.dirs?I.dirs.concat(l.dirs):l.dirs),l.transition&&(I.transition=l.transition),V=I,xs(D),V}const Pv=r=>{let s;for(const l in r)(l==="class"||l==="style"||As(l))&&((s||(s={}))[l]=r[l]);return s},Ov=(r,s)=>{const l={};for(const u in r)(!pa(u)||!(u.slice(9)in s))&&(l[u]=r[u]);return l};function Mv(r,s,l){const{props:u,children:f,component:d}=r,{props:v,children:b,patchFlag:y}=s,x=d.emitsOptions;if(s.dirs||s.transition)return!0;if(l&&y>=0){if(y&1024)return!0;if(y&16)return u?Jf(u,v,x):!!v;if(y&8){const S=s.dynamicProps;for(let T=0;T<S.length;T++){const O=S[T];if(v[O]!==u[O]&&!Hs(x,O))return!0}}}else return(f||b)&&(!b||!b.$stable)?!0:u===v?!1:u?v?Jf(u,v,x):!0:!!v;return!1}function Jf(r,s,l){const u=Object.keys(s);if(u.length!==Object.keys(r).length)return!0;for(let f=0;f<u.length;f++){const d=u[f];if(s[d]!==r[d]&&!Hs(l,d))return!0}return!1}function Ev({vnode:r,parent:s},l){for(;s&&s.subTree===r;)(r=s.vnode).el=l,s=s.parent}const Av=r=>r.__isSuspense;function Nv(r,s){s&&s.pendingBranch?je(r)?s.effects.push(...r):s.effects.push(r):Tv(r)}function vs(r,s){if(Et){let l=Et.provides;const u=Et.parent&&Et.parent.provides;u===l&&(l=Et.provides=Object.create(u)),l[r]=s}}function qr(r,s,l=!1){const u=Et||Xt;if(u){const f=u.parent==null?u.vnode.appContext&&u.vnode.appContext.provides:u.parent.provides;if(f&&r in f)return f[r];if(arguments.length>1)return l&&qe(s)?s.call(u.proxy):s}}function zv(r,s){return La(r,null,s)}const Qf={};function It(r,s,l){return La(r,s,l)}function La(r,s,{immediate:l,deep:u,flush:f,onTrack:d,onTrigger:v}=st){const b=Et;let y,x=!1,S=!1;if(bt(r)?(y=()=>r.value,x=fd(r)):gi(r)?(y=()=>r,u=!0):je(r)?(S=!0,x=r.some(gi),y=()=>r.map(N=>{if(bt(N))return N.value;if(gi(N))return di(N);if(qe(N))return pn(N,b,2)})):qe(r)?s?y=()=>pn(r,b,2):y=()=>{if(!(b&&b.isUnmounted))return T&&T(),kr(r,b,3,[O])}:y=xr,s&&u){const N=y;y=()=>di(N())}let T,O=N=>{T=V.onStop=()=>{pn(N,b,4)}};if(Co)return O=xr,s?l&&kr(s,b,3,[y(),S?[]:void 0,O]):y(),xr;let A=S?[]:Qf;const H=()=>{if(!!V.active)if(s){const N=V.run();(u||x||(S?N.some((D,I)=>bo(D,A[I])):bo(N,A)))&&(T&&T(),kr(s,b,3,[N,A===Qf?void 0:A,O]),A=N)}else V.run()};H.allowRecurse=!!s;let re;f==="sync"?re=H:f==="post"?re=()=>er(H,b&&b.suspense):re=()=>{!b||b.isMounted?_v(H):H()};const V=new ba(y,re);return s?l?H():A=V.run():f==="post"?er(V.run.bind(V),b&&b.suspense):V.run(),()=>{V.stop(),b&&b.scope&&ga(b.scope.effects,V)}}function Rv(r,s,l){const u=this.proxy,f=Nt(r)?r.includes(".")?_d(u,r):()=>u[r]:r.bind(u,u);let d;qe(s)?d=s:(d=s.handler,l=s);const v=Et;yi(this);const b=La(f,d.bind(u),l);return v?yi(v):Fn(),b}function _d(r,s){const l=s.split(".");return()=>{let u=r;for(let f=0;f<l.length&&u;f++)u=u[l[f]];return u}}function di(r,s){if(!Lt(r)||r.__v_skip||(s=s||new Set,s.has(r)))return r;if(s.add(r),bt(r))di(r.value,s);else if(je(r))for(let l=0;l<r.length;l++)di(r[l],s);else if(Xc(r)||pi(r))r.forEach(l=>{di(l,s)});else if(Qc(r))for(const l in r)di(r[l],s);return r}function Rr(r){return qe(r)?{setup:r,name:r.name}:r}const ks=r=>!!r.type.__asyncLoader,Td=r=>r.type.__isKeepAlive;function Dv(r,s){Ld(r,"a",s)}function Fv(r,s){Ld(r,"da",s)}function Ld(r,s,l=Et){const u=r.__wdc||(r.__wdc=()=>{let f=l;for(;f;){if(f.isDeactivated)return;f=f.parent}return r()});if(Ws(s,u,l),l){let f=l.parent;for(;f&&f.parent;)Td(f.parent.vnode)&&Iv(u,s,l,f),f=f.parent}}function Iv(r,s,l,u){const f=Ws(s,r,u,!0);Od(()=>{ga(u[s],f)},l)}function Ws(r,s,l=Et,u=!1){if(l){const f=l[r]||(l[r]=[]),d=s.__weh||(s.__weh=(...v)=>{if(l.isUnmounted)return;ki(),yi(l);const b=kr(s,l,r,v);return Fn(),Si(),b});return u?f.unshift(d):f.push(d),d}}const Gr=r=>(s,l=Et)=>(!Co||r==="sp")&&Ws(r,s,l),Pd=Gr("bm"),Pa=Gr("m"),Hv=Gr("bu"),Wv=Gr("u"),Bv=Gr("bum"),Od=Gr("um"),jv=Gr("sp"),Uv=Gr("rtg"),Kv=Gr("rtc");function qv(r,s=Et){Ws("ec",r,s)}let ea=!0;function $v(r){const s=Ed(r),l=r.proxy,u=r.ctx;ea=!1,s.beforeCreate&&Vf(s.beforeCreate,r,"bc");const{data:f,computed:d,methods:v,watch:b,provide:y,inject:x,created:S,beforeMount:T,mounted:O,beforeUpdate:A,updated:H,activated:re,deactivated:V,beforeDestroy:N,beforeUnmount:D,destroyed:I,unmounted:B,render:oe,renderTracked:pe,renderTriggered:ye,errorCaptured:We,serverPrefetch:Ee,expose:be,inheritAttrs:de,components:Ne,directives:j,filters:$}=s;if(x&&Gv(x,u,null,r.appContext.config.unwrapInjectedRef),v)for(const Y in v){const ue=v[Y];qe(ue)&&(u[Y]=ue.bind(l))}if(f){const Y=f.call(l,l);Lt(Y)&&(r.data=Ci(Y))}if(ea=!0,d)for(const Y in d){const ue=d[Y],ze=qe(ue)?ue.bind(l,l):qe(ue.get)?ue.get.bind(l,l):xr,Ge=!qe(ue)&&qe(ue.set)?ue.set.bind(l):xr,nt=ct({get:ze,set:Ge});Object.defineProperty(u,Y,{enumerable:!0,configurable:!0,get:()=>nt.value,set:lt=>nt.value=lt})}if(b)for(const Y in b)Md(b[Y],u,l,Y);if(y){const Y=qe(y)?y.call(l):y;Reflect.ownKeys(Y).forEach(ue=>{vs(ue,Y[ue])})}S&&Vf(S,r,"c");function ee(Y,ue){je(ue)?ue.forEach(ze=>Y(ze.bind(l))):ue&&Y(ue.bind(l))}if(ee(Pd,T),ee(Pa,O),ee(Hv,A),ee(Wv,H),ee(Dv,re),ee(Fv,V),ee(qv,We),ee(Kv,pe),ee(Uv,ye),ee(Bv,D),ee(Od,B),ee(jv,Ee),je(be))if(be.length){const Y=r.exposed||(r.exposed={});be.forEach(ue=>{Object.defineProperty(Y,ue,{get:()=>l[ue],set:ze=>l[ue]=ze})})}else r.exposed||(r.exposed={});oe&&r.render===xr&&(r.render=oe),de!=null&&(r.inheritAttrs=de),Ne&&(r.components=Ne),j&&(r.directives=j)}function Gv(r,s,l=xr,u=!1){je(r)&&(r=ta(r));for(const f in r){const d=r[f];let v;Lt(d)?"default"in d?v=qr(d.from||f,d.default,!0):v=qr(d.from||f):v=qr(d),bt(v)&&u?Object.defineProperty(s,f,{enumerable:!0,configurable:!0,get:()=>v.value,set:b=>v.value=b}):s[f]=v}}function Vf(r,s,l){kr(je(r)?r.map(u=>u.bind(s.proxy)):r.bind(s.proxy),s,l)}function Md(r,s,l,u){const f=u.includes(".")?_d(l,u):()=>l[u];if(Nt(r)){const d=s[r];qe(d)&&It(f,d)}else if(qe(r))It(f,r.bind(l));else if(Lt(r))if(je(r))r.forEach(d=>Md(d,s,l,u));else{const d=qe(r.handler)?r.handler.bind(l):s[r.handler];qe(d)&&It(f,d,r)}}function Ed(r){const s=r.type,{mixins:l,extends:u}=s,{mixins:f,optionsCache:d,config:{optionMergeStrategies:v}}=r.appContext,b=d.get(s);let y;return b?y=b:!f.length&&!l&&!u?y=s:(y={},f.length&&f.forEach(x=>Ss(y,x,v,!0)),Ss(y,s,v)),d.set(s,y),y}function Ss(r,s,l,u=!1){const{mixins:f,extends:d}=s;d&&Ss(r,d,l,!0),f&&f.forEach(v=>Ss(r,v,l,!0));for(const v in s)if(!(u&&v==="expose")){const b=Yv[v]||l&&l[v];r[v]=b?b(r[v],s[v]):s[v]}return r}const Yv={data:ec,props:Nn,emits:Nn,methods:Nn,computed:Nn,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:Nn,directives:Nn,watch:Zv,provide:ec,inject:Xv};function ec(r,s){return s?r?function(){return Zt(qe(r)?r.call(this,this):r,qe(s)?s.call(this,this):s)}:s:r}function Xv(r,s){return Nn(ta(r),ta(s))}function ta(r){if(je(r)){const s={};for(let l=0;l<r.length;l++)s[r[l]]=r[l];return s}return r}function Yt(r,s){return r?[...new Set([].concat(r,s))]:s}function Nn(r,s){return r?Zt(Zt(Object.create(null),r),s):s}function Zv(r,s){if(!r)return s;if(!s)return r;const l=Zt(Object.create(null),r);for(const u in s)l[u]=Yt(r[u],s[u]);return l}function Jv(r,s,l,u=!1){const f={},d={};bs(d,Bs,1),r.propsDefaults=Object.create(null),Ad(r,s,f,d);for(const v in r.propsOptions[0])v in f||(f[v]=void 0);l?r.props=u?f:pv(f):r.type.props?r.props=f:r.props=d,r.attrs=d}function Qv(r,s,l,u){const{props:f,attrs:d,vnode:{patchFlag:v}}=r,b=Ve(f),[y]=r.propsOptions;let x=!1;if((u||v>0)&&!(v&16)){if(v&8){const S=r.vnode.dynamicProps;for(let T=0;T<S.length;T++){let O=S[T];if(Hs(r.emitsOptions,O))continue;const A=s[O];if(y)if(Ye(d,O))A!==d[O]&&(d[O]=A,x=!0);else{const H=zr(O);f[H]=ra(y,b,H,A,r,!1)}else A!==d[O]&&(d[O]=A,x=!0)}}}else{Ad(r,s,f,d)&&(x=!0);let S;for(const T in b)(!s||!Ye(s,T)&&((S=xi(T))===T||!Ye(s,S)))&&(y?l&&(l[T]!==void 0||l[S]!==void 0)&&(f[T]=ra(y,b,T,void 0,r,!0)):delete f[T]);if(d!==b)for(const T in d)(!s||!Ye(s,T)&&!0)&&(delete d[T],x=!0)}x&&$r(r,"set","$attrs")}function Ad(r,s,l,u){const[f,d]=r.propsOptions;let v=!1,b;if(s)for(let y in s){if(gs(y))continue;const x=s[y];let S;f&&Ye(f,S=zr(y))?!d||!d.includes(S)?l[S]=x:(b||(b={}))[S]=x:Hs(r.emitsOptions,y)||(!(y in u)||x!==u[y])&&(u[y]=x,v=!0)}if(d){const y=Ve(l),x=b||st;for(let S=0;S<d.length;S++){const T=d[S];l[T]=ra(f,y,T,x[T],r,!Ye(x,T))}}return v}function ra(r,s,l,u,f,d){const v=r[l];if(v!=null){const b=Ye(v,"default");if(b&&u===void 0){const y=v.default;if(v.type!==Function&&qe(y)){const{propsDefaults:x}=f;l in x?u=x[l]:(yi(f),u=x[l]=y.call(null,s),Fn())}else u=y}v[0]&&(d&&!b?u=!1:v[1]&&(u===""||u===xi(l))&&(u=!0))}return u}function Nd(r,s,l=!1){const u=s.propsCache,f=u.get(r);if(f)return f;const d=r.props,v={},b=[];let y=!1;if(!qe(r)){const S=T=>{y=!0;const[O,A]=Nd(T,s,!0);Zt(v,O),A&&b.push(...A)};!l&&s.mixins.length&&s.mixins.forEach(S),r.extends&&S(r.extends),r.mixins&&r.mixins.forEach(S)}if(!d&&!y)return u.set(r,hi),hi;if(je(d))for(let S=0;S<d.length;S++){const T=zr(d[S]);tc(T)&&(v[T]=st)}else if(d)for(const S in d){const T=zr(S);if(tc(T)){const O=d[S],A=v[T]=je(O)||qe(O)?{type:O}:O;if(A){const H=ic(Boolean,A.type),re=ic(String,A.type);A[0]=H>-1,A[1]=re<0||H<re,(H>-1||Ye(A,"default"))&&b.push(T)}}}const x=[v,b];return u.set(r,x),x}function tc(r){return r[0]!=="$"}function rc(r){const s=r&&r.toString().match(/^\s*function (\w+)/);return s?s[1]:r===null?"null":""}function nc(r,s){return rc(r)===rc(s)}function ic(r,s){return je(s)?s.findIndex(l=>nc(l,r)):qe(s)&&nc(s,r)?0:-1}const zd=r=>r[0]==="_"||r==="$stable",Oa=r=>je(r)?r.map(Nr):[Nr(r)],Vv=(r,s,l)=>{const u=gn((...f)=>Oa(s(...f)),l);return u._c=!1,u},Rd=(r,s,l)=>{const u=r._ctx;for(const f in r){if(zd(f))continue;const d=r[f];if(qe(d))s[f]=Vv(f,d,u);else if(d!=null){const v=Oa(d);s[f]=()=>v}}},Dd=(r,s)=>{const l=Oa(s);r.slots.default=()=>l},em=(r,s)=>{if(r.vnode.shapeFlag&32){const l=s._;l?(r.slots=Ve(s),bs(s,"_",l)):Rd(s,r.slots={})}else r.slots={},s&&Dd(r,s);bs(r.slots,Bs,1)},tm=(r,s,l)=>{const{vnode:u,slots:f}=r;let d=!0,v=st;if(u.shapeFlag&32){const b=s._;b?l&&b===1?d=!1:(Zt(f,s),!l&&b===1&&delete f._):(d=!s.$stable,Rd(s,f)),v=s}else s&&(Dd(r,s),v={default:1});if(d)for(const b in f)!zd(b)&&!(b in v)&&delete f[b]};function En(r,s,l,u){const f=r.dirs,d=s&&s.dirs;for(let v=0;v<f.length;v++){const b=f[v];d&&(b.oldValue=d[v].value);let y=b.dir[u];y&&(ki(),kr(y,l,8,[r.el,b,r,s]),Si())}}function Fd(){return{app:null,config:{isNativeTag:Eg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let rm=0;function nm(r,s){return function(u,f=null){qe(u)||(u=Object.assign({},u)),f!=null&&!Lt(f)&&(f=null);const d=Fd(),v=new Set;let b=!1;const y=d.app={_uid:rm++,_component:u,_props:f,_container:null,_context:d,_instance:null,version:Cm,get config(){return d.config},set config(x){},use(x,...S){return v.has(x)||(x&&qe(x.install)?(v.add(x),x.install(y,...S)):qe(x)&&(v.add(x),x(y,...S))),y},mixin(x){return d.mixins.includes(x)||d.mixins.push(x),y},component(x,S){return S?(d.components[x]=S,y):d.components[x]},directive(x,S){return S?(d.directives[x]=S,y):d.directives[x]},mount(x,S,T){if(!b){const O=ot(u,f);return O.appContext=d,S&&s?s(O,x):r(O,x,T),b=!0,y._container=x,x.__vue_app__=y,Na(O.component)||O.component.proxy}},unmount(){b&&(r(null,y._container),delete y._container.__vue_app__)},provide(x,S){return d.provides[x]=S,y}};return y}}function na(r,s,l,u,f=!1){if(je(r)){r.forEach((O,A)=>na(O,s&&(je(s)?s[A]:s),l,u,f));return}if(ks(u)&&!f)return;const d=u.shapeFlag&4?Na(u.component)||u.component.proxy:u.el,v=f?null:d,{i:b,r:y}=r,x=s&&s.r,S=b.refs===st?b.refs={}:b.refs,T=b.setupState;if(x!=null&&x!==y&&(Nt(x)?(S[x]=null,Ye(T,x)&&(T[x]=null)):bt(x)&&(x.value=null)),qe(y))pn(y,b,12,[v,S]);else{const O=Nt(y),A=bt(y);if(O||A){const H=()=>{if(r.f){const re=O?S[y]:y.value;f?je(re)&&ga(re,d):je(re)?re.includes(d)||re.push(d):O?(S[y]=[d],Ye(T,y)&&(T[y]=S[y])):(y.value=[d],r.k&&(S[r.k]=y.value))}else O?(S[y]=v,Ye(T,y)&&(T[y]=v)):bt(y)&&(y.value=v,r.k&&(S[r.k]=v))};v?(H.id=-1,er(H,l)):H()}}}const er=Nv;function im(r){return om(r)}function om(r,s){const l=Ig();l.__VUE__=!0;const{insert:u,remove:f,patchProp:d,createElement:v,createText:b,createComment:y,setText:x,setElementText:S,parentNode:T,nextSibling:O,setScopeId:A=xr,cloneNode:H,insertStaticContent:re}=r,V=(_,E,F,G=null,J=null,ne=null,fe=!1,ce=null,te=!!E.dynamicChildren)=>{if(_===E)return;_&&!lo(_,E)&&(G=se(_),Ie(_,J,ne,!0),_=null),E.patchFlag===-2&&(te=!1,E.dynamicChildren=null);const{type:L,ref:W,shapeFlag:z}=E;switch(L){case Ma:N(_,E,F,G);break;case mn:D(_,E,F,G);break;case jl:_==null&&I(E,F,G,fe);break;case rr:j(_,E,F,G,J,ne,fe,ce,te);break;default:z&1?pe(_,E,F,G,J,ne,fe,ce,te):z&6?$(_,E,F,G,J,ne,fe,ce,te):(z&64||z&128)&&L.process(_,E,F,G,J,ne,fe,ce,te,Se)}W!=null&&J&&na(W,_&&_.ref,ne,E||_,!E)},N=(_,E,F,G)=>{if(_==null)u(E.el=b(E.children),F,G);else{const J=E.el=_.el;E.children!==_.children&&x(J,E.children)}},D=(_,E,F,G)=>{_==null?u(E.el=y(E.children||""),F,G):E.el=_.el},I=(_,E,F,G)=>{[_.el,_.anchor]=re(_.children,E,F,G,_.el,_.anchor)},B=({el:_,anchor:E},F,G)=>{let J;for(;_&&_!==E;)J=O(_),u(_,F,G),_=J;u(E,F,G)},oe=({el:_,anchor:E})=>{let F;for(;_&&_!==E;)F=O(_),f(_),_=F;f(E)},pe=(_,E,F,G,J,ne,fe,ce,te)=>{fe=fe||E.type==="svg",_==null?ye(E,F,G,J,ne,fe,ce,te):be(_,E,J,ne,fe,ce,te)},ye=(_,E,F,G,J,ne,fe,ce)=>{let te,L;const{type:W,props:z,shapeFlag:he,transition:Le,patchFlag:Be,dirs:tt}=_;if(_.el&&H!==void 0&&Be===-1)te=_.el=H(_.el);else{if(te=_.el=v(_.type,ne,z&&z.is,z),he&8?S(te,_.children):he&16&&Ee(_.children,te,null,G,J,ne&&W!=="foreignObject",fe,ce),tt&&En(_,null,G,"created"),z){for(const He in z)He!=="value"&&!gs(He)&&d(te,He,null,z[He],ne,_.children,G,J,K);"value"in z&&d(te,"value",null,z.value),(L=z.onVnodeBeforeMount)&&Er(L,G,_)}We(te,_,_.scopeId,fe,G)}tt&&En(_,null,G,"beforeMount");const Ke=(!J||J&&!J.pendingBranch)&&Le&&!Le.persisted;Ke&&Le.beforeEnter(te),u(te,E,F),((L=z&&z.onVnodeMounted)||Ke||tt)&&er(()=>{L&&Er(L,G,_),Ke&&Le.enter(te),tt&&En(_,null,G,"mounted")},J)},We=(_,E,F,G,J)=>{if(F&&A(_,F),G)for(let ne=0;ne<G.length;ne++)A(_,G[ne]);if(J){let ne=J.subTree;if(E===ne){const fe=J.vnode;We(_,fe,fe.scopeId,fe.slotScopeIds,J.parent)}}},Ee=(_,E,F,G,J,ne,fe,ce,te=0)=>{for(let L=te;L<_.length;L++){const W=_[L]=ce?cn(_[L]):Nr(_[L]);V(null,W,E,F,G,J,ne,fe,ce)}},be=(_,E,F,G,J,ne,fe)=>{const ce=E.el=_.el;let{patchFlag:te,dynamicChildren:L,dirs:W}=E;te|=_.patchFlag&16;const z=_.props||st,he=E.props||st;let Le;F&&An(F,!1),(Le=he.onVnodeBeforeUpdate)&&Er(Le,F,E,_),W&&En(E,_,F,"beforeUpdate"),F&&An(F,!0);const Be=J&&E.type!=="foreignObject";if(L?de(_.dynamicChildren,L,ce,F,G,Be,ne):fe||ze(_,E,ce,null,F,G,Be,ne,!1),te>0){if(te&16)Ne(ce,E,z,he,F,G,J);else if(te&2&&z.class!==he.class&&d(ce,"class",null,he.class,J),te&4&&d(ce,"style",z.style,he.style,J),te&8){const tt=E.dynamicProps;for(let Ke=0;Ke<tt.length;Ke++){const He=tt[Ke],xt=z[He],vt=he[He];(vt!==xt||He==="value")&&d(ce,He,xt,vt,J,_.children,F,G,K)}}te&1&&_.children!==E.children&&S(ce,E.children)}else!fe&&L==null&&Ne(ce,E,z,he,F,G,J);((Le=he.onVnodeUpdated)||W)&&er(()=>{Le&&Er(Le,F,E,_),W&&En(E,_,F,"updated")},G)},de=(_,E,F,G,J,ne,fe)=>{for(let ce=0;ce<E.length;ce++){const te=_[ce],L=E[ce],W=te.el&&(te.type===rr||!lo(te,L)||te.shapeFlag&70)?T(te.el):F;V(te,L,W,null,G,J,ne,fe,!0)}},Ne=(_,E,F,G,J,ne,fe)=>{if(F!==G){for(const ce in G){if(gs(ce))continue;const te=G[ce],L=F[ce];te!==L&&ce!=="value"&&d(_,ce,L,te,fe,E.children,J,ne,K)}if(F!==st)for(const ce in F)!gs(ce)&&!(ce in G)&&d(_,ce,F[ce],null,fe,E.children,J,ne,K);"value"in G&&d(_,"value",F.value,G.value)}},j=(_,E,F,G,J,ne,fe,ce,te)=>{const L=E.el=_?_.el:b(""),W=E.anchor=_?_.anchor:b("");let{patchFlag:z,dynamicChildren:he,slotScopeIds:Le}=E;Le&&(ce=ce?ce.concat(Le):Le),_==null?(u(L,F,G),u(W,F,G),Ee(E.children,F,W,J,ne,fe,ce,te)):z>0&&z&64&&he&&_.dynamicChildren?(de(_.dynamicChildren,he,F,J,ne,fe,ce),(E.key!=null||J&&E===J.subTree)&&Id(_,E,!0)):ze(_,E,F,W,J,ne,fe,ce,te)},$=(_,E,F,G,J,ne,fe,ce,te)=>{E.slotScopeIds=ce,_==null?E.shapeFlag&512?J.ctx.activate(E,F,G,fe,te):w(E,F,G,J,ne,fe,te):ee(_,E,te)},w=(_,E,F,G,J,ne,fe)=>{const ce=_.component=mm(_,G,J);if(Td(_)&&(ce.ctx.renderer=Se),ym(ce),ce.asyncDep){if(J&&J.registerDep(ce,Y),!_.el){const te=ce.subTree=ot(mn);D(null,te,E,F)}return}Y(ce,_,E,F,J,ne,fe)},ee=(_,E,F)=>{const G=E.component=_.component;if(Mv(_,E,F))if(G.asyncDep&&!G.asyncResolved){ue(G,E,F);return}else G.next=E,Cv(G.update),G.update();else E.component=_.component,E.el=_.el,G.vnode=E},Y=(_,E,F,G,J,ne,fe)=>{const ce=()=>{if(_.isMounted){let{next:W,bu:z,u:he,parent:Le,vnode:Be}=_,tt=W,Ke;An(_,!1),W?(W.el=Be.el,ue(_,W,fe)):W=Be,z&&Wl(z),(Ke=W.props&&W.props.onVnodeBeforeUpdate)&&Er(Ke,Le,W,Be),An(_,!0);const He=Bl(_),xt=_.subTree;_.subTree=He,V(xt,He,T(xt.el),se(xt),_,J,ne),W.el=He.el,tt===null&&Ev(_,He.el),he&&er(he,J),(Ke=W.props&&W.props.onVnodeUpdated)&&er(()=>Er(Ke,Le,W,Be),J)}else{let W;const{el:z,props:he}=E,{bm:Le,m:Be,parent:tt}=_,Ke=ks(E);if(An(_,!1),Le&&Wl(Le),!Ke&&(W=he&&he.onVnodeBeforeMount)&&Er(W,tt,E),An(_,!0),z&&Te){const He=()=>{_.subTree=Bl(_),Te(z,_.subTree,_,J,null)};Ke?E.type.__asyncLoader().then(()=>!_.isUnmounted&&He()):He()}else{const He=_.subTree=Bl(_);V(null,He,F,G,_,J,ne),E.el=He.el}if(Be&&er(Be,J),!Ke&&(W=he&&he.onVnodeMounted)){const He=E;er(()=>Er(W,tt,He),J)}E.shapeFlag&256&&_.a&&er(_.a,J),_.isMounted=!0,E=F=G=null}},te=_.effect=new ba(ce,()=>yd(_.update),_.scope),L=_.update=te.run.bind(te);L.id=_.uid,An(_,!0),L()},ue=(_,E,F)=>{E.component=_;const G=_.vnode.props;_.vnode=E,_.next=null,Qv(_,E.props,G,F),tm(_,E.children,F),ki(),Ta(void 0,_.update),Si()},ze=(_,E,F,G,J,ne,fe,ce,te=!1)=>{const L=_&&_.children,W=_?_.shapeFlag:0,z=E.children,{patchFlag:he,shapeFlag:Le}=E;if(he>0){if(he&128){nt(L,z,F,G,J,ne,fe,ce,te);return}else if(he&256){Ge(L,z,F,G,J,ne,fe,ce,te);return}}Le&8?(W&16&&K(L,J,ne),z!==L&&S(F,z)):W&16?Le&16?nt(L,z,F,G,J,ne,fe,ce,te):K(L,J,ne,!0):(W&8&&S(F,""),Le&16&&Ee(z,F,G,J,ne,fe,ce,te))},Ge=(_,E,F,G,J,ne,fe,ce,te)=>{_=_||hi,E=E||hi;const L=_.length,W=E.length,z=Math.min(L,W);let he;for(he=0;he<z;he++){const Le=E[he]=te?cn(E[he]):Nr(E[he]);V(_[he],Le,F,null,J,ne,fe,ce,te)}L>W?K(_,J,ne,!0,!1,z):Ee(E,F,G,J,ne,fe,ce,te,z)},nt=(_,E,F,G,J,ne,fe,ce,te)=>{let L=0;const W=E.length;let z=_.length-1,he=W-1;for(;L<=z&&L<=he;){const Le=_[L],Be=E[L]=te?cn(E[L]):Nr(E[L]);if(lo(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;L++}for(;L<=z&&L<=he;){const Le=_[z],Be=E[he]=te?cn(E[he]):Nr(E[he]);if(lo(Le,Be))V(Le,Be,F,null,J,ne,fe,ce,te);else break;z--,he--}if(L>z){if(L<=he){const Le=he+1,Be=Le<W?E[Le].el:G;for(;L<=he;)V(null,E[L]=te?cn(E[L]):Nr(E[L]),F,Be,J,ne,fe,ce,te),L++}}else if(L>he)for(;L<=z;)Ie(_[L],J,ne,!0),L++;else{const Le=L,Be=L,tt=new Map;for(L=Be;L<=he;L++){const et=E[L]=te?cn(E[L]):Nr(E[L]);et.key!=null&&tt.set(et.key,L)}let Ke,He=0;const xt=he-Be+1;let vt=!1,dr=0;const Pe=new Array(xt);for(L=0;L<xt;L++)Pe[L]=0;for(L=Le;L<=z;L++){const et=_[L];if(He>=xt){Ie(et,J,ne,!0);continue}let Oe;if(et.key!=null)Oe=tt.get(et.key);else for(Ke=Be;Ke<=he;Ke++)if(Pe[Ke-Be]===0&&lo(et,E[Ke])){Oe=Ke;break}Oe===void 0?Ie(et,J,ne,!0):(Pe[Oe-Be]=L+1,Oe>=dr?dr=Oe:vt=!0,V(et,E[Oe],F,null,J,ne,fe,ce,te),He++)}const Dr=vt?sm(Pe):hi;for(Ke=Dr.length-1,L=xt-1;L>=0;L--){const et=Be+L,Oe=E[et],ut=et+1<W?E[et+1].el:G;Pe[L]===0?V(null,Oe,F,ut,J,ne,fe,ce,te):vt&&(Ke<0||L!==Dr[Ke]?lt(Oe,F,ut,2):Ke--)}}},lt=(_,E,F,G,J=null)=>{const{el:ne,type:fe,transition:ce,children:te,shapeFlag:L}=_;if(L&6){lt(_.component.subTree,E,F,G);return}if(L&128){_.suspense.move(E,F,G);return}if(L&64){fe.move(_,E,F,Se);return}if(fe===rr){u(ne,E,F);for(let z=0;z<te.length;z++)lt(te[z],E,F,G);u(_.anchor,E,F);return}if(fe===jl){B(_,E,F);return}if(G!==2&&L&1&&ce)if(G===0)ce.beforeEnter(ne),u(ne,E,F),er(()=>ce.enter(ne),J);else{const{leave:z,delayLeave:he,afterLeave:Le}=ce,Be=()=>u(ne,E,F),tt=()=>{z(ne,()=>{Be(),Le&&Le()})};he?he(ne,Be,tt):tt()}else u(ne,E,F)},Ie=(_,E,F,G=!1,J=!1)=>{const{type:ne,props:fe,ref:ce,children:te,dynamicChildren:L,shapeFlag:W,patchFlag:z,dirs:he}=_;if(ce!=null&&na(ce,null,F,_,!0),W&256){E.ctx.deactivate(_);return}const Le=W&1&&he,Be=!ks(_);let tt;if(Be&&(tt=fe&&fe.onVnodeBeforeUnmount)&&Er(tt,E,_),W&6)Z(_.component,F,G);else{if(W&128){_.suspense.unmount(F,G);return}Le&&En(_,null,E,"beforeUnmount"),W&64?_.type.remove(_,E,F,J,Se,G):L&&(ne!==rr||z>0&&z&64)?K(L,E,F,!1,!0):(ne===rr&&z&384||!J&&W&16)&&K(te,E,F),G&&Je(_)}(Be&&(tt=fe&&fe.onVnodeUnmounted)||Le)&&er(()=>{tt&&Er(tt,E,_),Le&&En(_,null,E,"unmounted")},F)},Je=_=>{const{type:E,el:F,anchor:G,transition:J}=_;if(E===rr){q(F,G);return}if(E===jl){oe(_);return}const ne=()=>{f(F),J&&!J.persisted&&J.afterLeave&&J.afterLeave()};if(_.shapeFlag&1&&J&&!J.persisted){const{leave:fe,delayLeave:ce}=J,te=()=>fe(F,ne);ce?ce(_.el,ne,te):te()}else ne()},q=(_,E)=>{let F;for(;_!==E;)F=O(_),f(_),_=F;f(E)},Z=(_,E,F)=>{const{bum:G,scope:J,update:ne,subTree:fe,um:ce}=_;G&&Wl(G),J.stop(),ne&&(ne.active=!1,Ie(fe,_,E,F)),ce&&er(ce,E),er(()=>{_.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},K=(_,E,F,G=!1,J=!1,ne=0)=>{for(let fe=ne;fe<_.length;fe++)Ie(_[fe],E,F,G,J)},se=_=>_.shapeFlag&6?se(_.component.subTree):_.shapeFlag&128?_.suspense.next():O(_.anchor||_.el),Ce=(_,E,F)=>{_==null?E._vnode&&Ie(E._vnode,null,null,!0):V(E._vnode||null,_,E,null,null,null,F),xd(),E._vnode=_},Se={p:V,um:Ie,m:lt,r:Je,mt:w,mc:Ee,pc:ze,pbc:de,n:se,o:r};let ge,Te;return s&&([ge,Te]=s(Se)),{render:Ce,hydrate:ge,createApp:nm(Ce,ge)}}function An({effect:r,update:s},l){r.allowRecurse=s.allowRecurse=l}function Id(r,s,l=!1){const u=r.children,f=s.children;if(je(u)&&je(f))for(let d=0;d<u.length;d++){const v=u[d];let b=f[d];b.shapeFlag&1&&!b.dynamicChildren&&((b.patchFlag<=0||b.patchFlag===32)&&(b=f[d]=cn(f[d]),b.el=v.el),l||Id(v,b))}}function sm(r){const s=r.slice(),l=[0];let u,f,d,v,b;const y=r.length;for(u=0;u<y;u++){const x=r[u];if(x!==0){if(f=l[l.length-1],r[f]<x){s[u]=f,l.push(u);continue}for(d=0,v=l.length-1;d<v;)b=d+v>>1,r[l[b]]<x?d=b+1:v=b;x<r[l[d]]&&(d>0&&(s[u]=l[d-1]),l[d]=u)}}for(d=l.length,v=l[d-1];d-- >0;)l[d]=v,v=s[v];return l}const lm=r=>r.__isTeleport,Hd="components";function Cs(r,s){return um(Hd,r,!0,s)||r}const am=Symbol();function um(r,s,l=!0,u=!1){const f=Xt||Et;if(f){const d=f.type;if(r===Hd){const b=km(d);if(b&&(b===s||b===zr(s)||b===Rs(zr(s))))return d}const v=oc(f[r]||d[r],s)||oc(f.appContext[r],s);return!v&&u?d:v}}function oc(r,s){return r&&(r[s]||r[zr(s)]||r[Rs(zr(s))])}const rr=Symbol(void 0),Ma=Symbol(void 0),mn=Symbol(void 0),jl=Symbol(void 0),go=[];let Dn=null;function gt(r=!1){go.push(Dn=r?null:[])}function fm(){go.pop(),Dn=go[go.length-1]||null}let _s=1;function sc(r){_s+=r}function Wd(r){return r.dynamicChildren=_s>0?Dn||hi:null,fm(),_s>0&&Dn&&Dn.push(r),r}function Bt(r,s,l,u,f,d){return Wd(Fe(r,s,l,u,f,d,!0))}function mi(r,s,l,u,f){return Wd(ot(r,s,l,u,f,!0))}function Ts(r){return r?r.__v_isVNode===!0:!1}function lo(r,s){return r.type===s.type&&r.key===s.key}const Bs="__vInternal",Bd=({key:r})=>r!=null?r:null,ms=({ref:r,ref_key:s,ref_for:l})=>r!=null?Nt(r)||bt(r)||qe(r)?{i:Xt,r,k:s,f:!!l}:r:null;function Fe(r,s=null,l=null,u=0,f=null,d=r===rr?0:1,v=!1,b=!1){const y={__v_isVNode:!0,__v_skip:!0,type:r,props:s,key:s&&Bd(s),ref:s&&ms(s),scopeId:Cd,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:d,patchFlag:u,dynamicProps:f,dynamicChildren:null,appContext:null};return b?(Ea(y,l),d&128&&r.normalize(y)):l&&(y.shapeFlag|=Nt(l)?8:16),_s>0&&!v&&Dn&&(y.patchFlag>0||d&6)&&y.patchFlag!==32&&Dn.push(y),y}const ot=cm;function cm(r,s=null,l=null,u=0,f=null,d=!1){if((!r||r===am)&&(r=mn),Ts(r)){const b=So(r,s,!0);return l&&Ea(b,l),b}if(Sm(r)&&(r=r.__vccOpts),s){s=dm(s);let{class:b,style:y}=s;b&&!Nt(b)&&(s.class=vi(b)),Lt(y)&&(cd(y)&&!je(y)&&(y=Zt({},y)),s.style=To(y))}const v=Nt(r)?1:Av(r)?128:lm(r)?64:Lt(r)?4:qe(r)?2:0;return Fe(r,s,l,u,f,v,d,!0)}function dm(r){return r?cd(r)||Bs in r?Zt({},r):r:null}function So(r,s,l=!1){const{props:u,ref:f,patchFlag:d,children:v}=r,b=s?hm(u||{},s):u;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:b,key:b&&Bd(b),ref:s&&s.ref?l&&f?je(f)?f.concat(ms(s)):[f,ms(s)]:ms(s):f,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:v,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:s&&r.type!==rr?d===-1?16:d|16:d,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&So(r.ssContent),ssFallback:r.ssFallback&&So(r.ssFallback),el:r.el,anchor:r.anchor}}function Ar(r=" ",s=0){return ot(Ma,null,r,s)}function Ls(r="",s=!1){return s?(gt(),mi(mn,null,r)):ot(mn,null,r)}function Nr(r){return r==null||typeof r=="boolean"?ot(mn):je(r)?ot(rr,null,r.slice()):typeof r=="object"?cn(r):ot(Ma,null,String(r))}function cn(r){return r.el===null||r.memo?r:So(r)}function Ea(r,s){let l=0;const{shapeFlag:u}=r;if(s==null)s=null;else if(je(s))l=16;else if(typeof s=="object")if(u&65){const f=s.default;f&&(f._c&&(f._d=!1),Ea(r,f()),f._c&&(f._d=!0));return}else{l=32;const f=s._;!f&&!(Bs in s)?s._ctx=Xt:f===3&&Xt&&(Xt.slots._===1?s._=1:(s._=2,r.patchFlag|=1024))}else qe(s)?(s={default:s,_ctx:Xt},l=32):(s=String(s),u&64?(l=16,s=[Ar(s)]):l=8);r.children=s,r.shapeFlag|=l}function hm(...r){const s={};for(let l=0;l<r.length;l++){const u=r[l];for(const f in u)if(f==="class")s.class!==u.class&&(s.class=vi([s.class,u.class]));else if(f==="style")s.style=To([s.style,u.style]);else if(As(f)){const d=s[f],v=u[f];v&&d!==v&&!(je(d)&&d.includes(v))&&(s[f]=d?[].concat(d,v):v)}else f!==""&&(s[f]=u[f])}return s}function Er(r,s,l,u=null){kr(r,s,7,[l,u])}function lc(r,s,l,u){let f;const d=l&&l[u];if(je(r)||Nt(r)){f=new Array(r.length);for(let v=0,b=r.length;v<b;v++)f[v]=s(r[v],v,void 0,d&&d[v])}else if(typeof r=="number"){f=new Array(r);for(let v=0;v<r;v++)f[v]=s(v+1,v,void 0,d&&d[v])}else if(Lt(r))if(r[Symbol.iterator])f=Array.from(r,(v,b)=>s(v,b,void 0,d&&d[b]));else{const v=Object.keys(r);f=new Array(v.length);for(let b=0,y=v.length;b<y;b++){const x=v[b];f[b]=s(r[x],x,b,d&&d[b])}}else f=[];return l&&(l[u]=f),f}function jd(r,s,l={},u,f){if(Xt.isCE||Xt.parent&&ks(Xt.parent)&&Xt.parent.isCE)return ot("slot",s==="default"?null:{name:s},u&&u());let d=r[s];d&&d._c&&(d._d=!1),gt();const v=d&&Ud(d(l)),b=mi(rr,{key:l.key||`_${s}`},v||(u?u():[]),v&&r._===1?64:-2);return!f&&b.scopeId&&(b.slotScopeIds=[b.scopeId+"-s"]),d&&d._c&&(d._d=!0),b}function Ud(r){return r.some(s=>Ts(s)?!(s.type===mn||s.type===rr&&!Ud(s.children)):!0)?r:null}const ia=r=>r?Kd(r)?Na(r)||r.proxy:ia(r.parent):null,Ps=Zt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>ia(r.parent),$root:r=>ia(r.root),$emit:r=>r.emit,$options:r=>Ed(r),$forceUpdate:r=>()=>yd(r.update),$nextTick:r=>Is.bind(r.proxy),$watch:r=>Rv.bind(r)}),pm={get({_:r},s){const{ctx:l,setupState:u,data:f,props:d,accessCache:v,type:b,appContext:y}=r;let x;if(s[0]!=="$"){const A=v[s];if(A!==void 0)switch(A){case 1:return u[s];case 2:return f[s];case 4:return l[s];case 3:return d[s]}else{if(u!==st&&Ye(u,s))return v[s]=1,u[s];if(f!==st&&Ye(f,s))return v[s]=2,f[s];if((x=r.propsOptions[0])&&Ye(x,s))return v[s]=3,d[s];if(l!==st&&Ye(l,s))return v[s]=4,l[s];ea&&(v[s]=0)}}const S=Ps[s];let T,O;if(S)return s==="$attrs"&&cr(r,"get",s),S(r);if((T=b.__cssModules)&&(T=T[s]))return T;if(l!==st&&Ye(l,s))return v[s]=4,l[s];if(O=y.config.globalProperties,Ye(O,s))return O[s]},set({_:r},s,l){const{data:u,setupState:f,ctx:d}=r;return f!==st&&Ye(f,s)?(f[s]=l,!0):u!==st&&Ye(u,s)?(u[s]=l,!0):Ye(r.props,s)||s[0]==="$"&&s.slice(1)in r?!1:(d[s]=l,!0)},has({_:{data:r,setupState:s,accessCache:l,ctx:u,appContext:f,propsOptions:d}},v){let b;return!!l[v]||r!==st&&Ye(r,v)||s!==st&&Ye(s,v)||(b=d[0])&&Ye(b,v)||Ye(u,v)||Ye(Ps,v)||Ye(f.config.globalProperties,v)},defineProperty(r,s,l){return l.get!=null?r._.accessCache[s]=0:Ye(l,"value")&&this.set(r,s,l.value,null),Reflect.defineProperty(r,s,l)}},gm=Fd();let vm=0;function mm(r,s,l){const u=r.type,f=(s?s.appContext:r.appContext)||gm,d={uid:vm++,vnode:r,type:u,parent:s,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new Hg(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:s?s.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Nd(u,f),emitsOptions:Sd(u,f),emit:null,emitted:null,propsDefaults:st,inheritAttrs:u.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:l,suspenseId:l?l.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return d.ctx={_:d},d.root=s?s.root:d,d.emit=Lv.bind(null,d),r.ce&&r.ce(d),d}let Et=null;const Aa=()=>Et||Xt,yi=r=>{Et=r,r.scope.on()},Fn=()=>{Et&&Et.scope.off(),Et=null};function Kd(r){return r.vnode.shapeFlag&4}let Co=!1;function ym(r,s=!1){Co=s;const{props:l,children:u}=r.vnode,f=Kd(r);Jv(r,l,f,s),em(r,u);const d=f?bm(r,s):void 0;return Co=!1,d}function bm(r,s){const l=r.type;r.accessCache=Object.create(null),r.proxy=dd(new Proxy(r.ctx,pm));const{setup:u}=l;if(u){const f=r.setupContext=u.length>1?xm(r):null;yi(r),ki();const d=pn(u,r,0,[r.props,f]);if(Si(),Fn(),Zc(d)){if(d.then(Fn,Fn),s)return d.then(v=>{ac(r,v,s)}).catch(v=>{Fs(v,r,0)});r.asyncDep=d}else ac(r,d,s)}else qd(r,s)}function ac(r,s,l){qe(s)?r.type.__ssrInlineRender?r.ssrRender=s:r.render=s:Lt(s)&&(r.setupState=vd(s)),qd(r,l)}let uc;function qd(r,s,l){const u=r.type;if(!r.render){if(!s&&uc&&!u.render){const f=u.template;if(f){const{isCustomElement:d,compilerOptions:v}=r.appContext.config,{delimiters:b,compilerOptions:y}=u,x=Zt(Zt({isCustomElement:d,delimiters:b},v),y);u.render=uc(f,x)}}r.render=u.render||xr}yi(r),ki(),$v(r),Si(),Fn()}function wm(r){return new Proxy(r.attrs,{get(s,l){return cr(r,"get","$attrs"),s[l]}})}function xm(r){const s=u=>{r.exposed=u||{}};let l;return{get attrs(){return l||(l=wm(r))},slots:r.slots,emit:r.emit,expose:s}}function Na(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(vd(dd(r.exposed)),{get(s,l){if(l in s)return s[l];if(l in Ps)return Ps[l](r)}}))}function km(r){return qe(r)&&r.displayName||r.name}function Sm(r){return qe(r)&&"__vccOpts"in r}const ct=(r,s)=>xv(r,s,Co);function za(r,s,l){const u=arguments.length;return u===2?Lt(s)&&!je(s)?Ts(s)?ot(r,null,[s]):ot(r,s):ot(r,null,s):(u>3?l=Array.prototype.slice.call(arguments,2):u===3&&Ts(l)&&(l=[l]),ot(r,s,l))}const Cm="3.2.33",_m="http://www.w3.org/2000/svg",zn=typeof document!="undefined"?document:null,fc=zn&&zn.createElement("template"),Tm={insert:(r,s,l)=>{s.insertBefore(r,l||null)},remove:r=>{const s=r.parentNode;s&&s.removeChild(r)},createElement:(r,s,l,u)=>{const f=s?zn.createElementNS(_m,r):zn.createElement(r,l?{is:l}:void 0);return r==="select"&&u&&u.multiple!=null&&f.setAttribute("multiple",u.multiple),f},createText:r=>zn.createTextNode(r),createComment:r=>zn.createComment(r),setText:(r,s)=>{r.nodeValue=s},setElementText:(r,s)=>{r.textContent=s},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>zn.querySelector(r),setScopeId(r,s){r.setAttribute(s,"")},cloneNode(r){const s=r.cloneNode(!0);return"_value"in r&&(s._value=r._value),s},insertStaticContent(r,s,l,u,f,d){const v=l?l.previousSibling:s.lastChild;if(f&&(f===d||f.nextSibling))for(;s.insertBefore(f.cloneNode(!0),l),!(f===d||!(f=f.nextSibling)););else{fc.innerHTML=u?`<svg>${r}</svg>`:r;const b=fc.content;if(u){const y=b.firstChild;for(;y.firstChild;)b.appendChild(y.firstChild);b.removeChild(y)}s.insertBefore(b,l)}return[v?v.nextSibling:s.firstChild,l?l.previousSibling:s.lastChild]}};function Lm(r,s,l){const u=r._vtc;u&&(s=(s?[s,...u]:[...u]).join(" ")),s==null?r.removeAttribute("class"):l?r.setAttribute("class",s):r.className=s}function Pm(r,s,l){const u=r.style,f=Nt(l);if(l&&!f){for(const d in l)oa(u,d,l[d]);if(s&&!Nt(s))for(const d in s)l[d]==null&&oa(u,d,"")}else{const d=u.display;f?s!==l&&(u.cssText=l):s&&r.removeAttribute("style"),"_vod"in r&&(u.display=d)}}const cc=/\s*!important$/;function oa(r,s,l){if(je(l))l.forEach(u=>oa(r,s,u));else if(l==null&&(l=""),s.startsWith("--"))r.setProperty(s,l);else{const u=Om(r,s);cc.test(l)?r.setProperty(xi(u),l.replace(cc,""),"important"):r[u]=l}}const dc=["Webkit","Moz","ms"],Ul={};function Om(r,s){const l=Ul[s];if(l)return l;let u=zr(s);if(u!=="filter"&&u in r)return Ul[s]=u;u=Rs(u);for(let f=0;f<dc.length;f++){const d=dc[f]+u;if(d in r)return Ul[s]=d}return s}const hc="http://www.w3.org/1999/xlink";function Mm(r,s,l,u,f){if(u&&s.startsWith("xlink:"))l==null?r.removeAttributeNS(hc,s.slice(6,s.length)):r.setAttributeNS(hc,s,l);else{const d=Lg(s);l==null||d&&!Gc(l)?r.removeAttribute(s):r.setAttribute(s,d?"":l)}}function Em(r,s,l,u,f,d,v){if(s==="innerHTML"||s==="textContent"){u&&v(u,f,d),r[s]=l==null?"":l;return}if(s==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=l;const y=l==null?"":l;(r.value!==y||r.tagName==="OPTION")&&(r.value=y),l==null&&r.removeAttribute(s);return}let b=!1;if(l===""||l==null){const y=typeof r[s];y==="boolean"?l=Gc(l):l==null&&y==="string"?(l="",b=!0):y==="number"&&(l=0,b=!0)}try{r[s]=l}catch{}b&&r.removeAttribute(s)}const[$d,Am]=(()=>{let r=Date.now,s=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(r=()=>performance.now());const l=navigator.userAgent.match(/firefox\/(\d+)/i);s=!!(l&&Number(l[1])<=53)}return[r,s]})();let sa=0;const Nm=Promise.resolve(),zm=()=>{sa=0},Rm=()=>sa||(Nm.then(zm),sa=$d());function Dm(r,s,l,u){r.addEventListener(s,l,u)}function Fm(r,s,l,u){r.removeEventListener(s,l,u)}function Im(r,s,l,u,f=null){const d=r._vei||(r._vei={}),v=d[s];if(u&&v)v.value=u;else{const[b,y]=Hm(s);if(u){const x=d[s]=Wm(u,f);Dm(r,b,x,y)}else v&&(Fm(r,b,v,y),d[s]=void 0)}}const pc=/(?:Once|Passive|Capture)$/;function Hm(r){let s;if(pc.test(r)){s={};let l;for(;l=r.match(pc);)r=r.slice(0,r.length-l[0].length),s[l[0].toLowerCase()]=!0}return[xi(r.slice(2)),s]}function Wm(r,s){const l=u=>{const f=u.timeStamp||$d();(Am||f>=l.attached-1)&&kr(Bm(u,l.value),s,5,[u])};return l.value=r,l.attached=Rm(),l}function Bm(r,s){if(je(s)){const l=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{l.call(r),r._stopped=!0},s.map(u=>f=>!f._stopped&&u&&u(f))}else return s}const gc=/^on[a-z]/,jm=(r,s,l,u,f=!1,d,v,b,y)=>{s==="class"?Lm(r,u,f):s==="style"?Pm(r,l,u):As(s)?pa(s)||Im(r,s,l,u,v):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):Um(r,s,u,f))?Em(r,s,u,d,v,b,y):(s==="true-value"?r._trueValue=u:s==="false-value"&&(r._falseValue=u),Mm(r,s,u,f))};function Um(r,s,l,u){return u?!!(s==="innerHTML"||s==="textContent"||s in r&&gc.test(s)&&qe(l)):s==="spellcheck"||s==="draggable"||s==="translate"||s==="form"||s==="list"&&r.tagName==="INPUT"||s==="type"&&r.tagName==="TEXTAREA"||gc.test(s)&&Nt(l)?!1:s in r}const Km=Zt({patchProp:jm},Tm);let vc;function qm(){return vc||(vc=im(Km))}const $m=(...r)=>{const s=qm().createApp(...r),{mount:l}=s;return s.mount=u=>{const f=Gm(u);if(!f)return;const d=s._component;!qe(d)&&!d.render&&!d.template&&(d.template=f.innerHTML),f.innerHTML="";const v=l(f,!1,f instanceof SVGElement);return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),v},s};function Gm(r){return Nt(r)?document.querySelector(r):r}function vo(){const r=[],s=f=>{const d=r.indexOf(f);d!==-1&&r.splice(d,1)};return{on:f=>(r.push(f),{off:()=>s(f)}),off:s,trigger:f=>{r.forEach(d=>d(f))}}}function js(r){return Bg()?(jg(r),!0):!1}const Ra=typeof window!="undefined",Ym=r=>typeof r=="string",ys=()=>{};function Gd(r,s){function l(...u){r(()=>s.apply(this,u),{fn:s,thisArg:this,args:u})}return l}const Yd=r=>r();function Xm(r,s={}){let l,u;return d=>{const v=Re(r),b=Re(s.maxWait);if(l&&clearTimeout(l),v<=0||b!==void 0&&b<=0)return u&&(clearTimeout(u),u=null),d();b&&!u&&(u=setTimeout(()=>{l&&clearTimeout(l),u=null,d()},b)),l=setTimeout(()=>{u&&clearTimeout(u),u=null,d()},v)}}function Zm(r=Yd){const s=At(!0);function l(){s.value=!1}function u(){s.value=!0}return{isActive:s,pause:l,resume:u,eventFilter:(...d)=>{s.value&&r(...d)}}}function Jm(r,s=!1,l="Timeout"){return new Promise((u,f)=>{setTimeout(s?()=>f(l):u,r)})}function Qm(r,...s){return s.some(l=>l in r)}function Vm(r,s=200,l={}){return Gd(Xm(s,l),r)}function ey(r,s=200,l={}){if(s<=0)return r;const u=At(r.value),f=Vm(()=>{u.value=r.value},s,l);return It(r,()=>f()),u}function ty(r,s=!0){Aa()?Pd(r):s?r():Is(r)}function ry(r,s=!0){Aa()?Pa(r):s?r():Is(r)}function ny(r){let s=!1;function l(T,{flush:O="sync",deep:A=!1,timeout:H,throwOnTimeout:re}={}){let V=null;const D=[new Promise(I=>{V=It(r,B=>{T(B)===!s&&(V==null||V(),I())},{flush:O,deep:A,immediate:!0})})];return H&&D.push(Jm(H,re).finally(()=>{V==null||V()})),Promise.race(D)}function u(T,O){return l(A=>A===Re(T),O)}function f(T){return l(O=>Boolean(O),T)}function d(T){return u(null,T)}function v(T){return u(void 0,T)}function b(T){return l(Number.isNaN,T)}function y(T,O){return l(A=>{const H=Array.from(A);return H.includes(T)||H.includes(Re(T))},O)}function x(T){return S(1,T)}function S(T=1,O){let A=-1;return l(()=>(A+=1,A>=T),O)}return Array.isArray(Re(r))?{toMatch:l,toContains:y,changed:x,changedTimes:S,get not(){return s=!s,this}}:{toMatch:l,toBe:u,toBeTruthy:f,toBeNull:d,toBeNaN:b,toBeUndefined:v,changed:x,changedTimes:S,get not(){return s=!s,this}}}function iy(r,s,l={}){const{immediate:u=!0}=l,f=At(!1);let d=null;function v(){d&&(clearTimeout(d),d=null)}function b(){f.value=!1,v()}function y(...x){v(),f.value=!0,d=setTimeout(()=>{f.value=!1,d=null,r(...x)},Re(s))}return u&&(f.value=!0,Ra&&y()),js(b),{isPending:f,start:y,stop:b}}function oy(r=!1){if(bt(r))return s=>(r.value=typeof s=="boolean"?s:!r.value,r.value);{const s=At(r);return[s,u=>(s.value=typeof u=="boolean"?u:!s.value,s.value)]}}var mc=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,ay=(r,s)=>{var l={};for(var u in r)sy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&mc)for(var u of mc(r))s.indexOf(u)<0&&ly.call(r,u)&&(l[u]=r[u]);return l};function uy(r,s,l={}){const u=l,{eventFilter:f=Yd}=u,d=ay(u,["eventFilter"]);return It(r,Gd(f,s),d)}var fy=Object.defineProperty,cy=Object.defineProperties,dy=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Zd=Object.prototype.propertyIsEnumerable,yc=(r,s,l)=>s in r?fy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,hy=(r,s)=>{for(var l in s||(s={}))Xd.call(s,l)&&yc(r,l,s[l]);if(Os)for(var l of Os(s))Zd.call(s,l)&&yc(r,l,s[l]);return r},py=(r,s)=>cy(r,dy(s)),gy=(r,s)=>{var l={};for(var u in r)Xd.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Os)for(var u of Os(r))s.indexOf(u)<0&&Zd.call(r,u)&&(l[u]=r[u]);return l};function vy(r,s,l={}){const u=l,{eventFilter:f}=u,d=gy(u,["eventFilter"]),{eventFilter:v,pause:b,resume:y,isActive:x}=Zm(f);return{stop:uy(r,s,py(hy({},d),{eventFilter:v})),pause:b,resume:y,isActive:x}}function Pw(r,s,l){let u;bt(l)?u={evaluating:l}:u=l||{};const{lazy:f=!1,evaluating:d=void 0,onError:v=ys}=u,b=At(!f),y=At(s);let x=0;return zv(async S=>{if(!b.value)return;x++;const T=x;let O=!1;d&&Promise.resolve().then(()=>{d.value=!0});try{const A=await r(H=>{S(()=>{d&&(d.value=!1),O||H()})});T===x&&(y.value=A)}catch(A){v(A)}finally{d&&(d.value=!1),O=!0}}),f?ct(()=>(b.value=!0,y.value)):y}function Da(r){var s;const l=Re(r);return(s=l==null?void 0:l.$el)!=null?s:l}const yn=Ra?window:void 0;function my(...r){let s,l,u,f;if(Ym(r[0])?([l,u,f]=r,s=yn):[s,l,u,f]=r,!s)return ys;let d=ys;const v=It(()=>Da(s),y=>{d(),y&&(y.addEventListener(l,u,f),d=()=>{y.removeEventListener(l,u,f),d=ys})},{immediate:!0,flush:"post"}),b=()=>{v(),d()};return js(b),b}function yy(r,s={}){const{window:l=yn}=s;let u;const f=At(!1),d=()=>{!l||(u||(u=l.matchMedia(r)),f.value=u.matches)};return ty(()=>{d(),u&&("addEventListener"in u?u.addEventListener("change",d):u.addListener(d),js(()=>{"removeEventListener"in u?u.removeEventListener("change",d):u.removeListener(d)}))}),f}const la=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},aa="__vueuse_ssr_handlers__";la[aa]=la[aa]||{};const by=la[aa];function Jd(r,s){return by[r]||s}function wy(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":r instanceof Date?"date":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"||Array.isArray(r)?"object":Number.isNaN(r)?"any":"number"}const xy={boolean:{read:r=>r==="true",write:r=>String(r)},object:{read:r=>JSON.parse(r),write:r=>JSON.stringify(r)},number:{read:r=>Number.parseFloat(r),write:r=>String(r)},any:{read:r=>r,write:r=>String(r)},string:{read:r=>r,write:r=>String(r)},map:{read:r=>new Map(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r.entries()))},set:{read:r=>new Set(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r))},date:{read:r=>new Date(r),write:r=>r.toISOString()}};function ky(r,s,l,u={}){var f;const{flush:d="pre",deep:v=!0,listenToStorageChanges:b=!0,writeDefaults:y=!0,shallow:x,window:S=yn,eventFilter:T,onError:O=pe=>{console.error(pe)}}=u,A=(x?co:At)(s);if(!l)try{l=Jd("getDefaultStorage",()=>{var pe;return(pe=yn)==null?void 0:pe.localStorage})()}catch(pe){O(pe)}if(!l)return A;const H=Re(s),re=wy(H),V=(f=u.serializer)!=null?f:xy[re],{pause:N,resume:D}=vy(A,()=>I(A.value),{flush:d,deep:v,eventFilter:T});return S&&b&&my(S,"storage",oe),oe(),A;function I(pe){try{pe==null?l.removeItem(r):l.setItem(r,V.write(pe))}catch(ye){O(ye)}}function B(pe){if(!(pe&&pe.key!==r)){N();try{const ye=pe?pe.newValue:l.getItem(r);return ye==null?(y&&H!==null&&l.setItem(r,V.write(H)),H):typeof ye!="string"?ye:V.read(ye)}catch(ye){O(ye)}finally{D()}}}function oe(pe){pe&&pe.key!==r||(A.value=B(pe))}}function Qd(r){return yy("(prefers-color-scheme: dark)",r)}var Sy=Object.defineProperty,bc=Object.getOwnPropertySymbols,Cy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,wc=(r,s,l)=>s in r?Sy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Ty=(r,s)=>{for(var l in s||(s={}))Cy.call(s,l)&&wc(r,l,s[l]);if(bc)for(var l of bc(s))_y.call(s,l)&&wc(r,l,s[l]);return r};function Ly(r={}){const{selector:s="html",attribute:l="class",window:u=yn,storage:f,storageKey:d="vueuse-color-scheme",listenToStorageChanges:v=!0,storageRef:b}=r,y=Ty({auto:"",light:"light",dark:"dark"},r.modes||{}),x=Qd({window:u}),S=ct(()=>x.value?"dark":"light"),T=b||(d==null?At("auto"):ky(d,"auto",f,{window:u,listenToStorageChanges:v})),O=ct({get(){return T.value==="auto"?S.value:T.value},set(V){T.value=V}}),A=Jd("updateHTMLAttrs",(V,N,D)=>{const I=u==null?void 0:u.document.querySelector(V);if(!!I)if(N==="class"){const B=D.split(/\s/g);Object.values(y).flatMap(oe=>(oe||"").split(/\s/g)).filter(Boolean).forEach(oe=>{B.includes(oe)?I.classList.add(oe):I.classList.remove(oe)})}else I.setAttribute(N,D)});function H(V){var N;A(s,l,(N=y[V])!=null?N:V)}function re(V){r.onChanged?r.onChanged(V,H):H(V)}return It(O,re,{flush:"post",immediate:!0}),ry(()=>re(O.value)),O}var Py=Object.defineProperty,Oy=Object.defineProperties,My=Object.getOwnPropertyDescriptors,xc=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Ay=Object.prototype.propertyIsEnumerable,kc=(r,s,l)=>s in r?Py(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,Ny=(r,s)=>{for(var l in s||(s={}))Ey.call(s,l)&&kc(r,l,s[l]);if(xc)for(var l of xc(s))Ay.call(s,l)&&kc(r,l,s[l]);return r},zy=(r,s)=>Oy(r,My(s));function Ry(r={}){const{valueDark:s="dark",valueLight:l="",window:u=yn}=r,f=Ly(zy(Ny({},r),{onChanged:(b,y)=>{var x;r.onChanged?(x=r.onChanged)==null||x.call(r,b==="dark"):y(b)},modes:{dark:s,light:l}})),d=Qd({window:u});return ct({get(){return f.value==="dark"},set(b){b===d.value?f.value="auto":f.value=b?"dark":"light"}})}var Sc=Object.getOwnPropertySymbols,Dy=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,Iy=(r,s)=>{var l={};for(var u in r)Dy.call(r,u)&&s.indexOf(u)<0&&(l[u]=r[u]);if(r!=null&&Sc)for(var u of Sc(r))s.indexOf(u)<0&&Fy.call(r,u)&&(l[u]=r[u]);return l};function Hy(r,s,l={}){const u=l,{window:f=yn}=u,d=Iy(u,["window"]);let v;const b=f&&"ResizeObserver"in f,y=()=>{v&&(v.disconnect(),v=void 0)},x=It(()=>Da(r),T=>{y(),b&&f&&T&&(v=new ResizeObserver(s),v.observe(T,d))},{immediate:!0,flush:"post"}),S=()=>{y(),x()};return js(S),{isSupported:b,stop:S}}var Wy=Object.defineProperty,By=Object.defineProperties,jy=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Uy=Object.prototype.hasOwnProperty,Ky=Object.prototype.propertyIsEnumerable,_c=(r,s,l)=>s in r?Wy(r,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[s]=l,ar=(r,s)=>{for(var l in s||(s={}))Uy.call(s,l)&&_c(r,l,s[l]);if(Cc)for(var l of Cc(s))Ky.call(s,l)&&_c(r,l,s[l]);return r},ds=(r,s)=>By(r,jy(s));const qy={json:"application/json",text:"text/plain",formData:"multipart/form-data"};function Tc(r){return Qm(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError")}function Kl(r){return r instanceof Headers?Object.fromEntries([...r.entries()]):r}function Us(r,...s){var l;const u=typeof AbortController=="function";let f={},d={immediate:!0,refetch:!1,timeout:0};const v={method:"GET",type:"text",payload:void 0};s.length>0&&(Tc(s[0])?d=ar(ar({},d),s[0]):f=s[0]),s.length>1&&Tc(s[1])&&(d=ar(ar({},d),s[1]));const{fetch:b=(l=yn)==null?void 0:l.fetch,initialData:y,timeout:x}=d,S=vo(),T=vo(),O=vo(),A=At(!1),H=At(!1),re=At(!1),V=At(null),N=co(null),D=co(null),I=co(y),B=ct(()=>u&&H.value);let oe,pe;const ye=()=>{u&&oe&&oe.abort()},We=$=>{H.value=$,A.value=!$};x&&(pe=iy(ye,x,{immediate:!1}));const Ee=async($=!1)=>{var w;We(!0),D.value=null,V.value=null,re.value=!1,oe=void 0,u&&(oe=new AbortController,oe.signal.onabort=()=>re.value=!0,f=ds(ar({},f),{signal:oe.signal}));const ee={method:v.method,headers:{}};if(v.payload){const Ge=Kl(ee.headers);v.payloadType&&(Ge["Content-Type"]=(w=qy[v.payloadType])!=null?w:v.payloadType),ee.body=v.payloadType==="json"?JSON.stringify(Re(v.payload)):Re(v.payload)}let Y=!1;const ue={url:Re(r),options:ar(ar({},ee),f),cancel:()=>{Y=!0}};if(d.beforeFetch&&Object.assign(ue,await d.beforeFetch(ue)),Y||!b)return We(!1),Promise.resolve(null);let ze=null;return pe&&pe.start(),new Promise((Ge,nt)=>{var lt;b(ue.url,ds(ar(ar({},ee),ue.options),{headers:ar(ar({},Kl(ee.headers)),Kl((lt=ue.options)==null?void 0:lt.headers))})).then(async Ie=>{if(N.value=Ie,V.value=Ie.status,ze=await Ie[v.type](),d.afterFetch&&V.value>=200&&V.value<300&&({data:ze}=await d.afterFetch({data:ze,response:Ie})),I.value=ze,!Ie.ok)throw new Error(Ie.statusText);return S.trigger(Ie),Ge(Ie)}).catch(async Ie=>{let Je=Ie.message||Ie.name;return d.onFetchError&&({data:ze,error:Je}=await d.onFetchError({data:ze,error:Ie,response:N.value})),I.value=ze,D.value=Je,T.trigger(Ie),$?nt(Ie):Ge(null)}).finally(()=>{We(!1),pe&&pe.stop(),O.trigger(null)})})};It(()=>[Re(r),Re(d.refetch)],()=>Re(d.refetch)&&Ee(),{deep:!0});const be={isFinished:A,statusCode:V,response:N,error:D,data:I,isFetching:H,canAbort:B,aborted:re,abort:ye,execute:Ee,onFetchResponse:S.on,onFetchError:T.on,onFetchFinally:O.on,get:de("GET"),put:de("PUT"),post:de("POST"),delete:de("DELETE"),patch:de("PATCH"),head:de("HEAD"),options:de("OPTIONS"),json:j("json"),text:j("text"),blob:j("blob"),arrayBuffer:j("arrayBuffer"),formData:j("formData")};function de($){return(w,ee)=>{if(!H.value)return v.method=$,v.payload=w,v.payloadType=ee,bt(v.payload)&&It(()=>[Re(v.payload),Re(d.refetch)],()=>Re(d.refetch)&&Ee(),{deep:!0}),!ee&&Re(w)&&Object.getPrototypeOf(Re(w))===Object.prototype&&(v.payloadType="json"),be}}function Ne(){return new Promise(($,w)=>{ny(A).toBe(!0).then(()=>$(be)).catch(ee=>w(ee))})}function j($){return()=>{if(!H.value)return v.type=$,ds(ar({},be),{then(w,ee){return Ne().then(w,ee)}})}}return d.immediate&&setTimeout(Ee,0),ds(ar({},be),{then($,w){return Ne().then($,w)}})}var Lc,Pc;Ra&&(window==null?void 0:window.navigator)&&((Lc=window==null?void 0:window.navigator)==null?void 0:Lc.platform)&&/iP(ad|hone|od)/.test((Pc=window==null?void 0:window.navigator)==null?void 0:Pc.platform);function $y(r,s,l,u={}){var f;const{passive:d=!1,eventName:v,deep:b=!1}=u,y=Aa(),x=l||(y==null?void 0:y.emit)||((f=y==null?void 0:y.$emit)==null?void 0:f.bind(y));let S=v;if(s||(s="modelValue"),S=v||S||`update:${s}`,d){const T=At(r[s]);return It(()=>r[s],O=>T.value=O),It(T,O=>{(O!==r[s]||b)&&x(S,O)},{deep:b}),T}else return ct({get(){return r[s]},set(T){x(S,T)}})}function Oc(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Gy=/^\[(.+?)~?="(.*)"\]$/,Yy=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/;function Xy(r){return r.match(Gy)}function Ow(r=""){return Yy.test(r)}function Zy(r,s){const l=[],u=[],f=new Set;Array.from(s).forEach(v=>{const b=Xy(v);b?b[2]?u.push(b):f.add(b[1]):f.add(v)});let d=0;return r.split(/[\s"';<>]/g).forEach(v=>{const b=d+v.length;f.has(v)&&l.push([d,b,v]),d=b+1}),u.forEach(([,v,b])=>{const y=new RegExp(`${Oc(v)}=(['"])[^\\1]*?${Oc(b)}[^\\1]*?\\1`,"g");Array.from(r.matchAll(y)).forEach(x=>{const S=x.index+x[0].indexOf(b),T=S+b.length;l.push([S,T,`[${v}="${b}"]`])})}),l}var Jy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Yr={exports:{}};(function(r,s){(function(l,u){r.exports=u()})(Jy,function(){var l=navigator.userAgent,u=navigator.platform,f=/gecko\/\d/i.test(l),d=/MSIE \d/.test(l),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(l),b=/Edge\/(\d+)/.exec(l),y=d||v||b,x=y&&(d?document.documentMode||6:+(b||v)[1]),S=!b&&/WebKit\//.test(l),T=S&&/Qt\/\d+\.\d+/.test(l),O=!b&&/Chrome\//.test(l),A=/Opera\//.test(l),H=/Apple Computer/.test(navigator.vendor),re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(l),V=/PhantomJS/.test(l),N=H&&(/Mobile\/\w+/.test(l)||navigator.maxTouchPoints>2),D=/Android/.test(l),I=N||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(l),B=N||/Mac/.test(u),oe=/\bCrOS\b/.test(l),pe=/win/i.test(u),ye=A&&l.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(A=!1,S=!0);var We=B&&(T||A&&(ye==null||ye<12.11)),Ee=f||y&&x>=9;function be(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var de=function(e,t){var i=e.className,n=be(t).exec(i);if(n){var o=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(o?n[1]+o:"")}};function Ne(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return Ne(e).appendChild(t)}function $(e,t,i,n){var o=document.createElement(e);if(i&&(o.className=i),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)o.appendChild(t[a]);return o}function w(e,t,i,n){var o=$(e,t,i,n);return o.setAttribute("role","presentation"),o}var ee;document.createRange?ee=function(e,t,i,n){var o=document.createRange();return o.setEnd(n||e,i),o.setStart(e,t),o}:ee=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch{return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function Y(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ue(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ze(e,t){var i=e.className;be(t).test(i)||(e.className+=(i?" ":"")+t)}function Ge(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!be(i[n]).test(t)&&(t+=" "+i[n]);return t}var nt=function(e){e.select()};N?nt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:y&&(nt=function(e){try{e.select()}catch{}});function lt(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ie(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function Je(e,t,i,n,o){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,c=o||0;;){var h=e.indexOf(" ",a);if(h<0||h>=t)return c+(t-a);c+=h-a,c+=i-c%i,a=h+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=lt(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function Z(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var K=50,se={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},Se={origin:"*mouse"},ge={origin:"+move"};function Te(e,t,i){for(var n=0,o=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var c=a-n;if(a==e.length||o+c>=t)return n+Math.min(c,t-o);if(o+=a-n,o+=i-o%i,n=a+1,o>=t)return n}}var _=[""];function E(e){for(;_.length<=e;)_.push(F(_)+" ");return _[e]}function F(e){return e[e.length-1]}function G(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function J(e,t,i){for(var n=0,o=i(t);n<e.length&&i(e[n])<=o;)n++;e.splice(n,0,t)}function ne(){}function fe(e,t){var i;return Object.create?i=Object.create(e):(ne.prototype=e,i=new ne),t&&Ie(t,i),i}var ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ce.test(e))}function L(e,t){return t?t.source.indexOf("\\w")>-1&&te(e)?!0:t.test(e):te(e)}function W(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var z=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function he(e){return e.charCodeAt(0)>=768&&z.test(e)}function Le(e,t,i){for(;(i<0?t>0:t<e.length)&&he(e.charAt(t));)t+=i;return t}function Be(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var o=(t+i)/2,a=n<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+n}}function tt(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var o=!1,a=0;a<e.length;++a){var c=e[a];(c.from<i&&c.to>t||t==i&&c.to==t)&&(n(Math.max(c.from,t),Math.min(c.to,i),c.level==1?"rtl":"ltr",a),o=!0)}o||n(t,i,"ltr")}var Ke=null;function He(e,t,i){var n;Ke=null;for(var o=0;o<e.length;++o){var a=e[o];if(a.from<t&&a.to>t)return o;a.to==t&&(a.from!=a.to&&i=="before"?n=o:Ke=o),a.from==t&&(a.from!=a.to&&i!="before"?n=o:Ke=o)}return n!=null?n:Ke}var xt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(g){return g<=247?e.charAt(g):1424<=g&&g<=1524?"R":1536<=g&&g<=1785?t.charAt(g-1536):1774<=g&&g<=2220?"r":8192<=g&&g<=8203?"w":g==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,c=/[Lb1n]/,h=/[1n]/;function p(g,k,C){this.level=g,this.from=k,this.to=C}return function(g,k){var C=k=="ltr"?"L":"R";if(g.length==0||k=="ltr"&&!n.test(g))return!1;for(var R=g.length,M=[],U=0;U<R;++U)M.push(i(g.charCodeAt(U)));for(var Q=0,ae=C;Q<R;++Q){var ve=M[Q];ve=="m"?M[Q]=ae:ae=ve}for(var we=0,me=C;we<R;++we){var ke=M[we];ke=="1"&&me=="r"?M[we]="n":a.test(ke)&&(me=ke,ke=="r"&&(M[we]="R"))}for(var Ae=1,Me=M[0];Ae<R-1;++Ae){var Ue=M[Ae];Ue=="+"&&Me=="1"&&M[Ae+1]=="1"?M[Ae]="1":Ue==","&&Me==M[Ae+1]&&(Me=="1"||Me=="n")&&(M[Ae]=Me),Me=Ue}for(var rt=0;rt<R;++rt){var _t=M[rt];if(_t==",")M[rt]="N";else if(_t=="%"){var ft=void 0;for(ft=rt+1;ft<R&&M[ft]=="%";++ft);for(var Vt=rt&&M[rt-1]=="!"||ft<R&&M[ft]=="1"?"1":"N",qt=rt;qt<ft;++qt)M[qt]=Vt;rt=ft-1}}for(var mt=0,$t=C;mt<R;++mt){var Ot=M[mt];$t=="L"&&Ot=="1"?M[mt]="L":a.test(Ot)&&($t=Ot)}for(var wt=0;wt<R;++wt)if(o.test(M[wt])){var yt=void 0;for(yt=wt+1;yt<R&&o.test(M[yt]);++yt);for(var ht=(wt?M[wt-1]:C)=="L",Gt=(yt<R?M[yt]:C)=="L",si=ht==Gt?ht?"L":"R":C,sn=wt;sn<yt;++sn)M[sn]=si;wt=yt-1}for(var Ft=[],Mr,Tt=0;Tt<R;)if(c.test(M[Tt])){var Dl=Tt;for(++Tt;Tt<R&&c.test(M[Tt]);++Tt);Ft.push(new p(0,Dl,Tt))}else{var Ur=Tt,On=Ft.length,Mn=k=="rtl"?1:0;for(++Tt;Tt<R&&M[Tt]!="L";++Tt);for(var Wt=Ur;Wt<Tt;)if(h.test(M[Wt])){Ur<Wt&&(Ft.splice(On,0,new p(1,Ur,Wt)),On+=Mn);var li=Wt;for(++Wt;Wt<Tt&&h.test(M[Wt]);++Wt);Ft.splice(On,0,new p(2,li,Wt)),On+=Mn,Ur=Wt}else++Wt;Ur<Tt&&Ft.splice(On,0,new p(1,Ur,Tt))}return k=="ltr"&&(Ft[0].level==1&&(Mr=g.match(/^\s+/))&&(Ft[0].from=Mr[0].length,Ft.unshift(new p(0,0,Mr[0].length))),F(Ft).level==1&&(Mr=g.match(/\s+$/))&&(F(Ft).to-=Mr[0].length,Ft.push(new p(0,R-Mr[0].length,R)))),k=="rtl"?Ft.reverse():Ft}}();function vt(e,t){var i=e.order;return i==null&&(i=e.order=xt(e.text,t)),i}var dr=[],Pe=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||dr).concat(i)}};function Dr(e,t){return e._handlers&&e._handlers[t]||dr}function et(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,o=n&&n[t];if(o){var a=Z(o,i);a>-1&&(n[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function Oe(e,t){var i=Dr(e,t);if(!!i.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<i.length;++o)i[o].apply(null,n)}function ut(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,i||t.type,e,t),nr(t)||t.codemirrorIgnore}function In(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Z(i,t[n])==-1&&i.push(t[n])}function Pt(e,t){return Dr(e,t).length>0}function Sr(e){e.prototype.on=function(t,i){Pe(this,t,i)},e.prototype.off=function(t,i){et(this,t,i)}}function zt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Hn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function nr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function bn(e){zt(e),Hn(e)}function Xr(e){return e.target||e.srcElement}function Lo(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),B&&e.ctrlKey&&t==1&&(t=3),t}var Ti=function(){if(y&&x<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}(),jt;function Po(e){if(jt==null){var t=$("span","\u200B");j(e,$("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(jt=t.offsetWidth<=1&&t.offsetHeight>2&&!(y&&x<8))}var i=jt?$("span","\u200B"):$("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Li;function Cr(e){if(Li!=null)return Li;var t=j(e,document.createTextNode("A\u062EA")),i=ee(t,0,1).getBoundingClientRect(),n=ee(t,1,2).getBoundingClientRect();return Ne(e),!i||i.left==i.right?!1:Li=n.right-i.right<3}var Pi=`
2
2
 
3
3
  b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var o=e.indexOf(`
4
- `,t);o==-1&&(o=e.length);var a=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),c=a.indexOf("\r");c!=-1?(i.push(a.slice(0,c)),t+=c+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Oo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Mo=function(){var e=$("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Oi=null;function Zr(e){if(Oi!=null)return Oi;var t=j(e,$("span","x")),i=t.getBoundingClientRect(),n=ee(t,0,1).getBoundingClientRect();return Oi=Math.abs(i.left-n.left)>1}var dr={},ir={};function Eo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),dr[e]=t}function Fr(e,t){ir[e]=t}function Wn(e){if(typeof e=="string"&&ir.hasOwnProperty(e))e=ir[e];else if(e&&typeof e.name=="string"&&ir.hasOwnProperty(e.name)){var t=ir[e.name];typeof t=="string"&&(t={name:t}),e=fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bn(e,t){t=Wn(t);var i=dr[t.name];if(!i)return Bn(e,"text/plain");var n=i(e,t);if(hr.hasOwnProperty(t.name)){var o=hr[t.name];for(var a in o)!o.hasOwnProperty(a)||(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=o[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var c in t.modeProps)n[c]=t.modeProps[c];return n}var hr={};function pr(e,t){var i=hr.hasOwnProperty(e)?hr[e]:hr[e]={};Ie(t,i)}function or(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),i[n]=o}return i}function Mi(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ei(e,t,i){return e.startState?e.startState(t,i):!0}var dt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};dt.prototype.eol=function(){return this.pos>=this.string.length},dt.prototype.sol=function(){return this.pos==this.lineStart},dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dt.prototype.skipToEnd=function(){this.pos=this.string.length},dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},dt.prototype.backUp=function(e){this.pos-=e},dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Je(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},dt.prototype.indentation=function(){return Je(this.string,null,this.tabSize)-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},dt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(c){return i?c.toLowerCase():c},o=this.string.substr(this.pos,e.length);if(n(o)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function _e(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var o=i.children[n],a=o.chunkSize();if(t<a){i=o;break}t-=a}return i.lines[t]}function _r(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var c=a.text;o==i.line&&(c=c.slice(0,i.ch)),o==t.line&&(c=c.slice(t.ch)),n.push(c),++o}),n}function Ai(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function Jt(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Xe(e){if(e.parent==null)return null;for(var t=e.parent,i=Z(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)i+=n.children[o].chunkSize();return i+t.first}function Tr(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],a=o.height;if(t<a){e=o;continue e}t-=a,i+=o.chunkSize()}return i}while(!e.lines);for(var c=0;c<e.lines.length;++c){var h=e.lines[c],p=h.height;if(t<p)break;t-=p}return i+c}function wn(e,t){return t>=e.first&&t<e.first+e.size}function Ni(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ie(e,t,i){if(i===void 0&&(i=null),!(this instanceof ie))return new ie(e,t,i);this.line=e,this.ch=t,this.sticky=i}function m(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&m(e,t)==0}function X(e){return ie(e.line,e.ch)}function le(e,t){return m(e,t)<0?t:e}function De(e,t){return m(e,t)<0?e:t}function $e(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function xe(e,t){if(t.line<e.first)return ie(e.first,0);var i=e.first+e.size-1;return t.line>i?ie(i,_e(e,i).text.length):Rt(t,_e(e,t.line).text.length)}function Rt(e,t){var i=e.ch;return i==null||i>t?ie(e.line,t):i<0?ie(e.line,0):e}function sr(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=xe(e,t[n]);return i}var jn=function(e,t){this.state=e,this.lookAhead=t},Lr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Lr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Lr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Lr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Lr.fromSaved=function(e,t,i){return t instanceof jn?new Lr(e,or(e.mode,t.state),i,t.lookAhead):new Lr(e,or(e.mode,t),i)},Lr.prototype.save=function(e){var t=e!==!1?or(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jn(t,this.maxLookAhead):t};function Ba(e,t,i,n){var o=[e.state.modeGen],a={};Ga(e,t.text,e.doc.mode,i,function(g,k){return o.push(g,k)},a,n);for(var c=i.state,h=function(g){i.baseTokens=o;var k=e.state.overlays[g],C=1,R=0;i.state=!0,Ga(e,t.text,k.mode,i,function(M,U){for(var Q=C;R<M;){var ae=o[C];ae>M&&o.splice(C,1,M,o[C+1],ae),C+=2,R=Math.min(M,ae)}if(!!U)if(k.opaque)o.splice(Q,C-Q,M,"overlay "+U),C=Q+2;else for(;Q<C;Q+=2){var ve=o[Q+1];o[Q+1]=(ve?ve+" ":"")+"overlay "+U}},a),i.state=c,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)h(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function ja(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=zi(e,Xe(t)),o=t.text.length>e.options.maxHighlightLength&&or(e.doc.mode,n.state),a=Ba(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function zi(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new Lr(n,!0,t);var a=wh(e,t,i),c=a>n.first&&_e(n,a-1).stateAfter,h=c?Lr.fromSaved(n,c,a):new Lr(n,Ei(n.mode),a);return n.iter(a,t,function(p){$s(e,p.text,h);var g=h.line;p.stateAfter=g==t-1||g%5==0||g>=o.viewFrom&&g<o.viewTo?h.save():null,h.nextLine()}),i&&(n.modeFrontier=h.line),h}function $s(e,t,i,n){var o=e.doc.mode,a=new dt(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Ua(o,i.state);!a.eol();)Gs(o,a,i.state),a.start=a.pos}function Ua(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=Mi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Gs(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=Mi(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ka=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function qa(e,t,i,n){var o=e.doc,a=o.mode,c;t=xe(o,t);var h=_e(o,t.line),p=zi(e,t.line,i),g=new dt(h.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,c=Gs(a,g,p.state),n&&k.push(new Ka(g,c,or(o.mode,p.state)));return n?k:new Ka(g,c,p.state)}function $a(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function Ga(e,t,i,n,o,a,c){var h=i.flattenSpans;h==null&&(h=e.options.flattenSpans);var p=0,g=null,k=new dt(t,e.options.tabSize,n),C,R=e.options.addModeClass&&[null];for(t==""&&$a(Ua(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(h=!1,c&&$s(e,t,n,k.pos),k.pos=t.length,C=null):C=$a(Gs(i,k,n.state,R),a),R){var M=R[0].name;M&&(C="m-"+(C?M+" "+C:M))}if(!h||g!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,g);g=C}k.start=k.pos}for(;p<k.pos;){var U=Math.min(k.pos,p+5e3);o(U,g),p=U}}function wh(e,t,i){for(var n,o,a=e.doc,c=i?-1:t-(e.doc.mode.innerMode?1e3:100),h=t;h>c;--h){if(h<=a.first)return a.first;var p=_e(a,h-1),g=p.stateAfter;if(g&&(!i||h+(g instanceof jn?g.lookAhead:0)<=a.modeFrontier))return h;var k=Je(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=h-1,n=k)}return o}function xh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,n=t-1;n>i;n--){var o=_e(e,n).stateAfter;if(o&&(!(o instanceof jn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Ya=!1,Ir=!1;function kh(){Ya=!0}function Sh(){Ir=!0}function Ao(e,t,i){this.marker=e,this.from=t,this.to=i}function Ri(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Ch(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function _h(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Th(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);if(h||a.from==t&&c.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new Ao(c,a.from,p?null:a.to))}}return n}function Lh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);if(h||a.from==t&&c.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new Ao(c,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Ys(e,t){if(t.full)return null;var i=wn(e,t.from.line)&&_e(e,t.from.line).markedSpans,n=wn(e,t.to.line)&&_e(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,c=m(t.from,t.to)==0,h=Th(i,o,c),p=Lh(n,a,c),g=t.text.length==1,k=F(t.text).length+(g?o:0);if(h)for(var C=0;C<h.length;++C){var R=h[C];if(R.to==null){var M=Ri(p,R.marker);M?g&&(R.to=M.to==null?null:M.to+k):R.to=o}}if(p)for(var U=0;U<p.length;++U){var Q=p[U];if(Q.to!=null&&(Q.to+=k),Q.from==null){var ae=Ri(h,Q.marker);ae||(Q.from=k,g&&(h||(h=[])).push(Q))}else Q.from+=k,g&&(h||(h=[])).push(Q)}h&&(h=Xa(h)),p&&p!=h&&(p=Xa(p));var ve=[h];if(!g){var we=t.text.length-2,me;if(we>0&&h)for(var ke=0;ke<h.length;++ke)h[ke].to==null&&(me||(me=[])).push(new Ao(h[ke].marker,null,null));for(var Ae=0;Ae<we;++Ae)ve.push(me);ve.push(p)}return ve}function Xa(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ph(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(M){if(M.markedSpans)for(var U=0;U<M.markedSpans.length;++U){var Q=M.markedSpans[U].marker;Q.readOnly&&(!n||Z(n,Q)==-1)&&(n||(n=[])).push(Q)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var c=n[a],h=c.find(0),p=0;p<o.length;++p){var g=o[p];if(!(m(g.to,h.from)<0||m(g.from,h.to)>0)){var k=[p,1],C=m(g.from,h.from),R=m(g.to,h.to);(C<0||!c.inclusiveLeft&&!C)&&k.push({from:g.from,to:h.from}),(R>0||!c.inclusiveRight&&!R)&&k.push({from:h.to,to:g.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Za(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Ja(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function No(e){return e.inclusiveLeft?-1:0}function zo(e){return e.inclusiveRight?1:0}function Xs(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=m(n.from,o.from)||No(e)-No(t);if(a)return-a;var c=m(n.to,o.to)||zo(e)-zo(t);return c||t.id-e.id}function Qa(e,t){var i=Ir&&e.markedSpans,n;if(i)for(var o=void 0,a=0;a<i.length;++a)o=i[a],o.marker.collapsed&&(t?o.from:o.to)==null&&(!n||Xs(n,o.marker)<0)&&(n=o.marker);return n}function Va(e){return Qa(e,!0)}function Ro(e){return Qa(e,!1)}function Oh(e,t){var i=Ir&&e.markedSpans,n;if(i)for(var o=0;o<i.length;++o){var a=i[o];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Xs(n,a.marker)<0)&&(n=a.marker)}return n}function eu(e,t,i,n,o){var a=_e(e,t),c=Ir&&a.markedSpans;if(c)for(var h=0;h<c.length;++h){var p=c[h];if(!!p.marker.collapsed){var g=p.marker.find(0),k=m(g.from,i)||No(p.marker)-No(o),C=m(g.to,n)||zo(p.marker)-zo(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(g.to,i)>=0:m(g.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(g.from,n)<=0:m(g.from,n)<0)))return!0}}}function gr(e){for(var t;t=Va(e);)e=t.find(-1,!0).line;return e}function Mh(e){for(var t;t=Ro(e);)e=t.find(1,!0).line;return e}function Eh(e){for(var t,i;t=Ro(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Zs(e,t){var i=_e(e,t),n=gr(i);return i==n?t:Xe(n)}function tu(e,t){if(t>e.lastLine())return t;var i=_e(e,t),n;if(!Jr(e,i))return t;for(;n=Ro(i);)i=n.find(1,!0).line;return Xe(i)+1}function Jr(e,t){var i=Ir&&t.markedSpans;if(i){for(var n=void 0,o=0;o<i.length;++o)if(n=i[o],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&Js(e,t,n))return!0}}}function Js(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Js(e,n.line,Ri(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var o=void 0,a=0;a<t.markedSpans.length;++a)if(o=t.markedSpans[a],o.marker.collapsed&&!o.marker.widgetNode&&o.from==i.to&&(o.to==null||o.to!=i.from)&&(o.marker.inclusiveLeft||i.marker.inclusiveRight)&&Js(e,t,o))return!0}function Hr(e){e=gr(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var o=i.lines[n];if(o==e)break;t+=o.height}for(var a=i.parent;a;i=a,a=i.parent)for(var c=0;c<a.children.length;++c){var h=a.children[c];if(h==i)break;t+=h.height}return t}function Do(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Va(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=Ro(n);){var a=i.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Qs(e){var t=e.display,i=e.doc;t.maxLine=_e(i,i.first),t.maxLineLength=Do(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Do(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Un=function(e,t,i){this.text=e,Ja(this,t),this.height=i?i(this):1};Un.prototype.lineNo=function(){return Xe(this)},Sr(Un);function Ah(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Za(e),Ja(e,i);var o=n?n(e):1;o!=e.height&&Jt(e,o)}function Nh(e){e.parent=null,Za(e)}var zh={},Rh={};function ru(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Rh:zh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function nu(e,t){var i=w("span",null,null,S?"padding-right: .1px":null),n={pre:w("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,c=void 0;n.pos=0,n.addToken=Fh,Cr(e.display.measure)&&(c=vt(a,e.doc.direction))&&(n.addToken=Hh(n.addToken,c)),n.map=[];var h=t!=e.display.externalMeasured&&Xe(a);Wh(a,n,ja(e,a,h)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ge(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ge(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Po(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(S){var p=n.content.lastChild;(/\bcm-tab\b/.test(p.className)||p.querySelector&&p.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ge(n.pre.className,n.textClass||"")),n}function Dh(e){var t=$("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fh(e,t,i,n,o,a,c){if(!!t){var h=e.splitSpaces?Ih(t,e.trailingSpace):t,p=e.cm.state.specialChars,g=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,k),y&&x<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var R=p.exec(t),M=R?R.index-C:t.length-C;if(M){var U=document.createTextNode(h.slice(C,C+M));y&&x<9?k.appendChild($("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+M,U),e.col+=M,e.pos+=M}if(!R)break;C+=M+1;var Q=void 0;if(R[0]==" "){var ae=e.cm.options.tabSize,ve=ae-e.col%ae;Q=k.appendChild($("span",E(ve),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=ve}else R[0]=="\r"||R[0]==`
5
- `?(Q=k.appendChild($("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Q.setAttribute("cm-text",R[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(R[0]),Q.setAttribute("cm-text",R[0]),y&&x<9?k.appendChild($("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=h.charCodeAt(t.length-1)==32,i||n||o||g||a||c){var we=i||"";n&&(we+=n),o&&(we+=o);var me=$("span",[k],we,a);if(c)for(var ke in c)c.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&me.setAttribute(ke,c[ke]);return e.content.appendChild(me)}e.content.appendChild(k)}}function Ih(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",o=0;o<e.length;o++){var a=e.charAt(o);a==" "&&i&&(o==e.length-1||e.charCodeAt(o+1)==32)&&(a="\xA0"),n+=a,i=a==" "}return n}function Hh(e,t){return function(i,n,o,a,c,h,p){o=o?o+" cm-force-border":"cm-force-border";for(var g=i.pos,k=g+n.length;;){for(var C=void 0,R=0;R<t.length&&(C=t[R],!(C.to>g&&C.from<=g));R++);if(C.to>=k)return e(i,n,o,a,c,h,p);e(i,n.slice(0,C.to-g),o,a,null,h,p),a=null,n=n.slice(C.to-g),g=C.to}}}function iu(e,t,i,n){var o=!n&&i.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",i.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Wh(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var c=1;c<i.length;c+=2)t.addToken(t,o.slice(a,a=i[c]),ru(i[c+1],t.cm.options));return}for(var h=o.length,p=0,g=1,k="",C,R,M=0,U,Q,ae,ve,we;;){if(M==p){U=Q=ae=R="",we=null,ve=null,M=1/0;for(var me=[],ke=void 0,Ae=0;Ae<n.length;++Ae){var Me=n[Ae],Ue=Me.marker;if(Ue.type=="bookmark"&&Me.from==p&&Ue.widgetNode)me.push(Ue);else if(Me.from<=p&&(Me.to==null||Me.to>p||Ue.collapsed&&Me.to==p&&Me.from==p)){if(Me.to!=null&&Me.to!=p&&M>Me.to&&(M=Me.to,Q=""),Ue.className&&(U+=" "+Ue.className),Ue.css&&(R=(R?R+";":"")+Ue.css),Ue.startStyle&&Me.from==p&&(ae+=" "+Ue.startStyle),Ue.endStyle&&Me.to==M&&(ke||(ke=[])).push(Ue.endStyle,Me.to),Ue.title&&((we||(we={})).title=Ue.title),Ue.attributes)for(var rt in Ue.attributes)(we||(we={}))[rt]=Ue.attributes[rt];Ue.collapsed&&(!ve||Xs(ve.marker,Ue)<0)&&(ve=Me)}else Me.from>p&&M>Me.from&&(M=Me.from)}if(ke)for(var _t=0;_t<ke.length;_t+=2)ke[_t+1]==M&&(Q+=" "+ke[_t]);if(!ve||ve.from==p)for(var ft=0;ft<me.length;++ft)iu(t,0,me[ft]);if(ve&&(ve.from||0)==p){if(iu(t,(ve.to==null?h+1:ve.to)-p,ve.marker,ve.from==null),ve.to==null)return;ve.to==p&&(ve=!1)}}if(p>=h)break;for(var Vt=Math.min(h,M);;){if(k){var qt=p+k.length;if(!ve){var mt=qt>Vt?k.slice(0,Vt-p):k;t.addToken(t,mt,C?C+U:U,ae,p+mt.length==M?Q:"",R,we)}if(qt>=Vt){k=k.slice(Vt-p),p=Vt;break}p=qt,ae=""}k=o.slice(a,a=i[g++]),C=ru(i[g++],t.cm.options)}}}function ou(e,t,i){this.line=t,this.rest=Eh(t),this.size=this.rest?Xe(F(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Jr(e,t)}function Fo(e,t,i){for(var n=[],o,a=t;a<i;a=o){var c=new ou(e.doc,_e(e.doc,a),a);o=a+c.size,n.push(c)}return n}var Kn=null;function Bh(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function jh(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(i<t.length)}function Uh(e,t){var i=e.ownsGroup;if(!!i)try{jh(i)}finally{Kn=null,t(i)}}var Di=null;function kt(e,t){var i=Dr(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Kn?o=Kn.delayedCallbacks:Di?o=Di:(o=Di=[],setTimeout(Kh,0));for(var a=function(h){o.push(function(){return i[h].apply(null,n)})},c=0;c<i.length;++c)a(c)}}function Kh(){var e=Di;Di=null;for(var t=0;t<e.length;++t)e[t]()}function su(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?$h(e,t):a=="gutter"?au(e,t,i,n):a=="class"?Vs(e,t):a=="widget"&&Gh(e,t,n)}t.changes=null}function Fi(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&x<8&&(e.node.style.zIndex=2)),e.node}function qh(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=Fi(t);t.background=n.insertBefore($("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function lu(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):nu(e,t)}function $h(e,t){var i=t.text.className,n=lu(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Vs(e,t)):i&&(t.text.className=i)}function Vs(e,t){qh(e,t),t.line.wrapClass?Fi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function au(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Fi(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var c=Fi(t),h=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(h.setAttribute("aria-hidden","true"),e.display.input.setUneditable(h),c.insertBefore(h,t.text),t.line.gutterClass&&(h.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=h.appendChild($("div",Ni(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var p=0;p<e.display.gutterSpecs.length;++p){var g=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(g)&&a[g];k&&h.appendChild($("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function Gh(e,t,i){t.alignable&&(t.alignable=null);for(var n=be("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);uu(e,t,i)}function Yh(e,t,i,n){var o=lu(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Vs(e,t),au(e,t,i,n),uu(e,t,n),t.node}function uu(e,t,i){if(fu(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)fu(e,t.rest[n],t,i,!1)}function fu(e,t,i,n,o){if(!!t.widgets)for(var a=Fi(i),c=0,h=t.widgets;c<h.length;++c){var p=h[c],g=$("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),Xh(p,g,i,n),e.display.input.setUneditable(g),o&&p.above?a.insertBefore(g,i.gutter||i.text):a.appendChild(g),kt(p,"redraw")}}function Xh(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ii(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Y(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),j(t.display.measure,$("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Wr(e,t){for(var i=Xr(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Io(e){return e.lineSpace.offsetTop}function el(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function cu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,$("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Pr(e){return K-e.display.nativeBarWidth}function xn(e){return e.display.scroller.clientWidth-Pr(e)-e.display.barWidth}function tl(e){return e.display.scroller.clientHeight-Pr(e)-e.display.barHeight}function Zh(e,t,i){var n=e.options.lineWrapping,o=n&&xn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var c=t.text.firstChild.getClientRects(),h=0;h<c.length-1;h++){var p=c[h],g=c[h+1];Math.abs(p.bottom-g.bottom)>2&&a.push((p.bottom+g.top)/2-i.top)}}a.push(i.bottom-i.top)}}function du(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Xe(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Jh(e,t){t=gr(t);var i=Xe(t),n=e.display.externalMeasured=new ou(e.doc,t,i);n.lineN=i;var o=n.built=nu(e,n);return n.text=o.pre,j(e.display.lineMeasure,o.pre),n}function hu(e,t,i,n){return Or(e,qn(e,t),i,n)}function rl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Cn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function qn(e,t){var i=Xe(t),n=rl(e,i);n&&!n.text?n=null:n&&n.changes&&(su(e,n,i,ll(e)),e.curOp.forceUpdate=!0),n||(n=Jh(e,t));var o=du(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Or(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),c;return t.cache.hasOwnProperty(a)?c=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zh(e,t.view,t.rect),t.hasHeights=!0),c=Vh(e,t,i,n),c.bogus||(t.cache[a]=c)),{left:c.left,right:c.right,top:o?c.rtop:c.top,bottom:o?c.rbottom:c.bottom}}var pu={left:0,right:0,top:0,bottom:0};function gu(e,t,i){for(var n,o,a,c,h,p,g=0;g<e.length;g+=3)if(h=e[g],p=e[g+1],t<h?(o=0,a=1,c="left"):t<p?(o=t-h,a=o+1):(g==e.length-3||t==p&&e[g+3]>t)&&(a=p-h,o=a-1,t>=p&&(c="right")),o!=null){if(n=e[g+2],h==p&&i==(n.insertLeft?"left":"right")&&(c=i),i=="left"&&o==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],c="left";if(i=="right"&&o==p-h)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],c="right";break}return{node:n,start:o,end:a,collapse:c,coverStart:h,coverEnd:p}}function Qh(e,t){var i=pu;if(t=="left")for(var n=0;n<e.length&&(i=e[n]).left==i.right;n++);else for(var o=e.length-1;o>=0&&(i=e[o]).left==i.right;o--);return i}function Vh(e,t,i,n){var o=gu(t.map,i,n),a=o.node,c=o.start,h=o.end,p=o.collapse,g;if(a.nodeType==3){for(var k=0;k<4;k++){for(;c&&he(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&he(t.line.text.charAt(o.coverStart+h));)++h;if(y&&x<9&&c==0&&h==o.coverEnd-o.coverStart?g=a.parentNode.getBoundingClientRect():g=Qh(ee(a,c,h).getClientRects(),n),g.left||g.right||c==0)break;h=c,c=c-1,p="right"}y&&x<11&&(g=ep(e.display.measure,g))}else{c>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?g=C[n=="right"?C.length-1:0]:g=a.getBoundingClientRect()}if(y&&x<9&&!c&&(!g||!g.left&&!g.right)){var R=a.parentNode.getClientRects()[0];R?g={left:R.left,right:R.left+Gn(e.display),top:R.top,bottom:R.bottom}:g=pu}for(var M=g.top-t.rect.top,U=g.bottom-t.rect.top,Q=(M+U)/2,ae=t.view.measure.heights,ve=0;ve<ae.length-1&&!(Q<ae[ve]);ve++);var we=ve?ae[ve-1]:0,me=ae[ve],ke={left:(p=="right"?g.right:g.left)-t.rect.left,right:(p=="left"?g.left:g.right)-t.rect.left,top:we,bottom:me};return!g.left&&!g.right&&(ke.bogus=!0),e.options.singleCursorHeightPerLine||(ke.rtop=M,ke.rbottom=U),ke}function ep(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Zr(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function vu(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function mu(e){e.display.externalMeasure=null,Ne(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vu(e.display.view[t])}function Hi(e){mu(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yu(){return O&&D?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function bu(){return O&&D?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nl(e){var t=gr(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Ii(i[o]));return n}function Ho(e,t,i,n,o){if(!o){var a=nl(t);i.top+=a,i.bottom+=a}if(n=="line")return i;n||(n="local");var c=Hr(t);if(n=="local"?c+=Io(e.display):c-=e.display.viewOffset,n=="page"||n=="window"){var h=e.display.lineSpace.getBoundingClientRect();c+=h.top+(n=="window"?0:bu());var p=h.left+(n=="window"?0:yu());i.left+=p,i.right+=p}return i.top+=c,i.bottom+=c,i}function wu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=yu(),o-=bu();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var c=e.display.lineSpace.getBoundingClientRect();return{left:n-c.left,top:o-c.top}}function Wo(e,t,i,n,o){return n||(n=_e(e.doc,t.line)),Ho(e,n,hu(e,n,t.ch,o),i)}function vr(e,t,i,n,o,a){n=n||_e(e.doc,t.line),o||(o=qn(e,n));function c(U,Q){var ae=Or(e,o,U,Q?"right":"left",a);return Q?ae.left=ae.right:ae.right=ae.left,Ho(e,n,ae,i)}var h=vt(n,e.doc.direction),p=t.ch,g=t.sticky;if(p>=n.text.length?(p=n.text.length,g="before"):p<=0&&(p=0,g="after"),!h)return c(g=="before"?p-1:p,g=="before");function k(U,Q,ae){var ve=h[Q],we=ve.level==1;return c(ae?U-1:U,we!=ae)}var C=He(h,p,g),R=Ke,M=k(p,C,g=="before");return R!=null&&(M.other=k(p,R,g!="before")),M}function xu(e,t){var i=0;t=xe(e.doc,t),e.options.lineWrapping||(i=Gn(e.display)*t.ch);var n=_e(e.doc,t.line),o=Hr(n)+Io(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function il(e,t,i,n,o){var a=ie(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function ol(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return il(n.first,0,null,-1,-1);var o=Tr(n,i),a=n.first+n.size-1;if(o>a)return il(n.first+n.size-1,_e(n,a).text.length,null,1,1);t<0&&(t=0);for(var c=_e(n,o);;){var h=tp(e,c,o,t,i),p=Oh(c,h.ch+(h.xRel>0||h.outside>0?1:0));if(!p)return h;var g=p.find(1);if(g.line==o)return g;c=_e(n,o=g.line)}}function ku(e,t,i,n){n-=nl(t);var o=t.text.length,a=Be(function(c){return Or(e,i,c-1).bottom<=n},o,0);return o=Be(function(c){return Or(e,i,c).top>n},a,o),{begin:a,end:o}}function Su(e,t,i,n){i||(i=qn(e,t));var o=Ho(e,t,Or(e,i,n),"line").top;return ku(e,t,i,o)}function sl(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function tp(e,t,i,n,o){o-=Hr(t);var a=qn(e,t),c=nl(t),h=0,p=t.text.length,g=!0,k=vt(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?np:rp)(e,t,i,a,k,n,o);g=C.level!=1,h=g?C.from:C.to-1,p=g?C.to:C.from-1}var R=null,M=null,U=Be(function(Ae){var Me=Or(e,a,Ae);return Me.top+=c,Me.bottom+=c,sl(Me,n,o,!1)?(Me.top<=o&&Me.left<=n&&(R=Ae,M=Me),!0):!1},h,p),Q,ae,ve=!1;if(M){var we=n-M.left<M.right-n,me=we==g;U=R+(me?0:1),ae=me?"after":"before",Q=we?M.left:M.right}else{!g&&(U==p||U==h)&&U++,ae=U==0?"after":U==t.text.length?"before":Or(e,a,U-(g?1:0)).bottom+c<=o==g?"after":"before";var ke=vr(e,ie(i,U,ae),"line",t,a);Q=ke.left,ve=o<ke.top?-1:o>=ke.bottom?1:0}return U=Le(t.text,U,1),il(i,U,ae,ve,n-Q)}function rp(e,t,i,n,o,a,c){var h=Be(function(C){var R=o[C],M=R.level!=1;return sl(vr(e,ie(i,M?R.to:R.from,M?"before":"after"),"line",t,n),a,c,!0)},0,o.length-1),p=o[h];if(h>0){var g=p.level!=1,k=vr(e,ie(i,g?p.from:p.to,g?"after":"before"),"line",t,n);sl(k,a,c,!0)&&k.top>c&&(p=o[h-1])}return p}function np(e,t,i,n,o,a,c){var h=ku(e,t,n,c),p=h.begin,g=h.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,C=null,R=0;R<o.length;R++){var M=o[R];if(!(M.from>=g||M.to<=p)){var U=M.level!=1,Q=Or(e,n,U?Math.min(g,M.to)-1:Math.max(p,M.from)).right,ae=Q<a?a-Q+1e9:Q-a;(!k||C>ae)&&(k=M,C=ae)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>g&&(k={from:k.from,to:g,level:k.level}),k}var kn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kn==null){kn=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kn.appendChild(document.createTextNode("x")),kn.appendChild($("br"));kn.appendChild(document.createTextNode("x"))}j(e.measure,kn);var i=kn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Ne(e.measure),i||1}function Gn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),i=$("pre",[t],"CodeMirror-line-like");j(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ll(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,c=0;a;a=a.nextSibling,++c){var h=e.display.gutterSpecs[c].className;i[h]=a.offsetLeft+a.clientLeft+o,n[h]=a.clientWidth}return{fixedPos:al(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function al(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cu(e){var t=$n(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Gn(e.display)-3);return function(o){if(Jr(e.doc,o))return 0;var a=0;if(o.widgets)for(var c=0;c<o.widgets.length;c++)o.widgets[c].height&&(a+=o.widgets[c].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function ul(e){var t=e.doc,i=Cu(e);t.iter(function(n){var o=i(n);o!=n.height&&Jt(n,o)})}function Sn(e,t,i,n){var o=e.display;if(!i&&Xr(t).getAttribute("cm-not-content")=="true")return null;var a,c,h=o.lineSpace.getBoundingClientRect();try{a=t.clientX-h.left,c=t.clientY-h.top}catch{return null}var p=ol(e,a,c),g;if(n&&p.xRel>0&&(g=_e(e.doc,p.line).text).length==p.ch){var k=Je(g,g.length,e.options.tabSize)-g.length;p=ie(p.line,Math.max(0,Math.round((a-cu(e.display).left)/Gn(e.display))-k))}return p}function Cn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Ut(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&i<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Ir&&Zs(e.doc,t)<o.viewTo&&Vr(e);else if(i<=o.viewFrom)Ir&&tu(e.doc,i+n)>o.viewFrom?Vr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)Vr(e);else if(t<=o.viewFrom){var a=Bo(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):Vr(e)}else if(i>=o.viewTo){var c=Bo(e,t,t,-1);c?(o.view=o.view.slice(0,c.index),o.viewTo=c.lineN):Vr(e)}else{var h=Bo(e,t,t,-1),p=Bo(e,i,i+n,1);h&&p?(o.view=o.view.slice(0,h.index).concat(Fo(e,h.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):Vr(e)}var g=o.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(o.externalMeasured=null))}function Qr(e,t,i){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var a=n.view[Cn(e,t)];if(a.node!=null){var c=a.changes||(a.changes=[]);Z(c,i)==-1&&c.push(i)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bo(e,t,i,n){var o=Cn(e,t),a,c=e.display.view;if(!Ir||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var h=e.display.viewFrom,p=0;p<o;p++)h+=c[p].size;if(h!=t){if(n>0){if(o==c.length-1)return null;a=h+c[o].size-t,o++}else a=h-t;t+=a,i+=a}for(;Zs(e.doc,i)!=i;){if(o==(n<0?0:c.length-1))return null;i+=n*c[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function ip(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Fo(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Fo(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Cn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Fo(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,Cn(e,i)))),n.viewTo=i}function _u(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var o=t[n];!o.hidden&&(!o.node||o.changes)&&++i}return i}function Wi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Tu(e,t){t===void 0&&(t=!0);var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),c=e.options.$customCursor;c&&(t=!0);for(var h=0;h<i.sel.ranges.length;h++)if(!(!t&&h==i.sel.primIndex)){var p=i.sel.ranges[h];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var g=p.empty();if(c){var k=c(e,p);k&&fl(e,k,o)}else(g||e.options.showCursorWhenSelecting)&&fl(e,p.head,o);g||op(e,p,a)}}return n}function fl(e,t,i){var n=vr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild($("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Wo(e,t,"div",null,null),c=a.right-a.left;o.style.width=(c>0?c:e.defaultCharWidth())+"px"}if(n.other){var h=i.appendChild($("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));h.style.display="",h.style.left=n.other.left+"px",h.style.top=n.other.top+"px",h.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function jo(e,t){return e.top-t.top||e.left-t.left}function op(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),c=cu(e.display),h=c.left,p=Math.max(n.sizerWidth,xn(e)-n.sizer.offsetLeft)-c.right,g=o.direction=="ltr";function k(me,ke,Ae,Me){ke<0&&(ke=0),ke=Math.round(ke),Me=Math.round(Me),a.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+me+`px;
4
+ `,t);o==-1&&(o=e.length);var a=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),c=a.indexOf("\r");c!=-1?(i.push(a.slice(0,c)),t+=c+1):(i.push(a),t=o+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Oo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Mo=function(){var e=$("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Oi=null;function Zr(e){if(Oi!=null)return Oi;var t=j(e,$("span","x")),i=t.getBoundingClientRect(),n=ee(t,0,1).getBoundingClientRect();return Oi=Math.abs(i.left-n.left)>1}var hr={},ir={};function Eo(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),hr[e]=t}function Fr(e,t){ir[e]=t}function Wn(e){if(typeof e=="string"&&ir.hasOwnProperty(e))e=ir[e];else if(e&&typeof e.name=="string"&&ir.hasOwnProperty(e.name)){var t=ir[e.name];typeof t=="string"&&(t={name:t}),e=fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bn(e,t){t=Wn(t);var i=hr[t.name];if(!i)return Bn(e,"text/plain");var n=i(e,t);if(pr.hasOwnProperty(t.name)){var o=pr[t.name];for(var a in o)!o.hasOwnProperty(a)||(n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=o[a])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var c in t.modeProps)n[c]=t.modeProps[c];return n}var pr={};function gr(e,t){var i=pr.hasOwnProperty(e)?pr[e]:pr[e]={};Ie(t,i)}function or(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),i[n]=o}return i}function Mi(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ei(e,t,i){return e.startState?e.startState(t,i):!0}var dt=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};dt.prototype.eol=function(){return this.pos>=this.string.length},dt.prototype.sol=function(){return this.pos==this.lineStart},dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dt.prototype.skipToEnd=function(){this.pos=this.string.length},dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},dt.prototype.backUp=function(e){this.pos-=e},dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Je(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},dt.prototype.indentation=function(){return Je(this.string,null,this.tabSize)-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},dt.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(c){return i?c.toLowerCase():c},o=this.string.substr(this.pos,e.length);if(n(o)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function _e(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var o=i.children[n],a=o.chunkSize();if(t<a){i=o;break}t-=a}return i.lines[t]}function _r(e,t,i){var n=[],o=t.line;return e.iter(t.line,i.line+1,function(a){var c=a.text;o==i.line&&(c=c.slice(0,i.ch)),o==t.line&&(c=c.slice(t.ch)),n.push(c),++o}),n}function Ai(e,t,i){var n=[];return e.iter(t,i,function(o){n.push(o.text)}),n}function Jt(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function Xe(e){if(e.parent==null)return null;for(var t=e.parent,i=Z(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)i+=n.children[o].chunkSize();return i+t.first}function Tr(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],a=o.height;if(t<a){e=o;continue e}t-=a,i+=o.chunkSize()}return i}while(!e.lines);for(var c=0;c<e.lines.length;++c){var h=e.lines[c],p=h.height;if(t<p)break;t-=p}return i+c}function wn(e,t){return t>=e.first&&t<e.first+e.size}function Ni(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ie(e,t,i){if(i===void 0&&(i=null),!(this instanceof ie))return new ie(e,t,i);this.line=e,this.ch=t,this.sticky=i}function m(e,t){return e.line-t.line||e.ch-t.ch}function P(e,t){return e.sticky==t.sticky&&m(e,t)==0}function X(e){return ie(e.line,e.ch)}function le(e,t){return m(e,t)<0?t:e}function De(e,t){return m(e,t)<0?e:t}function $e(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function xe(e,t){if(t.line<e.first)return ie(e.first,0);var i=e.first+e.size-1;return t.line>i?ie(i,_e(e,i).text.length):Rt(t,_e(e,t.line).text.length)}function Rt(e,t){var i=e.ch;return i==null||i>t?ie(e.line,t):i<0?ie(e.line,0):e}function sr(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=xe(e,t[n]);return i}var jn=function(e,t){this.state=e,this.lookAhead=t},Lr=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Lr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Lr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Lr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Lr.fromSaved=function(e,t,i){return t instanceof jn?new Lr(e,or(e.mode,t.state),i,t.lookAhead):new Lr(e,or(e.mode,t),i)},Lr.prototype.save=function(e){var t=e!==!1?or(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jn(t,this.maxLookAhead):t};function Ba(e,t,i,n){var o=[e.state.modeGen],a={};Ga(e,t.text,e.doc.mode,i,function(g,k){return o.push(g,k)},a,n);for(var c=i.state,h=function(g){i.baseTokens=o;var k=e.state.overlays[g],C=1,R=0;i.state=!0,Ga(e,t.text,k.mode,i,function(M,U){for(var Q=C;R<M;){var ae=o[C];ae>M&&o.splice(C,1,M,o[C+1],ae),C+=2,R=Math.min(M,ae)}if(!!U)if(k.opaque)o.splice(Q,C-Q,M,"overlay "+U),C=Q+2;else for(;Q<C;Q+=2){var ve=o[Q+1];o[Q+1]=(ve?ve+" ":"")+"overlay "+U}},a),i.state=c,i.baseTokens=null,i.baseTokenPos=1},p=0;p<e.state.overlays.length;++p)h(p);return{styles:o,classes:a.bgClass||a.textClass?a:null}}function ja(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=zi(e,Xe(t)),o=t.text.length>e.options.maxHighlightLength&&or(e.doc.mode,n.state),a=Ba(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function zi(e,t,i){var n=e.doc,o=e.display;if(!n.mode.startState)return new Lr(n,!0,t);var a=wh(e,t,i),c=a>n.first&&_e(n,a-1).stateAfter,h=c?Lr.fromSaved(n,c,a):new Lr(n,Ei(n.mode),a);return n.iter(a,t,function(p){$s(e,p.text,h);var g=h.line;p.stateAfter=g==t-1||g%5==0||g>=o.viewFrom&&g<o.viewTo?h.save():null,h.nextLine()}),i&&(n.modeFrontier=h.line),h}function $s(e,t,i,n){var o=e.doc.mode,a=new dt(t,e.options.tabSize,i);for(a.start=a.pos=n||0,t==""&&Ua(o,i.state);!a.eol();)Gs(o,a,i.state),a.start=a.pos}function Ua(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=Mi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function Gs(e,t,i,n){for(var o=0;o<10;o++){n&&(n[0]=Mi(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ka=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function qa(e,t,i,n){var o=e.doc,a=o.mode,c;t=xe(o,t);var h=_e(o,t.line),p=zi(e,t.line,i),g=new dt(h.text,e.options.tabSize,p),k;for(n&&(k=[]);(n||g.pos<t.ch)&&!g.eol();)g.start=g.pos,c=Gs(a,g,p.state),n&&k.push(new Ka(g,c,or(o.mode,p.state)));return n?k:new Ka(g,c,p.state)}function $a(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function Ga(e,t,i,n,o,a,c){var h=i.flattenSpans;h==null&&(h=e.options.flattenSpans);var p=0,g=null,k=new dt(t,e.options.tabSize,n),C,R=e.options.addModeClass&&[null];for(t==""&&$a(Ua(i,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(h=!1,c&&$s(e,t,n,k.pos),k.pos=t.length,C=null):C=$a(Gs(i,k,n.state,R),a),R){var M=R[0].name;M&&(C="m-"+(C?M+" "+C:M))}if(!h||g!=C){for(;p<k.start;)p=Math.min(k.start,p+5e3),o(p,g);g=C}k.start=k.pos}for(;p<k.pos;){var U=Math.min(k.pos,p+5e3);o(U,g),p=U}}function wh(e,t,i){for(var n,o,a=e.doc,c=i?-1:t-(e.doc.mode.innerMode?1e3:100),h=t;h>c;--h){if(h<=a.first)return a.first;var p=_e(a,h-1),g=p.stateAfter;if(g&&(!i||h+(g instanceof jn?g.lookAhead:0)<=a.modeFrontier))return h;var k=Je(p.text,null,e.options.tabSize);(o==null||n>k)&&(o=h-1,n=k)}return o}function xh(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,n=t-1;n>i;n--){var o=_e(e,n).stateAfter;if(o&&(!(o instanceof jn)||n+o.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var Ya=!1,Ir=!1;function kh(){Ya=!0}function Sh(){Ir=!0}function Ao(e,t,i){this.marker=e,this.from=t,this.to=i}function Ri(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function Ch(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function _h(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Th(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);if(h||a.from==t&&c.type=="bookmark"&&(!i||!a.marker.insertLeft)){var p=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new Ao(c,a.from,p?null:a.to))}}return n}function Lh(e,t,i){var n;if(e)for(var o=0;o<e.length;++o){var a=e[o],c=a.marker,h=a.to==null||(c.inclusiveRight?a.to>=t:a.to>t);if(h||a.from==t&&c.type=="bookmark"&&(!i||a.marker.insertLeft)){var p=a.from==null||(c.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new Ao(c,p?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Ys(e,t){if(t.full)return null;var i=wn(e,t.from.line)&&_e(e,t.from.line).markedSpans,n=wn(e,t.to.line)&&_e(e,t.to.line).markedSpans;if(!i&&!n)return null;var o=t.from.ch,a=t.to.ch,c=m(t.from,t.to)==0,h=Th(i,o,c),p=Lh(n,a,c),g=t.text.length==1,k=F(t.text).length+(g?o:0);if(h)for(var C=0;C<h.length;++C){var R=h[C];if(R.to==null){var M=Ri(p,R.marker);M?g&&(R.to=M.to==null?null:M.to+k):R.to=o}}if(p)for(var U=0;U<p.length;++U){var Q=p[U];if(Q.to!=null&&(Q.to+=k),Q.from==null){var ae=Ri(h,Q.marker);ae||(Q.from=k,g&&(h||(h=[])).push(Q))}else Q.from+=k,g&&(h||(h=[])).push(Q)}h&&(h=Xa(h)),p&&p!=h&&(p=Xa(p));var ve=[h];if(!g){var we=t.text.length-2,me;if(we>0&&h)for(var ke=0;ke<h.length;++ke)h[ke].to==null&&(me||(me=[])).push(new Ao(h[ke].marker,null,null));for(var Ae=0;Ae<we;++Ae)ve.push(me);ve.push(p)}return ve}function Xa(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ph(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(M){if(M.markedSpans)for(var U=0;U<M.markedSpans.length;++U){var Q=M.markedSpans[U].marker;Q.readOnly&&(!n||Z(n,Q)==-1)&&(n||(n=[])).push(Q)}}),!n)return null;for(var o=[{from:t,to:i}],a=0;a<n.length;++a)for(var c=n[a],h=c.find(0),p=0;p<o.length;++p){var g=o[p];if(!(m(g.to,h.from)<0||m(g.from,h.to)>0)){var k=[p,1],C=m(g.from,h.from),R=m(g.to,h.to);(C<0||!c.inclusiveLeft&&!C)&&k.push({from:g.from,to:h.from}),(R>0||!c.inclusiveRight&&!R)&&k.push({from:h.to,to:g.to}),o.splice.apply(o,k),p+=k.length-3}}return o}function Za(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Ja(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function No(e){return e.inclusiveLeft?-1:0}function zo(e){return e.inclusiveRight?1:0}function Xs(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),o=t.find(),a=m(n.from,o.from)||No(e)-No(t);if(a)return-a;var c=m(n.to,o.to)||zo(e)-zo(t);return c||t.id-e.id}function Qa(e,t){var i=Ir&&e.markedSpans,n;if(i)for(var o=void 0,a=0;a<i.length;++a)o=i[a],o.marker.collapsed&&(t?o.from:o.to)==null&&(!n||Xs(n,o.marker)<0)&&(n=o.marker);return n}function Va(e){return Qa(e,!0)}function Ro(e){return Qa(e,!1)}function Oh(e,t){var i=Ir&&e.markedSpans,n;if(i)for(var o=0;o<i.length;++o){var a=i[o];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Xs(n,a.marker)<0)&&(n=a.marker)}return n}function eu(e,t,i,n,o){var a=_e(e,t),c=Ir&&a.markedSpans;if(c)for(var h=0;h<c.length;++h){var p=c[h];if(!!p.marker.collapsed){var g=p.marker.find(0),k=m(g.from,i)||No(p.marker)-No(o),C=m(g.to,n)||zo(p.marker)-zo(o);if(!(k>=0&&C<=0||k<=0&&C>=0)&&(k<=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(g.to,i)>=0:m(g.to,i)>0)||k>=0&&(p.marker.inclusiveRight&&o.inclusiveLeft?m(g.from,n)<=0:m(g.from,n)<0)))return!0}}}function vr(e){for(var t;t=Va(e);)e=t.find(-1,!0).line;return e}function Mh(e){for(var t;t=Ro(e);)e=t.find(1,!0).line;return e}function Eh(e){for(var t,i;t=Ro(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Zs(e,t){var i=_e(e,t),n=vr(i);return i==n?t:Xe(n)}function tu(e,t){if(t>e.lastLine())return t;var i=_e(e,t),n;if(!Jr(e,i))return t;for(;n=Ro(i);)i=n.find(1,!0).line;return Xe(i)+1}function Jr(e,t){var i=Ir&&t.markedSpans;if(i){for(var n=void 0,o=0;o<i.length;++o)if(n=i[o],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&Js(e,t,n))return!0}}}function Js(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Js(e,n.line,Ri(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var o=void 0,a=0;a<t.markedSpans.length;++a)if(o=t.markedSpans[a],o.marker.collapsed&&!o.marker.widgetNode&&o.from==i.to&&(o.to==null||o.to!=i.from)&&(o.marker.inclusiveLeft||i.marker.inclusiveRight)&&Js(e,t,o))return!0}function Hr(e){e=vr(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var o=i.lines[n];if(o==e)break;t+=o.height}for(var a=i.parent;a;i=a,a=i.parent)for(var c=0;c<a.children.length;++c){var h=a.children[c];if(h==i)break;t+=h.height}return t}function Do(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Va(n);){var o=i.find(0,!0);n=o.from.line,t+=o.from.ch-o.to.ch}for(n=e;i=Ro(n);){var a=i.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Qs(e){var t=e.display,i=e.doc;t.maxLine=_e(i,i.first),t.maxLineLength=Do(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var o=Do(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)})}var Un=function(e,t,i){this.text=e,Ja(this,t),this.height=i?i(this):1};Un.prototype.lineNo=function(){return Xe(this)},Sr(Un);function Ah(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Za(e),Ja(e,i);var o=n?n(e):1;o!=e.height&&Jt(e,o)}function Nh(e){e.parent=null,Za(e)}var zh={},Rh={};function ru(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Rh:zh;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function nu(e,t){var i=w("span",null,null,S?"padding-right: .1px":null),n={pre:w("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,c=void 0;n.pos=0,n.addToken=Fh,Cr(e.display.measure)&&(c=vt(a,e.doc.direction))&&(n.addToken=Hh(n.addToken,c)),n.map=[];var h=t!=e.display.externalMeasured&&Xe(a);Wh(a,n,ja(e,a,h)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Ge(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Ge(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Po(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(S){var p=n.content.lastChild;(/\bcm-tab\b/.test(p.className)||p.querySelector&&p.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ge(n.pre.className,n.textClass||"")),n}function Dh(e){var t=$("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fh(e,t,i,n,o,a,c){if(!!t){var h=e.splitSpaces?Ih(t,e.trailingSpace):t,p=e.cm.state.specialChars,g=!1,k;if(!p.test(t))e.col+=t.length,k=document.createTextNode(h),e.map.push(e.pos,e.pos+t.length,k),y&&x<9&&(g=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var C=0;;){p.lastIndex=C;var R=p.exec(t),M=R?R.index-C:t.length-C;if(M){var U=document.createTextNode(h.slice(C,C+M));y&&x<9?k.appendChild($("span",[U])):k.appendChild(U),e.map.push(e.pos,e.pos+M,U),e.col+=M,e.pos+=M}if(!R)break;C+=M+1;var Q=void 0;if(R[0]==" "){var ae=e.cm.options.tabSize,ve=ae-e.col%ae;Q=k.appendChild($("span",E(ve),"cm-tab")),Q.setAttribute("role","presentation"),Q.setAttribute("cm-text"," "),e.col+=ve}else R[0]=="\r"||R[0]==`
5
+ `?(Q=k.appendChild($("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Q.setAttribute("cm-text",R[0]),e.col+=1):(Q=e.cm.options.specialCharPlaceholder(R[0]),Q.setAttribute("cm-text",R[0]),y&&x<9?k.appendChild($("span",[Q])):k.appendChild(Q),e.col+=1);e.map.push(e.pos,e.pos+1,Q),e.pos++}}if(e.trailingSpace=h.charCodeAt(t.length-1)==32,i||n||o||g||a||c){var we=i||"";n&&(we+=n),o&&(we+=o);var me=$("span",[k],we,a);if(c)for(var ke in c)c.hasOwnProperty(ke)&&ke!="style"&&ke!="class"&&me.setAttribute(ke,c[ke]);return e.content.appendChild(me)}e.content.appendChild(k)}}function Ih(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",o=0;o<e.length;o++){var a=e.charAt(o);a==" "&&i&&(o==e.length-1||e.charCodeAt(o+1)==32)&&(a="\xA0"),n+=a,i=a==" "}return n}function Hh(e,t){return function(i,n,o,a,c,h,p){o=o?o+" cm-force-border":"cm-force-border";for(var g=i.pos,k=g+n.length;;){for(var C=void 0,R=0;R<t.length&&(C=t[R],!(C.to>g&&C.from<=g));R++);if(C.to>=k)return e(i,n,o,a,c,h,p);e(i,n.slice(0,C.to-g),o,a,null,h,p),a=null,n=n.slice(C.to-g),g=C.to}}}function iu(e,t,i,n){var o=!n&&i.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",i.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Wh(e,t,i){var n=e.markedSpans,o=e.text,a=0;if(!n){for(var c=1;c<i.length;c+=2)t.addToken(t,o.slice(a,a=i[c]),ru(i[c+1],t.cm.options));return}for(var h=o.length,p=0,g=1,k="",C,R,M=0,U,Q,ae,ve,we;;){if(M==p){U=Q=ae=R="",we=null,ve=null,M=1/0;for(var me=[],ke=void 0,Ae=0;Ae<n.length;++Ae){var Me=n[Ae],Ue=Me.marker;if(Ue.type=="bookmark"&&Me.from==p&&Ue.widgetNode)me.push(Ue);else if(Me.from<=p&&(Me.to==null||Me.to>p||Ue.collapsed&&Me.to==p&&Me.from==p)){if(Me.to!=null&&Me.to!=p&&M>Me.to&&(M=Me.to,Q=""),Ue.className&&(U+=" "+Ue.className),Ue.css&&(R=(R?R+";":"")+Ue.css),Ue.startStyle&&Me.from==p&&(ae+=" "+Ue.startStyle),Ue.endStyle&&Me.to==M&&(ke||(ke=[])).push(Ue.endStyle,Me.to),Ue.title&&((we||(we={})).title=Ue.title),Ue.attributes)for(var rt in Ue.attributes)(we||(we={}))[rt]=Ue.attributes[rt];Ue.collapsed&&(!ve||Xs(ve.marker,Ue)<0)&&(ve=Me)}else Me.from>p&&M>Me.from&&(M=Me.from)}if(ke)for(var _t=0;_t<ke.length;_t+=2)ke[_t+1]==M&&(Q+=" "+ke[_t]);if(!ve||ve.from==p)for(var ft=0;ft<me.length;++ft)iu(t,0,me[ft]);if(ve&&(ve.from||0)==p){if(iu(t,(ve.to==null?h+1:ve.to)-p,ve.marker,ve.from==null),ve.to==null)return;ve.to==p&&(ve=!1)}}if(p>=h)break;for(var Vt=Math.min(h,M);;){if(k){var qt=p+k.length;if(!ve){var mt=qt>Vt?k.slice(0,Vt-p):k;t.addToken(t,mt,C?C+U:U,ae,p+mt.length==M?Q:"",R,we)}if(qt>=Vt){k=k.slice(Vt-p),p=Vt;break}p=qt,ae=""}k=o.slice(a,a=i[g++]),C=ru(i[g++],t.cm.options)}}}function ou(e,t,i){this.line=t,this.rest=Eh(t),this.size=this.rest?Xe(F(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Jr(e,t)}function Fo(e,t,i){for(var n=[],o,a=t;a<i;a=o){var c=new ou(e.doc,_e(e.doc,a),a);o=a+c.size,n.push(c)}return n}var Kn=null;function Bh(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function jh(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(i<t.length)}function Uh(e,t){var i=e.ownsGroup;if(!!i)try{jh(i)}finally{Kn=null,t(i)}}var Di=null;function kt(e,t){var i=Dr(e,t);if(!!i.length){var n=Array.prototype.slice.call(arguments,2),o;Kn?o=Kn.delayedCallbacks:Di?o=Di:(o=Di=[],setTimeout(Kh,0));for(var a=function(h){o.push(function(){return i[h].apply(null,n)})},c=0;c<i.length;++c)a(c)}}function Kh(){var e=Di;Di=null;for(var t=0;t<e.length;++t)e[t]()}function su(e,t,i,n){for(var o=0;o<t.changes.length;o++){var a=t.changes[o];a=="text"?$h(e,t):a=="gutter"?au(e,t,i,n):a=="class"?Vs(e,t):a=="widget"&&Gh(e,t,n)}t.changes=null}function Fi(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),y&&x<8&&(e.node.style.zIndex=2)),e.node}function qh(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=Fi(t);t.background=n.insertBefore($("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function lu(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):nu(e,t)}function $h(e,t){var i=t.text.className,n=lu(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Vs(e,t)):i&&(t.text.className=i)}function Vs(e,t){qh(e,t),t.line.wrapClass?Fi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function au(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Fi(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var c=Fi(t),h=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(h.setAttribute("aria-hidden","true"),e.display.input.setUneditable(h),c.insertBefore(h,t.text),t.line.gutterClass&&(h.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=h.appendChild($("div",Ni(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var p=0;p<e.display.gutterSpecs.length;++p){var g=e.display.gutterSpecs[p].className,k=a.hasOwnProperty(g)&&a[g];k&&h.appendChild($("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[g]+"px; width: "+n.gutterWidth[g]+"px"))}}}function Gh(e,t,i){t.alignable&&(t.alignable=null);for(var n=be("CodeMirror-linewidget"),o=t.node.firstChild,a=void 0;o;o=a)a=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);uu(e,t,i)}function Yh(e,t,i,n){var o=lu(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Vs(e,t),au(e,t,i,n),uu(e,t,n),t.node}function uu(e,t,i){if(fu(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)fu(e,t.rest[n],t,i,!1)}function fu(e,t,i,n,o){if(!!t.widgets)for(var a=Fi(i),c=0,h=t.widgets;c<h.length;++c){var p=h[c],g=$("div",[p.node],"CodeMirror-linewidget"+(p.className?" "+p.className:""));p.handleMouseEvents||g.setAttribute("cm-ignore-events","true"),Xh(p,g,i,n),e.display.input.setUneditable(g),o&&p.above?a.insertBefore(g,i.gutter||i.text):a.appendChild(g),kt(p,"redraw")}}function Xh(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ii(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Y(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),j(t.display.measure,$("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Wr(e,t){for(var i=Xr(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Io(e){return e.lineSpace.offsetTop}function el(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function cu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,$("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Pr(e){return K-e.display.nativeBarWidth}function xn(e){return e.display.scroller.clientWidth-Pr(e)-e.display.barWidth}function tl(e){return e.display.scroller.clientHeight-Pr(e)-e.display.barHeight}function Zh(e,t,i){var n=e.options.lineWrapping,o=n&&xn(e);if(!t.measure.heights||n&&t.measure.width!=o){var a=t.measure.heights=[];if(n){t.measure.width=o;for(var c=t.text.firstChild.getClientRects(),h=0;h<c.length-1;h++){var p=c[h],g=c[h+1];Math.abs(p.bottom-g.bottom)>2&&a.push((p.bottom+g.top)/2-i.top)}}a.push(i.bottom-i.top)}}function du(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Xe(e.rest[o])>i)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Jh(e,t){t=vr(t);var i=Xe(t),n=e.display.externalMeasured=new ou(e.doc,t,i);n.lineN=i;var o=n.built=nu(e,n);return n.text=o.pre,j(e.display.lineMeasure,o.pre),n}function hu(e,t,i,n){return Or(e,qn(e,t),i,n)}function rl(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Cn(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function qn(e,t){var i=Xe(t),n=rl(e,i);n&&!n.text?n=null:n&&n.changes&&(su(e,n,i,ll(e)),e.curOp.forceUpdate=!0),n||(n=Jh(e,t));var o=du(n,t,i);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Or(e,t,i,n,o){t.before&&(i=-1);var a=i+(n||""),c;return t.cache.hasOwnProperty(a)?c=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zh(e,t.view,t.rect),t.hasHeights=!0),c=Vh(e,t,i,n),c.bogus||(t.cache[a]=c)),{left:c.left,right:c.right,top:o?c.rtop:c.top,bottom:o?c.rbottom:c.bottom}}var pu={left:0,right:0,top:0,bottom:0};function gu(e,t,i){for(var n,o,a,c,h,p,g=0;g<e.length;g+=3)if(h=e[g],p=e[g+1],t<h?(o=0,a=1,c="left"):t<p?(o=t-h,a=o+1):(g==e.length-3||t==p&&e[g+3]>t)&&(a=p-h,o=a-1,t>=p&&(c="right")),o!=null){if(n=e[g+2],h==p&&i==(n.insertLeft?"left":"right")&&(c=i),i=="left"&&o==0)for(;g&&e[g-2]==e[g-3]&&e[g-1].insertLeft;)n=e[(g-=3)+2],c="left";if(i=="right"&&o==p-h)for(;g<e.length-3&&e[g+3]==e[g+4]&&!e[g+5].insertLeft;)n=e[(g+=3)+2],c="right";break}return{node:n,start:o,end:a,collapse:c,coverStart:h,coverEnd:p}}function Qh(e,t){var i=pu;if(t=="left")for(var n=0;n<e.length&&(i=e[n]).left==i.right;n++);else for(var o=e.length-1;o>=0&&(i=e[o]).left==i.right;o--);return i}function Vh(e,t,i,n){var o=gu(t.map,i,n),a=o.node,c=o.start,h=o.end,p=o.collapse,g;if(a.nodeType==3){for(var k=0;k<4;k++){for(;c&&he(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+h<o.coverEnd&&he(t.line.text.charAt(o.coverStart+h));)++h;if(y&&x<9&&c==0&&h==o.coverEnd-o.coverStart?g=a.parentNode.getBoundingClientRect():g=Qh(ee(a,c,h).getClientRects(),n),g.left||g.right||c==0)break;h=c,c=c-1,p="right"}y&&x<11&&(g=ep(e.display.measure,g))}else{c>0&&(p=n="right");var C;e.options.lineWrapping&&(C=a.getClientRects()).length>1?g=C[n=="right"?C.length-1:0]:g=a.getBoundingClientRect()}if(y&&x<9&&!c&&(!g||!g.left&&!g.right)){var R=a.parentNode.getClientRects()[0];R?g={left:R.left,right:R.left+Gn(e.display),top:R.top,bottom:R.bottom}:g=pu}for(var M=g.top-t.rect.top,U=g.bottom-t.rect.top,Q=(M+U)/2,ae=t.view.measure.heights,ve=0;ve<ae.length-1&&!(Q<ae[ve]);ve++);var we=ve?ae[ve-1]:0,me=ae[ve],ke={left:(p=="right"?g.right:g.left)-t.rect.left,right:(p=="left"?g.left:g.right)-t.rect.left,top:we,bottom:me};return!g.left&&!g.right&&(ke.bogus=!0),e.options.singleCursorHeightPerLine||(ke.rtop=M,ke.rbottom=U),ke}function ep(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Zr(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function vu(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function mu(e){e.display.externalMeasure=null,Ne(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vu(e.display.view[t])}function Hi(e){mu(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function yu(){return O&&D?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function bu(){return O&&D?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nl(e){var t=vr(e),i=t.widgets,n=0;if(i)for(var o=0;o<i.length;++o)i[o].above&&(n+=Ii(i[o]));return n}function Ho(e,t,i,n,o){if(!o){var a=nl(t);i.top+=a,i.bottom+=a}if(n=="line")return i;n||(n="local");var c=Hr(t);if(n=="local"?c+=Io(e.display):c-=e.display.viewOffset,n=="page"||n=="window"){var h=e.display.lineSpace.getBoundingClientRect();c+=h.top+(n=="window"?0:bu());var p=h.left+(n=="window"?0:yu());i.left+=p,i.right+=p}return i.top+=c,i.bottom+=c,i}function wu(e,t,i){if(i=="div")return t;var n=t.left,o=t.top;if(i=="page")n-=yu(),o-=bu();else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();n+=a.left,o+=a.top}var c=e.display.lineSpace.getBoundingClientRect();return{left:n-c.left,top:o-c.top}}function Wo(e,t,i,n,o){return n||(n=_e(e.doc,t.line)),Ho(e,n,hu(e,n,t.ch,o),i)}function mr(e,t,i,n,o,a){n=n||_e(e.doc,t.line),o||(o=qn(e,n));function c(U,Q){var ae=Or(e,o,U,Q?"right":"left",a);return Q?ae.left=ae.right:ae.right=ae.left,Ho(e,n,ae,i)}var h=vt(n,e.doc.direction),p=t.ch,g=t.sticky;if(p>=n.text.length?(p=n.text.length,g="before"):p<=0&&(p=0,g="after"),!h)return c(g=="before"?p-1:p,g=="before");function k(U,Q,ae){var ve=h[Q],we=ve.level==1;return c(ae?U-1:U,we!=ae)}var C=He(h,p,g),R=Ke,M=k(p,C,g=="before");return R!=null&&(M.other=k(p,R,g!="before")),M}function xu(e,t){var i=0;t=xe(e.doc,t),e.options.lineWrapping||(i=Gn(e.display)*t.ch);var n=_e(e.doc,t.line),o=Hr(n)+Io(e.display);return{left:i,right:i,top:o,bottom:o+n.height}}function il(e,t,i,n,o){var a=ie(e,t,i);return a.xRel=o,n&&(a.outside=n),a}function ol(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return il(n.first,0,null,-1,-1);var o=Tr(n,i),a=n.first+n.size-1;if(o>a)return il(n.first+n.size-1,_e(n,a).text.length,null,1,1);t<0&&(t=0);for(var c=_e(n,o);;){var h=tp(e,c,o,t,i),p=Oh(c,h.ch+(h.xRel>0||h.outside>0?1:0));if(!p)return h;var g=p.find(1);if(g.line==o)return g;c=_e(n,o=g.line)}}function ku(e,t,i,n){n-=nl(t);var o=t.text.length,a=Be(function(c){return Or(e,i,c-1).bottom<=n},o,0);return o=Be(function(c){return Or(e,i,c).top>n},a,o),{begin:a,end:o}}function Su(e,t,i,n){i||(i=qn(e,t));var o=Ho(e,t,Or(e,i,n),"line").top;return ku(e,t,i,o)}function sl(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function tp(e,t,i,n,o){o-=Hr(t);var a=qn(e,t),c=nl(t),h=0,p=t.text.length,g=!0,k=vt(t,e.doc.direction);if(k){var C=(e.options.lineWrapping?np:rp)(e,t,i,a,k,n,o);g=C.level!=1,h=g?C.from:C.to-1,p=g?C.to:C.from-1}var R=null,M=null,U=Be(function(Ae){var Me=Or(e,a,Ae);return Me.top+=c,Me.bottom+=c,sl(Me,n,o,!1)?(Me.top<=o&&Me.left<=n&&(R=Ae,M=Me),!0):!1},h,p),Q,ae,ve=!1;if(M){var we=n-M.left<M.right-n,me=we==g;U=R+(me?0:1),ae=me?"after":"before",Q=we?M.left:M.right}else{!g&&(U==p||U==h)&&U++,ae=U==0?"after":U==t.text.length?"before":Or(e,a,U-(g?1:0)).bottom+c<=o==g?"after":"before";var ke=mr(e,ie(i,U,ae),"line",t,a);Q=ke.left,ve=o<ke.top?-1:o>=ke.bottom?1:0}return U=Le(t.text,U,1),il(i,U,ae,ve,n-Q)}function rp(e,t,i,n,o,a,c){var h=Be(function(C){var R=o[C],M=R.level!=1;return sl(mr(e,ie(i,M?R.to:R.from,M?"before":"after"),"line",t,n),a,c,!0)},0,o.length-1),p=o[h];if(h>0){var g=p.level!=1,k=mr(e,ie(i,g?p.from:p.to,g?"after":"before"),"line",t,n);sl(k,a,c,!0)&&k.top>c&&(p=o[h-1])}return p}function np(e,t,i,n,o,a,c){var h=ku(e,t,n,c),p=h.begin,g=h.end;/\s/.test(t.text.charAt(g-1))&&g--;for(var k=null,C=null,R=0;R<o.length;R++){var M=o[R];if(!(M.from>=g||M.to<=p)){var U=M.level!=1,Q=Or(e,n,U?Math.min(g,M.to)-1:Math.max(p,M.from)).right,ae=Q<a?a-Q+1e9:Q-a;(!k||C>ae)&&(k=M,C=ae)}}return k||(k=o[o.length-1]),k.from<p&&(k={from:p,to:k.to,level:k.level}),k.to>g&&(k={from:k.from,to:g,level:k.level}),k}var kn;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kn==null){kn=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kn.appendChild(document.createTextNode("x")),kn.appendChild($("br"));kn.appendChild(document.createTextNode("x"))}j(e.measure,kn);var i=kn.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Ne(e.measure),i||1}function Gn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),i=$("pre",[t],"CodeMirror-line-like");j(e.measure,i);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ll(e){for(var t=e.display,i={},n={},o=t.gutters.clientLeft,a=t.gutters.firstChild,c=0;a;a=a.nextSibling,++c){var h=e.display.gutterSpecs[c].className;i[h]=a.offsetLeft+a.clientLeft+o,n[h]=a.clientWidth}return{fixedPos:al(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function al(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cu(e){var t=$n(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/Gn(e.display)-3);return function(o){if(Jr(e.doc,o))return 0;var a=0;if(o.widgets)for(var c=0;c<o.widgets.length;c++)o.widgets[c].height&&(a+=o.widgets[c].height);return i?a+(Math.ceil(o.text.length/n)||1)*t:a+t}}function ul(e){var t=e.doc,i=Cu(e);t.iter(function(n){var o=i(n);o!=n.height&&Jt(n,o)})}function Sn(e,t,i,n){var o=e.display;if(!i&&Xr(t).getAttribute("cm-not-content")=="true")return null;var a,c,h=o.lineSpace.getBoundingClientRect();try{a=t.clientX-h.left,c=t.clientY-h.top}catch{return null}var p=ol(e,a,c),g;if(n&&p.xRel>0&&(g=_e(e.doc,p.line).text).length==p.ch){var k=Je(g,g.length,e.options.tabSize)-g.length;p=ie(p.line,Math.max(0,Math.round((a-cu(e.display).left)/Gn(e.display))-k))}return p}function Cn(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function Ut(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&i<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Ir&&Zs(e.doc,t)<o.viewTo&&Vr(e);else if(i<=o.viewFrom)Ir&&tu(e.doc,i+n)>o.viewFrom?Vr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&i>=o.viewTo)Vr(e);else if(t<=o.viewFrom){var a=Bo(e,i,i+n,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=n):Vr(e)}else if(i>=o.viewTo){var c=Bo(e,t,t,-1);c?(o.view=o.view.slice(0,c.index),o.viewTo=c.lineN):Vr(e)}else{var h=Bo(e,t,t,-1),p=Bo(e,i,i+n,1);h&&p?(o.view=o.view.slice(0,h.index).concat(Fo(e,h.lineN,p.lineN)).concat(o.view.slice(p.index)),o.viewTo+=n):Vr(e)}var g=o.externalMeasured;g&&(i<g.lineN?g.lineN+=n:t<g.lineN+g.size&&(o.externalMeasured=null))}function Qr(e,t,i){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var a=n.view[Cn(e,t)];if(a.node!=null){var c=a.changes||(a.changes=[]);Z(c,i)==-1&&c.push(i)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bo(e,t,i,n){var o=Cn(e,t),a,c=e.display.view;if(!Ir||i==e.doc.first+e.doc.size)return{index:o,lineN:i};for(var h=e.display.viewFrom,p=0;p<o;p++)h+=c[p].size;if(h!=t){if(n>0){if(o==c.length-1)return null;a=h+c[o].size-t,o++}else a=h-t;t+=a,i+=a}for(;Zs(e.doc,i)!=i;){if(o==(n<0?0:c.length-1))return null;i+=n*c[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:i}}function ip(e,t,i){var n=e.display,o=n.view;o.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=Fo(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=Fo(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Cn(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(Fo(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,Cn(e,i)))),n.viewTo=i}function _u(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var o=t[n];!o.hidden&&(!o.node||o.changes)&&++i}return i}function Wi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Tu(e,t){t===void 0&&(t=!0);var i=e.doc,n={},o=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),c=e.options.$customCursor;c&&(t=!0);for(var h=0;h<i.sel.ranges.length;h++)if(!(!t&&h==i.sel.primIndex)){var p=i.sel.ranges[h];if(!(p.from().line>=e.display.viewTo||p.to().line<e.display.viewFrom)){var g=p.empty();if(c){var k=c(e,p);k&&fl(e,k,o)}else(g||e.options.showCursorWhenSelecting)&&fl(e,p.head,o);g||op(e,p,a)}}return n}function fl(e,t,i){var n=mr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=i.appendChild($("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Wo(e,t,"div",null,null),c=a.right-a.left;o.style.width=(c>0?c:e.defaultCharWidth())+"px"}if(n.other){var h=i.appendChild($("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));h.style.display="",h.style.left=n.other.left+"px",h.style.top=n.other.top+"px",h.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function jo(e,t){return e.top-t.top||e.left-t.left}function op(e,t,i){var n=e.display,o=e.doc,a=document.createDocumentFragment(),c=cu(e.display),h=c.left,p=Math.max(n.sizerWidth,xn(e)-n.sizer.offsetLeft)-c.right,g=o.direction=="ltr";function k(me,ke,Ae,Me){ke<0&&(ke=0),ke=Math.round(ke),Me=Math.round(Me),a.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+me+`px;
6
6
  top: `+ke+"px; width: "+(Ae==null?p-me:Ae)+`px;
7
- height: `+(Me-ke)+"px"))}function C(me,ke,Ae){var Me=_e(o,me),Ue=Me.text.length,rt,_t;function ft(mt,$t){return Wo(e,ie(me,mt),"div",Me,$t)}function Vt(mt,$t,Ot){var wt=Su(e,Me,null,mt),yt=$t=="ltr"==(Ot=="after")?"left":"right",ht=Ot=="after"?wt.begin:wt.end-(/\s/.test(Me.text.charAt(wt.end-1))?2:1);return ft(ht,yt)[yt]}var qt=vt(Me,o.direction);return tt(qt,ke||0,Ae==null?Ue:Ae,function(mt,$t,Ot,wt){var yt=Ot=="ltr",ht=ft(mt,yt?"left":"right"),Gt=ft($t-1,yt?"right":"left"),si=ke==null&&mt==0,sn=Ae==null&&$t==Ue,Ft=wt==0,Mr=!qt||wt==qt.length-1;if(Gt.top-ht.top<=3){var Tt=(g?si:sn)&&Ft,Dl=(g?sn:si)&&Mr,Ur=Tt?h:(yt?ht:Gt).left,On=Dl?p:(yt?Gt:ht).right;k(Ur,ht.top,On-Ur,ht.bottom)}else{var Mn,Wt,li,Fl;yt?(Mn=g&&si&&Ft?h:ht.left,Wt=g?p:Vt(mt,Ot,"before"),li=g?h:Vt($t,Ot,"after"),Fl=g&&sn&&Mr?p:Gt.right):(Mn=g?Vt(mt,Ot,"before"):h,Wt=!g&&si&&Ft?p:ht.right,li=!g&&sn&&Mr?h:Gt.left,Fl=g?Vt($t,Ot,"after"):p),k(Mn,ht.top,Wt-Mn,ht.bottom),ht.bottom<Gt.top&&k(h,ht.bottom,null,Gt.top),k(li,Gt.top,Fl-li,Gt.bottom)}(!rt||jo(ht,rt)<0)&&(rt=ht),jo(Gt,rt)<0&&(rt=Gt),(!_t||jo(ht,_t)<0)&&(_t=ht),jo(Gt,_t)<0&&(_t=Gt)}),{start:rt,end:_t}}var R=t.from(),M=t.to();if(R.line==M.line)C(R.line,R.ch,M.ch);else{var U=_e(o,R.line),Q=_e(o,M.line),ae=gr(U)==gr(Q),ve=C(R.line,R.ch,ae?U.text.length+1:null).end,we=C(M.line,ae?0:null,M.ch).start;ae&&(ve.top<we.top-2?(k(ve.right,ve.top,null,ve.bottom),k(h,we.top,we.left,we.bottom)):k(ve.right,ve.top,we.left-ve.right,ve.bottom)),ve.bottom<we.top&&k(h,ve.bottom,null,we.top)}i.appendChild(a)}function cl(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Yn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||hl(e))}function dl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Yn(e))},100)}function hl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,ze(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),S&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),cl(e))}function Yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,de(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Uo(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var h=t.view[c],p=e.options.lineWrapping,g=void 0,k=0;if(!h.hidden){if(o+=h.line.height,y&&x<8){var C=h.node.offsetTop+h.node.offsetHeight;g=C-i,i=C}else{var R=h.node.getBoundingClientRect();g=R.bottom-R.top,!p&&h.text.firstChild&&(k=h.text.firstChild.getBoundingClientRect().right-R.left-1)}var M=h.line.height-g;if((M>.005||M<-.005)&&(o<n&&(a-=M),Jt(h.line,g),Pu(h.line),h.rest))for(var U=0;U<h.rest.length;U++)Pu(h.rest[U]);if(k>e.display.sizerWidth){var Q=Math.ceil(k/Gn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Pu(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Ko(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Io(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=Tr(t,n),c=Tr(t,o);if(i&&i.ensure){var h=i.ensure.from.line,p=i.ensure.to.line;h<a?(a=h,c=Tr(t,Hr(_e(t,h))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=c&&(a=Tr(t,Hr(_e(t,p))-e.wrapper.clientHeight),c=p)}return{from:a,to:Math.max(c,a+1)}}function sp(e,t){if(!ut(e,"scrollCursorIntoView")){var i=e.display,n=i.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!V){var a=$("div","\u200B",null,`position: absolute;
7
+ height: `+(Me-ke)+"px"))}function C(me,ke,Ae){var Me=_e(o,me),Ue=Me.text.length,rt,_t;function ft(mt,$t){return Wo(e,ie(me,mt),"div",Me,$t)}function Vt(mt,$t,Ot){var wt=Su(e,Me,null,mt),yt=$t=="ltr"==(Ot=="after")?"left":"right",ht=Ot=="after"?wt.begin:wt.end-(/\s/.test(Me.text.charAt(wt.end-1))?2:1);return ft(ht,yt)[yt]}var qt=vt(Me,o.direction);return tt(qt,ke||0,Ae==null?Ue:Ae,function(mt,$t,Ot,wt){var yt=Ot=="ltr",ht=ft(mt,yt?"left":"right"),Gt=ft($t-1,yt?"right":"left"),si=ke==null&&mt==0,sn=Ae==null&&$t==Ue,Ft=wt==0,Mr=!qt||wt==qt.length-1;if(Gt.top-ht.top<=3){var Tt=(g?si:sn)&&Ft,Dl=(g?sn:si)&&Mr,Ur=Tt?h:(yt?ht:Gt).left,On=Dl?p:(yt?Gt:ht).right;k(Ur,ht.top,On-Ur,ht.bottom)}else{var Mn,Wt,li,Fl;yt?(Mn=g&&si&&Ft?h:ht.left,Wt=g?p:Vt(mt,Ot,"before"),li=g?h:Vt($t,Ot,"after"),Fl=g&&sn&&Mr?p:Gt.right):(Mn=g?Vt(mt,Ot,"before"):h,Wt=!g&&si&&Ft?p:ht.right,li=!g&&sn&&Mr?h:Gt.left,Fl=g?Vt($t,Ot,"after"):p),k(Mn,ht.top,Wt-Mn,ht.bottom),ht.bottom<Gt.top&&k(h,ht.bottom,null,Gt.top),k(li,Gt.top,Fl-li,Gt.bottom)}(!rt||jo(ht,rt)<0)&&(rt=ht),jo(Gt,rt)<0&&(rt=Gt),(!_t||jo(ht,_t)<0)&&(_t=ht),jo(Gt,_t)<0&&(_t=Gt)}),{start:rt,end:_t}}var R=t.from(),M=t.to();if(R.line==M.line)C(R.line,R.ch,M.ch);else{var U=_e(o,R.line),Q=_e(o,M.line),ae=vr(U)==vr(Q),ve=C(R.line,R.ch,ae?U.text.length+1:null).end,we=C(M.line,ae?0:null,M.ch).start;ae&&(ve.top<we.top-2?(k(ve.right,ve.top,null,ve.bottom),k(h,we.top,we.left,we.bottom)):k(ve.right,ve.top,we.left-ve.right,ve.bottom)),ve.bottom<we.top&&k(h,ve.bottom,null,we.top)}i.appendChild(a)}function cl(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Yn(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Lu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||hl(e))}function dl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Yn(e))},100)}function hl(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,ze(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),S&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),cl(e))}function Yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,de(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Uo(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var h=t.view[c],p=e.options.lineWrapping,g=void 0,k=0;if(!h.hidden){if(o+=h.line.height,y&&x<8){var C=h.node.offsetTop+h.node.offsetHeight;g=C-i,i=C}else{var R=h.node.getBoundingClientRect();g=R.bottom-R.top,!p&&h.text.firstChild&&(k=h.text.firstChild.getBoundingClientRect().right-R.left-1)}var M=h.line.height-g;if((M>.005||M<-.005)&&(o<n&&(a-=M),Jt(h.line,g),Pu(h.line),h.rest))for(var U=0;U<h.rest.length;U++)Pu(h.rest[U]);if(k>e.display.sizerWidth){var Q=Math.ceil(k/Gn(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Pu(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Ko(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Io(e));var o=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,a=Tr(t,n),c=Tr(t,o);if(i&&i.ensure){var h=i.ensure.from.line,p=i.ensure.to.line;h<a?(a=h,c=Tr(t,Hr(_e(t,h))+e.wrapper.clientHeight)):Math.min(p,t.lastLine())>=c&&(a=Tr(t,Hr(_e(t,p))-e.wrapper.clientHeight),c=p)}return{from:a,to:Math.max(c,a+1)}}function sp(e,t){if(!ut(e,"scrollCursorIntoView")){var i=e.display,n=i.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!V){var a=$("div","\u200B",null,`position: absolute;
8
8
  top: `+(t.top-i.viewOffset-Io(e.display))+`px;
9
9
  height: `+(t.bottom-t.top+Pr(e)+i.barHeight)+`px;
10
- left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function lp(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ie(t.line,t.ch+1,"before"):t,t=t.ch?ie(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var c=!1,h=vr(e,t),p=!i||i==t?h:vr(e,i);o={left:Math.min(h.left,p.left),top:Math.min(h.top,p.top)-n,right:Math.max(h.left,p.left),bottom:Math.max(h.bottom,p.bottom)+n};var g=pl(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(g.scrollTop!=null&&(ji(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(c=!0)),g.scrollLeft!=null&&(_n(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(c=!0)),!c)break}return o}function ap(e,t){var i=pl(e,t);i.scrollTop!=null&&ji(e,i.scrollTop),i.scrollLeft!=null&&_n(e,i.scrollLeft)}function pl(e,t){var i=e.display,n=$n(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=tl(e),c={};t.bottom-t.top>a&&(t.bottom=t.top+a);var h=e.doc.height+el(i),p=t.top<n,g=t.bottom>h-n;if(t.top<o)c.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(g?h:t.bottom)-a);k!=o&&(c.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,M=xn(e)-i.gutters.offsetWidth,U=t.right-t.left>M;return U&&(t.right=t.left+M),t.left<10?c.scrollLeft=0:t.left<R?c.scrollLeft=Math.max(0,t.left+C-(U?0:10)):t.right>M+R-3&&(c.scrollLeft=t.right+(U?0:10)-M),c}function gl(e,t){t!=null&&(qo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xn(e){qo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Bi(e,t,i){(t!=null||i!=null)&&qo(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function up(e,t){qo(e),e.curOp.scrollToPos=t}function qo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=xu(e,t.from),n=xu(e,t.to);Ou(e,i,n,t.margin)}}function Ou(e,t,i,n){var o=pl(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Bi(e,o.scrollLeft,o.scrollTop)}function ji(e,t){Math.abs(e.doc.scrollTop-t)<2||(f||ml(e,{top:t}),Mu(e,t,!0),f&&ml(e),qi(e,100))}function Mu(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function _n(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,Ru(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ui(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+el(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Pr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Tn=function(e,t,i){this.cm=i;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Pe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Pe(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Tn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Tn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Tn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Tn.prototype.zeroWidthHack=function(){var e=B&&!re?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},Tn.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var o=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Tn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ki=function(){};Ki.prototype.update=function(){return{bottom:0,right:0}},Ki.prototype.setScrollLeft=function(){},Ki.prototype.setScrollTop=function(){},Ki.prototype.clear=function(){};function Zn(e,t){t||(t=Ui(e));var i=e.display.barWidth,n=e.display.barHeight;Eu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),Eu(e,Ui(e)),i=e.display.barWidth,n=e.display.barHeight}function Eu(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Au={native:Tn,null:Ki};function Nu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Au[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?_n(e,t):ji(e,t)},e),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)}var fp=0;function Ln(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++fp,markArrays:null},Bh(e.curOp)}function Pn(e){var t=e.curOp;t&&Uh(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;cp(i)})}function cp(e){for(var t=e.ops,i=0;i<t.length;i++)dp(t[i]);for(var n=0;n<t.length;n++)hp(t[n]);for(var o=0;o<t.length;o++)pp(t[o]);for(var a=0;a<t.length;a++)gp(t[a]);for(var c=0;c<t.length;c++)vp(t[c])}function dp(e){var t=e.cm,i=t.display;yp(t),e.updateMaxLine&&Qs(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new $o(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hp(e){e.updatedDisplay=e.mustUpdate&&vl(e.cm,e.update)}function pp(e){var t=e.cm,i=t.display;e.updatedDisplay&&Uo(t),e.barMeasure=Ui(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=hu(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Pr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-xn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function gp(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&_n(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==ue();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Zn(t,e.barMeasure),e.updatedDisplay&&bl(t,e.barMeasure),e.selectionChanged&&cl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Lu(e.cm)}function vp(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&zu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Mu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&_n(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=lp(t,xe(n,e.scrollToPos.from),xe(n,e.scrollToPos.to),e.scrollToPos.margin);sp(t,o)}var a=e.maybeHiddenMarkers,c=e.maybeUnhiddenMarkers;if(a)for(var h=0;h<a.length;++h)a[h].lines.length||Oe(a[h],"hide");if(c)for(var p=0;p<c.length;++p)c[p].lines.length&&Oe(c[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qt(e,t){if(e.curOp)return t();Ln(e);try{return t()}finally{Pn(e)}}function St(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ln(e);try{return t.apply(e,arguments)}finally{Pn(e)}}}function Ht(e){return function(){if(this.curOp)return e.apply(this,arguments);Ln(this);try{return e.apply(this,arguments)}finally{Pn(this)}}}function Ct(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ln(t);try{return e.apply(this,arguments)}finally{Pn(t)}}}function qi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,lt(mp,e))}function mp(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=zi(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var c=a.styles,h=a.text.length>e.options.maxHighlightLength?or(t.mode,n.state):null,p=Ba(e,a,n,!0);h&&(n.state=h),a.styles=p.styles;var g=a.styleClasses,k=p.classes;k?a.styleClasses=k:g&&(a.styleClasses=null);for(var C=!c||c.length!=a.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),R=0;!C&&R<c.length;++R)C=c[R]!=a.styles[R];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&$s(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return qi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Qt(e,function(){for(var a=0;a<o.length;a++)Qr(e,o[a],"text")})}}var $o=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Ko(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=xn(e),this.force=i,this.dims=ll(e),this.events=[]};$o.prototype.signal=function(e,t){Pt(e,t)&&this.events.push(arguments)},$o.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function yp(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Pr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Pr(e)+"px",t.scrollbarsClipped=!0)}function bp(e){if(e.hasFocus())return null;var t=ue();if(!t||!Y(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Y(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function wp(e){if(!(!e||!e.activeElt||e.activeElt==ue())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Y(document.body,e.anchorNode)&&Y(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function vl(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Vr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&_u(e)==0)return!1;Du(e)&&(Vr(e),t.dims=ll(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),c=Math.min(o,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(n.first,i.viewFrom)),i.viewTo>c&&i.viewTo-c<20&&(c=Math.min(o,i.viewTo)),Ir&&(a=Zs(e.doc,a),c=tu(e.doc,c));var h=a!=i.viewFrom||c!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;ip(e,a,c),i.viewOffset=Hr(_e(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=_u(e);if(!h&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=bp(e);return p>4&&(i.lineDiv.style.display="none"),xp(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,wp(g),Ne(i.cursorDiv),Ne(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,h&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,qi(e,400)),i.updateLineNumbers=null,!0}function zu(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==xn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+el(e.display)-tl(e),i.top)}),t.visible=Ko(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ko(e.display,e.doc,i));if(!vl(e,t))break;Uo(e);var o=Ui(e);Wi(e),Zn(e,o),bl(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ml(e,t){var i=new $o(e,t);if(vl(e,i)){Uo(e),zu(e,i);var n=Ui(e);Wi(e),Zn(e,n),bl(e,n),i.finish()}}function xp(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,c=a.firstChild;function h(U){var Q=U.nextSibling;return S&&B&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var p=n.view,g=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var R=Yh(e,C,g,i);a.insertBefore(R,c)}else{for(;c!=C.node;)c=h(c);var M=o&&t!=null&&t<=g&&C.lineNumber;C.changes&&(Z(C.changes,"gutter")>-1&&(M=!1),su(e,C,g,i)),M&&(Ne(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(Ni(e.options,g)))),c=C.node.nextSibling}g+=C.size}for(;c;)c=h(c)}function yl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",kt(e,"gutterChanged",e)}function bl(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pr(e)+"px"}function Ru(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=al(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",c=0;c<i.length;c++)if(!i[c].hidden){e.options.fixedGutter&&(i[c].gutter&&(i[c].gutter.style.left=a),i[c].gutterBackground&&(i[c].gutterBackground.style.left=a));var h=i[c].alignable;if(h)for(var p=0;p<h.length;p++)h[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Du(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=Ni(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild($("div",[$("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,c=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-c)+1,n.lineNumWidth=n.lineNumInnerWidth+c,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",yl(e.display),!0}return!1}function wl(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],c=null;if(typeof a!="string"&&(c=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:c})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Fu(e){var t=e.gutters,i=e.gutterSpecs;Ne(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,c=o.style,h=t.appendChild($("div",null,"CodeMirror-gutter "+a));c&&(h.style.cssText=c),a=="CodeMirror-linenumbers"&&(e.lineGutter=h,h.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",yl(e)}function $i(e){Fu(e.display),Ut(e),Ru(e)}function kp(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=w("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=w("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=w("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[a],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+K+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&x<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!S&&!(f&&I)&&(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=wl(n.gutters,n.lineNumbers),Fu(o),i.init(o)}var Go=0,Br=null;y?Br=-.53:f?Br=15:O?Br=-.7:H&&(Br=-1/3);function Iu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function Sp(e){var t=Iu(e);return t.x*=Br,t.y*=Br,t}function Hu(e,t){var i=Iu(t),n=i.x,o=i.y,a=Br;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var c=e.display,h=c.scroller,p=h.scrollWidth>h.clientWidth,g=h.scrollHeight>h.clientHeight;if(!!(n&&p||o&&g)){if(o&&B&&S){e:for(var k=t.target,C=c.view;k!=h;k=k.parentNode)for(var R=0;R<C.length;R++)if(C[R].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!f&&!A&&a!=null){o&&g&&ji(e,Math.max(0,h.scrollTop+o*a)),_n(e,Math.max(0,h.scrollLeft+n*a)),(!o||o&&g)&&zt(t),c.wheelStartX=null;return}if(o&&a!=null){var M=o*a,U=e.doc.scrollTop,Q=U+c.wrapper.clientHeight;M<0?U=Math.max(0,U+M-50):Q=Math.min(e.doc.height,Q+M+50),ml(e,{top:U,bottom:Q})}Go<20&&t.deltaMode!==0&&(c.wheelStartX==null?(c.wheelStartX=h.scrollLeft,c.wheelStartY=h.scrollTop,c.wheelDX=n,c.wheelDY=o,setTimeout(function(){if(c.wheelStartX!=null){var ae=h.scrollLeft-c.wheelStartX,ve=h.scrollTop-c.wheelStartY,we=ve&&c.wheelDY&&ve/c.wheelDY||ae&&c.wheelDX&&ae/c.wheelDX;c.wheelStartX=c.wheelStartY=null,we&&(Br=(Br*Go+we)/(Go+1),++Go)}},200)):(c.wheelDX+=n,c.wheelDY+=o))}}var lr=function(e,t){this.ranges=e,this.primIndex=t};lr.prototype.primary=function(){return this.ranges[this.primIndex]},lr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!P(i.anchor,n.anchor)||!P(i.head,n.head))return!1}return!0},lr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ze(X(this.ranges[t].anchor),X(this.ranges[t].head));return new lr(e,this.primIndex)},lr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},lr.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(m(t,n.from())>=0&&m(e,n.to())<=0)return i}return-1};var Ze=function(e,t){this.anchor=e,this.head=t};Ze.prototype.from=function(){return De(this.anchor,this.head)},Ze.prototype.to=function(){return le(this.anchor,this.head)},Ze.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function mr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(R,M){return m(R.from(),M.from())}),i=Z(t,o);for(var a=1;a<t.length;a++){var c=t[a],h=t[a-1],p=m(h.to(),c.from());if(n&&!c.empty()?p>0:p>=0){var g=De(h.from(),c.from()),k=le(h.to(),c.to()),C=h.empty()?c.from()==c.head:h.from()==h.head;a<=i&&--i,t.splice(--a,2,new Ze(C?k:g,C?g:k))}}return new lr(t,i)}function en(e,t){return new lr([new Ze(e,t||e)],0)}function tn(e){return e.text?ie(e.from.line+e.text.length-1,F(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Wu(e,t){if(m(e,t.from)<0)return e;if(m(e,t.to)<=0)return tn(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=tn(t).ch-t.to.ch),ie(i,n)}function xl(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Ze(Wu(o.anchor,t),Wu(o.head,t)))}return mr(e.cm,i,e.sel.primIndex)}function Bu(e,t,i){return e.line==t.line?ie(i.line,e.ch-t.ch+i.ch):ie(i.line+(e.line-t.line),e.ch)}function Cp(e,t,i){for(var n=[],o=ie(e.first,0),a=o,c=0;c<t.length;c++){var h=t[c],p=Bu(h.from,o,a),g=Bu(tn(h),o,a);if(o=h.to,a=g,i=="around"){var k=e.sel.ranges[c],C=m(k.head,k.anchor)<0;n[c]=new Ze(C?g:p,C?p:g)}else n[c]=new Ze(p,p)}return new lr(n,e.sel.primIndex)}function kl(e){e.doc.mode=Bn(e.options,e.doc.modeOption),Gi(e)}function Gi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,qi(e,100),e.state.modeGen++,e.curOp&&Ut(e)}function ju(e,t){return t.from.ch==0&&t.to.ch==0&&F(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Sl(e,t,i,n){function o(we){return i?i[we]:null}function a(we,me,ke){Ah(we,me,ke,n),kt(we,"change",we,t)}function c(we,me){for(var ke=[],Ae=we;Ae<me;++Ae)ke.push(new Un(g[Ae],o(Ae),n));return ke}var h=t.from,p=t.to,g=t.text,k=_e(e,h.line),C=_e(e,p.line),R=F(g),M=o(g.length-1),U=p.line-h.line;if(t.full)e.insert(0,c(0,g.length)),e.remove(g.length,e.size-g.length);else if(ju(e,t)){var Q=c(0,g.length-1);a(C,C.text,M),U&&e.remove(h.line,U),Q.length&&e.insert(h.line,Q)}else if(k==C)if(g.length==1)a(k,k.text.slice(0,h.ch)+R+k.text.slice(p.ch),M);else{var ae=c(1,g.length-1);ae.push(new Un(R+k.text.slice(p.ch),M,n)),a(k,k.text.slice(0,h.ch)+g[0],o(0)),e.insert(h.line+1,ae)}else if(g.length==1)a(k,k.text.slice(0,h.ch)+g[0]+C.text.slice(p.ch),o(0)),e.remove(h.line+1,U);else{a(k,k.text.slice(0,h.ch)+g[0],o(0)),a(C,R+C.text.slice(p.ch),M);var ve=c(1,g.length-1);U>1&&e.remove(h.line+1,U-1),e.insert(h.line+1,ve)}kt(e,"change",e,t)}function rn(e,t,i){function n(o,a,c){if(o.linked)for(var h=0;h<o.linked.length;++h){var p=o.linked[h];if(p.doc!=a){var g=c&&p.sharedHist;i&&!g||(t(p.doc,g),n(p.doc,o,g))}}}n(e,null,!0)}function Uu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ul(e),kl(e),Ku(e),e.options.direction=t.direction,e.options.lineWrapping||Qs(e),e.options.mode=t.modeOption,Ut(e)}function Ku(e){(e.doc.direction=="rtl"?ze:de)(e.display.lineDiv,"CodeMirror-rtl")}function _p(e){Qt(e,function(){Ku(e),Ut(e)})}function Yo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Cl(e,t){var i={from:X(t.from),to:tn(t),text:_r(e,t.from,t.to)};return Gu(e,i,t.from.line,t.to.line+1),rn(e,function(n){return Gu(n,i,t.from.line,t.to.line+1)},!0),i}function qu(e){for(;e.length;){var t=F(e);if(t.ranges)e.pop();else break}}function Tp(e,t){if(t)return qu(e.done),F(e.done);if(e.done.length&&!F(e.done).ranges)return F(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),F(e.done)}function $u(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,c,h;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(c=Tp(o,o.lastOp==n)))h=F(c.changes),m(t.from,t.to)==0&&m(t.from,h.to)==0?h.to=tn(t):c.changes.push(Cl(e,t));else{var p=F(o.done);for((!p||!p.ranges)&&Xo(e.sel,o.done),c={changes:[Cl(e,t)],generation:o.generation},o.done.push(c);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(i),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,h||Oe(e,"historyAdded")}function Lp(e,t,i,n){var o=t.charAt(0);return o=="*"||o=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pp(e,t,i,n){var o=e.history,a=n&&n.origin;i==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Lp(e,a,F(o.done),t))?o.done[o.done.length-1]=t:Xo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&qu(o.undone)}function Xo(e,t){var i=F(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Gu(e,t,i,n){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(c){c.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=c.markedSpans),++a})}function Op(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function Mp(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Op(i[o]));return n}function Yu(e,t){var i=Mp(e,t),n=Ys(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],c=n[o];if(a&&c){e:for(var h=0;h<c.length;++h){for(var p=c[h],g=0;g<a.length;++g)if(a[g].marker==p.marker)continue e;a.push(p)}}else c&&(i[o]=c)}return i}function Jn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?lr.prototype.deepCopy.call(a):a);continue}var c=a.changes,h=[];n.push({changes:h});for(var p=0;p<c.length;++p){var g=c[p],k=void 0;if(h.push({from:g.from,to:g.to,text:g.text}),t)for(var C in g)(k=C.match(/^spans_(\d+)$/))&&Z(t,Number(k[1]))>-1&&(F(h)[C]=g[C],delete g[C])}}return n}function _l(e,t,i,n){if(n){var o=e.anchor;if(i){var a=m(t,o)<0;a!=m(i,o)<0?(o=t,t=i):a!=m(t,i)<0&&(t=i)}return new Ze(o,t)}else return new Ze(i||t,t)}function Zo(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Dt(e,new lr([_l(e.sel.primary(),t,i,o)],0),n)}function Xu(e,t,i){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=_l(e.sel.ranges[a],t[a],null,o);var c=mr(e.cm,n,e.sel.primIndex);Dt(e,c,i)}function Tl(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Dt(e,mr(e.cm,o,e.sel.primIndex),n)}function Zu(e,t,i,n){Dt(e,en(t,i),n)}function Ep(e,t,i){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var a=0;a<o.length;a++)this.ranges[a]=new Ze(xe(e,o[a].anchor),xe(e,o[a].head))},origin:i&&i.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?mr(e.cm,n.ranges,n.ranges.length-1):t}function Ju(e,t,i){var n=e.history.done,o=F(n);o&&o.ranges?(n[n.length-1]=t,Jo(e,t,i)):Dt(e,t,i)}function Dt(e,t,i){Jo(e,t,i),Pp(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Jo(e,t,i){(Pt(e,"beforeSelectionChange")||e.cm&&Pt(e.cm,"beforeSelectionChange"))&&(t=Ep(e,t,i));var n=i&&i.bias||(m(t.primary().head,e.sel.primary().head)<0?-1:1);Qu(e,ef(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Xn(e.cm)}function Qu(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,In(e.cm)),kt(e,"cursorActivity",e))}function Vu(e){Qu(e,ef(e,e.sel,null,!1))}function ef(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var c=t.ranges[a],h=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Qo(e,c.anchor,h&&h.anchor,i,n),g=Qo(e,c.head,h&&h.head,i,n);(o||p!=c.anchor||g!=c.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new Ze(p,g))}return o?mr(e.cm,o,t.primIndex):t}function Qn(e,t,i,n,o){var a=_e(e,t.line);if(a.markedSpans)for(var c=0;c<a.markedSpans.length;++c){var h=a.markedSpans[c],p=h.marker,g="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((h.from==null||(g?h.from<=t.ch:h.from<t.ch))&&(h.to==null||(k?h.to>=t.ch:h.to>t.ch))){if(o&&(Oe(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--c;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),R=void 0;if((n<0?k:g)&&(C=tf(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(R=m(C,i))&&(n<0?R<0:R>0))return Qn(e,C,t,n,o)}var M=p.find(n<0?-1:1);return(n<0?g:k)&&(M=tf(e,M,n,M.line==t.line?a:null)),M?Qn(e,M,t,n,o):null}}return t}function Qo(e,t,i,n,o){var a=n||1,c=Qn(e,t,i,a,o)||!o&&Qn(e,t,i,a,!0)||Qn(e,t,i,-a,o)||!o&&Qn(e,t,i,-a,!0);return c||(e.cantEdit=!0,ie(e.first,0))}function tf(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?xe(e,ie(t.line-1)):null:i>0&&t.ch==(n||_e(e,t.line)).text.length?t.line<e.first+e.size-1?ie(t.line+1,0):null:new ie(t.line,t.ch+i)}function rf(e){e.setSelection(ie(e.firstLine(),0),ie(e.lastLine()),Ce)}function nf(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(o,a,c,h){o&&(n.from=xe(e,o)),a&&(n.to=xe(e,a)),c&&(n.text=c),h!==void 0&&(n.origin=h)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Vn(e,t,i){if(e.cm){if(!e.cm.curOp)return St(e.cm,Vn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"))&&(t=nf(e,t,!0),!t))){var n=Ya&&!i&&Ph(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)of(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else of(e,t)}}function of(e,t){if(!(t.text.length==1&&t.text[0]==""&&m(t.from,t.to)==0)){var i=xl(e,t);$u(e,t,i,e.cm?e.cm.curOp.id:NaN),Yi(e,t,i,Ys(e,t));var n=[];rn(e,function(o,a){!a&&Z(n,o.history)==-1&&(uf(o.history,t),n.push(o.history)),Yi(o,t,null,Ys(o,t))})}}function Vo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,c=e.sel,h=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,g=0;g<h.length&&(a=h[g],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));g++);if(g!=h.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=h.pop(),a.ranges){if(Xo(a,p),i&&!a.equals(e.sel)){Dt(e,a,{clearRedo:!1});return}c=a}else if(n){h.push(a);return}else break;var k=[];Xo(c,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"),R=function(Q){var ae=a.changes[Q];if(ae.origin=t,C&&!nf(e,ae,!1))return h.length=0,{};k.push(Cl(e,ae));var ve=Q?xl(e,ae):F(h);Yi(e,ae,ve,Yu(e,ae)),!Q&&e.cm&&e.cm.scrollIntoView({from:ae.from,to:tn(ae)});var we=[];rn(e,function(me,ke){!ke&&Z(we,me.history)==-1&&(uf(me.history,ae),we.push(me.history)),Yi(me,ae,null,Yu(me,ae))})},M=a.changes.length-1;M>=0;--M){var U=R(M);if(U)return U.v}}}}function sf(e,t){if(t!=0&&(e.first+=t,e.sel=new lr(G(e.sel.ranges,function(o){return new Ze(ie(o.anchor.line+t,o.anchor.ch),ie(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Ut(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Qr(e.cm,n,"gutter")}}function Yi(e,t,i,n){if(e.cm&&!e.cm.curOp)return St(e.cm,Yi)(e,t,i,n);if(t.to.line<e.first){sf(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);sf(e,o),t={from:ie(e.first,0),to:ie(t.to.line+o,t.to.ch),text:[F(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ie(a,_e(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_r(e,t.from,t.to),i||(i=xl(e,t)),e.cm?Ap(e.cm,t,n):Sl(e,t,n),Jo(e,i,Ce),e.cantEdit&&Qo(e,ie(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ap(e,t,i){var n=e.doc,o=e.display,a=t.from,c=t.to,h=!1,p=a.line;e.options.lineWrapping||(p=Xe(gr(_e(n,a.line))),n.iter(p,c.line+1,function(M){if(M==o.maxLine)return h=!0,!0})),n.sel.contains(t.from,t.to)>-1&&In(e),Sl(n,t,i,Cu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(M){var U=Do(M);U>o.maxLineLength&&(o.maxLine=M,o.maxLineLength=U,o.maxLineChanged=!0,h=!1)}),h&&(e.curOp.updateMaxLine=!0)),xh(n,a.line),qi(e,400);var g=t.text.length-(c.line-a.line)-1;t.full?Ut(e):a.line==c.line&&t.text.length==1&&!ju(e.doc,t)?Qr(e,a.line,"text"):Ut(e,a.line,c.line+1,g);var k=Pt(e,"changes"),C=Pt(e,"change");if(C||k){var R={from:a,to:c,text:t.text,removed:t.removed,origin:t.origin};C&&kt(e,"change",e,R),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function ei(e,t,i,n,o){var a;n||(n=i),m(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Vn(e,{from:i,to:n,text:t,origin:o})}function lf(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function af(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],c=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var h=0;h<a.ranges.length;h++)lf(a.ranges[h].anchor,t,i,n),lf(a.ranges[h].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var g=a.changes[p];if(i<g.from.line)g.from=ie(g.from.line+n,g.from.ch),g.to=ie(g.to.line+n,g.to.ch);else if(t<=g.to.line){c=!1;break}}c||(e.splice(0,o+1),o=0)}}function uf(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;af(e.done,i,n,o),af(e.undone,i,n,o)}function Xi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=_e(e,$e(e,t)):o=Xe(t),o==null?null:(n(a,o)&&e.cm&&Qr(e.cm,o,i),a)}function Zi(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Zi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var o=this.lines[i];this.height-=o.height,Nh(o),kt(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Ji(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),i+=o.height,o.parent=this}this.size=t,this.height=i,this.parent=null}Ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(e<o){var a=Math.min(t,o-e),c=n.height;if(n.removeInner(e,a),this.height-=c-n.height,o==a&&(this.children.splice(i--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Zi))){var h=[];this.collapse(h),this.children=[new Zi(h)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,i),o.lines&&o.lines.length>50){for(var c=o.lines.length%25+25,h=c;h<o.lines.length;){var p=new Zi(o.lines.slice(h,h+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,c),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Ji(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=Z(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Ji(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<a){var c=Math.min(t,a-e);if(o.iterN(e,c,i))return!0;if((t-=c)==0)break;e=0}else e-=a}}};var Qi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Qi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Xe(i);if(!(n==null||!t)){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(i.widgets=null);var a=Ii(this);Jt(i,Math.max(0,i.height-a)),e&&(Qt(e,function(){ff(e,i,-a),Qr(e,n,"widget")}),kt(e,"lineWidgetCleared",e,this,n))}},Qi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Ii(this)-t;!o||(Jr(this.doc,n)||Jt(n,n.height+o),i&&Qt(i,function(){i.curOp.forceUpdate=!0,ff(i,n,o),kt(i,"lineWidgetChanged",i,e,Xe(n))}))},Sr(Qi);function ff(e,t,i){Hr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&gl(e,i)}function Np(e,t,i,n){var o=new Qi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Xi(e,t,"widget",function(c){var h=c.widgets||(c.widgets=[]);if(o.insertAt==null?h.push(o):h.splice(Math.min(h.length,Math.max(0,o.insertAt)),0,o),o.line=c,a&&!Jr(e,c)){var p=Hr(c)<e.scrollTop;Jt(c,c.height+Ii(o)),p&&gl(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&kt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:Xe(t)),o}var cf=0,nn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++cf};nn.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ln(e),Pt(this,"clear")){var i=this.find();i&&kt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var c=this.lines[a],h=Ri(c.markedSpans,this);e&&!this.collapsed?Qr(e,Xe(c),"text"):e&&(h.to!=null&&(o=Xe(c)),h.from!=null&&(n=Xe(c))),c.markedSpans=Ch(c.markedSpans,h),h.from==null&&this.collapsed&&!Jr(this.doc,c)&&e&&Jt(c,$n(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var g=gr(this.lines[p]),k=Do(g);k>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Ut(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vu(e.doc)),e&&kt(e,"markerCleared",e,this,n,o),t&&Pn(e),this.parent&&this.parent.clear()}},nn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,o=0;o<this.lines.length;++o){var a=this.lines[o],c=Ri(a.markedSpans,this);if(c.from!=null&&(i=ie(t?a:Xe(a),c.from),e==-1))return i;if(c.to!=null&&(n=ie(t?a:Xe(a),c.to),e==1))return n}return i&&{from:i,to:n}},nn.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;!t||!n||Qt(n,function(){var o=t.line,a=Xe(t.line),c=rl(n,a);if(c&&(vu(c),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Jr(i.doc,o)&&i.height!=null){var h=i.height;i.height=null;var p=Ii(i)-h;p&&Jt(o,o.height+p)}kt(n,"markerChanged",n,e)})},nn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},nn.prototype.detachLine=function(e){if(this.lines.splice(Z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Sr(nn);function ti(e,t,i,n,o){if(n&&n.shared)return zp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return St(e.cm,ti)(e,t,i,n,o);var a=new nn(e,o),c=m(t,i);if(n&&Ie(n,a,!1),c>0||c==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=w("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(eu(e,t.line,t,i,a)||t.line!=i.line&&eu(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sh()}a.addToHistory&&$u(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var h=t.line,p=e.cm,g;if(e.iter(h,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&gr(C)==p.display.maxLine&&(g=!0),a.collapsed&&h!=t.line&&Jt(C,0),_h(C,new Ao(a,h==t.line?t.ch:null,h==i.line?i.ch:null),e.cm&&e.cm.curOp),++h}),a.collapsed&&e.iter(t.line,i.line+1,function(C){Jr(e,C)&&Jt(C,0)}),a.clearOnEnter&&Pe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(kh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++cf,a.atomic=!0),p){if(g&&(p.curOp.updateMaxLine=!0),a.collapsed)Ut(p,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=i.line;k++)Qr(p,k,"text");a.atomic&&Vu(p.doc),kt(p,"markerAdded",p,a)}return a}var Vi=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Vi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();kt(this,"clear")}},Vi.prototype.find=function(e,t){return this.primary.find(e,t)},Sr(Vi);function zp(e,t,i,n,o){n=Ie(n),n.shared=!1;var a=[ti(e,t,i,n,o)],c=a[0],h=n.widgetNode;return rn(e,function(p){h&&(n.widgetNode=h.cloneNode(!0)),a.push(ti(p,xe(p,t),xe(p,i),n,o));for(var g=0;g<p.linked.length;++g)if(p.linked[g].isParent)return;c=F(a)}),new Vi(a,c)}function df(e){return e.findMarks(ie(e.first,0),e.clipPos(ie(e.lastLine())),function(t){return t.parent})}function Rp(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),c=e.clipPos(o.to);if(m(a,c)){var h=ti(e,a,c,n.primary,n.primary.type);n.markers.push(h),h.parent=n}}}function Dp(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];rn(o.primary.doc,function(p){return a.push(p)});for(var c=0;c<o.markers.length;c++){var h=o.markers[c];Z(a,h.doc)==-1&&(h.parent=null,o.markers.splice(c--,1))}},i=0;i<e.length;i++)t(i)}var Fp=0,Kt=function(e,t,i,n,o){if(!(this instanceof Kt))return new Kt(e,t,i,n,o);i==null&&(i=0),Ji.call(this,[new Zi([new Un("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ie(i,0);this.sel=en(a),this.history=new Yo(null),this.id=++Fp,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Sl(this,{from:a,to:a,text:e}),Dt(this,en(a),Ce)};Kt.prototype=fe(Ji.prototype,{constructor:Kt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ai(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ct(function(e){var t=ie(this.first,0),i=this.first+this.size-1;Vn(this,{from:t,to:ie(i,_e(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Bi(this.cm,0,0),Dt(this,en(t),Ce)}),replaceRange:function(e,t,i,n){t=xe(this,t),i=i?xe(this,i):t,ei(this,e,t,i,n)},getRange:function(e,t,i){var n=_r(this,xe(this,e),xe(this,t));return i===!1?n:i===""?n.join(""):n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(wn(this,e))return _e(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=_e(this,e)),gr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return xe(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ct(function(e,t,i){Zu(this,xe(this,typeof e=="number"?ie(e,t||0):e),null,i)}),setSelection:Ct(function(e,t,i){Zu(this,xe(this,e),xe(this,t||e),i)}),extendSelection:Ct(function(e,t,i){Zo(this,xe(this,e),t&&xe(this,t),i)}),extendSelections:Ct(function(e,t){Xu(this,sr(this,e),t)}),extendSelectionsBy:Ct(function(e,t){var i=G(this.sel.ranges,e);Xu(this,sr(this,i),t)}),setSelections:Ct(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new Ze(xe(this,e[o].anchor),xe(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Dt(this,mr(this.cm,n,t),i)}}),addSelection:Ct(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Ze(xe(this,e),xe(this,t||e))),Dt(this,mr(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var o=_r(this,t[n].from(),t[n].to());i=i?i.concat(o):o}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var o=_r(this,i[n].from(),i[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,i){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:Ct(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var c=o.ranges[a];n[a]={from:c.from(),to:c.to(),text:this.splitLines(e[a]),origin:i}}for(var h=t&&t!="end"&&Cp(this,n,t),p=n.length-1;p>=0;p--)Vn(this,n[p]);h?Ju(this,h):this.cm&&Xn(this.cm)}),undo:Ct(function(){Vo(this,"undo")}),redo:Ct(function(){Vo(this,"redo")}),undoSelection:Ct(function(){Vo(this,"undo",!0)}),redoSelection:Ct(function(){Vo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Yo(this.history),rn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Jn(this.history.done),undone:Jn(this.history.undone)}},setHistory:function(e){var t=this.history=new Yo(this.history);t.done=Jn(e.done.slice(0),null,!0),t.undone=Jn(e.undone.slice(0),null,!0)},setGutterMarker:Ct(function(e,t,i){return Xi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&W(o)&&(n.gutterMarkers=null),!0})}),clearGutter:Ct(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Xi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,W(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!wn(this,e)||(t=e,e=_e(this,e),!e))return null}else if(t=Xe(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ct(function(e,t,i){return Xi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[o])n[o]=i;else{if(be(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:Ct(function(e,t,i){return Xi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[o];if(a)if(i==null)n[o]=null;else{var c=a.match(be(i));if(!c)return!1;var h=c.index+c[0].length;n[o]=a.slice(0,c.index)+(!c.index||h==a.length?"":" ")+a.slice(h)||null}else return!1;return!0})}),addLineWidget:Ct(function(e,t,i){return Np(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return ti(this,xe(this,e),xe(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=xe(this,e),ti(this,e,e,i,"bookmark")},findMarksAt:function(e){e=xe(this,e);var t=[],i=_e(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,i){e=xe(this,e),t=xe(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var c=a.markedSpans;if(c)for(var h=0;h<c.length;h++){var p=c[h];!(p.to!=null&&o==e.line&&e.ch>=p.to||p.from==null&&o!=e.line||p.from!=null&&o==t.line&&p.from>=t.ch)&&(!i||i(p.marker))&&n.push(p.marker.parent||p.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(o){var a=o.text.length+n;if(a>e)return t=e,!0;e-=a,++i}),xe(this,ie(i,t))},indexFromPos:function(e){e=xe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new Kt(Ai(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new Kt(Ai(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Rp(n,df(this)),n},unlinkDoc:function(e){if(e instanceof at&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Dp(df(this));break}}if(e.history==this.history){var n=[e.id];rn(e,function(o){return n.push(o.id)},!0),e.history=new Yo(null),e.history.done=Jn(this.history.done,n),e.history.undone=Jn(this.history.undone,n)}},iterLinkedDocs:function(e){rn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pi(e)},lineSeparator:function(){return this.lineSep||`
10
+ left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function lp(e,t,i,n){n==null&&(n=0);var o;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?ie(t.line,t.ch+1,"before"):t,t=t.ch?ie(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var c=!1,h=mr(e,t),p=!i||i==t?h:mr(e,i);o={left:Math.min(h.left,p.left),top:Math.min(h.top,p.top)-n,right:Math.max(h.left,p.left),bottom:Math.max(h.bottom,p.bottom)+n};var g=pl(e,o),k=e.doc.scrollTop,C=e.doc.scrollLeft;if(g.scrollTop!=null&&(ji(e,g.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(c=!0)),g.scrollLeft!=null&&(_n(e,g.scrollLeft),Math.abs(e.doc.scrollLeft-C)>1&&(c=!0)),!c)break}return o}function ap(e,t){var i=pl(e,t);i.scrollTop!=null&&ji(e,i.scrollTop),i.scrollLeft!=null&&_n(e,i.scrollLeft)}function pl(e,t){var i=e.display,n=$n(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=tl(e),c={};t.bottom-t.top>a&&(t.bottom=t.top+a);var h=e.doc.height+el(i),p=t.top<n,g=t.bottom>h-n;if(t.top<o)c.scrollTop=p?0:t.top;else if(t.bottom>o+a){var k=Math.min(t.top,(g?h:t.bottom)-a);k!=o&&(c.scrollTop=k)}var C=e.options.fixedGutter?0:i.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-C,M=xn(e)-i.gutters.offsetWidth,U=t.right-t.left>M;return U&&(t.right=t.left+M),t.left<10?c.scrollLeft=0:t.left<R?c.scrollLeft=Math.max(0,t.left+C-(U?0:10)):t.right>M+R-3&&(c.scrollLeft=t.right+(U?0:10)-M),c}function gl(e,t){t!=null&&(qo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xn(e){qo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Bi(e,t,i){(t!=null||i!=null)&&qo(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function up(e,t){qo(e),e.curOp.scrollToPos=t}function qo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=xu(e,t.from),n=xu(e,t.to);Ou(e,i,n,t.margin)}}function Ou(e,t,i,n){var o=pl(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Bi(e,o.scrollLeft,o.scrollTop)}function ji(e,t){Math.abs(e.doc.scrollTop-t)<2||(f||ml(e,{top:t}),Mu(e,t,!0),f&&ml(e),qi(e,100))}function Mu(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function _n(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,Ru(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ui(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+el(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+Pr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Tn=function(e,t,i){this.cm=i;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),Pe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Pe(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,y&&x<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Tn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Tn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Tn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Tn.prototype.zeroWidthHack=function(){var e=B&&!re?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},Tn.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var o=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Tn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ki=function(){};Ki.prototype.update=function(){return{bottom:0,right:0}},Ki.prototype.setScrollLeft=function(){},Ki.prototype.setScrollTop=function(){},Ki.prototype.clear=function(){};function Zn(e,t){t||(t=Ui(e));var i=e.display.barWidth,n=e.display.barHeight;Eu(e,t);for(var o=0;o<4&&i!=e.display.barWidth||n!=e.display.barHeight;o++)i!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),Eu(e,Ui(e)),i=e.display.barWidth,n=e.display.barHeight}function Eu(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var Au={native:Tn,null:Ki};function Nu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Au[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?_n(e,t):ji(e,t)},e),e.display.scrollbars.addClass&&ze(e.display.wrapper,e.display.scrollbars.addClass)}var fp=0;function Ln(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++fp,markArrays:null},Bh(e.curOp)}function Pn(e){var t=e.curOp;t&&Uh(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;cp(i)})}function cp(e){for(var t=e.ops,i=0;i<t.length;i++)dp(t[i]);for(var n=0;n<t.length;n++)hp(t[n]);for(var o=0;o<t.length;o++)pp(t[o]);for(var a=0;a<t.length;a++)gp(t[a]);for(var c=0;c<t.length;c++)vp(t[c])}function dp(e){var t=e.cm,i=t.display;yp(t),e.updateMaxLine&&Qs(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new $o(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function hp(e){e.updatedDisplay=e.mustUpdate&&vl(e.cm,e.update)}function pp(e){var t=e.cm,i=t.display;e.updatedDisplay&&Uo(t),e.barMeasure=Ui(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=hu(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Pr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-xn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function gp(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&_n(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==ue();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Zn(t,e.barMeasure),e.updatedDisplay&&bl(t,e.barMeasure),e.selectionChanged&&cl(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Lu(e.cm)}function vp(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&zu(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&Mu(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&_n(t,e.scrollLeft,!0,!0),e.scrollToPos){var o=lp(t,xe(n,e.scrollToPos.from),xe(n,e.scrollToPos.to),e.scrollToPos.margin);sp(t,o)}var a=e.maybeHiddenMarkers,c=e.maybeUnhiddenMarkers;if(a)for(var h=0;h<a.length;++h)a[h].lines.length||Oe(a[h],"hide");if(c)for(var p=0;p<c.length;++p)c[p].lines.length&&Oe(c[p],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qt(e,t){if(e.curOp)return t();Ln(e);try{return t()}finally{Pn(e)}}function St(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ln(e);try{return t.apply(e,arguments)}finally{Pn(e)}}}function Ht(e){return function(){if(this.curOp)return e.apply(this,arguments);Ln(this);try{return e.apply(this,arguments)}finally{Pn(this)}}}function Ct(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ln(t);try{return e.apply(this,arguments)}finally{Pn(t)}}}function qi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,lt(mp,e))}function mp(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,n=zi(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var c=a.styles,h=a.text.length>e.options.maxHighlightLength?or(t.mode,n.state):null,p=Ba(e,a,n,!0);h&&(n.state=h),a.styles=p.styles;var g=a.styleClasses,k=p.classes;k?a.styleClasses=k:g&&(a.styleClasses=null);for(var C=!c||c.length!=a.styles.length||g!=k&&(!g||!k||g.bgClass!=k.bgClass||g.textClass!=k.textClass),R=0;!C&&R<c.length;++R)C=c[R]!=a.styles[R];C&&o.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&$s(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return qi(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&Qt(e,function(){for(var a=0;a<o.length;a++)Qr(e,o[a],"text")})}}var $o=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Ko(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=xn(e),this.force=i,this.dims=ll(e),this.events=[]};$o.prototype.signal=function(e,t){Pt(e,t)&&this.events.push(arguments)},$o.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function yp(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Pr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Pr(e)+"px",t.scrollbarsClipped=!0)}function bp(e){if(e.hasFocus())return null;var t=ue();if(!t||!Y(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Y(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function wp(e){if(!(!e||!e.activeElt||e.activeElt==ue())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Y(document.body,e.anchorNode)&&Y(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function vl(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Vr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&_u(e)==0)return!1;Du(e)&&(Vr(e),t.dims=ll(e));var o=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),c=Math.min(o,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(n.first,i.viewFrom)),i.viewTo>c&&i.viewTo-c<20&&(c=Math.min(o,i.viewTo)),Ir&&(a=Zs(e.doc,a),c=tu(e.doc,c));var h=a!=i.viewFrom||c!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;ip(e,a,c),i.viewOffset=Hr(_e(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var p=_u(e);if(!h&&p==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var g=bp(e);return p>4&&(i.lineDiv.style.display="none"),xp(e,i.updateLineNumbers,t.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,wp(g),Ne(i.cursorDiv),Ne(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,h&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,qi(e,400)),i.updateLineNumbers=null,!0}function zu(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==xn(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+el(e.display)-tl(e),i.top)}),t.visible=Ko(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ko(e.display,e.doc,i));if(!vl(e,t))break;Uo(e);var o=Ui(e);Wi(e),Zn(e,o),bl(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ml(e,t){var i=new $o(e,t);if(vl(e,i)){Uo(e),zu(e,i);var n=Ui(e);Wi(e),Zn(e,n),bl(e,n),i.finish()}}function xp(e,t,i){var n=e.display,o=e.options.lineNumbers,a=n.lineDiv,c=a.firstChild;function h(U){var Q=U.nextSibling;return S&&B&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),Q}for(var p=n.view,g=n.viewFrom,k=0;k<p.length;k++){var C=p[k];if(!C.hidden)if(!C.node||C.node.parentNode!=a){var R=Yh(e,C,g,i);a.insertBefore(R,c)}else{for(;c!=C.node;)c=h(c);var M=o&&t!=null&&t<=g&&C.lineNumber;C.changes&&(Z(C.changes,"gutter")>-1&&(M=!1),su(e,C,g,i)),M&&(Ne(C.lineNumber),C.lineNumber.appendChild(document.createTextNode(Ni(e.options,g)))),c=C.node.nextSibling}g+=C.size}for(;c;)c=h(c)}function yl(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",kt(e,"gutterChanged",e)}function bl(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pr(e)+"px"}function Ru(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=al(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=n+"px",c=0;c<i.length;c++)if(!i[c].hidden){e.options.fixedGutter&&(i[c].gutter&&(i[c].gutter.style.left=a),i[c].gutterBackground&&(i[c].gutterBackground.style.left=a));var h=i[c].alignable;if(h)for(var p=0;p<h.length;p++)h[p].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Du(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=Ni(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var o=n.measure.appendChild($("div",[$("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,c=o.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-c)+1,n.lineNumWidth=n.lineNumInnerWidth+c,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",yl(e.display),!0}return!1}function wl(e,t){for(var i=[],n=!1,o=0;o<e.length;o++){var a=e[o],c=null;if(typeof a!="string"&&(c=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:a,style:c})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Fu(e){var t=e.gutters,i=e.gutterSpecs;Ne(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var o=i[n],a=o.className,c=o.style,h=t.appendChild($("div",null,"CodeMirror-gutter "+a));c&&(h.style.cssText=c),a=="CodeMirror-linenumbers"&&(e.lineGutter=h,h.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",yl(e)}function $i(e){Fu(e.display),Ut(e),Ru(e)}function kp(e,t,i,n){var o=this;this.input=i,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=w("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=w("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=w("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[a],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+K+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),y&&x<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),!S&&!(f&&I)&&(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=wl(n.gutters,n.lineNumbers),Fu(o),i.init(o)}var Go=0,Br=null;y?Br=-.53:f?Br=15:O?Br=-.7:H&&(Br=-1/3);function Iu(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function Sp(e){var t=Iu(e);return t.x*=Br,t.y*=Br,t}function Hu(e,t){var i=Iu(t),n=i.x,o=i.y,a=Br;t.deltaMode===0&&(n=t.deltaX,o=t.deltaY,a=1);var c=e.display,h=c.scroller,p=h.scrollWidth>h.clientWidth,g=h.scrollHeight>h.clientHeight;if(!!(n&&p||o&&g)){if(o&&B&&S){e:for(var k=t.target,C=c.view;k!=h;k=k.parentNode)for(var R=0;R<C.length;R++)if(C[R].node==k){e.display.currentWheelTarget=k;break e}}if(n&&!f&&!A&&a!=null){o&&g&&ji(e,Math.max(0,h.scrollTop+o*a)),_n(e,Math.max(0,h.scrollLeft+n*a)),(!o||o&&g)&&zt(t),c.wheelStartX=null;return}if(o&&a!=null){var M=o*a,U=e.doc.scrollTop,Q=U+c.wrapper.clientHeight;M<0?U=Math.max(0,U+M-50):Q=Math.min(e.doc.height,Q+M+50),ml(e,{top:U,bottom:Q})}Go<20&&t.deltaMode!==0&&(c.wheelStartX==null?(c.wheelStartX=h.scrollLeft,c.wheelStartY=h.scrollTop,c.wheelDX=n,c.wheelDY=o,setTimeout(function(){if(c.wheelStartX!=null){var ae=h.scrollLeft-c.wheelStartX,ve=h.scrollTop-c.wheelStartY,we=ve&&c.wheelDY&&ve/c.wheelDY||ae&&c.wheelDX&&ae/c.wheelDX;c.wheelStartX=c.wheelStartY=null,we&&(Br=(Br*Go+we)/(Go+1),++Go)}},200)):(c.wheelDX+=n,c.wheelDY+=o))}}var lr=function(e,t){this.ranges=e,this.primIndex=t};lr.prototype.primary=function(){return this.ranges[this.primIndex]},lr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!P(i.anchor,n.anchor)||!P(i.head,n.head))return!1}return!0},lr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ze(X(this.ranges[t].anchor),X(this.ranges[t].head));return new lr(e,this.primIndex)},lr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},lr.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(m(t,n.from())>=0&&m(e,n.to())<=0)return i}return-1};var Ze=function(e,t){this.anchor=e,this.head=t};Ze.prototype.from=function(){return De(this.anchor,this.head)},Ze.prototype.to=function(){return le(this.anchor,this.head)},Ze.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yr(e,t,i){var n=e&&e.options.selectionsMayTouch,o=t[i];t.sort(function(R,M){return m(R.from(),M.from())}),i=Z(t,o);for(var a=1;a<t.length;a++){var c=t[a],h=t[a-1],p=m(h.to(),c.from());if(n&&!c.empty()?p>0:p>=0){var g=De(h.from(),c.from()),k=le(h.to(),c.to()),C=h.empty()?c.from()==c.head:h.from()==h.head;a<=i&&--i,t.splice(--a,2,new Ze(C?k:g,C?g:k))}}return new lr(t,i)}function en(e,t){return new lr([new Ze(e,t||e)],0)}function tn(e){return e.text?ie(e.from.line+e.text.length-1,F(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Wu(e,t){if(m(e,t.from)<0)return e;if(m(e,t.to)<=0)return tn(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=tn(t).ch-t.to.ch),ie(i,n)}function xl(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];i.push(new Ze(Wu(o.anchor,t),Wu(o.head,t)))}return yr(e.cm,i,e.sel.primIndex)}function Bu(e,t,i){return e.line==t.line?ie(i.line,e.ch-t.ch+i.ch):ie(i.line+(e.line-t.line),e.ch)}function Cp(e,t,i){for(var n=[],o=ie(e.first,0),a=o,c=0;c<t.length;c++){var h=t[c],p=Bu(h.from,o,a),g=Bu(tn(h),o,a);if(o=h.to,a=g,i=="around"){var k=e.sel.ranges[c],C=m(k.head,k.anchor)<0;n[c]=new Ze(C?g:p,C?p:g)}else n[c]=new Ze(p,p)}return new lr(n,e.sel.primIndex)}function kl(e){e.doc.mode=Bn(e.options,e.doc.modeOption),Gi(e)}function Gi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,qi(e,100),e.state.modeGen++,e.curOp&&Ut(e)}function ju(e,t){return t.from.ch==0&&t.to.ch==0&&F(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Sl(e,t,i,n){function o(we){return i?i[we]:null}function a(we,me,ke){Ah(we,me,ke,n),kt(we,"change",we,t)}function c(we,me){for(var ke=[],Ae=we;Ae<me;++Ae)ke.push(new Un(g[Ae],o(Ae),n));return ke}var h=t.from,p=t.to,g=t.text,k=_e(e,h.line),C=_e(e,p.line),R=F(g),M=o(g.length-1),U=p.line-h.line;if(t.full)e.insert(0,c(0,g.length)),e.remove(g.length,e.size-g.length);else if(ju(e,t)){var Q=c(0,g.length-1);a(C,C.text,M),U&&e.remove(h.line,U),Q.length&&e.insert(h.line,Q)}else if(k==C)if(g.length==1)a(k,k.text.slice(0,h.ch)+R+k.text.slice(p.ch),M);else{var ae=c(1,g.length-1);ae.push(new Un(R+k.text.slice(p.ch),M,n)),a(k,k.text.slice(0,h.ch)+g[0],o(0)),e.insert(h.line+1,ae)}else if(g.length==1)a(k,k.text.slice(0,h.ch)+g[0]+C.text.slice(p.ch),o(0)),e.remove(h.line+1,U);else{a(k,k.text.slice(0,h.ch)+g[0],o(0)),a(C,R+C.text.slice(p.ch),M);var ve=c(1,g.length-1);U>1&&e.remove(h.line+1,U-1),e.insert(h.line+1,ve)}kt(e,"change",e,t)}function rn(e,t,i){function n(o,a,c){if(o.linked)for(var h=0;h<o.linked.length;++h){var p=o.linked[h];if(p.doc!=a){var g=c&&p.sharedHist;i&&!g||(t(p.doc,g),n(p.doc,o,g))}}}n(e,null,!0)}function Uu(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ul(e),kl(e),Ku(e),e.options.direction=t.direction,e.options.lineWrapping||Qs(e),e.options.mode=t.modeOption,Ut(e)}function Ku(e){(e.doc.direction=="rtl"?ze:de)(e.display.lineDiv,"CodeMirror-rtl")}function _p(e){Qt(e,function(){Ku(e),Ut(e)})}function Yo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Cl(e,t){var i={from:X(t.from),to:tn(t),text:_r(e,t.from,t.to)};return Gu(e,i,t.from.line,t.to.line+1),rn(e,function(n){return Gu(n,i,t.from.line,t.to.line+1)},!0),i}function qu(e){for(;e.length;){var t=F(e);if(t.ranges)e.pop();else break}}function Tp(e,t){if(t)return qu(e.done),F(e.done);if(e.done.length&&!F(e.done).ranges)return F(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),F(e.done)}function $u(e,t,i,n){var o=e.history;o.undone.length=0;var a=+new Date,c,h;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(c=Tp(o,o.lastOp==n)))h=F(c.changes),m(t.from,t.to)==0&&m(t.from,h.to)==0?h.to=tn(t):c.changes.push(Cl(e,t));else{var p=F(o.done);for((!p||!p.ranges)&&Xo(e.sel,o.done),c={changes:[Cl(e,t)],generation:o.generation},o.done.push(c);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(i),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,h||Oe(e,"historyAdded")}function Lp(e,t,i,n){var o=t.charAt(0);return o=="*"||o=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pp(e,t,i,n){var o=e.history,a=n&&n.origin;i==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Lp(e,a,F(o.done),t))?o.done[o.done.length-1]=t:Xo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=i,n&&n.clearRedo!==!1&&qu(o.undone)}function Xo(e,t){var i=F(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Gu(e,t,i,n){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(c){c.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=c.markedSpans),++a})}function Op(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function Mp(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Op(i[o]));return n}function Yu(e,t){var i=Mp(e,t),n=Ys(e,t);if(!i)return n;if(!n)return i;for(var o=0;o<i.length;++o){var a=i[o],c=n[o];if(a&&c){e:for(var h=0;h<c.length;++h){for(var p=c[h],g=0;g<a.length;++g)if(a[g].marker==p.marker)continue e;a.push(p)}}else c&&(i[o]=c)}return i}function Jn(e,t,i){for(var n=[],o=0;o<e.length;++o){var a=e[o];if(a.ranges){n.push(i?lr.prototype.deepCopy.call(a):a);continue}var c=a.changes,h=[];n.push({changes:h});for(var p=0;p<c.length;++p){var g=c[p],k=void 0;if(h.push({from:g.from,to:g.to,text:g.text}),t)for(var C in g)(k=C.match(/^spans_(\d+)$/))&&Z(t,Number(k[1]))>-1&&(F(h)[C]=g[C],delete g[C])}}return n}function _l(e,t,i,n){if(n){var o=e.anchor;if(i){var a=m(t,o)<0;a!=m(i,o)<0?(o=t,t=i):a!=m(t,i)<0&&(t=i)}return new Ze(o,t)}else return new Ze(i||t,t)}function Zo(e,t,i,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),Dt(e,new lr([_l(e.sel.primary(),t,i,o)],0),n)}function Xu(e,t,i){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=_l(e.sel.ranges[a],t[a],null,o);var c=yr(e.cm,n,e.sel.primIndex);Dt(e,c,i)}function Tl(e,t,i,n){var o=e.sel.ranges.slice(0);o[t]=i,Dt(e,yr(e.cm,o,e.sel.primIndex),n)}function Zu(e,t,i,n){Dt(e,en(t,i),n)}function Ep(e,t,i){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var a=0;a<o.length;a++)this.ranges[a]=new Ze(xe(e,o[a].anchor),xe(e,o[a].head))},origin:i&&i.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?yr(e.cm,n.ranges,n.ranges.length-1):t}function Ju(e,t,i){var n=e.history.done,o=F(n);o&&o.ranges?(n[n.length-1]=t,Jo(e,t,i)):Dt(e,t,i)}function Dt(e,t,i){Jo(e,t,i),Pp(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Jo(e,t,i){(Pt(e,"beforeSelectionChange")||e.cm&&Pt(e.cm,"beforeSelectionChange"))&&(t=Ep(e,t,i));var n=i&&i.bias||(m(t.primary().head,e.sel.primary().head)<0?-1:1);Qu(e,ef(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Xn(e.cm)}function Qu(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,In(e.cm)),kt(e,"cursorActivity",e))}function Vu(e){Qu(e,ef(e,e.sel,null,!1))}function ef(e,t,i,n){for(var o,a=0;a<t.ranges.length;a++){var c=t.ranges[a],h=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],p=Qo(e,c.anchor,h&&h.anchor,i,n),g=Qo(e,c.head,h&&h.head,i,n);(o||p!=c.anchor||g!=c.head)&&(o||(o=t.ranges.slice(0,a)),o[a]=new Ze(p,g))}return o?yr(e.cm,o,t.primIndex):t}function Qn(e,t,i,n,o){var a=_e(e,t.line);if(a.markedSpans)for(var c=0;c<a.markedSpans.length;++c){var h=a.markedSpans[c],p=h.marker,g="selectLeft"in p?!p.selectLeft:p.inclusiveLeft,k="selectRight"in p?!p.selectRight:p.inclusiveRight;if((h.from==null||(g?h.from<=t.ch:h.from<t.ch))&&(h.to==null||(k?h.to>=t.ch:h.to>t.ch))){if(o&&(Oe(p,"beforeCursorEnter"),p.explicitlyCleared))if(a.markedSpans){--c;continue}else break;if(!p.atomic)continue;if(i){var C=p.find(n<0?1:-1),R=void 0;if((n<0?k:g)&&(C=tf(e,C,-n,C&&C.line==t.line?a:null)),C&&C.line==t.line&&(R=m(C,i))&&(n<0?R<0:R>0))return Qn(e,C,t,n,o)}var M=p.find(n<0?-1:1);return(n<0?g:k)&&(M=tf(e,M,n,M.line==t.line?a:null)),M?Qn(e,M,t,n,o):null}}return t}function Qo(e,t,i,n,o){var a=n||1,c=Qn(e,t,i,a,o)||!o&&Qn(e,t,i,a,!0)||Qn(e,t,i,-a,o)||!o&&Qn(e,t,i,-a,!0);return c||(e.cantEdit=!0,ie(e.first,0))}function tf(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?xe(e,ie(t.line-1)):null:i>0&&t.ch==(n||_e(e,t.line)).text.length?t.line<e.first+e.size-1?ie(t.line+1,0):null:new ie(t.line,t.ch+i)}function rf(e){e.setSelection(ie(e.firstLine(),0),ie(e.lastLine()),Ce)}function nf(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(o,a,c,h){o&&(n.from=xe(e,o)),a&&(n.to=xe(e,a)),c&&(n.text=c),h!==void 0&&(n.origin=h)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Vn(e,t,i){if(e.cm){if(!e.cm.curOp)return St(e.cm,Vn)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"))&&(t=nf(e,t,!0),!t))){var n=Ya&&!i&&Ph(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)of(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else of(e,t)}}function of(e,t){if(!(t.text.length==1&&t.text[0]==""&&m(t.from,t.to)==0)){var i=xl(e,t);$u(e,t,i,e.cm?e.cm.curOp.id:NaN),Yi(e,t,i,Ys(e,t));var n=[];rn(e,function(o,a){!a&&Z(n,o.history)==-1&&(uf(o.history,t),n.push(o.history)),Yi(o,t,null,Ys(o,t))})}}function Vo(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!i)){for(var o=e.history,a,c=e.sel,h=t=="undo"?o.done:o.undone,p=t=="undo"?o.undone:o.done,g=0;g<h.length&&(a=h[g],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));g++);if(g!=h.length){for(o.lastOrigin=o.lastSelOrigin=null;;)if(a=h.pop(),a.ranges){if(Xo(a,p),i&&!a.equals(e.sel)){Dt(e,a,{clearRedo:!1});return}c=a}else if(n){h.push(a);return}else break;var k=[];Xo(c,p),p.push({changes:k,generation:o.generation}),o.generation=a.generation||++o.maxGeneration;for(var C=Pt(e,"beforeChange")||e.cm&&Pt(e.cm,"beforeChange"),R=function(Q){var ae=a.changes[Q];if(ae.origin=t,C&&!nf(e,ae,!1))return h.length=0,{};k.push(Cl(e,ae));var ve=Q?xl(e,ae):F(h);Yi(e,ae,ve,Yu(e,ae)),!Q&&e.cm&&e.cm.scrollIntoView({from:ae.from,to:tn(ae)});var we=[];rn(e,function(me,ke){!ke&&Z(we,me.history)==-1&&(uf(me.history,ae),we.push(me.history)),Yi(me,ae,null,Yu(me,ae))})},M=a.changes.length-1;M>=0;--M){var U=R(M);if(U)return U.v}}}}function sf(e,t){if(t!=0&&(e.first+=t,e.sel=new lr(G(e.sel.ranges,function(o){return new Ze(ie(o.anchor.line+t,o.anchor.ch),ie(o.head.line+t,o.head.ch))}),e.sel.primIndex),e.cm)){Ut(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Qr(e.cm,n,"gutter")}}function Yi(e,t,i,n){if(e.cm&&!e.cm.curOp)return St(e.cm,Yi)(e,t,i,n);if(t.to.line<e.first){sf(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);sf(e,o),t={from:ie(e.first,0),to:ie(t.to.line+o,t.to.ch),text:[F(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:ie(a,_e(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_r(e,t.from,t.to),i||(i=xl(e,t)),e.cm?Ap(e.cm,t,n):Sl(e,t,n),Jo(e,i,Ce),e.cantEdit&&Qo(e,ie(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ap(e,t,i){var n=e.doc,o=e.display,a=t.from,c=t.to,h=!1,p=a.line;e.options.lineWrapping||(p=Xe(vr(_e(n,a.line))),n.iter(p,c.line+1,function(M){if(M==o.maxLine)return h=!0,!0})),n.sel.contains(t.from,t.to)>-1&&In(e),Sl(n,t,i,Cu(e)),e.options.lineWrapping||(n.iter(p,a.line+t.text.length,function(M){var U=Do(M);U>o.maxLineLength&&(o.maxLine=M,o.maxLineLength=U,o.maxLineChanged=!0,h=!1)}),h&&(e.curOp.updateMaxLine=!0)),xh(n,a.line),qi(e,400);var g=t.text.length-(c.line-a.line)-1;t.full?Ut(e):a.line==c.line&&t.text.length==1&&!ju(e.doc,t)?Qr(e,a.line,"text"):Ut(e,a.line,c.line+1,g);var k=Pt(e,"changes"),C=Pt(e,"change");if(C||k){var R={from:a,to:c,text:t.text,removed:t.removed,origin:t.origin};C&&kt(e,"change",e,R),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function ei(e,t,i,n,o){var a;n||(n=i),m(n,i)<0&&(a=[n,i],i=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Vn(e,{from:i,to:n,text:t,origin:o})}function lf(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function af(e,t,i,n){for(var o=0;o<e.length;++o){var a=e[o],c=!0;if(a.ranges){a.copied||(a=e[o]=a.deepCopy(),a.copied=!0);for(var h=0;h<a.ranges.length;h++)lf(a.ranges[h].anchor,t,i,n),lf(a.ranges[h].head,t,i,n);continue}for(var p=0;p<a.changes.length;++p){var g=a.changes[p];if(i<g.from.line)g.from=ie(g.from.line+n,g.from.ch),g.to=ie(g.to.line+n,g.to.ch);else if(t<=g.to.line){c=!1;break}}c||(e.splice(0,o+1),o=0)}}function uf(e,t){var i=t.from.line,n=t.to.line,o=t.text.length-(n-i)-1;af(e.done,i,n,o),af(e.undone,i,n,o)}function Xi(e,t,i,n){var o=t,a=t;return typeof t=="number"?a=_e(e,$e(e,t)):o=Xe(t),o==null?null:(n(a,o)&&e.cm&&Qr(e.cm,o,i),a)}function Zi(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Zi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var o=this.lines[i];this.height-=o.height,Nh(o),kt(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Ji(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),i+=o.height,o.parent=this}this.size=t,this.height=i,this.parent=null}Ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(e<o){var a=Math.min(t,o-e),c=n.height;if(n.removeInner(e,a),this.height-=c-n.height,o==a&&(this.children.splice(i--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Zi))){var h=[];this.collapse(h),this.children=[new Zi(h)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,i),o.lines&&o.lines.length>50){for(var c=o.lines.length%25+25,h=c;h<o.lines.length;){var p=new Zi(o.lines.slice(h,h+=25));o.height-=p.height,this.children.splice(++n,0,p),p.parent=this}o.lines=o.lines.slice(0,c),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Ji(t);if(e.parent){e.size-=i.size,e.height-=i.height;var o=Z(e.parent.children,e);e.parent.children.splice(o+1,0,i)}else{var n=new Ji(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var o=this.children[n],a=o.chunkSize();if(e<a){var c=Math.min(t,a-e);if(o.iterN(e,c,i))return!0;if((t-=c)==0)break;e=0}else e-=a}}};var Qi=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Qi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=Xe(i);if(!(n==null||!t)){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(i.widgets=null);var a=Ii(this);Jt(i,Math.max(0,i.height-a)),e&&(Qt(e,function(){ff(e,i,-a),Qr(e,n,"widget")}),kt(e,"lineWidgetCleared",e,this,n))}},Qi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var o=Ii(this)-t;!o||(Jr(this.doc,n)||Jt(n,n.height+o),i&&Qt(i,function(){i.curOp.forceUpdate=!0,ff(i,n,o),kt(i,"lineWidgetChanged",i,e,Xe(n))}))},Sr(Qi);function ff(e,t,i){Hr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&gl(e,i)}function Np(e,t,i,n){var o=new Qi(e,i,n),a=e.cm;return a&&o.noHScroll&&(a.display.alignWidgets=!0),Xi(e,t,"widget",function(c){var h=c.widgets||(c.widgets=[]);if(o.insertAt==null?h.push(o):h.splice(Math.min(h.length,Math.max(0,o.insertAt)),0,o),o.line=c,a&&!Jr(e,c)){var p=Hr(c)<e.scrollTop;Jt(c,c.height+Ii(o)),p&&gl(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&kt(a,"lineWidgetAdded",a,o,typeof t=="number"?t:Xe(t)),o}var cf=0,nn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++cf};nn.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ln(e),Pt(this,"clear")){var i=this.find();i&&kt(this,"clear",i.from,i.to)}for(var n=null,o=null,a=0;a<this.lines.length;++a){var c=this.lines[a],h=Ri(c.markedSpans,this);e&&!this.collapsed?Qr(e,Xe(c),"text"):e&&(h.to!=null&&(o=Xe(c)),h.from!=null&&(n=Xe(c))),c.markedSpans=Ch(c.markedSpans,h),h.from==null&&this.collapsed&&!Jr(this.doc,c)&&e&&Jt(c,$n(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var p=0;p<this.lines.length;++p){var g=vr(this.lines[p]),k=Do(g);k>e.display.maxLineLength&&(e.display.maxLine=g,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Ut(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vu(e.doc)),e&&kt(e,"markerCleared",e,this,n,o),t&&Pn(e),this.parent&&this.parent.clear()}},nn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,o=0;o<this.lines.length;++o){var a=this.lines[o],c=Ri(a.markedSpans,this);if(c.from!=null&&(i=ie(t?a:Xe(a),c.from),e==-1))return i;if(c.to!=null&&(n=ie(t?a:Xe(a),c.to),e==1))return n}return i&&{from:i,to:n}},nn.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;!t||!n||Qt(n,function(){var o=t.line,a=Xe(t.line),c=rl(n,a);if(c&&(vu(c),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Jr(i.doc,o)&&i.height!=null){var h=i.height;i.height=null;var p=Ii(i)-h;p&&Jt(o,o.height+p)}kt(n,"markerChanged",n,e)})},nn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Z(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},nn.prototype.detachLine=function(e){if(this.lines.splice(Z(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Sr(nn);function ti(e,t,i,n,o){if(n&&n.shared)return zp(e,t,i,n,o);if(e.cm&&!e.cm.curOp)return St(e.cm,ti)(e,t,i,n,o);var a=new nn(e,o),c=m(t,i);if(n&&Ie(n,a,!1),c>0||c==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=w("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(eu(e,t.line,t,i,a)||t.line!=i.line&&eu(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sh()}a.addToHistory&&$u(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var h=t.line,p=e.cm,g;if(e.iter(h,i.line+1,function(C){p&&a.collapsed&&!p.options.lineWrapping&&vr(C)==p.display.maxLine&&(g=!0),a.collapsed&&h!=t.line&&Jt(C,0),_h(C,new Ao(a,h==t.line?t.ch:null,h==i.line?i.ch:null),e.cm&&e.cm.curOp),++h}),a.collapsed&&e.iter(t.line,i.line+1,function(C){Jr(e,C)&&Jt(C,0)}),a.clearOnEnter&&Pe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(kh(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++cf,a.atomic=!0),p){if(g&&(p.curOp.updateMaxLine=!0),a.collapsed)Ut(p,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=i.line;k++)Qr(p,k,"text");a.atomic&&Vu(p.doc),kt(p,"markerAdded",p,a)}return a}var Vi=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Vi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();kt(this,"clear")}},Vi.prototype.find=function(e,t){return this.primary.find(e,t)},Sr(Vi);function zp(e,t,i,n,o){n=Ie(n),n.shared=!1;var a=[ti(e,t,i,n,o)],c=a[0],h=n.widgetNode;return rn(e,function(p){h&&(n.widgetNode=h.cloneNode(!0)),a.push(ti(p,xe(p,t),xe(p,i),n,o));for(var g=0;g<p.linked.length;++g)if(p.linked[g].isParent)return;c=F(a)}),new Vi(a,c)}function df(e){return e.findMarks(ie(e.first,0),e.clipPos(ie(e.lastLine())),function(t){return t.parent})}function Rp(e,t){for(var i=0;i<t.length;i++){var n=t[i],o=n.find(),a=e.clipPos(o.from),c=e.clipPos(o.to);if(m(a,c)){var h=ti(e,a,c,n.primary,n.primary.type);n.markers.push(h),h.parent=n}}}function Dp(e){for(var t=function(n){var o=e[n],a=[o.primary.doc];rn(o.primary.doc,function(p){return a.push(p)});for(var c=0;c<o.markers.length;c++){var h=o.markers[c];Z(a,h.doc)==-1&&(h.parent=null,o.markers.splice(c--,1))}},i=0;i<e.length;i++)t(i)}var Fp=0,Kt=function(e,t,i,n,o){if(!(this instanceof Kt))return new Kt(e,t,i,n,o);i==null&&(i=0),Ji.call(this,[new Zi([new Un("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=ie(i,0);this.sel=en(a),this.history=new Yo(null),this.id=++Fp,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Sl(this,{from:a,to:a,text:e}),Dt(this,en(a),Ce)};Kt.prototype=fe(Ji.prototype,{constructor:Kt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ai(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Ct(function(e){var t=ie(this.first,0),i=this.first+this.size-1;Vn(this,{from:t,to:ie(i,_e(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Bi(this.cm,0,0),Dt(this,en(t),Ce)}),replaceRange:function(e,t,i,n){t=xe(this,t),i=i?xe(this,i):t,ei(this,e,t,i,n)},getRange:function(e,t,i){var n=_r(this,xe(this,e),xe(this,t));return i===!1?n:i===""?n.join(""):n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(wn(this,e))return _e(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=_e(this,e)),vr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return xe(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ct(function(e,t,i){Zu(this,xe(this,typeof e=="number"?ie(e,t||0):e),null,i)}),setSelection:Ct(function(e,t,i){Zu(this,xe(this,e),xe(this,t||e),i)}),extendSelection:Ct(function(e,t,i){Zo(this,xe(this,e),t&&xe(this,t),i)}),extendSelections:Ct(function(e,t){Xu(this,sr(this,e),t)}),extendSelectionsBy:Ct(function(e,t){var i=G(this.sel.ranges,e);Xu(this,sr(this,i),t)}),setSelections:Ct(function(e,t,i){if(!!e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new Ze(xe(this,e[o].anchor),xe(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Dt(this,yr(this.cm,n,t),i)}}),addSelection:Ct(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new Ze(xe(this,e),xe(this,t||e))),Dt(this,yr(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var o=_r(this,t[n].from(),t[n].to());i=i?i.concat(o):o}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var o=_r(this,i[n].from(),i[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,i){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:Ct(function(e,t,i){for(var n=[],o=this.sel,a=0;a<o.ranges.length;a++){var c=o.ranges[a];n[a]={from:c.from(),to:c.to(),text:this.splitLines(e[a]),origin:i}}for(var h=t&&t!="end"&&Cp(this,n,t),p=n.length-1;p>=0;p--)Vn(this,n[p]);h?Ju(this,h):this.cm&&Xn(this.cm)}),undo:Ct(function(){Vo(this,"undo")}),redo:Ct(function(){Vo(this,"redo")}),undoSelection:Ct(function(){Vo(this,"undo",!0)}),redoSelection:Ct(function(){Vo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Yo(this.history),rn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Jn(this.history.done),undone:Jn(this.history.undone)}},setHistory:function(e){var t=this.history=new Yo(this.history);t.done=Jn(e.done.slice(0),null,!0),t.undone=Jn(e.undone.slice(0),null,!0)},setGutterMarker:Ct(function(e,t,i){return Xi(this,e,"gutter",function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=i,!i&&W(o)&&(n.gutterMarkers=null),!0})}),clearGutter:Ct(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Xi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,W(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!wn(this,e)||(t=e,e=_e(this,e),!e))return null}else if(t=Xe(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ct(function(e,t,i){return Xi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[o])n[o]=i;else{if(be(i).test(n[o]))return!1;n[o]+=" "+i}return!0})}),removeLineClass:Ct(function(e,t,i){return Xi(this,e,t=="gutter"?"gutter":"class",function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[o];if(a)if(i==null)n[o]=null;else{var c=a.match(be(i));if(!c)return!1;var h=c.index+c[0].length;n[o]=a.slice(0,c.index)+(!c.index||h==a.length?"":" ")+a.slice(h)||null}else return!1;return!0})}),addLineWidget:Ct(function(e,t,i){return Np(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return ti(this,xe(this,e),xe(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=xe(this,e),ti(this,e,e,i,"bookmark")},findMarksAt:function(e){e=xe(this,e);var t=[],i=_e(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,i){e=xe(this,e),t=xe(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(a){var c=a.markedSpans;if(c)for(var h=0;h<c.length;h++){var p=c[h];!(p.to!=null&&o==e.line&&e.ch>=p.to||p.from==null&&o!=e.line||p.from!=null&&o==t.line&&p.from>=t.ch)&&(!i||i(p.marker))&&n.push(p.marker.parent||p.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(o){var a=o.text.length+n;if(a>e)return t=e,!0;e-=a,++i}),xe(this,ie(i,t))},indexFromPos:function(e){e=xe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new Kt(Ai(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new Kt(Ai(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Rp(n,df(this)),n},unlinkDoc:function(e){if(e instanceof at&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Dp(df(this));break}}if(e.history==this.history){var n=[e.id];rn(e,function(o){return n.push(o.id)},!0),e.history=new Yo(null),e.history.done=Jn(this.history.done,n),e.history.undone=Jn(this.history.undone,n)}},iterLinkedDocs:function(e){rn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pi(e)},lineSeparator:function(){return this.lineSep||`
11
11
  `},setDirection:Ct(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&_p(this.cm))})}),Kt.prototype.eachLine=Kt.prototype.iter;var hf=0;function Ip(e){var t=this;if(pf(t),!(ut(t,e)||Wr(t.display,e))){zt(e),y&&(hf=+new Date);var i=Sn(t,e,!0),n=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,a=Array(o),c=0,h=function(){++c==o&&St(t,function(){i=xe(t.doc,i);var M={from:i,to:i,text:t.doc.splitLines(a.filter(function(U){return U!=null}).join(t.doc.lineSeparator())),origin:"paste"};Vn(t.doc,M),Ju(t.doc,en(xe(t.doc,i),xe(t.doc,tn(M))))})()},p=function(M,U){if(t.options.allowDropFileTypes&&Z(t.options.allowDropFileTypes,M.type)==-1){h();return}var Q=new FileReader;Q.onerror=function(){return h()},Q.onload=function(){var ae=Q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ae)){h();return}a[U]=ae,h()},Q.readAsText(M)},g=0;g<n.length;g++)p(n[g],g);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var k=e.dataTransfer.getData("Text");if(k){var C;if(t.state.draggingText&&!t.state.draggingText.copy&&(C=t.listSelections()),Jo(t.doc,en(i,i)),C)for(var R=0;R<C.length;++R)ei(t.doc,"",C[R].anchor,C[R].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch{}}}}function Hp(e,t){if(y&&(!e.state.draggingText||+new Date-hf<100)){bn(t);return}if(!(ut(e,t)||Wr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!H)){var i=$("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),A&&i.parentNode.removeChild(i)}}function Wp(e,t){var i=Sn(e,t);if(!!i){var n=document.createDocumentFragment();fl(e,i,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,n)}}function pf(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gf(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&i.push(o)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var vf=!1;function Bp(){vf||(jp(),vf=!0)}function jp(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gf(Up)},100))}),Pe(window,"blur",function(){return gf(Yn)})}function Up(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var on={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},eo=0;eo<10;eo++)on[eo+48]=on[eo+96]=String(eo);for(var es=65;es<=90;es++)on[es]=String.fromCharCode(es);for(var to=1;to<=12;to++)on[to+111]=on[to+63235]="F"+to;var jr={};jr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jr.default=B?jr.macDefault:jr.pcDefault;function Kp(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,o,a,c=0;c<t.length-1;c++){var h=t[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))n=!0;else if(/^s(hift)?$/i.test(h))o=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),o&&(e="Shift-"+e),e}function qp(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var o=G(i.split(" "),Kp),a=0;a<o.length;a++){var c=void 0,h=void 0;a==o.length-1?(h=o.join(" "),c=n):(h=o.slice(0,a+1).join(" "),c="...");var p=t[h];if(!p)t[h]=c;else if(p!=c)throw new Error("Inconsistent bindings for "+h)}delete e[i]}for(var g in t)e[g]=t[g];return e}function ri(e,t,i,n){t=ts(t);var o=t.call?t.call(e,n):t[e];if(o===!1)return"nothing";if(o==="...")return"multi";if(o!=null&&i(o))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return ri(e,t.fallthrough,i,n);for(var a=0;a<t.fallthrough.length;a++){var c=ri(e,t.fallthrough[a],i,n);if(c)return c}}}function mf(e){var t=typeof e=="string"?e:on[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function yf(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(We?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(We?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function bf(e,t){if(A&&e.keyCode==34&&e.char)return!1;var i=on[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),yf(i,e,t))}function ts(e){return typeof e=="string"?jr[e]:e}function ni(e,t){for(var i=e.doc.sel.ranges,n=[],o=0;o<i.length;o++){for(var a=t(i[o]);n.length&&m(a.from,F(n).to)<=0;){var c=n.pop();if(m(c.from,a.from)<0){a.from=c.from;break}}n.push(a)}Qt(e,function(){for(var h=n.length-1;h>=0;h--)ei(e.doc,"",n[h].from,n[h].to,"+delete");Xn(e)})}function Ll(e,t,i){var n=Le(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Pl(e,t,i){var n=Ll(e,t.ch,i);return n==null?null:new ie(t.line,n,i<0?"after":"before")}function Ol(e,t,i,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var a=vt(i,t.doc.direction);if(a){var c=o<0?F(a):a[0],h=o<0==(c.level==1),p=h?"after":"before",g;if(c.level>0||t.doc.direction=="rtl"){var k=qn(t,i);g=o<0?i.text.length-1:0;var C=Or(t,k,g).top;g=Be(function(R){return Or(t,k,R).top==C},o<0==(c.level==1)?c.from:c.to-1,g),p=="before"&&(g=Ll(i,g,1))}else g=o<0?c.to:c.from;return new ie(n,g,p)}}return new ie(n,o<0?i.text.length:0,o<0?"before":"after")}function $p(e,t,i,n){var o=vt(t,e.doc.direction);if(!o)return Pl(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=He(o,i.ch,i.sticky),c=o[a];if(e.doc.direction=="ltr"&&c.level%2==0&&(n>0?c.to>i.ch:c.from<i.ch))return Pl(t,i,n);var h=function(ve,we){return Ll(t,ve instanceof ie?ve.ch:ve,we)},p,g=function(ve){return e.options.lineWrapping?(p=p||qn(e,t),Su(e,t,p,ve)):{begin:0,end:t.text.length}},k=g(i.sticky=="before"?h(i,-1):i.ch);if(e.doc.direction=="rtl"||c.level==1){var C=c.level==1==n<0,R=h(i,C?1:-1);if(R!=null&&(C?R<=c.to&&R<=k.end:R>=c.from&&R>=k.begin)){var M=C?"before":"after";return new ie(i.line,R,M)}}var U=function(ve,we,me){for(var ke=function(rt,_t){return _t?new ie(i.line,h(rt,1),"before"):new ie(i.line,rt,"after")};ve>=0&&ve<o.length;ve+=we){var Ae=o[ve],Me=we>0==(Ae.level!=1),Ue=Me?me.begin:h(me.end,-1);if(Ae.from<=Ue&&Ue<Ae.to||(Ue=Me?Ae.from:h(Ae.to,-1),me.begin<=Ue&&Ue<me.end))return ke(Ue,Me)}},Q=U(a+n,n,k);if(Q)return Q;var ae=n>0?k.end:h(k.begin,-1);return ae!=null&&!(n>0&&ae==t.text.length)&&(Q=U(n>0?0:o.length-1,n,g(ae)),Q)?Q:null}var ro={selectAll:rf,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ce)},killLine:function(e){return ni(e,function(t){if(t.empty()){var i=_e(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:ie(t.head.line+1,0)}:{from:t.head,to:ie(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ni(e,function(t){return{from:ie(t.from().line,0),to:xe(e.doc,ie(t.to().line+1,0))}})},delLineLeft:function(e){return ni(e,function(t){return{from:ie(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ni(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ie(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ie(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return wf(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return xf(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Gp(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},ge)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},ge)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?xf(e,t.head):n},ge)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,o=0;o<i.length;o++){var a=i[o].from(),c=Je(e.getLine(a.line),a.ch,n);t.push(E(n-c%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qt(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)if(!!t[n].empty()){var o=t[n].head,a=_e(e.doc,o.line).text;if(a){if(o.ch==a.length&&(o=new ie(o.line,o.ch-1)),o.ch>0)o=new ie(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),ie(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var c=_e(e.doc,o.line-1).text;c&&(o=new ie(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+c.charAt(c.length-1),ie(o.line-1,c.length-1),o,"+transpose"))}}i.push(new Ze(o,o))}e.setSelections(i)})},newlineAndIndent:function(e){return Qt(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Xn(e)})},openLine:function(e){return e.replaceSelection(`
12
- `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function wf(e,t){var i=_e(e.doc,t),n=gr(i);return n!=i&&(t=Xe(n)),Ol(!0,e,n,t,1)}function Gp(e,t){var i=_e(e.doc,t),n=Mh(i);return n!=i&&(t=Xe(n)),Ol(!0,e,i,t,-1)}function xf(e,t){var i=wf(e,t.line),n=_e(e.doc,i.line),o=vt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),c=t.line==i.line&&t.ch<=a&&t.ch;return ie(i.line,c?0:a,i.sticky)}return i}function rs(e,t,i){if(typeof t=="string"&&(t=ro[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),o=t(e)!=se}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function Yp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=ri(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&ri(t,e.options.extraKeys,i,e)||ri(t,e.options.keyMap,i,e)}var Xp=new q;function no(e,t,i,n){var o=e.state.keySeq;if(o){if(mf(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Xp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),kf(e,o+" "+t,i,n))return!0}return kf(e,t,i,n)}function kf(e,t,i,n){var o=Yp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&kt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(zt(i),cl(e)),!!o}function Sf(e,t){var i=bf(t,!0);return i?t.shiftKey&&!e.state.keySeq?no(e,"Shift-"+i,t,function(n){return rs(e,n,!0)})||no(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return rs(e,n)}):no(e,i,t,function(n){return rs(e,n)}):!1}function Zp(e,t,i){return no(e,"'"+i+"'",t,function(n){return rs(e,n,!0)})}var Ml=null;function Cf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ue(),!ut(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=Sf(t,e);A&&(Ml=n?i:null,!n&&i==88&&!Mo&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),f&&!B&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Jp(t)}}function Jp(e){var t=e.display.lineDiv;ze(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(de(t,"CodeMirror-crosshair"),et(document,"keyup",i),et(document,"mouseover",i))}Pe(document,"keyup",i),Pe(document,"mouseover",i)}function _f(e){e.keyCode==16&&(this.doc.sel.shift=!1),ut(this,e)}function Tf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Wr(t.display,e)||ut(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(A&&i==Ml){Ml=null,zt(e);return}if(!(A&&(!e.which||e.which<10)&&Sf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(Zp(t,e,o)||t.display.input.onKeyPress(e))}}}var Qp=400,El=function(e,t,i){this.time=e,this.pos=t,this.button=i};El.prototype.compare=function(e,t,i){return this.time+Qp>e&&m(t,this.pos)==0&&i==this.button};var io,oo;function Vp(e,t){var i=+new Date;return oo&&oo.compare(i,e,t)?(io=oo=null,"triple"):io&&io.compare(i,e,t)?(oo=new El(i,e,t),io=null,"double"):(io=new El(i,e,t),oo=null,"single")}function Lf(e){var t=this,i=t.display;if(!(ut(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Wr(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!Al(t,e)){var n=Sn(t,e),o=Lo(e),a=n?Vp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&eg(t,o,n,a,e))&&(o==1?n?rg(t,n,a,e):Xr(e)==i.scroller&&zt(e):o==2?(n&&Zo(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(Ee?t.display.input.onContextMenu(e):dl(t)))}}}function eg(e,t,i,n,o){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,no(e,yf(a,o),o,function(c){if(typeof c=="string"&&(c=ro[c]),!c)return!1;var h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),h=c(e,i)!=se}finally{e.state.suppressEdits=!1}return h})}function tg(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=oe?i.shiftKey&&i.metaKey:i.altKey;o.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||i.shiftKey),o.addNew==null&&(o.addNew=B?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(B?i.altKey:i.ctrlKey)),o}function rg(e,t,i,n){y?setTimeout(lt(Lu,e),0):e.curOp.focus=ue();var o=tg(e,i,n),a=e.doc.sel,c;e.options.dragDrop&&Ti&&!e.isReadOnly()&&i=="single"&&(c=a.contains(t))>-1&&(m((c=a.ranges[c]).from(),t)<0||t.xRel>0)&&(m(c.to(),t)>0||t.xRel<0)?ng(e,n,t,o):ig(e,n,t,o)}function ng(e,t,i,n){var o=e.display,a=!1,c=St(e,function(g){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:dl(e)),et(o.wrapper.ownerDocument,"mouseup",c),et(o.wrapper.ownerDocument,"mousemove",h),et(o.scroller,"dragstart",p),et(o.scroller,"drop",c),a||(zt(g),n.addNew||Zo(e.doc,i,null,null,n.extend),S&&!H||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),h=function(g){a=a||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,Pe(o.wrapper.ownerDocument,"mouseup",c),Pe(o.wrapper.ownerDocument,"mousemove",h),Pe(o.scroller,"dragstart",p),Pe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Pf(e,t,i){if(i=="char")return new Ze(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ze(ie(t.line,0),xe(e.doc,ie(t.line+1,0)));var n=i(e,t);return new Ze(n.from,n.to)}function ig(e,t,i,n){y&&dl(e);var o=e.display,a=e.doc;zt(t);var c,h,p=a.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=a.sel.contains(i),h>-1?c=g[h]:c=new Ze(i,i)):(c=a.sel.primary(),h=a.sel.primIndex),n.unit=="rectangle")n.addNew||(c=new Ze(i,i)),i=Sn(e,t,!0,!0),h=-1;else{var k=Pf(e,i,n.unit);n.extend?c=_l(c,k.anchor,k.head,n.extend):c=k}n.addNew?h==-1?(h=g.length,Dt(a,mr(e,g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&n.unit=="char"&&!n.extend?(Dt(a,mr(e,g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):Tl(a,h,c,Se):(h=0,Dt(a,new lr([c],0),Se),p=a.sel);var C=i;function R(me){if(m(C,me)!=0)if(C=me,n.unit=="rectangle"){for(var ke=[],Ae=e.options.tabSize,Me=Je(_e(a,i.line).text,i.ch,Ae),Ue=Je(_e(a,me.line).text,me.ch,Ae),rt=Math.min(Me,Ue),_t=Math.max(Me,Ue),ft=Math.min(i.line,me.line),Vt=Math.min(e.lastLine(),Math.max(i.line,me.line));ft<=Vt;ft++){var qt=_e(a,ft).text,mt=Te(qt,rt,Ae);rt==_t?ke.push(new Ze(ie(ft,mt),ie(ft,mt))):qt.length>mt&&ke.push(new Ze(ie(ft,mt),ie(ft,Te(qt,_t,Ae))))}ke.length||ke.push(new Ze(i,i)),Dt(a,mr(e,p.ranges.slice(0,h).concat(ke),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(me)}else{var $t=c,Ot=Pf(e,me,n.unit),wt=$t.anchor,yt;m(Ot.anchor,wt)>0?(yt=Ot.head,wt=De($t.from(),Ot.anchor)):(yt=Ot.anchor,wt=le($t.to(),Ot.head));var ht=p.ranges.slice(0);ht[h]=og(e,new Ze(xe(a,wt),yt)),Dt(a,mr(e,ht,h),Se)}}var M=o.wrapper.getBoundingClientRect(),U=0;function Q(me){var ke=++U,Ae=Sn(e,me,!0,n.unit=="rectangle");if(!!Ae)if(m(Ae,C)!=0){e.curOp.focus=ue(),R(Ae);var Me=Ko(o,a);(Ae.line>=Me.to||Ae.line<Me.from)&&setTimeout(St(e,function(){U==ke&&Q(me)}),150)}else{var Ue=me.clientY<M.top?-20:me.clientY>M.bottom?20:0;Ue&&setTimeout(St(e,function(){U==ke&&(o.scroller.scrollTop+=Ue,Q(me))}),50)}}function ae(me){e.state.selectingText=!1,U=1/0,me&&(zt(me),o.input.focus()),et(o.wrapper.ownerDocument,"mousemove",ve),et(o.wrapper.ownerDocument,"mouseup",we),a.history.lastSelOrigin=null}var ve=St(e,function(me){me.buttons===0||!Lo(me)?ae(me):Q(me)}),we=St(e,ae);e.state.selectingText=we,Pe(o.wrapper.ownerDocument,"mousemove",ve),Pe(o.wrapper.ownerDocument,"mouseup",we)}function og(e,t){var i=t.anchor,n=t.head,o=_e(e.doc,i.line);if(m(i,n)==0&&i.sticky==n.sticky)return t;var a=vt(o);if(!a)return t;var c=He(a,i.ch,i.sticky),h=a[c];if(h.from!=i.ch&&h.to!=i.ch)return t;var p=c+(h.from==i.ch==(h.level!=1)?0:1);if(p==0||p==a.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=He(a,n.ch,n.sticky),C=k-c||(n.ch-i.ch)*(h.level==1?-1:1);k==p-1||k==p?g=C<0:g=C>0}var R=a[p+(g?-1:0)],M=g==(R.level==1),U=M?R.from:R.to,Q=M?"after":"before";return i.ch==U&&i.sticky==Q?t:new Ze(new ie(i.line,U,Q),n)}function Of(e,t,i,n){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch{return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&zt(t);var c=e.display,h=c.lineDiv.getBoundingClientRect();if(a>h.bottom||!Pt(e,i))return nr(t);a-=h.top-c.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var g=c.gutters.childNodes[p];if(g&&g.getBoundingClientRect().right>=o){var k=Tr(e.doc,a),C=e.display.gutterSpecs[p];return Oe(e,i,e,k,C.className,t),nr(t)}}}function Al(e,t){return Of(e,t,"gutterClick",!0)}function Mf(e,t){Wr(e.display,t)||sg(e,t)||ut(e,t,"contextmenu")||Ee||e.display.input.onContextMenu(t)}function sg(e,t){return Pt(e,"gutterContextMenu")?Of(e,t,"gutterContextMenu",!1):!1}function Ef(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hi(e)}var ii={toString:function(){return"CodeMirror.Init"}},Af={},ns={};function lg(e){var t=e.optionHandlers;function i(n,o,a,c){e.defaults[n]=o,a&&(t[n]=c?function(h,p,g){g!=ii&&a(h,p,g)}:a)}e.defineOption=i,e.Init=ii,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,kl(n)},!0),i("indentUnit",2,kl,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Gi(n),Hi(n),Ut(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],c=n.doc.first;n.doc.iter(function(p){for(var g=0;;){var k=p.text.indexOf(o,g);if(k==-1)break;g=k+o.length,a.push(ie(c,k))}c++});for(var h=a.length-1;h>=0;h--)ei(n.doc,o,a[h],ie(a[h].line,a[h].ch+o.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,o,a){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),a!=ii&&n.refresh()}),i("specialCharPlaceholder",Dh,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",I?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,o){return n.getInputField().spellcheck=o},!0),i("autocorrect",!1,function(n,o){return n.getInputField().autocorrect=o},!0),i("autocapitalize",!1,function(n,o){return n.getInputField().autocapitalize=o},!0),i("rtlMoveVisually",!pe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Ef(n),$i(n)},!0),i("keyMap","default",function(n,o,a){var c=ts(o),h=a!=ii&&ts(a);h&&h.detach&&h.detach(n,c),c.attach&&c.attach(n,h||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,ug,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=wl(o,n.options.lineNumbers),$i(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?al(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return Zn(n)},!0),i("scrollbarStyle","native",function(n){Nu(n),Zn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,o){n.display.gutterSpecs=wl(n.options.gutters,o),$i(n)},!0),i("firstLineNumber",1,$i,!0),i("lineNumberFormatter",function(n){return n},$i,!0),i("showCursorWhenSelecting",!1,Wi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Yn(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)}),i("screenReaderLabel",null,function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)}),i("disableInput",!1,function(n,o){o||n.display.input.reset()},!0),i("dragDrop",!0,ag),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Wi,!0),i("singleCursorHeightPerLine",!0,Wi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Gi,!0),i("addModeClass",!1,Gi,!0),i("pollInterval",100),i("undoDepth",200,function(n,o){return n.doc.history.undoDepth=o}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Gi,!0),i("moveInputWithCursor",!0,function(n,o){o||n.display.input.resetPosition()}),i("tabindex",null,function(n,o){return n.display.input.getField().tabIndex=o||""}),i("autofocus",null),i("direction","ltr",function(n,o){return n.doc.setDirection(o)},!0),i("phrases",null)}function ag(e,t,i){var n=i&&i!=ii;if(!t!=!n){var o=e.display.dragFunctions,a=t?Pe:et;a(e.display.scroller,"dragstart",o.start),a(e.display.scroller,"dragenter",o.enter),a(e.display.scroller,"dragover",o.over),a(e.display.scroller,"dragleave",o.leave),a(e.display.scroller,"drop",o.drop)}}function ug(e){e.options.lineWrapping?(ze(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(de(e.display.wrapper,"CodeMirror-wrap"),Qs(e)),ul(e),Ut(e),Hi(e),setTimeout(function(){return Zn(e)},100)}function at(e,t){var i=this;if(!(this instanceof at))return new at(e,t);this.options=t=t?Ie(t):{},Ie(Af,t,!1);var n=t.value;typeof n=="string"?n=new Kt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new at.inputStyles[t.inputStyle](this),a=this.display=new kp(e,n,o,t);a.wrapper.CodeMirror=this,Ef(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Nu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!I&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),fg(this),Bp(),Ln(this),this.curOp.forceUpdate=!0,Uu(this,n),t.autofocus&&!I||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&hl(i)},20):Yn(this);for(var c in ns)ns.hasOwnProperty(c)&&ns[c](this,t[c],ii);Du(this),t.finishInit&&t.finishInit(this);for(var h=0;h<Nl.length;++h)Nl[h](this);Pn(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}at.defaults=Af,at.optionHandlers=ns;function fg(e){var t=e.display;Pe(t.scroller,"mousedown",St(e,Lf)),y&&x<11?Pe(t.scroller,"dblclick",St(e,function(p){if(!ut(e,p)){var g=Sn(e,p);if(!(!g||Al(e,p)||Wr(e.display,p))){zt(p);var k=e.findWordAt(g);Zo(e.doc,k.anchor,k.head)}}})):Pe(t.scroller,"dblclick",function(p){return ut(e,p)||zt(p)}),Pe(t.scroller,"contextmenu",function(p){return Mf(e,p)}),Pe(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||Mf(e,p)});var i,n={end:0};function o(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(p){if(p.touches.length!=1)return!1;var g=p.touches[0];return g.radiusX<=1&&g.radiusY<=1}function c(p,g){if(g.left==null)return!0;var k=g.left-p.left,C=g.top-p.top;return k*k+C*C>20*20}Pe(t.scroller,"touchstart",function(p){if(!ut(e,p)&&!a(p)&&!Al(e,p)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(p){var g=t.activeTouch;if(g&&!Wr(t,p)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!g.prev||c(g,g.prev)?C=new Ze(k,k):!g.prev.prev||c(g,g.prev.prev)?C=e.findWordAt(k):C=new Ze(ie(k.line,0),xe(e.doc,ie(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),zt(p)}o()}),Pe(t.scroller,"touchcancel",o),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ji(e,t.scroller.scrollTop),_n(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(p){return Hu(e,p)}),Pe(t.scroller,"DOMMouseScroll",function(p){return Hu(e,p)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){ut(e,p)||bn(p)},over:function(p){ut(e,p)||(Wp(e,p),bn(p))},start:function(p){return Hp(e,p)},drop:St(e,Ip),leave:function(p){ut(e,p)||pf(e)}};var h=t.input.getField();Pe(h,"keyup",function(p){return _f.call(e,p)}),Pe(h,"keydown",St(e,Cf)),Pe(h,"keypress",St(e,Tf)),Pe(h,"focus",function(p){return hl(e,p)}),Pe(h,"blur",function(p){return Yn(e,p)})}var Nl=[];at.defineInitHook=function(e){return Nl.push(e)};function so(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=zi(e,t).state:i="prev");var c=e.options.tabSize,h=_e(o,t),p=Je(h.text,null,c);h.stateAfter&&(h.stateAfter=null);var g=h.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(h.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,h.text.slice(g.length),h.text),k==se||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=Je(_e(o,t-1).text,null,c):k=0:i=="add"?k=p+e.options.indentUnit:i=="subtract"?k=p-e.options.indentUnit:typeof i=="number"&&(k=p+i),k=Math.max(0,k);var C="",R=0;if(e.options.indentWithTabs)for(var M=Math.floor(k/c);M;--M)R+=c,C+=" ";if(R<k&&(C+=E(k-R)),C!=g)return ei(o,C,ie(t,0),ie(t,g.length),"+input"),h.stateAfter=null,!0;for(var U=0;U<o.sel.ranges.length;U++){var Q=o.sel.ranges[U];if(Q.head.line==t&&Q.head.ch<g.length){var ae=ie(t,g.length);Tl(o,U,new Ze(ae,ae));break}}}var yr=null;function is(e){yr=e}function zl(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var c=+new Date-200,h=o=="paste"||e.state.pasteIncoming>c,p=Pi(t),g=null;if(h&&n.ranges.length>1)if(yr&&yr.text.join(`
13
- `)==t){if(n.ranges.length%yr.text.length==0){g=[];for(var k=0;k<yr.text.length;k++)g.push(a.splitLines(yr.text[k]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(g=G(p,function(ve){return[ve]}));for(var C=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var M=n.ranges[R],U=M.from(),Q=M.to();M.empty()&&(i&&i>0?U=ie(U.line,U.ch-i):e.state.overwrite&&!h?Q=ie(Q.line,Math.min(_e(a,Q.line).text.length,Q.ch+F(p).length)):h&&yr&&yr.lineWise&&yr.text.join(`
12
+ `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function wf(e,t){var i=_e(e.doc,t),n=vr(i);return n!=i&&(t=Xe(n)),Ol(!0,e,n,t,1)}function Gp(e,t){var i=_e(e.doc,t),n=Mh(i);return n!=i&&(t=Xe(n)),Ol(!0,e,i,t,-1)}function xf(e,t){var i=wf(e,t.line),n=_e(e.doc,i.line),o=vt(n,e.doc.direction);if(!o||o[0].level==0){var a=Math.max(i.ch,n.text.search(/\S/)),c=t.line==i.line&&t.ch<=a&&t.ch;return ie(i.line,c?0:a,i.sticky)}return i}function rs(e,t,i){if(typeof t=="string"&&(t=ro[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),o=t(e)!=se}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function Yp(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var o=ri(t,e.state.keyMaps[n],i,e);if(o)return o}return e.options.extraKeys&&ri(t,e.options.extraKeys,i,e)||ri(t,e.options.keyMap,i,e)}var Xp=new q;function no(e,t,i,n){var o=e.state.keySeq;if(o){if(mf(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Xp.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),kf(e,o+" "+t,i,n))return!0}return kf(e,t,i,n)}function kf(e,t,i,n){var o=Yp(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&kt(e,"keyHandled",e,t,i),(o=="handled"||o=="multi")&&(zt(i),cl(e)),!!o}function Sf(e,t){var i=bf(t,!0);return i?t.shiftKey&&!e.state.keySeq?no(e,"Shift-"+i,t,function(n){return rs(e,n,!0)})||no(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return rs(e,n)}):no(e,i,t,function(n){return rs(e,n)}):!1}function Zp(e,t,i){return no(e,"'"+i+"'",t,function(n){return rs(e,n,!0)})}var Ml=null;function Cf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ue(),!ut(t,e))){y&&x<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=Sf(t,e);A&&(Ml=n?i:null,!n&&i==88&&!Mo&&(B?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),f&&!B&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Jp(t)}}function Jp(e){var t=e.display.lineDiv;ze(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(de(t,"CodeMirror-crosshair"),et(document,"keyup",i),et(document,"mouseover",i))}Pe(document,"keyup",i),Pe(document,"mouseover",i)}function _f(e){e.keyCode==16&&(this.doc.sel.shift=!1),ut(this,e)}function Tf(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Wr(t.display,e)||ut(t,e)||e.ctrlKey&&!e.altKey||B&&e.metaKey)){var i=e.keyCode,n=e.charCode;if(A&&i==Ml){Ml=null,zt(e);return}if(!(A&&(!e.which||e.which<10)&&Sf(t,e))){var o=String.fromCharCode(n==null?i:n);o!="\b"&&(Zp(t,e,o)||t.display.input.onKeyPress(e))}}}var Qp=400,El=function(e,t,i){this.time=e,this.pos=t,this.button=i};El.prototype.compare=function(e,t,i){return this.time+Qp>e&&m(t,this.pos)==0&&i==this.button};var io,oo;function Vp(e,t){var i=+new Date;return oo&&oo.compare(i,e,t)?(io=oo=null,"triple"):io&&io.compare(i,e,t)?(oo=new El(i,e,t),io=null,"double"):(io=new El(i,e,t),oo=null,"single")}function Lf(e){var t=this,i=t.display;if(!(ut(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Wr(i,e)){S||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!Al(t,e)){var n=Sn(t,e),o=Lo(e),a=n?Vp(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&eg(t,o,n,a,e))&&(o==1?n?rg(t,n,a,e):Xr(e)==i.scroller&&zt(e):o==2?(n&&Zo(t.doc,n),setTimeout(function(){return i.input.focus()},20)):o==3&&(Ee?t.display.input.onContextMenu(e):dl(t)))}}}function eg(e,t,i,n,o){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,no(e,yf(a,o),o,function(c){if(typeof c=="string"&&(c=ro[c]),!c)return!1;var h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),h=c(e,i)!=se}finally{e.state.suppressEdits=!1}return h})}function tg(e,t,i){var n=e.getOption("configureMouse"),o=n?n(e,t,i):{};if(o.unit==null){var a=oe?i.shiftKey&&i.metaKey:i.altKey;o.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||i.shiftKey),o.addNew==null&&(o.addNew=B?i.metaKey:i.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(B?i.altKey:i.ctrlKey)),o}function rg(e,t,i,n){y?setTimeout(lt(Lu,e),0):e.curOp.focus=ue();var o=tg(e,i,n),a=e.doc.sel,c;e.options.dragDrop&&Ti&&!e.isReadOnly()&&i=="single"&&(c=a.contains(t))>-1&&(m((c=a.ranges[c]).from(),t)<0||t.xRel>0)&&(m(c.to(),t)>0||t.xRel<0)?ng(e,n,t,o):ig(e,n,t,o)}function ng(e,t,i,n){var o=e.display,a=!1,c=St(e,function(g){S&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:dl(e)),et(o.wrapper.ownerDocument,"mouseup",c),et(o.wrapper.ownerDocument,"mousemove",h),et(o.scroller,"dragstart",p),et(o.scroller,"drop",c),a||(zt(g),n.addNew||Zo(e.doc,i,null,null,n.extend),S&&!H||y&&x==9?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),h=function(g){a=a||Math.abs(t.clientX-g.clientX)+Math.abs(t.clientY-g.clientY)>=10},p=function(){return a=!0};S&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,Pe(o.wrapper.ownerDocument,"mouseup",c),Pe(o.wrapper.ownerDocument,"mousemove",h),Pe(o.scroller,"dragstart",p),Pe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Pf(e,t,i){if(i=="char")return new Ze(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ze(ie(t.line,0),xe(e.doc,ie(t.line+1,0)));var n=i(e,t);return new Ze(n.from,n.to)}function ig(e,t,i,n){y&&dl(e);var o=e.display,a=e.doc;zt(t);var c,h,p=a.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=a.sel.contains(i),h>-1?c=g[h]:c=new Ze(i,i)):(c=a.sel.primary(),h=a.sel.primIndex),n.unit=="rectangle")n.addNew||(c=new Ze(i,i)),i=Sn(e,t,!0,!0),h=-1;else{var k=Pf(e,i,n.unit);n.extend?c=_l(c,k.anchor,k.head,n.extend):c=k}n.addNew?h==-1?(h=g.length,Dt(a,yr(e,g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&n.unit=="char"&&!n.extend?(Dt(a,yr(e,g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=a.sel):Tl(a,h,c,Se):(h=0,Dt(a,new lr([c],0),Se),p=a.sel);var C=i;function R(me){if(m(C,me)!=0)if(C=me,n.unit=="rectangle"){for(var ke=[],Ae=e.options.tabSize,Me=Je(_e(a,i.line).text,i.ch,Ae),Ue=Je(_e(a,me.line).text,me.ch,Ae),rt=Math.min(Me,Ue),_t=Math.max(Me,Ue),ft=Math.min(i.line,me.line),Vt=Math.min(e.lastLine(),Math.max(i.line,me.line));ft<=Vt;ft++){var qt=_e(a,ft).text,mt=Te(qt,rt,Ae);rt==_t?ke.push(new Ze(ie(ft,mt),ie(ft,mt))):qt.length>mt&&ke.push(new Ze(ie(ft,mt),ie(ft,Te(qt,_t,Ae))))}ke.length||ke.push(new Ze(i,i)),Dt(a,yr(e,p.ranges.slice(0,h).concat(ke),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(me)}else{var $t=c,Ot=Pf(e,me,n.unit),wt=$t.anchor,yt;m(Ot.anchor,wt)>0?(yt=Ot.head,wt=De($t.from(),Ot.anchor)):(yt=Ot.anchor,wt=le($t.to(),Ot.head));var ht=p.ranges.slice(0);ht[h]=og(e,new Ze(xe(a,wt),yt)),Dt(a,yr(e,ht,h),Se)}}var M=o.wrapper.getBoundingClientRect(),U=0;function Q(me){var ke=++U,Ae=Sn(e,me,!0,n.unit=="rectangle");if(!!Ae)if(m(Ae,C)!=0){e.curOp.focus=ue(),R(Ae);var Me=Ko(o,a);(Ae.line>=Me.to||Ae.line<Me.from)&&setTimeout(St(e,function(){U==ke&&Q(me)}),150)}else{var Ue=me.clientY<M.top?-20:me.clientY>M.bottom?20:0;Ue&&setTimeout(St(e,function(){U==ke&&(o.scroller.scrollTop+=Ue,Q(me))}),50)}}function ae(me){e.state.selectingText=!1,U=1/0,me&&(zt(me),o.input.focus()),et(o.wrapper.ownerDocument,"mousemove",ve),et(o.wrapper.ownerDocument,"mouseup",we),a.history.lastSelOrigin=null}var ve=St(e,function(me){me.buttons===0||!Lo(me)?ae(me):Q(me)}),we=St(e,ae);e.state.selectingText=we,Pe(o.wrapper.ownerDocument,"mousemove",ve),Pe(o.wrapper.ownerDocument,"mouseup",we)}function og(e,t){var i=t.anchor,n=t.head,o=_e(e.doc,i.line);if(m(i,n)==0&&i.sticky==n.sticky)return t;var a=vt(o);if(!a)return t;var c=He(a,i.ch,i.sticky),h=a[c];if(h.from!=i.ch&&h.to!=i.ch)return t;var p=c+(h.from==i.ch==(h.level!=1)?0:1);if(p==0||p==a.length)return t;var g;if(n.line!=i.line)g=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var k=He(a,n.ch,n.sticky),C=k-c||(n.ch-i.ch)*(h.level==1?-1:1);k==p-1||k==p?g=C<0:g=C>0}var R=a[p+(g?-1:0)],M=g==(R.level==1),U=M?R.from:R.to,Q=M?"after":"before";return i.ch==U&&i.sticky==Q?t:new Ze(new ie(i.line,U,Q),n)}function Of(e,t,i,n){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch{return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&zt(t);var c=e.display,h=c.lineDiv.getBoundingClientRect();if(a>h.bottom||!Pt(e,i))return nr(t);a-=h.top-c.viewOffset;for(var p=0;p<e.display.gutterSpecs.length;++p){var g=c.gutters.childNodes[p];if(g&&g.getBoundingClientRect().right>=o){var k=Tr(e.doc,a),C=e.display.gutterSpecs[p];return Oe(e,i,e,k,C.className,t),nr(t)}}}function Al(e,t){return Of(e,t,"gutterClick",!0)}function Mf(e,t){Wr(e.display,t)||sg(e,t)||ut(e,t,"contextmenu")||Ee||e.display.input.onContextMenu(t)}function sg(e,t){return Pt(e,"gutterContextMenu")?Of(e,t,"gutterContextMenu",!1):!1}function Ef(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hi(e)}var ii={toString:function(){return"CodeMirror.Init"}},Af={},ns={};function lg(e){var t=e.optionHandlers;function i(n,o,a,c){e.defaults[n]=o,a&&(t[n]=c?function(h,p,g){g!=ii&&a(h,p,g)}:a)}e.defineOption=i,e.Init=ii,i("value","",function(n,o){return n.setValue(o)},!0),i("mode",null,function(n,o){n.doc.modeOption=o,kl(n)},!0),i("indentUnit",2,kl,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Gi(n),Hi(n),Ut(n)},!0),i("lineSeparator",null,function(n,o){if(n.doc.lineSep=o,!!o){var a=[],c=n.doc.first;n.doc.iter(function(p){for(var g=0;;){var k=p.text.indexOf(o,g);if(k==-1)break;g=k+o.length,a.push(ie(c,k))}c++});for(var h=a.length-1;h>=0;h--)ei(n.doc,o,a[h],ie(a[h].line,a[h].ch+o.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,o,a){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),a!=ii&&n.refresh()}),i("specialCharPlaceholder",Dh,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",I?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,o){return n.getInputField().spellcheck=o},!0),i("autocorrect",!1,function(n,o){return n.getInputField().autocorrect=o},!0),i("autocapitalize",!1,function(n,o){return n.getInputField().autocapitalize=o},!0),i("rtlMoveVisually",!pe),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){Ef(n),$i(n)},!0),i("keyMap","default",function(n,o,a){var c=ts(o),h=a!=ii&&ts(a);h&&h.detach&&h.detach(n,c),c.attach&&c.attach(n,h||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,ug,!0),i("gutters",[],function(n,o){n.display.gutterSpecs=wl(o,n.options.lineNumbers),$i(n)},!0),i("fixedGutter",!0,function(n,o){n.display.gutters.style.left=o?al(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return Zn(n)},!0),i("scrollbarStyle","native",function(n){Nu(n),Zn(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,o){n.display.gutterSpecs=wl(n.options.gutters,o),$i(n)},!0),i("firstLineNumber",1,$i,!0),i("lineNumberFormatter",function(n){return n},$i,!0),i("showCursorWhenSelecting",!1,Wi,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,o){o=="nocursor"&&(Yn(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)}),i("screenReaderLabel",null,function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)}),i("disableInput",!1,function(n,o){o||n.display.input.reset()},!0),i("dragDrop",!0,ag),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Wi,!0),i("singleCursorHeightPerLine",!0,Wi,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Gi,!0),i("addModeClass",!1,Gi,!0),i("pollInterval",100),i("undoDepth",200,function(n,o){return n.doc.history.undoDepth=o}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Gi,!0),i("moveInputWithCursor",!0,function(n,o){o||n.display.input.resetPosition()}),i("tabindex",null,function(n,o){return n.display.input.getField().tabIndex=o||""}),i("autofocus",null),i("direction","ltr",function(n,o){return n.doc.setDirection(o)},!0),i("phrases",null)}function ag(e,t,i){var n=i&&i!=ii;if(!t!=!n){var o=e.display.dragFunctions,a=t?Pe:et;a(e.display.scroller,"dragstart",o.start),a(e.display.scroller,"dragenter",o.enter),a(e.display.scroller,"dragover",o.over),a(e.display.scroller,"dragleave",o.leave),a(e.display.scroller,"drop",o.drop)}}function ug(e){e.options.lineWrapping?(ze(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(de(e.display.wrapper,"CodeMirror-wrap"),Qs(e)),ul(e),Ut(e),Hi(e),setTimeout(function(){return Zn(e)},100)}function at(e,t){var i=this;if(!(this instanceof at))return new at(e,t);this.options=t=t?Ie(t):{},Ie(Af,t,!1);var n=t.value;typeof n=="string"?n=new Kt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new at.inputStyles[t.inputStyle](this),a=this.display=new kp(e,n,o,t);a.wrapper.CodeMirror=this,Ef(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Nu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!I&&a.input.focus(),y&&x<11&&setTimeout(function(){return i.display.input.reset(!0)},20),fg(this),Bp(),Ln(this),this.curOp.forceUpdate=!0,Uu(this,n),t.autofocus&&!I||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&hl(i)},20):Yn(this);for(var c in ns)ns.hasOwnProperty(c)&&ns[c](this,t[c],ii);Du(this),t.finishInit&&t.finishInit(this);for(var h=0;h<Nl.length;++h)Nl[h](this);Pn(this),S&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}at.defaults=Af,at.optionHandlers=ns;function fg(e){var t=e.display;Pe(t.scroller,"mousedown",St(e,Lf)),y&&x<11?Pe(t.scroller,"dblclick",St(e,function(p){if(!ut(e,p)){var g=Sn(e,p);if(!(!g||Al(e,p)||Wr(e.display,p))){zt(p);var k=e.findWordAt(g);Zo(e.doc,k.anchor,k.head)}}})):Pe(t.scroller,"dblclick",function(p){return ut(e,p)||zt(p)}),Pe(t.scroller,"contextmenu",function(p){return Mf(e,p)}),Pe(t.input.getField(),"contextmenu",function(p){t.scroller.contains(p.target)||Mf(e,p)});var i,n={end:0};function o(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(p){if(p.touches.length!=1)return!1;var g=p.touches[0];return g.radiusX<=1&&g.radiusY<=1}function c(p,g){if(g.left==null)return!0;var k=g.left-p.left,C=g.top-p.top;return k*k+C*C>20*20}Pe(t.scroller,"touchstart",function(p){if(!ut(e,p)&&!a(p)&&!Al(e,p)){t.input.ensurePolled(),clearTimeout(i);var g=+new Date;t.activeTouch={start:g,moved:!1,prev:g-n.end<=300?n:null},p.touches.length==1&&(t.activeTouch.left=p.touches[0].pageX,t.activeTouch.top=p.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(p){var g=t.activeTouch;if(g&&!Wr(t,p)&&g.left!=null&&!g.moved&&new Date-g.start<300){var k=e.coordsChar(t.activeTouch,"page"),C;!g.prev||c(g,g.prev)?C=new Ze(k,k):!g.prev.prev||c(g,g.prev.prev)?C=e.findWordAt(k):C=new Ze(ie(k.line,0),xe(e.doc,ie(k.line+1,0))),e.setSelection(C.anchor,C.head),e.focus(),zt(p)}o()}),Pe(t.scroller,"touchcancel",o),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ji(e,t.scroller.scrollTop),_n(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(p){return Hu(e,p)}),Pe(t.scroller,"DOMMouseScroll",function(p){return Hu(e,p)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(p){ut(e,p)||bn(p)},over:function(p){ut(e,p)||(Wp(e,p),bn(p))},start:function(p){return Hp(e,p)},drop:St(e,Ip),leave:function(p){ut(e,p)||pf(e)}};var h=t.input.getField();Pe(h,"keyup",function(p){return _f.call(e,p)}),Pe(h,"keydown",St(e,Cf)),Pe(h,"keypress",St(e,Tf)),Pe(h,"focus",function(p){return hl(e,p)}),Pe(h,"blur",function(p){return Yn(e,p)})}var Nl=[];at.defineInitHook=function(e){return Nl.push(e)};function so(e,t,i,n){var o=e.doc,a;i==null&&(i="add"),i=="smart"&&(o.mode.indent?a=zi(e,t).state:i="prev");var c=e.options.tabSize,h=_e(o,t),p=Je(h.text,null,c);h.stateAfter&&(h.stateAfter=null);var g=h.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(h.text))k=0,i="not";else if(i=="smart"&&(k=o.mode.indent(a,h.text.slice(g.length),h.text),k==se||k>150)){if(!n)return;i="prev"}i=="prev"?t>o.first?k=Je(_e(o,t-1).text,null,c):k=0:i=="add"?k=p+e.options.indentUnit:i=="subtract"?k=p-e.options.indentUnit:typeof i=="number"&&(k=p+i),k=Math.max(0,k);var C="",R=0;if(e.options.indentWithTabs)for(var M=Math.floor(k/c);M;--M)R+=c,C+=" ";if(R<k&&(C+=E(k-R)),C!=g)return ei(o,C,ie(t,0),ie(t,g.length),"+input"),h.stateAfter=null,!0;for(var U=0;U<o.sel.ranges.length;U++){var Q=o.sel.ranges[U];if(Q.head.line==t&&Q.head.ch<g.length){var ae=ie(t,g.length);Tl(o,U,new Ze(ae,ae));break}}}var br=null;function is(e){br=e}function zl(e,t,i,n,o){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var c=+new Date-200,h=o=="paste"||e.state.pasteIncoming>c,p=Pi(t),g=null;if(h&&n.ranges.length>1)if(br&&br.text.join(`
13
+ `)==t){if(n.ranges.length%br.text.length==0){g=[];for(var k=0;k<br.text.length;k++)g.push(a.splitLines(br.text[k]))}}else p.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(g=G(p,function(ve){return[ve]}));for(var C=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var M=n.ranges[R],U=M.from(),Q=M.to();M.empty()&&(i&&i>0?U=ie(U.line,U.ch-i):e.state.overwrite&&!h?Q=ie(Q.line,Math.min(_e(a,Q.line).text.length,Q.ch+F(p).length)):h&&br&&br.lineWise&&br.text.join(`
14
14
  `)==p.join(`
15
- `)&&(U=Q=ie(U.line,0)));var ae={from:U,to:Q,text:g?g[R%g.length]:p,origin:o||(h?"paste":e.state.cutIncoming>c?"cut":"+input")};Vn(e.doc,ae),kt(e,"inputRead",e,ae)}t&&!h&&zf(e,t),Xn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Nf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Qt(t,function(){return zl(t,i,0,null,"paste")}),!0}function zf(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var o=i.ranges[n];if(!(o.head.ch>100||n&&i.ranges[n-1].head.line==o.head.line)){var a=e.getModeAt(o.head),c=!1;if(a.electricChars){for(var h=0;h<a.electricChars.length;h++)if(t.indexOf(a.electricChars.charAt(h))>-1){c=so(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(_e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(c=so(e,o.head.line,"smart"));c&&kt(e,"electricInput",e,o.head.line)}}}function Rf(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,a={anchor:ie(o,0),head:ie(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function Df(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ff(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),Df(e),t}function cg(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var a=this.options,c=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&St(this,t[n])(this,o,c),Oe(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](ts(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,a=0;a<o.length;++a)if(o[a]==n||o[a].name==n)return o.splice(a,1),!0},addOverlay:Ht(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(c){return c.priority}),this.state.modeGen++,Ut(this)}),removeOverlay:Ht(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var c=o[a].modeSpec;if(c==n||typeof n=="string"&&c.name==n){o.splice(a,1),this.state.modeGen++,Ut(this);return}}}),indentLine:Ht(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),wn(this.doc,n)&&so(this,n,o,a)}),indentSelection:Ht(function(n){for(var o=this.doc.sel.ranges,a=-1,c=0;c<o.length;c++){var h=o[c];if(h.empty())h.head.line>a&&(so(this,h.head.line,n,!0),a=h.head.line,c==this.doc.sel.primIndex&&Xn(this));else{var p=h.from(),g=h.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var C=k;C<a;++C)so(this,C,n);var R=this.doc.sel.ranges;p.ch==0&&o.length==R.length&&R[c].from().ch>0&&Tl(this.doc,c,new Ze(p,R[c].to()),Ce)}}}),getTokenAt:function(n,o){return qa(this,n,o)},getLineTokens:function(n,o){return qa(this,ie(n),o,!0)},getTokenTypeAt:function(n){n=xe(this.doc,n);var o=ja(this,_e(this.doc,n.line)),a=0,c=(o.length-1)/2,h=n.ch,p;if(h==0)p=o[2];else for(;;){var g=a+c>>1;if((g?o[g*2-1]:0)>=h)c=g;else if(o[g*2+1]<h)a=g+1;else{p=o[g*2+2];break}}var k=p?p.indexOf("overlay "):-1;return k<0?p:k==0?null:p.slice(0,k-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var a=[];if(!i.hasOwnProperty(o))return a;var c=i[o],h=this.getModeAt(n);if(typeof h[o]=="string")c[h[o]]&&a.push(c[h[o]]);else if(h[o])for(var p=0;p<h[o].length;p++){var g=c[h[o][p]];g&&a.push(g)}else h.helperType&&c[h.helperType]?a.push(c[h.helperType]):c[h.name]&&a.push(c[h.name]);for(var k=0;k<c._global.length;k++){var C=c._global[k];C.pred(h,this)&&Z(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=$e(a,n==null?a.first+a.size-1:n),zi(this,n+1,o).state},cursorCoords:function(n,o){var a,c=this.doc.sel.primary();return n==null?a=c.head:typeof n=="object"?a=xe(this.doc,n):a=n?c.from():c.to(),vr(this,a,o||"page")},charCoords:function(n,o){return Wo(this,xe(this.doc,n),o||"page")},coordsChar:function(n,o){return n=wu(this,n,o||"page"),ol(this,n.left,n.top)},lineAtHeight:function(n,o){return n=wu(this,{top:n,left:0},o||"page").top,Tr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var c=!1,h;if(typeof n=="number"){var p=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>p&&(n=p,c=!0),h=_e(this.doc,n)}else h=n;return Ho(this,h,{top:0,left:0},o||"page",a||c).top+(c?this.doc.height-Hr(h):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Gn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,c,h){var p=this.display;n=vr(this,xe(this.doc,n));var g=n.bottom,k=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),p.sizer.appendChild(o),c=="over")g=n.top;else if(c=="above"||c=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),R=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(c=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?g=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(g=n.bottom),k+o.offsetWidth>R&&(k=R-o.offsetWidth)}o.style.top=g+"px",o.style.left=o.style.right="",h=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(h=="left"?k=0:h=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&ap(this,{left:k,top:g,right:k+o.offsetWidth,bottom:g+o.offsetHeight})},triggerOnKeyDown:Ht(Cf),triggerOnKeyPress:Ht(Tf),triggerOnKeyUp:_f,triggerOnMouseDown:Ht(Lf),execCommand:function(n){if(ro.hasOwnProperty(n))return ro[n].call(null,this)},triggerElectric:Ht(function(n){zf(this,n)}),findPosH:function(n,o,a,c){var h=1;o<0&&(h=-1,o=-o);for(var p=xe(this.doc,n),g=0;g<o&&(p=Rl(this.doc,p,h,a,c),!p.hitSide);++g);return p},moveH:Ht(function(n,o){var a=this;this.extendSelectionsBy(function(c){return a.display.shift||a.doc.extend||c.empty()?Rl(a.doc,c.head,n,o,a.options.rtlMoveVisually):n<0?c.from():c.to()},ge)}),deleteH:Ht(function(n,o){var a=this.doc.sel,c=this.doc;a.somethingSelected()?c.replaceSelection("",null,"+delete"):ni(this,function(h){var p=Rl(c,h.head,n,o,!1);return n<0?{from:p,to:h.head}:{from:h.head,to:p}})}),findPosV:function(n,o,a,c){var h=1,p=c;o<0&&(h=-1,o=-o);for(var g=xe(this.doc,n),k=0;k<o;++k){var C=vr(this,g,"div");if(p==null?p=C.left:C.left=p,g=If(this,C,h,a),g.hitSide)break}return g},moveV:Ht(function(n,o){var a=this,c=this.doc,h=[],p=!this.display.shift&&!c.extend&&c.sel.somethingSelected();if(c.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=vr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),h.push(C.left);var R=If(a,C,n,o);return o=="page"&&k==c.sel.primary()&&gl(a,Wo(a,R,"div").top-C.top),R},ge),h.length)for(var g=0;g<c.sel.ranges.length;g++)c.sel.ranges[g].goalColumn=h[g]}),findWordAt:function(n){var o=this.doc,a=_e(o,n.line).text,c=n.ch,h=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||h==a.length)&&c?--c:++h;for(var g=a.charAt(c),k=L(g,p)?function(C){return L(C,p)}:/\s/.test(g)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!L(C)};c>0&&k(a.charAt(c-1));)--c;for(;h<a.length&&k(a.charAt(h));)++h}return new Ze(ie(n.line,c),ie(n.line,h))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ze(this.display.cursorDiv,"CodeMirror-overwrite"):de(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ht(function(n,o){Bi(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Pr(this)-this.display.barHeight,width:n.scrollWidth-Pr(this)-this.display.barWidth,clientHeight:tl(this),clientWidth:xn(this)}},scrollIntoView:Ht(function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:ie(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?up(this,n):Ou(this,n.from,n.to,n.margin)}),setSize:Ht(function(n,o){var a=this,c=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=c(n)),o!=null&&(this.display.wrapper.style.height=c(o)),this.options.lineWrapping&&mu(this);var h=this.display.viewFrom;this.doc.iter(h,this.display.viewTo,function(p){if(p.widgets){for(var g=0;g<p.widgets.length;g++)if(p.widgets[g].noHScroll){Qr(a,h,"widget");break}}++h}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return Qt(this,n)},startOperation:function(){return Ln(this)},endOperation:function(){return Pn(this)},refresh:Ht(function(){var n=this.display.cachedTextHeight;Ut(this),this.curOp.forceUpdate=!0,Hi(this),Bi(this,this.doc.scrollLeft,this.doc.scrollTop),yl(this.display),(n==null||Math.abs(n-$n(this.display))>.5||this.options.lineWrapping)&&ul(this),Oe(this,"refresh",this)}),swapDoc:Ht(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Uu(this,n),Hi(this),this.display.input.reset(),Bi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,kt(this,"swapDoc",this,o),o}),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Sr(e),e.registerHelper=function(n,o,a){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][o]=a},e.registerGlobalHelper=function(n,o,a,c){e.registerHelper(n,o,c),i[n]._global.push({pred:a,val:c})}}function Rl(e,t,i,n,o){var a=t,c=i,h=_e(e,t.line),p=o&&e.direction=="rtl"?-i:i;function g(){var we=t.line+p;return we<e.first||we>=e.first+e.size?!1:(t=new ie(we,t.ch,t.sticky),h=_e(e,we))}function k(we){var me;if(n=="codepoint"){var ke=h.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ke))me=null;else{var Ae=i>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;me=new ie(t.line,Math.max(0,Math.min(h.text.length,t.ch+i*(Ae?2:1))),-i)}}else o?me=$p(e.cm,h,t,i):me=Pl(h,t,i);if(me==null)if(!we&&g())t=Ol(o,e.cm,h,t.line,p);else return!1;else t=me;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,R=n=="group",M=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(i<0&&!k(!U));U=!1){var Q=h.text.charAt(t.ch)||`
15
+ `)&&(U=Q=ie(U.line,0)));var ae={from:U,to:Q,text:g?g[R%g.length]:p,origin:o||(h?"paste":e.state.cutIncoming>c?"cut":"+input")};Vn(e.doc,ae),kt(e,"inputRead",e,ae)}t&&!h&&zf(e,t),Xn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=C),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Nf(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Qt(t,function(){return zl(t,i,0,null,"paste")}),!0}function zf(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var o=i.ranges[n];if(!(o.head.ch>100||n&&i.ranges[n-1].head.line==o.head.line)){var a=e.getModeAt(o.head),c=!1;if(a.electricChars){for(var h=0;h<a.electricChars.length;h++)if(t.indexOf(a.electricChars.charAt(h))>-1){c=so(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(_e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(c=so(e,o.head.line,"smart"));c&&kt(e,"electricInput",e,o.head.line)}}}function Rf(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,a={anchor:ie(o,0),head:ie(o+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function Df(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ff(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return S?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),Df(e),t}function cg(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var a=this.options,c=a[n];a[n]==o&&n!="mode"||(a[n]=o,t.hasOwnProperty(n)&&St(this,t[n])(this,o,c),Oe(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](ts(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,a=0;a<o.length;++a)if(o[a]==n||o[a].name==n)return o.splice(a,1),!0},addOverlay:Ht(function(n,o){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:a,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},function(c){return c.priority}),this.state.modeGen++,Ut(this)}),removeOverlay:Ht(function(n){for(var o=this.state.overlays,a=0;a<o.length;++a){var c=o[a].modeSpec;if(c==n||typeof n=="string"&&c.name==n){o.splice(a,1),this.state.modeGen++,Ut(this);return}}}),indentLine:Ht(function(n,o,a){typeof o!="string"&&typeof o!="number"&&(o==null?o=this.options.smartIndent?"smart":"prev":o=o?"add":"subtract"),wn(this.doc,n)&&so(this,n,o,a)}),indentSelection:Ht(function(n){for(var o=this.doc.sel.ranges,a=-1,c=0;c<o.length;c++){var h=o[c];if(h.empty())h.head.line>a&&(so(this,h.head.line,n,!0),a=h.head.line,c==this.doc.sel.primIndex&&Xn(this));else{var p=h.from(),g=h.to(),k=Math.max(a,p.line);a=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var C=k;C<a;++C)so(this,C,n);var R=this.doc.sel.ranges;p.ch==0&&o.length==R.length&&R[c].from().ch>0&&Tl(this.doc,c,new Ze(p,R[c].to()),Ce)}}}),getTokenAt:function(n,o){return qa(this,n,o)},getLineTokens:function(n,o){return qa(this,ie(n),o,!0)},getTokenTypeAt:function(n){n=xe(this.doc,n);var o=ja(this,_e(this.doc,n.line)),a=0,c=(o.length-1)/2,h=n.ch,p;if(h==0)p=o[2];else for(;;){var g=a+c>>1;if((g?o[g*2-1]:0)>=h)c=g;else if(o[g*2+1]<h)a=g+1;else{p=o[g*2+2];break}}var k=p?p.indexOf("overlay "):-1;return k<0?p:k==0?null:p.slice(0,k-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var a=[];if(!i.hasOwnProperty(o))return a;var c=i[o],h=this.getModeAt(n);if(typeof h[o]=="string")c[h[o]]&&a.push(c[h[o]]);else if(h[o])for(var p=0;p<h[o].length;p++){var g=c[h[o][p]];g&&a.push(g)}else h.helperType&&c[h.helperType]?a.push(c[h.helperType]):c[h.name]&&a.push(c[h.name]);for(var k=0;k<c._global.length;k++){var C=c._global[k];C.pred(h,this)&&Z(a,C.val)==-1&&a.push(C.val)}return a},getStateAfter:function(n,o){var a=this.doc;return n=$e(a,n==null?a.first+a.size-1:n),zi(this,n+1,o).state},cursorCoords:function(n,o){var a,c=this.doc.sel.primary();return n==null?a=c.head:typeof n=="object"?a=xe(this.doc,n):a=n?c.from():c.to(),mr(this,a,o||"page")},charCoords:function(n,o){return Wo(this,xe(this.doc,n),o||"page")},coordsChar:function(n,o){return n=wu(this,n,o||"page"),ol(this,n.left,n.top)},lineAtHeight:function(n,o){return n=wu(this,{top:n,left:0},o||"page").top,Tr(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,a){var c=!1,h;if(typeof n=="number"){var p=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>p&&(n=p,c=!0),h=_e(this.doc,n)}else h=n;return Ho(this,h,{top:0,left:0},o||"page",a||c).top+(c?this.doc.height-Hr(h):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Gn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,a,c,h){var p=this.display;n=mr(this,xe(this.doc,n));var g=n.bottom,k=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),p.sizer.appendChild(o),c=="over")g=n.top;else if(c=="above"||c=="near"){var C=Math.max(p.wrapper.clientHeight,this.doc.height),R=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);(c=="above"||n.bottom+o.offsetHeight>C)&&n.top>o.offsetHeight?g=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=C&&(g=n.bottom),k+o.offsetWidth>R&&(k=R-o.offsetWidth)}o.style.top=g+"px",o.style.left=o.style.right="",h=="right"?(k=p.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(h=="left"?k=0:h=="middle"&&(k=(p.sizer.clientWidth-o.offsetWidth)/2),o.style.left=k+"px"),a&&ap(this,{left:k,top:g,right:k+o.offsetWidth,bottom:g+o.offsetHeight})},triggerOnKeyDown:Ht(Cf),triggerOnKeyPress:Ht(Tf),triggerOnKeyUp:_f,triggerOnMouseDown:Ht(Lf),execCommand:function(n){if(ro.hasOwnProperty(n))return ro[n].call(null,this)},triggerElectric:Ht(function(n){zf(this,n)}),findPosH:function(n,o,a,c){var h=1;o<0&&(h=-1,o=-o);for(var p=xe(this.doc,n),g=0;g<o&&(p=Rl(this.doc,p,h,a,c),!p.hitSide);++g);return p},moveH:Ht(function(n,o){var a=this;this.extendSelectionsBy(function(c){return a.display.shift||a.doc.extend||c.empty()?Rl(a.doc,c.head,n,o,a.options.rtlMoveVisually):n<0?c.from():c.to()},ge)}),deleteH:Ht(function(n,o){var a=this.doc.sel,c=this.doc;a.somethingSelected()?c.replaceSelection("",null,"+delete"):ni(this,function(h){var p=Rl(c,h.head,n,o,!1);return n<0?{from:p,to:h.head}:{from:h.head,to:p}})}),findPosV:function(n,o,a,c){var h=1,p=c;o<0&&(h=-1,o=-o);for(var g=xe(this.doc,n),k=0;k<o;++k){var C=mr(this,g,"div");if(p==null?p=C.left:C.left=p,g=If(this,C,h,a),g.hitSide)break}return g},moveV:Ht(function(n,o){var a=this,c=this.doc,h=[],p=!this.display.shift&&!c.extend&&c.sel.somethingSelected();if(c.extendSelectionsBy(function(k){if(p)return n<0?k.from():k.to();var C=mr(a,k.head,"div");k.goalColumn!=null&&(C.left=k.goalColumn),h.push(C.left);var R=If(a,C,n,o);return o=="page"&&k==c.sel.primary()&&gl(a,Wo(a,R,"div").top-C.top),R},ge),h.length)for(var g=0;g<c.sel.ranges.length;g++)c.sel.ranges[g].goalColumn=h[g]}),findWordAt:function(n){var o=this.doc,a=_e(o,n.line).text,c=n.ch,h=n.ch;if(a){var p=this.getHelper(n,"wordChars");(n.sticky=="before"||h==a.length)&&c?--c:++h;for(var g=a.charAt(c),k=L(g,p)?function(C){return L(C,p)}:/\s/.test(g)?function(C){return/\s/.test(C)}:function(C){return!/\s/.test(C)&&!L(C)};c>0&&k(a.charAt(c-1));)--c;for(;h<a.length&&k(a.charAt(h));)++h}return new Ze(ie(n.line,c),ie(n.line,h))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ze(this.display.cursorDiv,"CodeMirror-overwrite"):de(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ht(function(n,o){Bi(this,n,o)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Pr(this)-this.display.barHeight,width:n.scrollWidth-Pr(this)-this.display.barWidth,clientHeight:tl(this),clientWidth:xn(this)}},scrollIntoView:Ht(function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:ie(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?up(this,n):Ou(this,n.from,n.to,n.margin)}),setSize:Ht(function(n,o){var a=this,c=function(p){return typeof p=="number"||/^\d+$/.test(String(p))?p+"px":p};n!=null&&(this.display.wrapper.style.width=c(n)),o!=null&&(this.display.wrapper.style.height=c(o)),this.options.lineWrapping&&mu(this);var h=this.display.viewFrom;this.doc.iter(h,this.display.viewTo,function(p){if(p.widgets){for(var g=0;g<p.widgets.length;g++)if(p.widgets[g].noHScroll){Qr(a,h,"widget");break}}++h}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return Qt(this,n)},startOperation:function(){return Ln(this)},endOperation:function(){return Pn(this)},refresh:Ht(function(){var n=this.display.cachedTextHeight;Ut(this),this.curOp.forceUpdate=!0,Hi(this),Bi(this,this.doc.scrollLeft,this.doc.scrollTop),yl(this.display),(n==null||Math.abs(n-$n(this.display))>.5||this.options.lineWrapping)&&ul(this),Oe(this,"refresh",this)}),swapDoc:Ht(function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),Uu(this,n),Hi(this),this.display.input.reset(),Bi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,kt(this,"swapDoc",this,o),o}),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Sr(e),e.registerHelper=function(n,o,a){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][o]=a},e.registerGlobalHelper=function(n,o,a,c){e.registerHelper(n,o,c),i[n]._global.push({pred:a,val:c})}}function Rl(e,t,i,n,o){var a=t,c=i,h=_e(e,t.line),p=o&&e.direction=="rtl"?-i:i;function g(){var we=t.line+p;return we<e.first||we>=e.first+e.size?!1:(t=new ie(we,t.ch,t.sticky),h=_e(e,we))}function k(we){var me;if(n=="codepoint"){var ke=h.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ke))me=null;else{var Ae=i>0?ke>=55296&&ke<56320:ke>=56320&&ke<57343;me=new ie(t.line,Math.max(0,Math.min(h.text.length,t.ch+i*(Ae?2:1))),-i)}}else o?me=$p(e.cm,h,t,i):me=Pl(h,t,i);if(me==null)if(!we&&g())t=Ol(o,e.cm,h,t.line,p);else return!1;else t=me;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var C=null,R=n=="group",M=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(i<0&&!k(!U));U=!1){var Q=h.text.charAt(t.ch)||`
16
16
  `,ae=L(Q,M)?"w":R&&Q==`
17
- `?"n":!R||/\s/.test(Q)?null:"p";if(R&&!U&&!ae&&(ae="s"),C&&C!=ae){i<0&&(i=1,k(),t.sticky="after");break}if(ae&&(C=ae),i>0&&!k(!U))break}var ve=Qo(e,t,a,c,!0);return P(a,ve)&&(ve.hitSide=!0),ve}function If(e,t,i,n){var o=e.doc,a=t.left,c;if(n=="page"){var h=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(h-.5*$n(e.display),3);c=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(c=i>0?t.bottom+3:t.top-3);for(var g;g=ol(e,a,c),!!g.outside;){if(i<0?c<=0:c>=o.height){g.hitSide=!0;break}c+=i*5}return g}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,Df(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(h){for(var p=h.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Pe(o,"paste",function(h){!a(h)||ut(n,h)||Nf(h,n)||x<=11&&setTimeout(St(n,function(){return t.updateFromDOM()}),20)}),Pe(o,"compositionstart",function(h){t.composing={data:h.data,done:!1}}),Pe(o,"compositionupdate",function(h){t.composing||(t.composing={data:h.data,done:!1})}),Pe(o,"compositionend",function(h){t.composing&&(h.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(o,"touchstart",function(){return i.forceCompositionEnd()}),Pe(o,"input",function(){t.composing||t.readFromDOMSoon()});function c(h){if(!(!a(h)||ut(n,h))){if(n.somethingSelected())is({lineWise:!1,text:n.getSelections()}),h.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=Rf(n);is({lineWise:!0,text:p.text}),h.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,Ce),n.replaceSelection("",null,"cut")})}else return;if(h.clipboardData){h.clipboardData.clearData();var g=yr.text.join(`
18
- `);if(h.clipboardData.setData("Text",g),h.clipboardData.getData("Text")==g){h.preventDefault();return}}var k=Ff(),C=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),C.value=yr.text.join(`
17
+ `?"n":!R||/\s/.test(Q)?null:"p";if(R&&!U&&!ae&&(ae="s"),C&&C!=ae){i<0&&(i=1,k(),t.sticky="after");break}if(ae&&(C=ae),i>0&&!k(!U))break}var ve=Qo(e,t,a,c,!0);return P(a,ve)&&(ve.hitSide=!0),ve}function If(e,t,i,n){var o=e.doc,a=t.left,c;if(n=="page"){var h=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),p=Math.max(h-.5*$n(e.display),3);c=(i>0?t.bottom:t.top)+i*p}else n=="line"&&(c=i>0?t.bottom+3:t.top-3);for(var g;g=ol(e,a,c),!!g.outside;){if(i<0?c<=0:c>=o.height){g.hitSide=!0;break}c+=i*5}return g}var Qe=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qe.prototype.init=function(e){var t=this,i=this,n=i.cm,o=i.div=e.lineDiv;o.contentEditable=!0,Df(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(h){for(var p=h.target;p;p=p.parentNode){if(p==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(p.className))break}return!1}Pe(o,"paste",function(h){!a(h)||ut(n,h)||Nf(h,n)||x<=11&&setTimeout(St(n,function(){return t.updateFromDOM()}),20)}),Pe(o,"compositionstart",function(h){t.composing={data:h.data,done:!1}}),Pe(o,"compositionupdate",function(h){t.composing||(t.composing={data:h.data,done:!1})}),Pe(o,"compositionend",function(h){t.composing&&(h.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(o,"touchstart",function(){return i.forceCompositionEnd()}),Pe(o,"input",function(){t.composing||t.readFromDOMSoon()});function c(h){if(!(!a(h)||ut(n,h))){if(n.somethingSelected())is({lineWise:!1,text:n.getSelections()}),h.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var p=Rf(n);is({lineWise:!0,text:p.text}),h.type=="cut"&&n.operation(function(){n.setSelections(p.ranges,0,Ce),n.replaceSelection("",null,"cut")})}else return;if(h.clipboardData){h.clipboardData.clearData();var g=br.text.join(`
18
+ `);if(h.clipboardData.setData("Text",g),h.clipboardData.getData("Text")==g){h.preventDefault();return}}var k=Ff(),C=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),C.value=br.text.join(`
19
19
  `);var R=ue();nt(C),setTimeout(function(){n.display.lineSpace.removeChild(k),R.focus(),R==o&&i.showPrimarySelection()},50)}}Pe(o,"copy",c),Pe(o,"cut",c)},Qe.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qe.prototype.prepareSelection=function(){var e=Tu(this.cm,!1);return e.focus=ue()==this.div,e},Qe.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qe.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||o.line<t.display.viewFrom){e.removeAllRanges();return}var a=os(t,e.anchorNode,e.anchorOffset),c=os(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&c&&!c.bad&&m(De(a,c),n)==0&&m(le(a,c),o)==0)){var h=t.display.view,p=n.line>=t.display.viewFrom&&Hf(t,n)||{node:h[0].measure.map[2],offset:0},g=o.line<t.display.viewTo&&Hf(t,o);if(!g){var k=h[h.length-1].measure,C=k.maps?k.maps[k.maps.length-1]:k.map;g={node:C[C.length-1],offset:C[C.length-2]-C[C.length-3]}}if(!p||!g){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),M;try{M=ee(p.node,p.offset,g.offset,g.node)}catch{}M&&(!f&&t.state.focused?(e.collapse(p.node,p.offset),M.collapsed||(e.removeAllRanges(),e.addRange(M))):(e.removeAllRanges(),e.addRange(M)),R&&e.anchorNode==null?e.addRange(R):f&&this.startGracePeriod()),this.rememberSelection()}},Qe.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Qe.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},Qe.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qe.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Y(this.div,t)},Qe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ue()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qe.prototype.blur=function(){this.div.blur()},Qe.prototype.getField=function(){return this.div},Qe.prototype.supportsTouch=function(){return!0},Qe.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Qt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Qe.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qe.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(D&&O&&this.cm.display.gutterSpecs.length&&dg(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=os(t,e.anchorNode,e.anchorOffset),n=os(t,e.focusNode,e.focusOffset);i&&n&&Qt(t,function(){Dt(t.doc,en(i,n),Ce),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Qe.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),o=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=ie(n.line-1,_e(e.doc,n.line-1).length)),o.ch==_e(e.doc,o.line).text.length&&o.line<e.lastLine()&&(o=ie(o.line+1,0)),n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var a,c,h;n.line==t.viewFrom||(a=Cn(e,n.line))==0?(c=Xe(t.view[0].line),h=t.view[0].node):(c=Xe(t.view[a].line),h=t.view[a-1].node.nextSibling);var p=Cn(e,o.line),g,k;if(p==t.view.length-1?(g=t.viewTo-1,k=t.lineDiv.lastChild):(g=Xe(t.view[p+1].line)-1,k=t.view[p+1].node.previousSibling),!h)return!1;for(var C=e.doc.splitLines(hg(e,h,k,c,g)),R=_r(e.doc,ie(c,0),ie(g,_e(e.doc,g).text.length));C.length>1&&R.length>1;)if(F(C)==F(R))C.pop(),R.pop(),g--;else if(C[0]==R[0])C.shift(),R.shift(),c++;else break;for(var M=0,U=0,Q=C[0],ae=R[0],ve=Math.min(Q.length,ae.length);M<ve&&Q.charCodeAt(M)==ae.charCodeAt(M);)++M;for(var we=F(C),me=F(R),ke=Math.min(we.length-(C.length==1?M:0),me.length-(R.length==1?M:0));U<ke&&we.charCodeAt(we.length-U-1)==me.charCodeAt(me.length-U-1);)++U;if(C.length==1&&R.length==1&&c==n.line)for(;M&&M>n.ch&&we.charCodeAt(we.length-U-1)==me.charCodeAt(me.length-U-1);)M--,U++;C[C.length-1]=we.slice(0,we.length-U).replace(/^\u200b+/,""),C[0]=C[0].slice(M).replace(/\u200b+$/,"");var Ae=ie(c,M),Me=ie(g,R.length?F(R).length-U:0);if(C.length>1||C[0]||m(Ae,Me))return ei(e.doc,C,Ae,Me,"+input"),!0},Qe.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qe.prototype.reset=function(){this.forceCompositionEnd()},Qe.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qe.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Qe.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Qt(this.cm,function(){return Ut(e.cm)})},Qe.prototype.setUneditable=function(e){e.contentEditable="false"},Qe.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||St(this.cm,zl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Qe.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Qe.prototype.onContextMenu=function(){},Qe.prototype.resetPosition=function(){},Qe.prototype.needsContentAttribute=!0;function Hf(e,t){var i=rl(e,t.line);if(!i||i.hidden)return null;var n=_e(e.doc,t.line),o=du(i,n,t.line),a=vt(n,e.doc.direction),c="left";if(a){var h=He(a,t.ch);c=h%2?"right":"left"}var p=gu(o.map,t.ch,c);return p.offset=p.collapse=="right"?p.end:p.start,p}function dg(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function oi(e,t){return t&&(e.bad=!0),e}function hg(e,t,i,n,o){var a="",c=!1,h=e.doc.lineSeparator(),p=!1;function g(M){return function(U){return U.id==M}}function k(){c&&(a+=h,p&&(a+=h),c=p=!1)}function C(M){M&&(k(),a+=M)}function R(M){if(M.nodeType==1){var U=M.getAttribute("cm-text");if(U){C(U);return}var Q=M.getAttribute("cm-marker"),ae;if(Q){var ve=e.findMarks(ie(n,0),ie(o+1,0),g(+Q));ve.length&&(ae=ve[0].find(0))&&C(_r(e.doc,ae.from,ae.to).join(h));return}if(M.getAttribute("contenteditable")=="false")return;var we=/^(pre|div|p|li|table|br)$/i.test(M.nodeName);if(!/^br$/i.test(M.nodeName)&&M.textContent.length==0)return;we&&k();for(var me=0;me<M.childNodes.length;me++)R(M.childNodes[me]);/^(pre|p)$/i.test(M.nodeName)&&(p=!0),we&&(c=!0)}else M.nodeType==3&&C(M.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=i;)t=t.nextSibling,p=!1;return a}function os(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return oi(e.clipPos(ie(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var a=e.display.view[o];if(a.node==n)return pg(a,t,i)}}function pg(e,t,i){var n=e.text.firstChild,o=!1;if(!t||!Y(n,t))return oi(ie(Xe(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[i],i=0,!t)){var a=e.rest?F(e.rest):e.line;return oi(ie(Xe(a),a.text.length),o)}var c=t.nodeType==3?t:null,h=t;for(!c&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(c=t.firstChild,i&&(i=c.nodeValue.length));h.parentNode!=n;)h=h.parentNode;var p=e.measure,g=p.maps;function k(ae,ve,we){for(var me=-1;me<(g?g.length:0);me++)for(var ke=me<0?p.map:g[me],Ae=0;Ae<ke.length;Ae+=3){var Me=ke[Ae+2];if(Me==ae||Me==ve){var Ue=Xe(me<0?e.line:e.rest[me]),rt=ke[Ae]+we;return(we<0||Me!=ae)&&(rt=ke[Ae+(we?1:0)]),ie(Ue,rt)}}}var C=k(c,h,i);if(C)return oi(C,o);for(var R=h.nextSibling,M=c?c.nodeValue.length-i:0;R;R=R.nextSibling){if(C=k(R,R.firstChild,0),C)return oi(ie(C.line,C.ch-M),o);M+=R.textContent.length}for(var U=h.previousSibling,Q=i;U;U=U.previousSibling){if(C=k(U,U.firstChild,-1),C)return oi(ie(C.line,C.ch+Q),o);Q+=U.textContent.length}}var pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};pt.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var o=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),N&&(o.style.width="0px"),Pe(o,"input",function(){y&&x>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Pe(o,"paste",function(c){ut(n,c)||Nf(c,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())});function a(c){if(!ut(n,c)){if(n.somethingSelected())is({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var h=Rf(n);is({lineWise:!0,text:h.text}),c.type=="cut"?n.setSelections(h.ranges,null,Ce):(i.prevInput="",o.value=h.text.join(`
20
- `),nt(o))}else return;c.type=="cut"&&(n.state.cutIncoming=+new Date)}}Pe(o,"cut",a),Pe(o,"copy",a),Pe(e.scroller,"paste",function(c){if(!(Wr(e,c)||ut(n,c))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var h=new Event("paste");h.clipboardData=c.clipboardData,o.dispatchEvent(h)}}),Pe(e.lineSpace,"selectstart",function(c){Wr(e,c)||zt(c)}),Pe(o,"compositionstart",function(){var c=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:c,range:n.markText(c,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},pt.prototype.createField=function(e){this.wrapper=Ff(),this.textarea=this.wrapper.firstChild},pt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},pt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=Tu(e);if(e.options.moveInputWithCursor){var o=vr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),c=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+c.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+c.left-a.left))}return n},pt.prototype.showSelection=function(e){var t=this.cm,i=t.display;j(i.cursorDiv,e.cursors),j(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},pt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&nt(this.textarea),y&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&x>=9&&(this.hasSelection=null))}},pt.prototype.getField=function(){return this.textarea},pt.prototype.supportsTouch=function(){return!1},pt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||ue()!=this.textarea))try{this.textarea.focus()}catch{}},pt.prototype.blur=function(){this.textarea.blur()},pt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pt.prototype.receivedFocus=function(){this.slowPoll()},pt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},pt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},pt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Oo(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=i.value;if(o==n&&!t.somethingSelected())return!1;if(y&&x>=9&&this.hasSelection===o||B&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var c=0,h=Math.min(n.length,o.length);c<h&&n.charCodeAt(c)==o.charCodeAt(c);)++c;return Qt(t,function(){zl(t,o.slice(c),n.length-c,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
20
+ `),nt(o))}else return;c.type=="cut"&&(n.state.cutIncoming=+new Date)}}Pe(o,"cut",a),Pe(o,"copy",a),Pe(e.scroller,"paste",function(c){if(!(Wr(e,c)||ut(n,c))){if(!o.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var h=new Event("paste");h.clipboardData=c.clipboardData,o.dispatchEvent(h)}}),Pe(e.lineSpace,"selectstart",function(c){Wr(e,c)||zt(c)}),Pe(o,"compositionstart",function(){var c=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:c,range:n.markText(c,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},pt.prototype.createField=function(e){this.wrapper=Ff(),this.textarea=this.wrapper.firstChild},pt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},pt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=Tu(e);if(e.options.moveInputWithCursor){var o=mr(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),c=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+c.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+c.left-a.left))}return n},pt.prototype.showSelection=function(e){var t=this.cm,i=t.display;j(i.cursorDiv,e.cursors),j(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},pt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&nt(this.textarea),y&&x>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",y&&x>=9&&(this.hasSelection=null))}},pt.prototype.getField=function(){return this.textarea},pt.prototype.supportsTouch=function(){return!1},pt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||ue()!=this.textarea))try{this.textarea.focus()}catch{}},pt.prototype.blur=function(){this.textarea.blur()},pt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pt.prototype.receivedFocus=function(){this.slowPoll()},pt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},pt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},pt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Oo(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=i.value;if(o==n&&!t.somethingSelected())return!1;if(y&&x>=9&&this.hasSelection===o||B&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var c=0,h=Math.min(n.length,o.length);c<h&&n.charCodeAt(c)==o.charCodeAt(c);)++c;return Qt(t,function(){zl(t,o.slice(c),n.length-c,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(`
21
21
  `)>-1?i.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pt.prototype.onKeyPress=function(){y&&x>=9&&(this.hasSelection=null),this.fastPoll()},pt.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Sn(i,e),c=n.scroller.scrollTop;if(!a||A)return;var h=i.options.resetSelectionOnContextMenu;h&&i.doc.sel.contains(a)==-1&&St(i,Dt)(i.doc,en(a),Ce);var p=o.style.cssText,g=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px;
22
22
  top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px;
23
23
  z-index: 1000; background: `+(y?"rgba(255, 255, 255, .05)":"transparent")+`;
24
- outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var C;S&&(C=window.scrollY),n.input.focus(),S&&window.scrollTo(null,C),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=M,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(o.selectionStart!=null){var Q=i.somethingSelected(),ae="\u200B"+(Q?o.value:"");o.value="\u21DA",o.value=ae,t.prevInput=Q?"":"\u200B",o.selectionStart=1,o.selectionEnd=ae.length,n.selForContextMenu=i.doc.sel}}function M(){if(t.contextMenuPending==M&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),o.selectionStart!=null)){(!y||y&&x<9)&&R();var Q=0,ae=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?St(i,rf)(i):Q++<10?n.detectingSelectAll=setTimeout(ae,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ae,200)}}if(y&&x>=9&&R(),Ee){bn(e);var U=function(){et(window,"mouseup",U),setTimeout(M,20)};Pe(window,"mouseup",U)}else setTimeout(M,50)},pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},pt.prototype.setUneditable=function(){},pt.prototype.needsContentAttribute=!1;function gg(e,t){if(t=t?Ie(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=ue();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=h.getValue()}var o;if(e.form&&(Pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var c=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=c}}catch{}}t.finishInit=function(p){p.save=n,p.getTextArea=function(){return e},p.toTextArea=function(){p.toTextArea=isNaN,n(),e.parentNode.removeChild(p.getWrapperElement()),e.style.display="",e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var h=at(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return h}function vg(e){e.off=et,e.on=Pe,e.wheelEventPixels=Sp,e.Doc=Kt,e.splitLines=Pi,e.countColumn=Je,e.findColumn=Te,e.isWordChar=te,e.Pass=se,e.signal=Oe,e.Line=Un,e.changeEnd=tn,e.scrollbarModel=Au,e.Pos=ie,e.cmpPos=m,e.modes=dr,e.mimeModes=ir,e.resolveMode=Wn,e.getMode=Bn,e.modeExtensions=hr,e.extendMode=pr,e.copyState=or,e.startState=Ei,e.innerMode=Mi,e.commands=ro,e.keyMap=jr,e.keyName=bf,e.isModifierKey=mf,e.lookupKey=ri,e.normalizeKeyMap=qp,e.StringStream=dt,e.SharedTextMarker=Vi,e.TextMarker=nn,e.LineWidget=Qi,e.e_preventDefault=zt,e.e_stopPropagation=Hn,e.e_stop=bn,e.addClass=ze,e.contains=Y,e.rmClass=de,e.keyNames=on}lg(at),cg(at);var mg="iter insert remove copy getEditor constructor".split(" ");for(var ss in Kt.prototype)Kt.prototype.hasOwnProperty(ss)&&Z(mg,ss)<0&&(at.prototype[ss]=function(e){return function(){return e.apply(this.doc,arguments)}}(Kt.prototype[ss]));return Sr(Kt),at.inputStyles={textarea:pt,contenteditable:Qe},at.defineMode=function(e){!at.defaults.mode&&e!="null"&&(at.defaults.mode=e),Eo.apply(this,arguments)},at.defineMIME=Fr,at.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),at.defineMIME("text/plain","null"),at.defineExtension=function(e,t){at.prototype[e]=t},at.defineDocExtension=function(e,t){Kt.prototype[e]=t},at.fromTextArea=gg,vg(at),at.version="5.65.2",at})})(Yr);var Qy=Yr.exports,Vd={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineMode("javascript",function(u,f){var d=u.indentUnit,v=f.statementIndent,b=f.jsonld,y=f.json||b,x=f.trackScope!==!1,S=f.typescript,T=f.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function m(Rt){return{type:Rt,style:"keyword"}}var P=m("keyword a"),X=m("keyword b"),le=m("keyword c"),De=m("keyword d"),$e=m("operator"),xe={type:"atom",style:"atom"};return{if:m("if"),while:P,with:P,else:X,do:X,try:X,finally:X,return:De,break:De,continue:De,new:m("new"),delete:le,void:le,throw:le,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:$e,typeof:$e,instanceof:$e,true:xe,false:xe,null:xe,undefined:xe,NaN:xe,Infinity:xe,this:m("this"),class:m("class"),super:m("atom"),yield:le,export:m("export"),import:m("import"),extends:le,await:le}}(),A=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function re(m){for(var P=!1,X,le=!1;(X=m.next())!=null;){if(!P){if(X=="/"&&!le)return;X=="["?le=!0:le&&X=="]"&&(le=!1)}P=!P&&X=="\\"}}var V,N;function D(m,P,X){return V=m,N=X,P}function I(m,P){var X=m.next();if(X=='"'||X=="'")return P.tokenize=B(X),P.tokenize(m,P);if(X=="."&&m.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(X=="."&&m.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(X))return D(X);if(X=="="&&m.eat(">"))return D("=>","operator");if(X=="0"&&m.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(X))return m.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(X=="/")return m.eat("*")?(P.tokenize=oe,oe(m,P)):m.eat("/")?(m.skipToEnd(),D("comment","comment")):ie(m,P,1)?(re(m),m.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(m.eat("="),D("operator","operator",m.current()));if(X=="`")return P.tokenize=pe,pe(m,P);if(X=="#"&&m.peek()=="!")return m.skipToEnd(),D("meta","meta");if(X=="#"&&m.eatWhile(T))return D("variable","property");if(X=="<"&&m.match("!--")||X=="-"&&m.match("->")&&!/\S/.test(m.string.slice(0,m.start)))return m.skipToEnd(),D("comment","comment");if(A.test(X))return(X!=">"||!P.lexical||P.lexical.type!=">")&&(m.eat("=")?(X=="!"||X=="=")&&m.eat("="):/[<>*+\-|&?]/.test(X)&&(m.eat(X),X==">"&&m.eat(X))),X=="?"&&m.eat(".")?D("."):D("operator","operator",m.current());if(T.test(X)){m.eatWhile(T);var le=m.current();if(P.lastType!="."){if(O.propertyIsEnumerable(le)){var De=O[le];return D(De.type,De.style,le)}if(le=="async"&&m.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",le)}return D("variable","variable",le)}}function B(m){return function(P,X){var le=!1,De;if(b&&P.peek()=="@"&&P.match(H))return X.tokenize=I,D("jsonld-keyword","meta");for(;(De=P.next())!=null&&!(De==m&&!le);)le=!le&&De=="\\";return le||(X.tokenize=I),D("string","string")}}function oe(m,P){for(var X=!1,le;le=m.next();){if(le=="/"&&X){P.tokenize=I;break}X=le=="*"}return D("comment","comment")}function pe(m,P){for(var X=!1,le;(le=m.next())!=null;){if(!X&&(le=="`"||le=="$"&&m.eat("{"))){P.tokenize=I;break}X=!X&&le=="\\"}return D("quasi","string-2",m.current())}var ye="([{}])";function We(m,P){P.fatArrowAt&&(P.fatArrowAt=null);var X=m.string.indexOf("=>",m.start);if(!(X<0)){if(S){var le=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(m.string.slice(m.start,X));le&&(X=le.index)}for(var De=0,$e=!1,xe=X-1;xe>=0;--xe){var Rt=m.string.charAt(xe),sr=ye.indexOf(Rt);if(sr>=0&&sr<3){if(!De){++xe;break}if(--De==0){Rt=="("&&($e=!0);break}}else if(sr>=3&&sr<6)++De;else if(T.test(Rt))$e=!0;else if(/["'\/`]/.test(Rt))for(;;--xe){if(xe==0)return;var jn=m.string.charAt(xe-1);if(jn==Rt&&m.string.charAt(xe-2)!="\\"){xe--;break}}else if($e&&!De){++xe;break}}$e&&!De&&(P.fatArrowAt=xe)}}var Ee={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function be(m,P,X,le,De,$e){this.indented=m,this.column=P,this.type=X,this.prev=De,this.info=$e,le!=null&&(this.align=le)}function de(m,P){if(!x)return!1;for(var X=m.localVars;X;X=X.next)if(X.name==P)return!0;for(var le=m.context;le;le=le.prev)for(var X=le.vars;X;X=X.next)if(X.name==P)return!0}function Ne(m,P,X,le,De){var $e=m.cc;for(j.state=m,j.stream=De,j.marked=null,j.cc=$e,j.style=P,m.lexical.hasOwnProperty("align")||(m.lexical.align=!0);;){var xe=$e.length?$e.pop():y?ge:Ce;if(xe(X,le)){for(;$e.length&&$e[$e.length-1].lex;)$e.pop()();return j.marked?j.marked:X=="variable"&&de(m,le)?"variable-2":P}}}var j={state:null,column:null,marked:null,cc:null};function $(){for(var m=arguments.length-1;m>=0;m--)j.cc.push(arguments[m])}function w(){return $.apply(null,arguments),!0}function ee(m,P){for(var X=P;X;X=X.next)if(X.name==m)return!0;return!1}function Y(m){var P=j.state;if(j.marked="def",!!x){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var X=ue(m,P.context);if(X!=null){P.context=X;return}}else if(!ee(m,P.localVars)){P.localVars=new nt(m,P.localVars);return}}f.globalVars&&!ee(m,P.globalVars)&&(P.globalVars=new nt(m,P.globalVars))}}function ue(m,P){if(P)if(P.block){var X=ue(m,P.prev);return X?X==P.prev?P:new Ge(X,P.vars,!0):null}else return ee(m,P.vars)?P:new Ge(P.prev,new nt(m,P.vars),!1);else return null}function ze(m){return m=="public"||m=="private"||m=="protected"||m=="abstract"||m=="readonly"}function Ge(m,P,X){this.prev=m,this.vars=P,this.block=X}function nt(m,P){this.name=m,this.next=P}var lt=new nt("this",new nt("arguments",null));function Ie(){j.state.context=new Ge(j.state.context,j.state.localVars,!1),j.state.localVars=lt}function Je(){j.state.context=new Ge(j.state.context,j.state.localVars,!0),j.state.localVars=null}Ie.lex=Je.lex=!0;function q(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}q.lex=!0;function Z(m,P){var X=function(){var le=j.state,De=le.indented;if(le.lexical.type=="stat")De=le.lexical.indented;else for(var $e=le.lexical;$e&&$e.type==")"&&$e.align;$e=$e.prev)De=$e.indented;le.lexical=new be(De,j.stream.column(),m,null,le.lexical,P)};return X.lex=!0,X}function K(){var m=j.state;m.lexical.prev&&(m.lexical.type==")"&&(m.indented=m.lexical.indented),m.lexical=m.lexical.prev)}K.lex=!0;function se(m){function P(X){return X==m?w():m==";"||X=="}"||X==")"||X=="]"?$():w(P)}return P}function Ce(m,P){return m=="var"?w(Z("vardef",P),Ti,se(";"),K):m=="keyword a"?w(Z("form"),_,Ce,K):m=="keyword b"?w(Z("form"),Ce,K):m=="keyword d"?j.stream.match(/^\s*$/,!1)?w():w(Z("stat"),F,se(";"),K):m=="debugger"?w(se(";")):m=="{"?w(Z("}"),Je,vt,K,q):m==";"?w():m=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==K&&j.state.cc.pop()(),w(Z("form"),_,Ce,K,Oo)):m=="function"?w(dr):m=="for"?w(Z("form"),Je,Mo,Ce,q,K):m=="class"||S&&P=="interface"?(j.marked="keyword",w(Z("form",m=="class"?m:P),Bn,K)):m=="variable"?S&&P=="declare"?(j.marked="keyword",w(Ce)):S&&(P=="module"||P=="enum"||P=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",P=="enum"?w(Tr):P=="type"?w(Eo,se("operator"),Oe,se(";")):w(Z("form"),jt,se("{"),Z("}"),vt,K,K)):S&&P=="namespace"?(j.marked="keyword",w(Z("form"),ge,Ce,K)):S&&P=="abstract"?(j.marked="keyword",w(Ce)):w(Z("stat"),he):m=="switch"?w(Z("form"),_,se("{"),Z("}","switch"),Je,vt,K,K,q):m=="case"?w(ge,se(":")):m=="default"?w(se(":")):m=="catch"?w(Z("form"),Ie,Se,Ce,K,q):m=="export"?w(Z("stat"),Mi,K):m=="import"?w(Z("stat"),dt,K):m=="async"?w(Ce):P=="@"?w(ge,Ce):$(Z("stat"),ge,se(";"),K)}function Se(m){if(m=="(")return w(Fr,se(")"))}function ge(m,P){return E(m,P,!1)}function Te(m,P){return E(m,P,!0)}function _(m){return m!="("?$():w(Z(")"),F,se(")"),K)}function E(m,P,X){if(j.state.fatArrowAt==j.stream.start){var le=X?te:ce;if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,se("=>"),le,q);if(m=="variable")return $(Ie,jt,se("=>"),le,q)}var De=X?J:G;return Ee.hasOwnProperty(m)?w(De):m=="function"?w(dr,De):m=="class"||S&&P=="interface"?(j.marked="keyword",w(Z("form"),Wn,K)):m=="keyword c"||m=="async"?w(X?Te:ge):m=="("?w(Z(")"),F,se(")"),K,De):m=="operator"||m=="spread"?w(X?Te:ge):m=="["?w(Z("]"),Xe,K,De):m=="{"?xt(Be,"}",null,De):m=="quasi"?$(ne,De):m=="new"?w(L(X)):w()}function F(m){return m.match(/[;\}\)\],]/)?$():$(ge)}function G(m,P){return m==","?w(F):J(m,P,!1)}function J(m,P,X){var le=X==!1?G:J,De=X==!1?ge:Te;if(m=="=>")return w(Ie,X?te:ce,q);if(m=="operator")return/\+\+|--/.test(P)||S&&P=="!"?w(le):S&&P=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(Z(">"),He(Oe,">"),K,le):P=="?"?w(ge,se(":"),De):w(De);if(m=="quasi")return $(ne,le);if(m!=";"){if(m=="(")return xt(Te,")","call",le);if(m==".")return w(Le,le);if(m=="[")return w(Z("]"),F,se("]"),K,le);if(S&&P=="as")return j.marked="keyword",w(Oe,le);if(m=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),w(De)}}function ne(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?w(ne):w(F,fe)}function fe(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,w(ne)}function ce(m){return We(j.stream,j.state),$(m=="{"?Ce:ge)}function te(m){return We(j.stream,j.state),$(m=="{"?Ce:Te)}function L(m){return function(P){return P=="."?w(m?z:W):P=="variable"&&S?w(bn,m?J:G):$(m?Te:ge)}}function W(m,P){if(P=="target")return j.marked="keyword",w(G)}function z(m,P){if(P=="target")return j.marked="keyword",w(J)}function he(m){return m==":"?w(K,Ce):$(G,se(";"),K)}function Le(m){if(m=="variable")return j.marked="property",w()}function Be(m,P){if(m=="async")return j.marked="property",w(Be);if(m=="variable"||j.style=="keyword"){if(j.marked="property",P=="get"||P=="set")return w(tt);var X;return S&&j.state.fatArrowAt==j.stream.start&&(X=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+X[0].length),w(Ke)}else{if(m=="number"||m=="string")return j.marked=b?"property":j.style+" property",w(Ke);if(m=="jsonld-keyword")return w(Ke);if(S&&ze(P))return j.marked="keyword",w(Be);if(m=="[")return w(ge,cr,se("]"),Ke);if(m=="spread")return w(Te,Ke);if(P=="*")return j.marked="keyword",w(Be);if(m==":")return $(Ke)}}function tt(m){return m!="variable"?$(Ke):(j.marked="property",w(dr))}function Ke(m){if(m==":")return w(Te);if(m=="(")return $(dr)}function He(m,P,X){function le(De,$e){if(X?X.indexOf(De)>-1:De==","){var xe=j.state.lexical;return xe.info=="call"&&(xe.pos=(xe.pos||0)+1),w(function(Rt,sr){return Rt==P||sr==P?$():$(m)},le)}return De==P||$e==P?w():X&&X.indexOf(";")>-1?$(m):w(se(P))}return function(De,$e){return De==P||$e==P?w():$(m,le)}}function xt(m,P,X){for(var le=3;le<arguments.length;le++)j.cc.push(arguments[le]);return w(Z(P,X),He(m,P),K)}function vt(m){return m=="}"?w():$(Ce,vt)}function cr(m,P){if(S){if(m==":")return w(Oe);if(P=="?")return w(cr)}}function Pe(m,P){if(S&&(m==":"||P=="in"))return w(Oe)}function Dr(m){if(S&&m==":")return j.stream.match(/^\s*\w+\s+is\b/,!1)?w(ge,et,Oe):w(Oe)}function et(m,P){if(P=="is")return j.marked="keyword",w()}function Oe(m,P){if(P=="keyof"||P=="typeof"||P=="infer"||P=="readonly")return j.marked="keyword",w(P=="typeof"?Te:Oe);if(m=="variable"||P=="void")return j.marked="type",w(nr);if(P=="|"||P=="&")return w(Oe);if(m=="string"||m=="number"||m=="atom")return w(nr);if(m=="[")return w(Z("]"),He(Oe,"]",","),K,nr);if(m=="{")return w(Z("}"),In,K,nr);if(m=="(")return w(He(Hn,")"),ut,nr);if(m=="<")return w(He(Oe,">"),Oe);if(m=="quasi")return $(Sr,nr)}function ut(m){if(m=="=>")return w(Oe)}function In(m){return m.match(/[\}\)\]]/)?w():m==","||m==";"?w(In):$(Pt,In)}function Pt(m,P){if(m=="variable"||j.style=="keyword")return j.marked="property",w(Pt);if(P=="?"||m=="number"||m=="string")return w(Pt);if(m==":")return w(Oe);if(m=="[")return w(se("variable"),Pe,se("]"),Pt);if(m=="(")return $(ir,Pt);if(!m.match(/[;\}\)\],]/))return w()}function Sr(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?w(Sr):w(Oe,zt)}function zt(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,w(Sr)}function Hn(m,P){return m=="variable"&&j.stream.match(/^\s*[?:]/,!1)||P=="?"?w(Hn):m==":"?w(Oe):m=="spread"?w(Hn):$(Oe)}function nr(m,P){if(P=="<")return w(Z(">"),He(Oe,">"),K,nr);if(P=="|"||m=="."||P=="&")return w(Oe);if(m=="[")return w(Oe,se("]"),nr);if(P=="extends"||P=="implements")return j.marked="keyword",w(Oe);if(P=="?")return w(Oe,se(":"),Oe)}function bn(m,P){if(P=="<")return w(Z(">"),He(Oe,">"),K,nr)}function Xr(){return $(Oe,Lo)}function Lo(m,P){if(P=="=")return w(Oe)}function Ti(m,P){return P=="enum"?(j.marked="keyword",w(Tr)):$(jt,cr,Cr,Pi)}function jt(m,P){if(S&&ze(P))return j.marked="keyword",w(jt);if(m=="variable")return Y(P),w();if(m=="spread")return w(jt);if(m=="[")return xt(Li,"]");if(m=="{")return xt(Po,"}")}function Po(m,P){return m=="variable"&&!j.stream.match(/^\s*:/,!1)?(Y(P),w(Cr)):(m=="variable"&&(j.marked="property"),m=="spread"?w(jt):m=="}"?$():m=="["?w(ge,se("]"),se(":"),Po):w(se(":"),jt,Cr))}function Li(){return $(jt,Cr)}function Cr(m,P){if(P=="=")return w(Te)}function Pi(m){if(m==",")return w(Ti)}function Oo(m,P){if(m=="keyword b"&&P=="else")return w(Z("form","else"),Ce,K)}function Mo(m,P){if(P=="await")return w(Mo);if(m=="(")return w(Z(")"),Oi,K)}function Oi(m){return m=="var"?w(Ti,Zr):m=="variable"?w(Zr):$(Zr)}function Zr(m,P){return m==")"?w():m==";"?w(Zr):P=="in"||P=="of"?(j.marked="keyword",w(ge,Zr)):$(ge,Zr)}function dr(m,P){if(P=="*")return j.marked="keyword",w(dr);if(m=="variable")return Y(P),w(dr);if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,Dr,Ce,q);if(S&&P=="<")return w(Z(">"),He(Xr,">"),K,dr)}function ir(m,P){if(P=="*")return j.marked="keyword",w(ir);if(m=="variable")return Y(P),w(ir);if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,Dr,q);if(S&&P=="<")return w(Z(">"),He(Xr,">"),K,ir)}function Eo(m,P){if(m=="keyword"||m=="variable")return j.marked="type",w(Eo);if(P=="<")return w(Z(">"),He(Xr,">"),K)}function Fr(m,P){return P=="@"&&w(ge,Fr),m=="spread"?w(Fr):S&&ze(P)?(j.marked="keyword",w(Fr)):S&&m=="this"?w(cr,Cr):$(jt,cr,Cr)}function Wn(m,P){return m=="variable"?Bn(m,P):hr(m,P)}function Bn(m,P){if(m=="variable")return Y(P),w(hr)}function hr(m,P){if(P=="<")return w(Z(">"),He(Xr,">"),K,hr);if(P=="extends"||P=="implements"||S&&m==",")return P=="implements"&&(j.marked="keyword"),w(S?Oe:ge,hr);if(m=="{")return w(Z("}"),pr,K)}function pr(m,P){if(m=="async"||m=="variable"&&(P=="static"||P=="get"||P=="set"||S&&ze(P))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return j.marked="keyword",w(pr);if(m=="variable"||j.style=="keyword")return j.marked="property",w(or,pr);if(m=="number"||m=="string")return w(or,pr);if(m=="[")return w(ge,cr,se("]"),or,pr);if(P=="*")return j.marked="keyword",w(pr);if(S&&m=="(")return $(ir,pr);if(m==";"||m==",")return w(pr);if(m=="}")return w();if(P=="@")return w(ge,pr)}function or(m,P){if(P=="!"||P=="?")return w(or);if(m==":")return w(Oe,Cr);if(P=="=")return w(Te);var X=j.state.lexical.prev,le=X&&X.info=="interface";return $(le?ir:dr)}function Mi(m,P){return P=="*"?(j.marked="keyword",w(Jt,se(";"))):P=="default"?(j.marked="keyword",w(ge,se(";"))):m=="{"?w(He(Ei,"}"),Jt,se(";")):$(Ce)}function Ei(m,P){if(P=="as")return j.marked="keyword",w(se("variable"));if(m=="variable")return $(Te,Ei)}function dt(m){return m=="string"?w():m=="("?$(ge):m=="."?$(G):$(_e,_r,Jt)}function _e(m,P){return m=="{"?xt(_e,"}"):(m=="variable"&&Y(P),P=="*"&&(j.marked="keyword"),w(Ai))}function _r(m){if(m==",")return w(_e,_r)}function Ai(m,P){if(P=="as")return j.marked="keyword",w(_e)}function Jt(m,P){if(P=="from")return j.marked="keyword",w(ge)}function Xe(m){return m=="]"?w():$(He(Te,"]"))}function Tr(){return $(Z("form"),jt,se("{"),Z("}"),He(wn,"}"),K,K)}function wn(){return $(jt,Cr)}function Ni(m,P){return m.lastType=="operator"||m.lastType==","||A.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function ie(m,P,X){return P.tokenize==I&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(m.string.slice(0,m.pos-(X||0)))}return{startState:function(m){var P={tokenize:I,lastType:"sof",cc:[],lexical:new be((m||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new Ge(null,null,!1),indented:m||0};return f.globalVars&&typeof f.globalVars=="object"&&(P.globalVars=f.globalVars),P},token:function(m,P){if(m.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=m.indentation(),We(m,P)),P.tokenize!=oe&&m.eatSpace())return null;var X=P.tokenize(m,P);return V=="comment"?X:(P.lastType=V=="operator"&&(N=="++"||N=="--")?"incdec":V,Ne(P,X,V,N,m))},indent:function(m,P){if(m.tokenize==oe||m.tokenize==pe)return l.Pass;if(m.tokenize!=I)return 0;var X=P&&P.charAt(0),le=m.lexical,De;if(!/^\s*else\b/.test(P))for(var $e=m.cc.length-1;$e>=0;--$e){var xe=m.cc[$e];if(xe==K)le=le.prev;else if(xe!=Oo&&xe!=q)break}for(;(le.type=="stat"||le.type=="form")&&(X=="}"||(De=m.cc[m.cc.length-1])&&(De==G||De==J)&&!/^[,\.=+\-*:?[\(]/.test(P));)le=le.prev;v&&le.type==")"&&le.prev.type=="stat"&&(le=le.prev);var Rt=le.type,sr=X==Rt;return Rt=="vardef"?le.indented+(m.lastType=="operator"||m.lastType==","?le.info.length+1:0):Rt=="form"&&X=="{"?le.indented:Rt=="form"?le.indented+d:Rt=="stat"?le.indented+(Ni(m,P)?v||d:0):le.info=="switch"&&!sr&&f.doubleIndentSwitch!=!1?le.indented+(/^(?:case|default)\b/.test(P)?d:2*d):le.align?le.column+(sr?0:1):le.indented+(sr?0:d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:y?null:"/*",blockCommentEnd:y?null:"*/",blockCommentContinue:y?null:" * ",lineComment:y?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:y?"json":"javascript",jsonldMode:b,jsonMode:y,expressionAllowed:ie,skipExpression:function(m){Ne(m,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Vy={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineMode("css",function(be,de){var Ne=de.inline;de.propertyKeywords||(de=l.resolveMode("text/css"));var j=be.indentUnit,$=de.tokenHooks,w=de.documentTypes||{},ee=de.mediaTypes||{},Y=de.mediaFeatures||{},ue=de.mediaValueKeywords||{},ze=de.propertyKeywords||{},Ge=de.nonStandardPropertyKeywords||{},nt=de.fontProperties||{},lt=de.counterDescriptors||{},Ie=de.colorKeywords||{},Je=de.valueKeywords||{},q=de.allowNested,Z=de.lineComment,K=de.supportsAtComponent===!0,se=be.highlightNonStandardPropertyKeywords!==!1,Ce,Se;function ge(L,W){return Ce=W,L}function Te(L,W){var z=L.next();if($[z]){var he=$[z](L,W);if(he!==!1)return he}if(z=="@")return L.eatWhile(/[\w\\\-]/),ge("def",L.current());if(z=="="||(z=="~"||z=="|")&&L.eat("="))return ge(null,"compare");if(z=='"'||z=="'")return W.tokenize=_(z),W.tokenize(L,W);if(z=="#")return L.eatWhile(/[\w\\\-]/),ge("atom","hash");if(z=="!")return L.match(/^\s*\w*/),ge("keyword","important");if(/\d/.test(z)||z=="."&&L.eat(/\d/))return L.eatWhile(/[\w.%]/),ge("number","unit");if(z==="-"){if(/[\d.]/.test(L.peek()))return L.eatWhile(/[\w.%]/),ge("number","unit");if(L.match(/^-[\w\\\-]*/))return L.eatWhile(/[\w\\\-]/),L.match(/^\s*:/,!1)?ge("variable-2","variable-definition"):ge("variable-2","variable");if(L.match(/^\w+-/))return ge("meta","meta")}else return/[,+>*\/]/.test(z)?ge(null,"select-op"):z=="."&&L.match(/^-?[_a-z][_a-z0-9-]*/i)?ge("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(z)?ge(null,z):L.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(L.current())&&(W.tokenize=E),ge("variable callee","variable")):/[\w\\\-]/.test(z)?(L.eatWhile(/[\w\\\-]/),ge("property","word")):ge(null,null)}function _(L){return function(W,z){for(var he=!1,Le;(Le=W.next())!=null;){if(Le==L&&!he){L==")"&&W.backUp(1);break}he=!he&&Le=="\\"}return(Le==L||!he&&L!=")")&&(z.tokenize=null),ge("string","string")}}function E(L,W){return L.next(),L.match(/^\s*[\"\')]/,!1)?W.tokenize=null:W.tokenize=_(")"),ge(null,"(")}function F(L,W,z){this.type=L,this.indent=W,this.prev=z}function G(L,W,z,he){return L.context=new F(z,W.indentation()+(he===!1?0:j),L.context),z}function J(L){return L.context.prev&&(L.context=L.context.prev),L.context.type}function ne(L,W,z){return te[z.context.type](L,W,z)}function fe(L,W,z,he){for(var Le=he||1;Le>0;Le--)z.context=z.context.prev;return ne(L,W,z)}function ce(L){var W=L.current().toLowerCase();Je.hasOwnProperty(W)?Se="atom":Ie.hasOwnProperty(W)?Se="keyword":Se="variable"}var te={};return te.top=function(L,W,z){if(L=="{")return G(z,W,"block");if(L=="}"&&z.context.prev)return J(z);if(K&&/@component/i.test(L))return G(z,W,"atComponentBlock");if(/^@(-moz-)?document$/i.test(L))return G(z,W,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(L))return G(z,W,"atBlock");if(/^@(font-face|counter-style)/i.test(L))return z.stateArg=L,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(L))return"keyframes";if(L&&L.charAt(0)=="@")return G(z,W,"at");if(L=="hash")Se="builtin";else if(L=="word")Se="tag";else{if(L=="variable-definition")return"maybeprop";if(L=="interpolation")return G(z,W,"interpolation");if(L==":")return"pseudo";if(q&&L=="(")return G(z,W,"parens")}return z.context.type},te.block=function(L,W,z){if(L=="word"){var he=W.current().toLowerCase();return ze.hasOwnProperty(he)?(Se="property","maybeprop"):Ge.hasOwnProperty(he)?(Se=se?"string-2":"property","maybeprop"):q?(Se=W.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Se+=" error","maybeprop")}else return L=="meta"?"block":!q&&(L=="hash"||L=="qualifier")?(Se="error","block"):te.top(L,W,z)},te.maybeprop=function(L,W,z){return L==":"?G(z,W,"prop"):ne(L,W,z)},te.prop=function(L,W,z){if(L==";")return J(z);if(L=="{"&&q)return G(z,W,"propBlock");if(L=="}"||L=="{")return fe(L,W,z);if(L=="(")return G(z,W,"parens");if(L=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(W.current()))Se+=" error";else if(L=="word")ce(W);else if(L=="interpolation")return G(z,W,"interpolation");return"prop"},te.propBlock=function(L,W,z){return L=="}"?J(z):L=="word"?(Se="property","maybeprop"):z.context.type},te.parens=function(L,W,z){return L=="{"||L=="}"?fe(L,W,z):L==")"?J(z):L=="("?G(z,W,"parens"):L=="interpolation"?G(z,W,"interpolation"):(L=="word"&&ce(W),"parens")},te.pseudo=function(L,W,z){return L=="meta"?"pseudo":L=="word"?(Se="variable-3",z.context.type):ne(L,W,z)},te.documentTypes=function(L,W,z){return L=="word"&&w.hasOwnProperty(W.current())?(Se="tag",z.context.type):te.atBlock(L,W,z)},te.atBlock=function(L,W,z){if(L=="(")return G(z,W,"atBlock_parens");if(L=="}"||L==";")return fe(L,W,z);if(L=="{")return J(z)&&G(z,W,q?"block":"top");if(L=="interpolation")return G(z,W,"interpolation");if(L=="word"){var he=W.current().toLowerCase();he=="only"||he=="not"||he=="and"||he=="or"?Se="keyword":ee.hasOwnProperty(he)?Se="attribute":Y.hasOwnProperty(he)?Se="property":ue.hasOwnProperty(he)?Se="keyword":ze.hasOwnProperty(he)?Se="property":Ge.hasOwnProperty(he)?Se=se?"string-2":"property":Je.hasOwnProperty(he)?Se="atom":Ie.hasOwnProperty(he)?Se="keyword":Se="error"}return z.context.type},te.atComponentBlock=function(L,W,z){return L=="}"?fe(L,W,z):L=="{"?J(z)&&G(z,W,q?"block":"top",!1):(L=="word"&&(Se="error"),z.context.type)},te.atBlock_parens=function(L,W,z){return L==")"?J(z):L=="{"||L=="}"?fe(L,W,z,2):te.atBlock(L,W,z)},te.restricted_atBlock_before=function(L,W,z){return L=="{"?G(z,W,"restricted_atBlock"):L=="word"&&z.stateArg=="@counter-style"?(Se="variable","restricted_atBlock_before"):ne(L,W,z)},te.restricted_atBlock=function(L,W,z){return L=="}"?(z.stateArg=null,J(z)):L=="word"?(z.stateArg=="@font-face"&&!nt.hasOwnProperty(W.current().toLowerCase())||z.stateArg=="@counter-style"&&!lt.hasOwnProperty(W.current().toLowerCase())?Se="error":Se="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(L,W,z){return L=="word"?(Se="variable","keyframes"):L=="{"?G(z,W,"top"):ne(L,W,z)},te.at=function(L,W,z){return L==";"?J(z):L=="{"||L=="}"?fe(L,W,z):(L=="word"?Se="tag":L=="hash"&&(Se="builtin"),"at")},te.interpolation=function(L,W,z){return L=="}"?J(z):L=="{"||L==";"?fe(L,W,z):(L=="word"?Se="variable":L!="variable"&&L!="("&&L!=")"&&(Se="error"),"interpolation")},{startState:function(L){return{tokenize:null,state:Ne?"block":"top",stateArg:null,context:new F(Ne?"block":"top",L||0,null)}},token:function(L,W){if(!W.tokenize&&L.eatSpace())return null;var z=(W.tokenize||Te)(L,W);return z&&typeof z=="object"&&(Ce=z[1],z=z[0]),Se=z,Ce!="comment"&&(W.state=te[W.state](Ce,L,W)),Se},indent:function(L,W){var z=L.context,he=W&&W.charAt(0),Le=z.indent;return z.type=="prop"&&(he=="}"||he==")")&&(z=z.prev),z.prev&&(he=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="restricted_atBlock")?(z=z.prev,Le=z.indent):(he==")"&&(z.type=="parens"||z.type=="atBlock_parens")||he=="{"&&(z.type=="at"||z.type=="atBlock"))&&(Le=Math.max(0,z.indent-j))),Le},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Z,fold:"brace"}});function u(be){for(var de={},Ne=0;Ne<be.length;++Ne)de[be[Ne].toLowerCase()]=!0;return de}var f=["domain","regexp","url","url-prefix"],d=u(f),v=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(v),y=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],x=u(y),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],T=u(S),O=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],A=u(O),H=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],re=u(H),V=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],N=u(V),D=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],I=u(D),B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],oe=u(B),pe=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ye=u(pe),We=f.concat(v).concat(y).concat(S).concat(O).concat(H).concat(B).concat(pe);l.registerHelper("hintWords","css",We);function Ee(be,de){for(var Ne=!1,j;(j=be.next())!=null;){if(Ne&&j=="/"){de.tokenize=null;break}Ne=j=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:d,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,fontProperties:N,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ee,Ee(be,de)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ee,Ee(be,de)):["operator","operator"]},":":function(be){return be.match(/^\s*\{/,!1)?[null,null]:!1},$:function(be){return be.match(/^[\w-]+/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(be){return be.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ee,Ee(be,de)):["operator","operator"]},"@":function(be){return be.eat("{")?[null,"interpolation"]:be.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(be.eatWhile(/[\w\\\-]/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:d,mediaTypes:b,mediaFeatures:x,propertyKeywords:A,nonStandardPropertyKeywords:re,fontProperties:N,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,supportsAtComponent:!0,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ee,Ee(be,de)):!1}},name:"css",helperType:"gss"})})})();var eh={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},f={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(d,v){var b=d.indentUnit,y={},x=v.htmlMode?u:f;for(var S in x)y[S]=x[S];for(var S in v)y[S]=v[S];var T,O;function A(w,ee){function Y(Ge){return ee.tokenize=Ge,Ge(w,ee)}var ue=w.next();if(ue=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?Y(V("atom","]]>")):null:w.match("--")?Y(V("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),Y(N(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),ee.tokenize=V("meta","?>"),"meta"):(T=w.eat("/")?"closeTag":"openTag",ee.tokenize=H,"tag bracket");if(ue=="&"){var ze;return w.eat("#")?w.eat("x")?ze=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):ze=w.eatWhile(/[\d]/)&&w.eat(";"):ze=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),ze?"atom":"error"}else return w.eatWhile(/[^&<]/),null}A.isInText=!0;function H(w,ee){var Y=w.next();if(Y==">"||Y=="/"&&w.eat(">"))return ee.tokenize=A,T=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return T="equals",null;if(Y=="<"){ee.tokenize=A,ee.state=pe,ee.tagName=ee.tagStart=null;var ue=ee.tokenize(w,ee);return ue?ue+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(ee.tokenize=re(Y),ee.stringStartCol=w.column(),ee.tokenize(w,ee)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(w){var ee=function(Y,ue){for(;!Y.eol();)if(Y.next()==w){ue.tokenize=H;break}return"string"};return ee.isInAttribute=!0,ee}function V(w,ee){return function(Y,ue){for(;!Y.eol();){if(Y.match(ee)){ue.tokenize=A;break}Y.next()}return w}}function N(w){return function(ee,Y){for(var ue;(ue=ee.next())!=null;){if(ue=="<")return Y.tokenize=N(w+1),Y.tokenize(ee,Y);if(ue==">")if(w==1){Y.tokenize=A;break}else return Y.tokenize=N(w-1),Y.tokenize(ee,Y)}return"meta"}}function D(w){return w&&w.toLowerCase()}function I(w,ee,Y){this.prev=w.context,this.tagName=ee||"",this.indent=w.indented,this.startOfLine=Y,(y.doNotIndent.hasOwnProperty(ee)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function B(w){w.context&&(w.context=w.context.prev)}function oe(w,ee){for(var Y;;){if(!w.context||(Y=w.context.tagName,!y.contextGrabbers.hasOwnProperty(D(Y))||!y.contextGrabbers[D(Y)].hasOwnProperty(D(ee))))return;B(w)}}function pe(w,ee,Y){return w=="openTag"?(Y.tagStart=ee.column(),ye):w=="closeTag"?We:pe}function ye(w,ee,Y){return w=="word"?(Y.tagName=ee.current(),O="tag",de):y.allowMissingTagName&&w=="endTag"?(O="tag bracket",de(w,ee,Y)):(O="error",ye)}function We(w,ee,Y){if(w=="word"){var ue=ee.current();return Y.context&&Y.context.tagName!=ue&&y.implicitlyClosed.hasOwnProperty(D(Y.context.tagName))&&B(Y),Y.context&&Y.context.tagName==ue||y.matchClosing===!1?(O="tag",Ee):(O="tag error",be)}else return y.allowMissingTagName&&w=="endTag"?(O="tag bracket",Ee(w,ee,Y)):(O="error",be)}function Ee(w,ee,Y){return w!="endTag"?(O="error",Ee):(B(Y),pe)}function be(w,ee,Y){return O="error",Ee(w,ee,Y)}function de(w,ee,Y){if(w=="word")return O="attribute",Ne;if(w=="endTag"||w=="selfcloseTag"){var ue=Y.tagName,ze=Y.tagStart;return Y.tagName=Y.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(D(ue))?oe(Y,ue):(oe(Y,ue),Y.context=new I(Y,ue,ze==Y.indented)),pe}return O="error",de}function Ne(w,ee,Y){return w=="equals"?j:(y.allowMissing||(O="error"),de(w,ee,Y))}function j(w,ee,Y){return w=="string"?$:w=="word"&&y.allowUnquoted?(O="string",de):(O="error",de(w,ee,Y))}function $(w,ee,Y){return w=="string"?$:de(w,ee,Y)}return{startState:function(w){var ee={tokenize:A,state:pe,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(ee.baseIndent=w),ee},token:function(w,ee){if(!ee.tagName&&w.sol()&&(ee.indented=w.indentation()),w.eatSpace())return null;T=null;var Y=ee.tokenize(w,ee);return(Y||T)&&Y!="comment"&&(O=null,ee.state=ee.state(T||Y,w,ee),O&&(Y=O=="error"?Y+" error":O)),Y},indent:function(w,ee,Y){var ue=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(ue&&ue.noIndent)return l.Pass;if(w.tokenize!=H&&w.tokenize!=A)return Y?Y.match(/^(\s*)/)[0].length:0;if(w.tagName)return y.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(ee))return 0;var ze=ee&&/^<(\/)?([\w_:\.-]*)/.exec(ee);if(ze&&ze[1])for(;ue;)if(ue.tagName==ze[2]){ue=ue.prev;break}else if(y.implicitlyClosed.hasOwnProperty(D(ue.tagName)))ue=ue.prev;else break;else if(ze)for(;ue;){var Ge=y.contextGrabbers[D(ue.tagName)];if(Ge&&Ge.hasOwnProperty(D(ze[2])))ue=ue.prev;else break}for(;ue&&ue.prev&&!ue.startOfLine;)ue=ue.prev;return ue?ue.indent+b:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(w){w.state==j&&(w.state=de)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var ee=[],Y=w.context;Y;Y=Y.prev)ee.push(Y.tagName);return ee.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,s){(function(l){l(Yr.exports,eh.exports,Vd.exports,Vy.exports)})(function(l){var u={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(T,O,A){var H=T.current(),re=H.search(O);return re>-1?T.backUp(H.length-re):H.match(/<\/?$/)&&(T.backUp(H.length),T.match(O,!1)||T.match(H)),A}var d={};function v(T){var O=d[T];return O||(d[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(T,O){var A=T.match(v(O));return A?/^\s*(.*?)\s*$/.exec(A[2])[1]:""}function y(T,O){return new RegExp((O?"^":"")+"</\\s*"+T+"\\s*>","i")}function x(T,O){for(var A in T)for(var H=O[A]||(O[A]=[]),re=T[A],V=re.length-1;V>=0;V--)H.unshift(re[V])}function S(T,O){for(var A=0;A<T.length;A++){var H=T[A];if(!H[0]||H[1].test(b(O,H[0])))return H[2]}}l.defineMode("htmlmixed",function(T,O){var A=l.getMode(T,{name:"xml",htmlMode:!0,multilineTagIndentFactor:O.multilineTagIndentFactor,multilineTagIndentPastTag:O.multilineTagIndentPastTag,allowMissingTagName:O.allowMissingTagName}),H={},re=O&&O.tags,V=O&&O.scriptTypes;if(x(u,H),re&&x(re,H),V)for(var N=V.length-1;N>=0;N--)H.script.unshift(["type",V[N].matches,V[N].mode]);function D(I,B){var oe=A.token(I,B.htmlState),pe=/\btag\b/.test(oe),ye;if(pe&&!/[<>\s\/]/.test(I.current())&&(ye=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(ye))B.inTag=ye+" ";else if(B.inTag&&pe&&/>$/.test(I.current())){var We=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var Ee=I.current()==">"&&S(H[We[1]],We[2]),be=l.getMode(T,Ee),de=y(We[1],!0),Ne=y(We[1],!1);B.token=function(j,$){return j.match(de,!1)?($.token=D,$.localState=$.localMode=null,null):f(j,Ne,$.localMode.token(j,$.localState))},B.localMode=be,B.localState=l.startState(be,A.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=I.current(),I.eol()&&(B.inTag+=" "));return oe}return{startState:function(){var I=l.startState(A);return{token:D,inTag:null,localMode:null,localState:null,htmlState:I}},copyState:function(I){var B;return I.localState&&(B=l.copyState(I.localMode,I.localState)),{token:I.token,inTag:I.inTag,localMode:I.localMode,localState:B,htmlState:l.copyState(A,I.htmlState)}},token:function(I,B){return B.token(I,B)},indent:function(I,B,oe){return!I.localMode||/^\s*<\//.test(B)?A.indent(I.htmlState,B,oe):I.localMode.indent?I.localMode.indent(I.localState,B,oe):l.Pass},innerMode:function(I){return{state:I.localState||I.htmlState,mode:I.localMode||A}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(r,s){(function(l){l(Yr.exports,eh.exports,Vd.exports)})(function(l){function u(d,v,b,y){this.state=d,this.mode=v,this.depth=b,this.prev=y}function f(d){return new u(l.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&f(d.prev))}l.defineMode("jsx",function(d,v){var b=l.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=l.getMode(d,v&&v.base||"javascript");function x(A){var H=A.tagName;A.tagName=null;var re=b.indent(A,"","");return A.tagName=H,re}function S(A,H){return H.context.mode==b?T(A,H,H.context):O(A,H,H.context)}function T(A,H,re){if(re.depth==2)return A.match(/^.*?\*\//)?re.depth=1:A.skipToEnd(),"comment";if(A.peek()=="{"){b.skipAttribute(re.state);var V=x(re.state),N=re.state.context;if(N&&A.match(/^[^>]*>\s*$/,!1)){for(;N.prev&&!N.startOfLine;)N=N.prev;N.startOfLine?V-=d.indentUnit:re.prev.state.lexical&&(V=re.prev.state.lexical.indented)}else re.depth==1&&(V+=d.indentUnit);return H.context=new u(l.startState(y,V),y,0,H.context),null}if(re.depth==1){if(A.peek()=="<")return b.skipAttribute(re.state),H.context=new u(l.startState(b,x(re.state)),b,0,H.context),null;if(A.match("//"))return A.skipToEnd(),"comment";if(A.match("/*"))return re.depth=2,S(A,H)}var D=b.token(A,re.state),I=A.current(),B;return/\btag\b/.test(D)?/>$/.test(I)?re.state.context?re.depth=0:H.context=H.context.prev:/^</.test(I)&&(re.depth=1):!D&&(B=I.indexOf("{"))>-1&&A.backUp(I.length-B),D}function O(A,H,re){if(A.peek()=="<"&&y.expressionAllowed(A,re.state))return H.context=new u(l.startState(b,y.indent(re.state,"","")),b,0,H.context),y.skipExpression(re.state),null;var V=y.token(A,re.state);if(!V&&re.depth!=null){var N=A.current();N=="{"?re.depth++:N=="}"&&--re.depth==0&&(H.context=H.context.prev)}return V}return{startState:function(){return{context:new u(l.startState(y),y)}},copyState:function(A){return{context:f(A.context)}},token:S,indent:function(A,H,re){return A.context.mode.indent(A.context.state,H,re)},innerMode:function(A){return A.context}}},"xml","javascript"),l.defineMIME("text/jsx","jsx"),l.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineOption("placeholder","",function(x,S,T){var O=T&&T!=l.Init;if(S&&!O)x.on("blur",v),x.on("change",b),x.on("swapDoc",b),l.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){d(x)}),b(x);else if(!S&&O){x.off("blur",v),x.off("change",b),x.off("swapDoc",b),l.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var A=x.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}S&&!x.hasFocus()&&v(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function f(x){u(x);var S=x.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=x.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var T=x.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),S.appendChild(T),x.display.lineSpace.insertBefore(S,x.display.lineSpace.firstChild)}function d(x){setTimeout(function(){var S=!1;if(x.lineCount()==1){var T=x.getInputField();S=T.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}S?f(x):u(x)},20)}function v(x){y(x)&&f(x)}function b(x){var S=x.getWrapperElement(),T=y(x);S.className=S.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?f(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();(function(r,s){(function(l){l(Yr.exports)})(function(l){var u="CodeMirror-hint",f="CodeMirror-hint-active";l.showHint=function(N,D,I){if(!D)return N.showHint(I);I&&I.async&&(D.async=!0);var B={hint:D};if(I)for(var oe in I)B[oe]=I[oe];return N.showHint(B)},l.defineExtension("showHint",function(N){N=y(this,this.getCursor("start"),N);var D=this.listSelections();if(!(D.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var I=0;I<D.length;I++)if(D[I].head.line!=D[I].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new d(this,N);!B.options.hint||(l.signal(this,"startCompletion",this),B.update(!0))}}),l.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(N,D){if(this.cm=N,this.options=D,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var I=this;N.on("cursorActivity",this.activityFunc=function(){I.cursorActivity()})}}var v=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},b=window.cancelAnimationFrame||clearTimeout;d.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&l.signal(this.data,"close"),this.widget&&this.widget.close(),l.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,D){var I=N.list[D],B=this;this.cm.operation(function(){I.hint?I.hint(B.cm,N,I):B.cm.replaceRange(x(I),I.from||N.from,I.to||N.to,"complete"),l.signal(N,"pick",I),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(b(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var D=this.cm.getCursor(),I=this.cm.getLine(D.line);if(D.line!=this.startPos.line||I.length-D.ch!=this.startLen-this.startPos.ch||D.ch<N.ch||this.cm.somethingSelected()||!D.ch||this.options.closeCharacters.test(I.charAt(D.ch-1)))this.close();else{var B=this;this.debounce=v(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var D=this,I=++this.tick;H(this.options.hint,this.cm,this.options,function(B){D.tick==I&&D.finishUpdate(B,N)})}},finishUpdate:function(N,D){this.data&&l.signal(this.data,"update");var I=this.widget&&this.widget.picked||D&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(I&&N.list.length==1?this.pick(N,0):(this.widget=new O(this,N),l.signal(N,"shown")))}};function y(N,D,I){var B=N.options.hintOptions,oe={};for(var pe in V)oe[pe]=V[pe];if(B)for(var pe in B)B[pe]!==void 0&&(oe[pe]=B[pe]);if(I)for(var pe in I)I[pe]!==void 0&&(oe[pe]=I[pe]);return oe.hint.resolve&&(oe.hint=oe.hint.resolve(N,D)),oe}function x(N){return typeof N=="string"?N:N.text}function S(N,D){var I={Up:function(){D.moveFocus(-1)},Down:function(){D.moveFocus(1)},PageUp:function(){D.moveFocus(-D.menuSize()+1,!0)},PageDown:function(){D.moveFocus(D.menuSize()-1,!0)},Home:function(){D.setFocus(0)},End:function(){D.setFocus(D.length-1)},Enter:D.pick,Tab:D.pick,Esc:D.close},B=/Mac/.test(navigator.platform);B&&(I["Ctrl-P"]=function(){D.moveFocus(-1)},I["Ctrl-N"]=function(){D.moveFocus(1)});var oe=N.options.customKeys,pe=oe?{}:I;function ye(be,de){var Ne;typeof de!="string"?Ne=function(j){return de(j,D)}:I.hasOwnProperty(de)?Ne=I[de]:Ne=de,pe[be]=Ne}if(oe)for(var We in oe)oe.hasOwnProperty(We)&&ye(We,oe[We]);var Ee=N.options.extraKeys;if(Ee)for(var We in Ee)Ee.hasOwnProperty(We)&&ye(We,Ee[We]);return pe}function T(N,D){for(;D&&D!=N;){if(D.nodeName.toUpperCase()==="LI"&&D.parentNode==N)return D;D=D.parentNode}}function O(N,D){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=D,this.picked=!1;var I=this,B=N.cm,oe=B.getInputField().ownerDocument,pe=oe.defaultView||oe.parentWindow,ye=this.hints=oe.createElement("ul");ye.setAttribute("role","listbox"),ye.setAttribute("aria-expanded","true"),ye.id=this.id;var We=N.cm.options.theme;ye.className="CodeMirror-hints "+We,this.selectedHint=D.selectedHint||0;for(var Ee=D.list,be=0;be<Ee.length;++be){var de=ye.appendChild(oe.createElement("li")),Ne=Ee[be],j=u+(be!=this.selectedHint?"":" "+f);Ne.className!=null&&(j=Ne.className+" "+j),de.className=j,be==this.selectedHint&&de.setAttribute("aria-selected","true"),de.id=this.id+"-"+be,de.setAttribute("role","option"),Ne.render?Ne.render(de,D,Ne):de.appendChild(oe.createTextNode(Ne.displayText||x(Ne))),de.hintId=be}var $=N.options.container||oe.body,w=B.cursorCoords(N.options.alignWithWord?D.from:null),ee=w.left,Y=w.bottom,ue=!0,ze=0,Ge=0;if($!==oe.body){var nt=["absolute","relative","fixed"].indexOf(pe.getComputedStyle($).position)!==-1,lt=nt?$:$.offsetParent,Ie=lt.getBoundingClientRect(),Je=oe.body.getBoundingClientRect();ze=Ie.left-Je.left-lt.scrollLeft,Ge=Ie.top-Je.top-lt.scrollTop}ye.style.left=ee-ze+"px",ye.style.top=Y-Ge+"px";var q=pe.innerWidth||Math.max(oe.body.offsetWidth,oe.documentElement.offsetWidth),Z=pe.innerHeight||Math.max(oe.body.offsetHeight,oe.documentElement.offsetHeight);$.appendChild(ye),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var K=N.options.moveOnOverlap?ye.getBoundingClientRect():new DOMRect,se=N.options.paddingForScrollbar?ye.scrollHeight>ye.clientHeight+1:!1,Ce;setTimeout(function(){Ce=B.getScrollInfo()});var Se=K.bottom-Z;if(Se>0){var ge=K.bottom-K.top,Te=w.top-(w.bottom-K.top);if(Te-ge>0)ye.style.top=(Y=w.top-ge-Ge)+"px",ue=!1;else if(ge>Z){ye.style.height=Z-5+"px",ye.style.top=(Y=w.bottom-K.top-Ge)+"px";var _=B.getCursor();D.from.ch!=_.ch&&(w=B.cursorCoords(_),ye.style.left=(ee=w.left-ze)+"px",K=ye.getBoundingClientRect())}}var E=K.right-q;if(se&&(E+=B.display.nativeBarWidth),E>0&&(K.right-K.left>q&&(ye.style.width=q-5+"px",E-=K.right-K.left-q),ye.style.left=(ee=w.left-E-ze)+"px"),se)for(var F=ye.firstChild;F;F=F.nextSibling)F.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=S(N,{moveFocus:function(ne,fe){I.changeActive(I.selectedHint+ne,fe)},setFocus:function(ne){I.changeActive(ne)},menuSize:function(){return I.screenAmount()},length:Ee.length,close:function(){N.close()},pick:function(){I.pick()},data:D})),N.options.closeOnUnfocus){var G;B.on("blur",this.onBlur=function(){G=setTimeout(function(){N.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(G)})}B.on("scroll",this.onScroll=function(){var ne=B.getScrollInfo(),fe=B.getWrapperElement().getBoundingClientRect();Ce||(Ce=B.getScrollInfo());var ce=Y+Ce.top-ne.top,te=ce-(pe.pageYOffset||(oe.documentElement||oe.body).scrollTop);if(ue||(te+=ye.offsetHeight),te<=fe.top||te>=fe.bottom)return N.close();ye.style.top=ce+"px",ye.style.left=ee+Ce.left-ne.left+"px"}),l.on(ye,"dblclick",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),I.pick())}),l.on(ye,"click",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),N.options.completeOnSingleClick&&I.pick())}),l.on(ye,"mousedown",function(){setTimeout(function(){B.focus()},20)});var J=this.getSelectedHintRange();return(J.from!==0||J.to!==0)&&this.scrollToActive(),l.signal(D,"select",Ee[this.selectedHint],ye.childNodes[this.selectedHint]),!0}O.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var D=this.completion.cm;this.completion.options.closeOnUnfocus&&(D.off("blur",this.onBlur),D.off("focus",this.onFocus)),D.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,D){if(N>=this.data.list.length?N=D?this.data.list.length-1:0:N<0&&(N=D?0:this.data.list.length-1),this.selectedHint!=N){var I=this.hints.childNodes[this.selectedHint];I&&(I.className=I.className.replace(" "+f,""),I.removeAttribute("aria-selected")),I=this.hints.childNodes[this.selectedHint=N],I.className+=" "+f,I.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",I.id),this.scrollToActive(),l.signal(this.data,"select",this.data.list[this.selectedHint],I)}},scrollToActive:function(){var N=this.getSelectedHintRange(),D=this.hints.childNodes[N.from],I=this.hints.childNodes[N.to],B=this.hints.firstChild;D.offsetTop<this.hints.scrollTop?this.hints.scrollTop=D.offsetTop-B.offsetTop:I.offsetTop+I.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=I.offsetTop+I.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function A(N,D){if(!N.somethingSelected())return D;for(var I=[],B=0;B<D.length;B++)D[B].supportsSelection&&I.push(D[B]);return I}function H(N,D,I,B){if(N.async)N(D,B,I);else{var oe=N(D,I);oe&&oe.then?oe.then(B):B(oe)}}function re(N,D){var I=N.getHelpers(D,"hint"),B;if(I.length){var oe=function(pe,ye,We){var Ee=A(pe,I);function be(de){if(de==Ee.length)return ye(null);H(Ee[de],pe,We,function(Ne){Ne&&Ne.list.length>0?ye(Ne):be(de+1)})}be(0)};return oe.async=!0,oe.supportsSelection=!0,oe}else return(B=N.getHelper(N.getCursor(),"hintWords"))?function(pe){return l.hint.fromList(pe,{words:B})}:l.hint.anyword?function(pe,ye){return l.hint.anyword(pe,ye)}:function(){}}l.registerHelper("hint","auto",{resolve:re}),l.registerHelper("hint","fromList",function(N,D){var I=N.getCursor(),B=N.getTokenAt(I),oe,pe=l.Pos(I.line,B.start),ye=I;B.start<I.ch&&/\w/.test(B.string.charAt(I.ch-B.start-1))?oe=B.string.substr(0,I.ch-B.start):(oe="",pe=I);for(var We=[],Ee=0;Ee<D.words.length;Ee++){var be=D.words[Ee];be.slice(0,oe.length)==oe&&We.push(be)}if(We.length)return{list:We,from:pe,to:ye}}),l.commands.autocomplete=l.showHint;var V={hint:l.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};l.defineOption("hintOptions",null)})})();function e0(r,s,l={}){const u=Qy.fromTextArea(r.value,Il({theme:"vars"},Re(l)));It(l,d=>Object.entries(d).forEach(([v,b])=>u.setOption(v,b)));let f=!1;return u.on("change",()=>{if(f){f=!1;return}s.value=u.getValue()}),It(s,d=>{if(d!==u.getValue()){f=!0;const v=u.listSelections();u.replaceRange(d,u.posFromIndex(0),u.posFromIndex(1/0)),u.setSelections(v)}},{immediate:!0}),u}const t0={relative:"","font-mono":"","text-sm":""},r0=Rr({props:{modelValue:null,mode:null,readOnly:{type:Boolean},matched:null,getHint:null},emits:["update:modelValue"],setup(r,{emit:s}){const l=r,u={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=At(),d=$y(l,"modelValue",s,{passive:!0}),v=ct(()=>u[l.mode||""]||l.mode),b=ct(()=>l.getHint?{"Ctrl-Space":"autocomplete","Ctrl-.":"autocomplete","Cmd-Space":"autocomplete","Cmd-.":"autocomplete",Tab:"autocomplete"}:{}),y=ct(()=>l.getHint?{hint:l.getHint}:{});return Pa(async()=>{const x=e0(f,d,Ci(jf(Il({},mv(l)),{mode:v,hintOptions:y,extraKeys:b})));x.setSize("100%","100%"),l.getHint&&x.on("keyup",(H,re)=>{re.key.match(/^[\w:-]$/)&&H.execCommand("autocomplete")}),setTimeout(()=>x.refresh(),100);const S=[];function T(H,re){S.push(x.markText(x.posFromIndex(H),x.posFromIndex(re),{className:"highlighted"}))}function O(){S.forEach(H=>H.clear()),Zy(l.modelValue,Array.from(l.matched||[])).forEach(H=>T(H[0],H[1]))}let A=0;It(()=>[l.modelValue,l.matched],async()=>{clearTimeout(A),l.matched&&(A=setTimeout(O,200))},{immediate:!0})}),(x,S)=>(gt(),Bt("div",t0,[Fe("textarea",{ref_key:"el",ref:f},null,512)]))}});var th=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const n0={},i0={"bg-gray4:10":"","p-5":"",b:"b main",text:"sm gray5 dark:gray3"};function o0(r,s){return gt(),Bt("div",i0,[jd(r.$slots,"default")])}var s0=th(n0,[["render",o0]]);const l0="/@vite/client",rh=vo(),nh=vo(),a0=rh.on,ih=nh.on;da(()=>import(l0),[]).then(r=>{const s=r.createHotContext("/");s.on("vite:beforeUpdate",l=>{l.updates.forEach(u=>{rh.trigger(u)})}),s.on("unocss:config-changed",()=>{nh.trigger()})}).catch(r=>{console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates"),console.error(r)});const Ks="/__unocss_api",oh=Us(Ks).json(),Fa=Us(`${Ks}/overview`,{immediate:!1}).json(),Mt=oh.data,hs=Fa.data;ih(()=>{oh.execute(),Fa.execute()});function Mw(r){const s=Us(ct(()=>`${Ks}/module?id=${encodeURIComponent(Re(r))}`),{refetch:!0}).json();return ih(()=>s.execute()),a0(l=>{var u;(l.path===Re(r)||l.path===Re(r).slice(((u=Mt.value)==null?void 0:u.root.length)||0))&&setTimeout(()=>{s.execute()},50)}),s}function Ew(r){const s=ey(r,500);return Us(ct(()=>`${Ks}/repl?token=${encodeURIComponent(s.value)}`),{refetch:!0}).json()}const ps=ct(()=>{if(!Mt.value)return{workspace:{children:{},items:[]},root:{children:{},items:[]}};const r=Mt.value.modules.map(u=>({full:u,path:u})),s=r.filter(u=>u.full.startsWith(Mt.value.root)),l=r.filter(u=>!u.full.startsWith(Mt.value.root));return s.forEach(u=>u.path=u.path.slice(Mt.value.root.length+1)),{workspace:Mc(s,"Project Root"),root:Mc(l,"Disk Root")}});function Mc(r,s){const l={name:s,children:{},items:[]};function u(f,d,v=l){if(d.length<=1){v.items.push(f);return}const b=d.shift();v.children[b]||(v.children[b]={name:b,children:{},items:[]}),u(f,d,v.children[b])}return r.forEach(f=>{const d=f.path.split(/\//g).filter(Boolean);u(f,d)}),l}const u0={key:0,"ws-wrap":""},f0=Fe("span",{op80:""},".",-1),c0={key:1},d0=Rr({props:{id:null},setup(r){return(s,l)=>r.id&&Re(Mt)?(gt(),Bt("span",u0,[r.id.startsWith(Re(Mt).root)?(gt(),Bt(rr,{key:0},[f0,Fe("span",null,tr(r.id.slice(Re(Mt).root.length)),1)],64)):(gt(),Bt("span",c0,tr(r.id),1))])):Ls("",!0)}}),h0=(r,s)=>{const l=At(null);return Hy(r,()=>{var f;const u=(f=Da(r))==null?void 0:f.clientHeight;l.value=u?`--${s}: calc(100vh - ${u}px - 2px);`:null}),l},p0={"h-full":""},g0={p:"x4 y2",grid:"~ cols-4 gap-4"},v0=Fe("div",{op80:""}," Presets ",-1),m0={op50:"","ws-pre":""},y0={overflow:"auto"},b0=Fe("div",{op80:""}," Rules ",-1),w0=Fe("span",{op50:""},"dynamic",-1),x0=Fe("br",null,null,-1),k0=Fe("span",{op50:""},"static",-1),S0=Fe("div",{op80:""}," Variants ",-1),C0=Fe("div",{op80:""}," Shortcuts ",-1),_0={key:0},T0=Fe("div",{op80:""}," Config File ",-1),L0=Fe("div",{op80:""}," Version ",-1),P0={op50:"","ws-pre":""},O0={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},M0=Fe("div",{op80:""}," Included Files ",-1),E0=Fe("div",{op80:""}," CSS Size ",-1),A0=Fe("span",{op50:""},"gzipped",-1),N0=Fe("div",{op80:""}," Matched Rules ",-1),z0=Fe("div",{op80:""}," Layers ",-1),R0={op50:"","ws-pre":""},D0=Rr({setup(r){const s=At(null),l=h0(s,"overview-scrolls");return Fa.execute(),(u,f)=>{var y;const d=d0,v=s0,b=r0;return gt(),Bt("div",p0,[ot(v,{ref_key:"status",ref:s,p0:""},{default:gn(()=>{var x,S,T,O,A,H,re,V,N,D,I,B,oe,pe,ye,We,Ee,be;return[Fe("div",g0,[Fe("div",null,[v0,Fe("div",m0,tr((T=(S=(x=Re(Mt))==null?void 0:x.config)==null?void 0:S.presets)==null?void 0:T.map(de=>de.name).join(`
24
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var C;S&&(C=window.scrollY),n.input.focus(),S&&window.scrollTo(null,C),n.input.reset(),i.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=M,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(o.selectionStart!=null){var Q=i.somethingSelected(),ae="\u200B"+(Q?o.value:"");o.value="\u21DA",o.value=ae,t.prevInput=Q?"":"\u200B",o.selectionStart=1,o.selectionEnd=ae.length,n.selForContextMenu=i.doc.sel}}function M(){if(t.contextMenuPending==M&&(t.contextMenuPending=!1,t.wrapper.style.cssText=g,o.style.cssText=p,y&&x<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),o.selectionStart!=null)){(!y||y&&x<9)&&R();var Q=0,ae=function(){n.selForContextMenu==i.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?St(i,rf)(i):Q++<10?n.detectingSelectAll=setTimeout(ae,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ae,200)}}if(y&&x>=9&&R(),Ee){bn(e);var U=function(){et(window,"mouseup",U),setTimeout(M,20)};Pe(window,"mouseup",U)}else setTimeout(M,50)},pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},pt.prototype.setUneditable=function(){},pt.prototype.needsContentAttribute=!1;function gg(e,t){if(t=t?Ie(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=ue();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=h.getValue()}var o;if(e.form&&(Pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;o=a.submit;try{var c=a.submit=function(){n(),a.submit=o,a.submit(),a.submit=c}}catch{}}t.finishInit=function(p){p.save=n,p.getTextArea=function(){return e},p.toTextArea=function(){p.toTextArea=isNaN,n(),e.parentNode.removeChild(p.getWrapperElement()),e.style.display="",e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=o))}},e.style.display="none";var h=at(function(p){return e.parentNode.insertBefore(p,e.nextSibling)},t);return h}function vg(e){e.off=et,e.on=Pe,e.wheelEventPixels=Sp,e.Doc=Kt,e.splitLines=Pi,e.countColumn=Je,e.findColumn=Te,e.isWordChar=te,e.Pass=se,e.signal=Oe,e.Line=Un,e.changeEnd=tn,e.scrollbarModel=Au,e.Pos=ie,e.cmpPos=m,e.modes=hr,e.mimeModes=ir,e.resolveMode=Wn,e.getMode=Bn,e.modeExtensions=pr,e.extendMode=gr,e.copyState=or,e.startState=Ei,e.innerMode=Mi,e.commands=ro,e.keyMap=jr,e.keyName=bf,e.isModifierKey=mf,e.lookupKey=ri,e.normalizeKeyMap=qp,e.StringStream=dt,e.SharedTextMarker=Vi,e.TextMarker=nn,e.LineWidget=Qi,e.e_preventDefault=zt,e.e_stopPropagation=Hn,e.e_stop=bn,e.addClass=ze,e.contains=Y,e.rmClass=de,e.keyNames=on}lg(at),cg(at);var mg="iter insert remove copy getEditor constructor".split(" ");for(var ss in Kt.prototype)Kt.prototype.hasOwnProperty(ss)&&Z(mg,ss)<0&&(at.prototype[ss]=function(e){return function(){return e.apply(this.doc,arguments)}}(Kt.prototype[ss]));return Sr(Kt),at.inputStyles={textarea:pt,contenteditable:Qe},at.defineMode=function(e){!at.defaults.mode&&e!="null"&&(at.defaults.mode=e),Eo.apply(this,arguments)},at.defineMIME=Fr,at.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),at.defineMIME("text/plain","null"),at.defineExtension=function(e,t){at.prototype[e]=t},at.defineDocExtension=function(e,t){Kt.prototype[e]=t},at.fromTextArea=gg,vg(at),at.version="5.65.3",at})})(Yr);var Qy=Yr.exports,Vd={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineMode("javascript",function(u,f){var d=u.indentUnit,v=f.statementIndent,b=f.jsonld,y=f.json||b,x=f.trackScope!==!1,S=f.typescript,T=f.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function m(Rt){return{type:Rt,style:"keyword"}}var P=m("keyword a"),X=m("keyword b"),le=m("keyword c"),De=m("keyword d"),$e=m("operator"),xe={type:"atom",style:"atom"};return{if:m("if"),while:P,with:P,else:X,do:X,try:X,finally:X,return:De,break:De,continue:De,new:m("new"),delete:le,void:le,throw:le,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:$e,typeof:$e,instanceof:$e,true:xe,false:xe,null:xe,undefined:xe,NaN:xe,Infinity:xe,this:m("this"),class:m("class"),super:m("atom"),yield:le,export:m("export"),import:m("import"),extends:le,await:le}}(),A=/[+\-*&%=<>!?|~^@]/,H=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function re(m){for(var P=!1,X,le=!1;(X=m.next())!=null;){if(!P){if(X=="/"&&!le)return;X=="["?le=!0:le&&X=="]"&&(le=!1)}P=!P&&X=="\\"}}var V,N;function D(m,P,X){return V=m,N=X,P}function I(m,P){var X=m.next();if(X=='"'||X=="'")return P.tokenize=B(X),P.tokenize(m,P);if(X=="."&&m.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return D("number","number");if(X=="."&&m.match(".."))return D("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(X))return D(X);if(X=="="&&m.eat(">"))return D("=>","operator");if(X=="0"&&m.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return D("number","number");if(/\d/.test(X))return m.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),D("number","number");if(X=="/")return m.eat("*")?(P.tokenize=oe,oe(m,P)):m.eat("/")?(m.skipToEnd(),D("comment","comment")):ie(m,P,1)?(re(m),m.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),D("regexp","string-2")):(m.eat("="),D("operator","operator",m.current()));if(X=="`")return P.tokenize=pe,pe(m,P);if(X=="#"&&m.peek()=="!")return m.skipToEnd(),D("meta","meta");if(X=="#"&&m.eatWhile(T))return D("variable","property");if(X=="<"&&m.match("!--")||X=="-"&&m.match("->")&&!/\S/.test(m.string.slice(0,m.start)))return m.skipToEnd(),D("comment","comment");if(A.test(X))return(X!=">"||!P.lexical||P.lexical.type!=">")&&(m.eat("=")?(X=="!"||X=="=")&&m.eat("="):/[<>*+\-|&?]/.test(X)&&(m.eat(X),X==">"&&m.eat(X))),X=="?"&&m.eat(".")?D("."):D("operator","operator",m.current());if(T.test(X)){m.eatWhile(T);var le=m.current();if(P.lastType!="."){if(O.propertyIsEnumerable(le)){var De=O[le];return D(De.type,De.style,le)}if(le=="async"&&m.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return D("async","keyword",le)}return D("variable","variable",le)}}function B(m){return function(P,X){var le=!1,De;if(b&&P.peek()=="@"&&P.match(H))return X.tokenize=I,D("jsonld-keyword","meta");for(;(De=P.next())!=null&&!(De==m&&!le);)le=!le&&De=="\\";return le||(X.tokenize=I),D("string","string")}}function oe(m,P){for(var X=!1,le;le=m.next();){if(le=="/"&&X){P.tokenize=I;break}X=le=="*"}return D("comment","comment")}function pe(m,P){for(var X=!1,le;(le=m.next())!=null;){if(!X&&(le=="`"||le=="$"&&m.eat("{"))){P.tokenize=I;break}X=!X&&le=="\\"}return D("quasi","string-2",m.current())}var ye="([{}])";function We(m,P){P.fatArrowAt&&(P.fatArrowAt=null);var X=m.string.indexOf("=>",m.start);if(!(X<0)){if(S){var le=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(m.string.slice(m.start,X));le&&(X=le.index)}for(var De=0,$e=!1,xe=X-1;xe>=0;--xe){var Rt=m.string.charAt(xe),sr=ye.indexOf(Rt);if(sr>=0&&sr<3){if(!De){++xe;break}if(--De==0){Rt=="("&&($e=!0);break}}else if(sr>=3&&sr<6)++De;else if(T.test(Rt))$e=!0;else if(/["'\/`]/.test(Rt))for(;;--xe){if(xe==0)return;var jn=m.string.charAt(xe-1);if(jn==Rt&&m.string.charAt(xe-2)!="\\"){xe--;break}}else if($e&&!De){++xe;break}}$e&&!De&&(P.fatArrowAt=xe)}}var Ee={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function be(m,P,X,le,De,$e){this.indented=m,this.column=P,this.type=X,this.prev=De,this.info=$e,le!=null&&(this.align=le)}function de(m,P){if(!x)return!1;for(var X=m.localVars;X;X=X.next)if(X.name==P)return!0;for(var le=m.context;le;le=le.prev)for(var X=le.vars;X;X=X.next)if(X.name==P)return!0}function Ne(m,P,X,le,De){var $e=m.cc;for(j.state=m,j.stream=De,j.marked=null,j.cc=$e,j.style=P,m.lexical.hasOwnProperty("align")||(m.lexical.align=!0);;){var xe=$e.length?$e.pop():y?ge:Ce;if(xe(X,le)){for(;$e.length&&$e[$e.length-1].lex;)$e.pop()();return j.marked?j.marked:X=="variable"&&de(m,le)?"variable-2":P}}}var j={state:null,column:null,marked:null,cc:null};function $(){for(var m=arguments.length-1;m>=0;m--)j.cc.push(arguments[m])}function w(){return $.apply(null,arguments),!0}function ee(m,P){for(var X=P;X;X=X.next)if(X.name==m)return!0;return!1}function Y(m){var P=j.state;if(j.marked="def",!!x){if(P.context){if(P.lexical.info=="var"&&P.context&&P.context.block){var X=ue(m,P.context);if(X!=null){P.context=X;return}}else if(!ee(m,P.localVars)){P.localVars=new nt(m,P.localVars);return}}f.globalVars&&!ee(m,P.globalVars)&&(P.globalVars=new nt(m,P.globalVars))}}function ue(m,P){if(P)if(P.block){var X=ue(m,P.prev);return X?X==P.prev?P:new Ge(X,P.vars,!0):null}else return ee(m,P.vars)?P:new Ge(P.prev,new nt(m,P.vars),!1);else return null}function ze(m){return m=="public"||m=="private"||m=="protected"||m=="abstract"||m=="readonly"}function Ge(m,P,X){this.prev=m,this.vars=P,this.block=X}function nt(m,P){this.name=m,this.next=P}var lt=new nt("this",new nt("arguments",null));function Ie(){j.state.context=new Ge(j.state.context,j.state.localVars,!1),j.state.localVars=lt}function Je(){j.state.context=new Ge(j.state.context,j.state.localVars,!0),j.state.localVars=null}Ie.lex=Je.lex=!0;function q(){j.state.localVars=j.state.context.vars,j.state.context=j.state.context.prev}q.lex=!0;function Z(m,P){var X=function(){var le=j.state,De=le.indented;if(le.lexical.type=="stat")De=le.lexical.indented;else for(var $e=le.lexical;$e&&$e.type==")"&&$e.align;$e=$e.prev)De=$e.indented;le.lexical=new be(De,j.stream.column(),m,null,le.lexical,P)};return X.lex=!0,X}function K(){var m=j.state;m.lexical.prev&&(m.lexical.type==")"&&(m.indented=m.lexical.indented),m.lexical=m.lexical.prev)}K.lex=!0;function se(m){function P(X){return X==m?w():m==";"||X=="}"||X==")"||X=="]"?$():w(P)}return P}function Ce(m,P){return m=="var"?w(Z("vardef",P),Ti,se(";"),K):m=="keyword a"?w(Z("form"),_,Ce,K):m=="keyword b"?w(Z("form"),Ce,K):m=="keyword d"?j.stream.match(/^\s*$/,!1)?w():w(Z("stat"),F,se(";"),K):m=="debugger"?w(se(";")):m=="{"?w(Z("}"),Je,vt,K,q):m==";"?w():m=="if"?(j.state.lexical.info=="else"&&j.state.cc[j.state.cc.length-1]==K&&j.state.cc.pop()(),w(Z("form"),_,Ce,K,Oo)):m=="function"?w(hr):m=="for"?w(Z("form"),Je,Mo,Ce,q,K):m=="class"||S&&P=="interface"?(j.marked="keyword",w(Z("form",m=="class"?m:P),Bn,K)):m=="variable"?S&&P=="declare"?(j.marked="keyword",w(Ce)):S&&(P=="module"||P=="enum"||P=="type")&&j.stream.match(/^\s*\w/,!1)?(j.marked="keyword",P=="enum"?w(Tr):P=="type"?w(Eo,se("operator"),Oe,se(";")):w(Z("form"),jt,se("{"),Z("}"),vt,K,K)):S&&P=="namespace"?(j.marked="keyword",w(Z("form"),ge,Ce,K)):S&&P=="abstract"?(j.marked="keyword",w(Ce)):w(Z("stat"),he):m=="switch"?w(Z("form"),_,se("{"),Z("}","switch"),Je,vt,K,K,q):m=="case"?w(ge,se(":")):m=="default"?w(se(":")):m=="catch"?w(Z("form"),Ie,Se,Ce,K,q):m=="export"?w(Z("stat"),Mi,K):m=="import"?w(Z("stat"),dt,K):m=="async"?w(Ce):P=="@"?w(ge,Ce):$(Z("stat"),ge,se(";"),K)}function Se(m){if(m=="(")return w(Fr,se(")"))}function ge(m,P){return E(m,P,!1)}function Te(m,P){return E(m,P,!0)}function _(m){return m!="("?$():w(Z(")"),F,se(")"),K)}function E(m,P,X){if(j.state.fatArrowAt==j.stream.start){var le=X?te:ce;if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,se("=>"),le,q);if(m=="variable")return $(Ie,jt,se("=>"),le,q)}var De=X?J:G;return Ee.hasOwnProperty(m)?w(De):m=="function"?w(hr,De):m=="class"||S&&P=="interface"?(j.marked="keyword",w(Z("form"),Wn,K)):m=="keyword c"||m=="async"?w(X?Te:ge):m=="("?w(Z(")"),F,se(")"),K,De):m=="operator"||m=="spread"?w(X?Te:ge):m=="["?w(Z("]"),Xe,K,De):m=="{"?xt(Be,"}",null,De):m=="quasi"?$(ne,De):m=="new"?w(L(X)):w()}function F(m){return m.match(/[;\}\)\],]/)?$():$(ge)}function G(m,P){return m==","?w(F):J(m,P,!1)}function J(m,P,X){var le=X==!1?G:J,De=X==!1?ge:Te;if(m=="=>")return w(Ie,X?te:ce,q);if(m=="operator")return/\+\+|--/.test(P)||S&&P=="!"?w(le):S&&P=="<"&&j.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?w(Z(">"),He(Oe,">"),K,le):P=="?"?w(ge,se(":"),De):w(De);if(m=="quasi")return $(ne,le);if(m!=";"){if(m=="(")return xt(Te,")","call",le);if(m==".")return w(Le,le);if(m=="[")return w(Z("]"),F,se("]"),K,le);if(S&&P=="as")return j.marked="keyword",w(Oe,le);if(m=="regexp")return j.state.lastType=j.marked="operator",j.stream.backUp(j.stream.pos-j.stream.start-1),w(De)}}function ne(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?w(ne):w(F,fe)}function fe(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,w(ne)}function ce(m){return We(j.stream,j.state),$(m=="{"?Ce:ge)}function te(m){return We(j.stream,j.state),$(m=="{"?Ce:Te)}function L(m){return function(P){return P=="."?w(m?z:W):P=="variable"&&S?w(bn,m?J:G):$(m?Te:ge)}}function W(m,P){if(P=="target")return j.marked="keyword",w(G)}function z(m,P){if(P=="target")return j.marked="keyword",w(J)}function he(m){return m==":"?w(K,Ce):$(G,se(";"),K)}function Le(m){if(m=="variable")return j.marked="property",w()}function Be(m,P){if(m=="async")return j.marked="property",w(Be);if(m=="variable"||j.style=="keyword"){if(j.marked="property",P=="get"||P=="set")return w(tt);var X;return S&&j.state.fatArrowAt==j.stream.start&&(X=j.stream.match(/^\s*:\s*/,!1))&&(j.state.fatArrowAt=j.stream.pos+X[0].length),w(Ke)}else{if(m=="number"||m=="string")return j.marked=b?"property":j.style+" property",w(Ke);if(m=="jsonld-keyword")return w(Ke);if(S&&ze(P))return j.marked="keyword",w(Be);if(m=="[")return w(ge,dr,se("]"),Ke);if(m=="spread")return w(Te,Ke);if(P=="*")return j.marked="keyword",w(Be);if(m==":")return $(Ke)}}function tt(m){return m!="variable"?$(Ke):(j.marked="property",w(hr))}function Ke(m){if(m==":")return w(Te);if(m=="(")return $(hr)}function He(m,P,X){function le(De,$e){if(X?X.indexOf(De)>-1:De==","){var xe=j.state.lexical;return xe.info=="call"&&(xe.pos=(xe.pos||0)+1),w(function(Rt,sr){return Rt==P||sr==P?$():$(m)},le)}return De==P||$e==P?w():X&&X.indexOf(";")>-1?$(m):w(se(P))}return function(De,$e){return De==P||$e==P?w():$(m,le)}}function xt(m,P,X){for(var le=3;le<arguments.length;le++)j.cc.push(arguments[le]);return w(Z(P,X),He(m,P),K)}function vt(m){return m=="}"?w():$(Ce,vt)}function dr(m,P){if(S){if(m==":")return w(Oe);if(P=="?")return w(dr)}}function Pe(m,P){if(S&&(m==":"||P=="in"))return w(Oe)}function Dr(m){if(S&&m==":")return j.stream.match(/^\s*\w+\s+is\b/,!1)?w(ge,et,Oe):w(Oe)}function et(m,P){if(P=="is")return j.marked="keyword",w()}function Oe(m,P){if(P=="keyof"||P=="typeof"||P=="infer"||P=="readonly")return j.marked="keyword",w(P=="typeof"?Te:Oe);if(m=="variable"||P=="void")return j.marked="type",w(nr);if(P=="|"||P=="&")return w(Oe);if(m=="string"||m=="number"||m=="atom")return w(nr);if(m=="[")return w(Z("]"),He(Oe,"]",","),K,nr);if(m=="{")return w(Z("}"),In,K,nr);if(m=="(")return w(He(Hn,")"),ut,nr);if(m=="<")return w(He(Oe,">"),Oe);if(m=="quasi")return $(Sr,nr)}function ut(m){if(m=="=>")return w(Oe)}function In(m){return m.match(/[\}\)\]]/)?w():m==","||m==";"?w(In):$(Pt,In)}function Pt(m,P){if(m=="variable"||j.style=="keyword")return j.marked="property",w(Pt);if(P=="?"||m=="number"||m=="string")return w(Pt);if(m==":")return w(Oe);if(m=="[")return w(se("variable"),Pe,se("]"),Pt);if(m=="(")return $(ir,Pt);if(!m.match(/[;\}\)\],]/))return w()}function Sr(m,P){return m!="quasi"?$():P.slice(P.length-2)!="${"?w(Sr):w(Oe,zt)}function zt(m){if(m=="}")return j.marked="string-2",j.state.tokenize=pe,w(Sr)}function Hn(m,P){return m=="variable"&&j.stream.match(/^\s*[?:]/,!1)||P=="?"?w(Hn):m==":"?w(Oe):m=="spread"?w(Hn):$(Oe)}function nr(m,P){if(P=="<")return w(Z(">"),He(Oe,">"),K,nr);if(P=="|"||m=="."||P=="&")return w(Oe);if(m=="[")return w(Oe,se("]"),nr);if(P=="extends"||P=="implements")return j.marked="keyword",w(Oe);if(P=="?")return w(Oe,se(":"),Oe)}function bn(m,P){if(P=="<")return w(Z(">"),He(Oe,">"),K,nr)}function Xr(){return $(Oe,Lo)}function Lo(m,P){if(P=="=")return w(Oe)}function Ti(m,P){return P=="enum"?(j.marked="keyword",w(Tr)):$(jt,dr,Cr,Pi)}function jt(m,P){if(S&&ze(P))return j.marked="keyword",w(jt);if(m=="variable")return Y(P),w();if(m=="spread")return w(jt);if(m=="[")return xt(Li,"]");if(m=="{")return xt(Po,"}")}function Po(m,P){return m=="variable"&&!j.stream.match(/^\s*:/,!1)?(Y(P),w(Cr)):(m=="variable"&&(j.marked="property"),m=="spread"?w(jt):m=="}"?$():m=="["?w(ge,se("]"),se(":"),Po):w(se(":"),jt,Cr))}function Li(){return $(jt,Cr)}function Cr(m,P){if(P=="=")return w(Te)}function Pi(m){if(m==",")return w(Ti)}function Oo(m,P){if(m=="keyword b"&&P=="else")return w(Z("form","else"),Ce,K)}function Mo(m,P){if(P=="await")return w(Mo);if(m=="(")return w(Z(")"),Oi,K)}function Oi(m){return m=="var"?w(Ti,Zr):m=="variable"?w(Zr):$(Zr)}function Zr(m,P){return m==")"?w():m==";"?w(Zr):P=="in"||P=="of"?(j.marked="keyword",w(ge,Zr)):$(ge,Zr)}function hr(m,P){if(P=="*")return j.marked="keyword",w(hr);if(m=="variable")return Y(P),w(hr);if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,Dr,Ce,q);if(S&&P=="<")return w(Z(">"),He(Xr,">"),K,hr)}function ir(m,P){if(P=="*")return j.marked="keyword",w(ir);if(m=="variable")return Y(P),w(ir);if(m=="(")return w(Ie,Z(")"),He(Fr,")"),K,Dr,q);if(S&&P=="<")return w(Z(">"),He(Xr,">"),K,ir)}function Eo(m,P){if(m=="keyword"||m=="variable")return j.marked="type",w(Eo);if(P=="<")return w(Z(">"),He(Xr,">"),K)}function Fr(m,P){return P=="@"&&w(ge,Fr),m=="spread"?w(Fr):S&&ze(P)?(j.marked="keyword",w(Fr)):S&&m=="this"?w(dr,Cr):$(jt,dr,Cr)}function Wn(m,P){return m=="variable"?Bn(m,P):pr(m,P)}function Bn(m,P){if(m=="variable")return Y(P),w(pr)}function pr(m,P){if(P=="<")return w(Z(">"),He(Xr,">"),K,pr);if(P=="extends"||P=="implements"||S&&m==",")return P=="implements"&&(j.marked="keyword"),w(S?Oe:ge,pr);if(m=="{")return w(Z("}"),gr,K)}function gr(m,P){if(m=="async"||m=="variable"&&(P=="static"||P=="get"||P=="set"||S&&ze(P))&&j.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return j.marked="keyword",w(gr);if(m=="variable"||j.style=="keyword")return j.marked="property",w(or,gr);if(m=="number"||m=="string")return w(or,gr);if(m=="[")return w(ge,dr,se("]"),or,gr);if(P=="*")return j.marked="keyword",w(gr);if(S&&m=="(")return $(ir,gr);if(m==";"||m==",")return w(gr);if(m=="}")return w();if(P=="@")return w(ge,gr)}function or(m,P){if(P=="!"||P=="?")return w(or);if(m==":")return w(Oe,Cr);if(P=="=")return w(Te);var X=j.state.lexical.prev,le=X&&X.info=="interface";return $(le?ir:hr)}function Mi(m,P){return P=="*"?(j.marked="keyword",w(Jt,se(";"))):P=="default"?(j.marked="keyword",w(ge,se(";"))):m=="{"?w(He(Ei,"}"),Jt,se(";")):$(Ce)}function Ei(m,P){if(P=="as")return j.marked="keyword",w(se("variable"));if(m=="variable")return $(Te,Ei)}function dt(m){return m=="string"?w():m=="("?$(ge):m=="."?$(G):$(_e,_r,Jt)}function _e(m,P){return m=="{"?xt(_e,"}"):(m=="variable"&&Y(P),P=="*"&&(j.marked="keyword"),w(Ai))}function _r(m){if(m==",")return w(_e,_r)}function Ai(m,P){if(P=="as")return j.marked="keyword",w(_e)}function Jt(m,P){if(P=="from")return j.marked="keyword",w(ge)}function Xe(m){return m=="]"?w():$(He(Te,"]"))}function Tr(){return $(Z("form"),jt,se("{"),Z("}"),He(wn,"}"),K,K)}function wn(){return $(jt,Cr)}function Ni(m,P){return m.lastType=="operator"||m.lastType==","||A.test(P.charAt(0))||/[,.]/.test(P.charAt(0))}function ie(m,P,X){return P.tokenize==I&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(P.lastType)||P.lastType=="quasi"&&/\{\s*$/.test(m.string.slice(0,m.pos-(X||0)))}return{startState:function(m){var P={tokenize:I,lastType:"sof",cc:[],lexical:new be((m||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new Ge(null,null,!1),indented:m||0};return f.globalVars&&typeof f.globalVars=="object"&&(P.globalVars=f.globalVars),P},token:function(m,P){if(m.sol()&&(P.lexical.hasOwnProperty("align")||(P.lexical.align=!1),P.indented=m.indentation(),We(m,P)),P.tokenize!=oe&&m.eatSpace())return null;var X=P.tokenize(m,P);return V=="comment"?X:(P.lastType=V=="operator"&&(N=="++"||N=="--")?"incdec":V,Ne(P,X,V,N,m))},indent:function(m,P){if(m.tokenize==oe||m.tokenize==pe)return l.Pass;if(m.tokenize!=I)return 0;var X=P&&P.charAt(0),le=m.lexical,De;if(!/^\s*else\b/.test(P))for(var $e=m.cc.length-1;$e>=0;--$e){var xe=m.cc[$e];if(xe==K)le=le.prev;else if(xe!=Oo&&xe!=q)break}for(;(le.type=="stat"||le.type=="form")&&(X=="}"||(De=m.cc[m.cc.length-1])&&(De==G||De==J)&&!/^[,\.=+\-*:?[\(]/.test(P));)le=le.prev;v&&le.type==")"&&le.prev.type=="stat"&&(le=le.prev);var Rt=le.type,sr=X==Rt;return Rt=="vardef"?le.indented+(m.lastType=="operator"||m.lastType==","?le.info.length+1:0):Rt=="form"&&X=="{"?le.indented:Rt=="form"?le.indented+d:Rt=="stat"?le.indented+(Ni(m,P)?v||d:0):le.info=="switch"&&!sr&&f.doubleIndentSwitch!=!1?le.indented+(/^(?:case|default)\b/.test(P)?d:2*d):le.align?le.column+(sr?0:1):le.indented+(sr?0:d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:y?null:"/*",blockCommentEnd:y?null:"*/",blockCommentContinue:y?null:" * ",lineComment:y?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:y?"json":"javascript",jsonldMode:b,jsonMode:y,expressionAllowed:ie,skipExpression:function(m){Ne(m,"atom","atom","true",new l.StringStream("",2,null))}}}),l.registerHelper("wordChars","javascript",/[\w$]/),l.defineMIME("text/javascript","javascript"),l.defineMIME("text/ecmascript","javascript"),l.defineMIME("application/javascript","javascript"),l.defineMIME("application/x-javascript","javascript"),l.defineMIME("application/ecmascript","javascript"),l.defineMIME("application/json",{name:"javascript",json:!0}),l.defineMIME("application/x-json",{name:"javascript",json:!0}),l.defineMIME("application/manifest+json",{name:"javascript",json:!0}),l.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),l.defineMIME("text/typescript",{name:"javascript",typescript:!0}),l.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Vy={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineMode("css",function(be,de){var Ne=de.inline;de.propertyKeywords||(de=l.resolveMode("text/css"));var j=be.indentUnit,$=de.tokenHooks,w=de.documentTypes||{},ee=de.mediaTypes||{},Y=de.mediaFeatures||{},ue=de.mediaValueKeywords||{},ze=de.propertyKeywords||{},Ge=de.nonStandardPropertyKeywords||{},nt=de.fontProperties||{},lt=de.counterDescriptors||{},Ie=de.colorKeywords||{},Je=de.valueKeywords||{},q=de.allowNested,Z=de.lineComment,K=de.supportsAtComponent===!0,se=be.highlightNonStandardPropertyKeywords!==!1,Ce,Se;function ge(L,W){return Ce=W,L}function Te(L,W){var z=L.next();if($[z]){var he=$[z](L,W);if(he!==!1)return he}if(z=="@")return L.eatWhile(/[\w\\\-]/),ge("def",L.current());if(z=="="||(z=="~"||z=="|")&&L.eat("="))return ge(null,"compare");if(z=='"'||z=="'")return W.tokenize=_(z),W.tokenize(L,W);if(z=="#")return L.eatWhile(/[\w\\\-]/),ge("atom","hash");if(z=="!")return L.match(/^\s*\w*/),ge("keyword","important");if(/\d/.test(z)||z=="."&&L.eat(/\d/))return L.eatWhile(/[\w.%]/),ge("number","unit");if(z==="-"){if(/[\d.]/.test(L.peek()))return L.eatWhile(/[\w.%]/),ge("number","unit");if(L.match(/^-[\w\\\-]*/))return L.eatWhile(/[\w\\\-]/),L.match(/^\s*:/,!1)?ge("variable-2","variable-definition"):ge("variable-2","variable");if(L.match(/^\w+-/))return ge("meta","meta")}else return/[,+>*\/]/.test(z)?ge(null,"select-op"):z=="."&&L.match(/^-?[_a-z][_a-z0-9-]*/i)?ge("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(z)?ge(null,z):L.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(L.current())&&(W.tokenize=E),ge("variable callee","variable")):/[\w\\\-]/.test(z)?(L.eatWhile(/[\w\\\-]/),ge("property","word")):ge(null,null)}function _(L){return function(W,z){for(var he=!1,Le;(Le=W.next())!=null;){if(Le==L&&!he){L==")"&&W.backUp(1);break}he=!he&&Le=="\\"}return(Le==L||!he&&L!=")")&&(z.tokenize=null),ge("string","string")}}function E(L,W){return L.next(),L.match(/^\s*[\"\')]/,!1)?W.tokenize=null:W.tokenize=_(")"),ge(null,"(")}function F(L,W,z){this.type=L,this.indent=W,this.prev=z}function G(L,W,z,he){return L.context=new F(z,W.indentation()+(he===!1?0:j),L.context),z}function J(L){return L.context.prev&&(L.context=L.context.prev),L.context.type}function ne(L,W,z){return te[z.context.type](L,W,z)}function fe(L,W,z,he){for(var Le=he||1;Le>0;Le--)z.context=z.context.prev;return ne(L,W,z)}function ce(L){var W=L.current().toLowerCase();Je.hasOwnProperty(W)?Se="atom":Ie.hasOwnProperty(W)?Se="keyword":Se="variable"}var te={};return te.top=function(L,W,z){if(L=="{")return G(z,W,"block");if(L=="}"&&z.context.prev)return J(z);if(K&&/@component/i.test(L))return G(z,W,"atComponentBlock");if(/^@(-moz-)?document$/i.test(L))return G(z,W,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(L))return G(z,W,"atBlock");if(/^@(font-face|counter-style)/i.test(L))return z.stateArg=L,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(L))return"keyframes";if(L&&L.charAt(0)=="@")return G(z,W,"at");if(L=="hash")Se="builtin";else if(L=="word")Se="tag";else{if(L=="variable-definition")return"maybeprop";if(L=="interpolation")return G(z,W,"interpolation");if(L==":")return"pseudo";if(q&&L=="(")return G(z,W,"parens")}return z.context.type},te.block=function(L,W,z){if(L=="word"){var he=W.current().toLowerCase();return ze.hasOwnProperty(he)?(Se="property","maybeprop"):Ge.hasOwnProperty(he)?(Se=se?"string-2":"property","maybeprop"):q?(Se=W.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Se+=" error","maybeprop")}else return L=="meta"?"block":!q&&(L=="hash"||L=="qualifier")?(Se="error","block"):te.top(L,W,z)},te.maybeprop=function(L,W,z){return L==":"?G(z,W,"prop"):ne(L,W,z)},te.prop=function(L,W,z){if(L==";")return J(z);if(L=="{"&&q)return G(z,W,"propBlock");if(L=="}"||L=="{")return fe(L,W,z);if(L=="(")return G(z,W,"parens");if(L=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(W.current()))Se+=" error";else if(L=="word")ce(W);else if(L=="interpolation")return G(z,W,"interpolation");return"prop"},te.propBlock=function(L,W,z){return L=="}"?J(z):L=="word"?(Se="property","maybeprop"):z.context.type},te.parens=function(L,W,z){return L=="{"||L=="}"?fe(L,W,z):L==")"?J(z):L=="("?G(z,W,"parens"):L=="interpolation"?G(z,W,"interpolation"):(L=="word"&&ce(W),"parens")},te.pseudo=function(L,W,z){return L=="meta"?"pseudo":L=="word"?(Se="variable-3",z.context.type):ne(L,W,z)},te.documentTypes=function(L,W,z){return L=="word"&&w.hasOwnProperty(W.current())?(Se="tag",z.context.type):te.atBlock(L,W,z)},te.atBlock=function(L,W,z){if(L=="(")return G(z,W,"atBlock_parens");if(L=="}"||L==";")return fe(L,W,z);if(L=="{")return J(z)&&G(z,W,q?"block":"top");if(L=="interpolation")return G(z,W,"interpolation");if(L=="word"){var he=W.current().toLowerCase();he=="only"||he=="not"||he=="and"||he=="or"?Se="keyword":ee.hasOwnProperty(he)?Se="attribute":Y.hasOwnProperty(he)?Se="property":ue.hasOwnProperty(he)?Se="keyword":ze.hasOwnProperty(he)?Se="property":Ge.hasOwnProperty(he)?Se=se?"string-2":"property":Je.hasOwnProperty(he)?Se="atom":Ie.hasOwnProperty(he)?Se="keyword":Se="error"}return z.context.type},te.atComponentBlock=function(L,W,z){return L=="}"?fe(L,W,z):L=="{"?J(z)&&G(z,W,q?"block":"top",!1):(L=="word"&&(Se="error"),z.context.type)},te.atBlock_parens=function(L,W,z){return L==")"?J(z):L=="{"||L=="}"?fe(L,W,z,2):te.atBlock(L,W,z)},te.restricted_atBlock_before=function(L,W,z){return L=="{"?G(z,W,"restricted_atBlock"):L=="word"&&z.stateArg=="@counter-style"?(Se="variable","restricted_atBlock_before"):ne(L,W,z)},te.restricted_atBlock=function(L,W,z){return L=="}"?(z.stateArg=null,J(z)):L=="word"?(z.stateArg=="@font-face"&&!nt.hasOwnProperty(W.current().toLowerCase())||z.stateArg=="@counter-style"&&!lt.hasOwnProperty(W.current().toLowerCase())?Se="error":Se="property","maybeprop"):"restricted_atBlock"},te.keyframes=function(L,W,z){return L=="word"?(Se="variable","keyframes"):L=="{"?G(z,W,"top"):ne(L,W,z)},te.at=function(L,W,z){return L==";"?J(z):L=="{"||L=="}"?fe(L,W,z):(L=="word"?Se="tag":L=="hash"&&(Se="builtin"),"at")},te.interpolation=function(L,W,z){return L=="}"?J(z):L=="{"||L==";"?fe(L,W,z):(L=="word"?Se="variable":L!="variable"&&L!="("&&L!=")"&&(Se="error"),"interpolation")},{startState:function(L){return{tokenize:null,state:Ne?"block":"top",stateArg:null,context:new F(Ne?"block":"top",L||0,null)}},token:function(L,W){if(!W.tokenize&&L.eatSpace())return null;var z=(W.tokenize||Te)(L,W);return z&&typeof z=="object"&&(Ce=z[1],z=z[0]),Se=z,Ce!="comment"&&(W.state=te[W.state](Ce,L,W)),Se},indent:function(L,W){var z=L.context,he=W&&W.charAt(0),Le=z.indent;return z.type=="prop"&&(he=="}"||he==")")&&(z=z.prev),z.prev&&(he=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="restricted_atBlock")?(z=z.prev,Le=z.indent):(he==")"&&(z.type=="parens"||z.type=="atBlock_parens")||he=="{"&&(z.type=="at"||z.type=="atBlock"))&&(Le=Math.max(0,z.indent-j))),Le},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Z,fold:"brace"}});function u(be){for(var de={},Ne=0;Ne<be.length;++Ne)de[be[Ne].toLowerCase()]=!0;return de}var f=["domain","regexp","url","url-prefix"],d=u(f),v=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],b=u(v),y=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],x=u(y),S=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],T=u(S),O=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],A=u(O),H=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],re=u(H),V=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],N=u(V),D=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],I=u(D),B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],oe=u(B),pe=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ye=u(pe),We=f.concat(v).concat(y).concat(S).concat(O).concat(H).concat(B).concat(pe);l.registerHelper("hintWords","css",We);function Ee(be,de){for(var Ne=!1,j;(j=be.next())!=null;){if(Ne&&j=="/"){de.tokenize=null;break}Ne=j=="*"}return["comment","comment"]}l.defineMIME("text/css",{documentTypes:d,mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,fontProperties:N,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ee,Ee(be,de)):!1}},name:"css"}),l.defineMIME("text/x-scss",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ee,Ee(be,de)):["operator","operator"]},":":function(be){return be.match(/^\s*\{/,!1)?[null,null]:!1},$:function(be){return be.match(/^[\w-]+/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(be){return be.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),l.defineMIME("text/x-less",{mediaTypes:b,mediaFeatures:x,mediaValueKeywords:T,propertyKeywords:A,nonStandardPropertyKeywords:re,colorKeywords:oe,valueKeywords:ye,fontProperties:N,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(be,de){return be.eat("/")?(be.skipToEnd(),["comment","comment"]):be.eat("*")?(de.tokenize=Ee,Ee(be,de)):["operator","operator"]},"@":function(be){return be.eat("{")?[null,"interpolation"]:be.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(be.eatWhile(/[\w\\\-]/),be.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),l.defineMIME("text/x-gss",{documentTypes:d,mediaTypes:b,mediaFeatures:x,propertyKeywords:A,nonStandardPropertyKeywords:re,fontProperties:N,counterDescriptors:I,colorKeywords:oe,valueKeywords:ye,supportsAtComponent:!0,tokenHooks:{"/":function(be,de){return be.eat("*")?(de.tokenize=Ee,Ee(be,de)):!1}},name:"css",helperType:"gss"})})})();var eh={exports:{}};(function(r,s){(function(l){l(Yr.exports)})(function(l){var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},f={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};l.defineMode("xml",function(d,v){var b=d.indentUnit,y={},x=v.htmlMode?u:f;for(var S in x)y[S]=x[S];for(var S in v)y[S]=v[S];var T,O;function A(w,ee){function Y(Ge){return ee.tokenize=Ge,Ge(w,ee)}var ue=w.next();if(ue=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?Y(V("atom","]]>")):null:w.match("--")?Y(V("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),Y(N(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),ee.tokenize=V("meta","?>"),"meta"):(T=w.eat("/")?"closeTag":"openTag",ee.tokenize=H,"tag bracket");if(ue=="&"){var ze;return w.eat("#")?w.eat("x")?ze=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):ze=w.eatWhile(/[\d]/)&&w.eat(";"):ze=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),ze?"atom":"error"}else return w.eatWhile(/[^&<]/),null}A.isInText=!0;function H(w,ee){var Y=w.next();if(Y==">"||Y=="/"&&w.eat(">"))return ee.tokenize=A,T=Y==">"?"endTag":"selfcloseTag","tag bracket";if(Y=="=")return T="equals",null;if(Y=="<"){ee.tokenize=A,ee.state=pe,ee.tagName=ee.tagStart=null;var ue=ee.tokenize(w,ee);return ue?ue+" tag error":"tag error"}else return/[\'\"]/.test(Y)?(ee.tokenize=re(Y),ee.stringStartCol=w.column(),ee.tokenize(w,ee)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(w){var ee=function(Y,ue){for(;!Y.eol();)if(Y.next()==w){ue.tokenize=H;break}return"string"};return ee.isInAttribute=!0,ee}function V(w,ee){return function(Y,ue){for(;!Y.eol();){if(Y.match(ee)){ue.tokenize=A;break}Y.next()}return w}}function N(w){return function(ee,Y){for(var ue;(ue=ee.next())!=null;){if(ue=="<")return Y.tokenize=N(w+1),Y.tokenize(ee,Y);if(ue==">")if(w==1){Y.tokenize=A;break}else return Y.tokenize=N(w-1),Y.tokenize(ee,Y)}return"meta"}}function D(w){return w&&w.toLowerCase()}function I(w,ee,Y){this.prev=w.context,this.tagName=ee||"",this.indent=w.indented,this.startOfLine=Y,(y.doNotIndent.hasOwnProperty(ee)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function B(w){w.context&&(w.context=w.context.prev)}function oe(w,ee){for(var Y;;){if(!w.context||(Y=w.context.tagName,!y.contextGrabbers.hasOwnProperty(D(Y))||!y.contextGrabbers[D(Y)].hasOwnProperty(D(ee))))return;B(w)}}function pe(w,ee,Y){return w=="openTag"?(Y.tagStart=ee.column(),ye):w=="closeTag"?We:pe}function ye(w,ee,Y){return w=="word"?(Y.tagName=ee.current(),O="tag",de):y.allowMissingTagName&&w=="endTag"?(O="tag bracket",de(w,ee,Y)):(O="error",ye)}function We(w,ee,Y){if(w=="word"){var ue=ee.current();return Y.context&&Y.context.tagName!=ue&&y.implicitlyClosed.hasOwnProperty(D(Y.context.tagName))&&B(Y),Y.context&&Y.context.tagName==ue||y.matchClosing===!1?(O="tag",Ee):(O="tag error",be)}else return y.allowMissingTagName&&w=="endTag"?(O="tag bracket",Ee(w,ee,Y)):(O="error",be)}function Ee(w,ee,Y){return w!="endTag"?(O="error",Ee):(B(Y),pe)}function be(w,ee,Y){return O="error",Ee(w,ee,Y)}function de(w,ee,Y){if(w=="word")return O="attribute",Ne;if(w=="endTag"||w=="selfcloseTag"){var ue=Y.tagName,ze=Y.tagStart;return Y.tagName=Y.tagStart=null,w=="selfcloseTag"||y.autoSelfClosers.hasOwnProperty(D(ue))?oe(Y,ue):(oe(Y,ue),Y.context=new I(Y,ue,ze==Y.indented)),pe}return O="error",de}function Ne(w,ee,Y){return w=="equals"?j:(y.allowMissing||(O="error"),de(w,ee,Y))}function j(w,ee,Y){return w=="string"?$:w=="word"&&y.allowUnquoted?(O="string",de):(O="error",de(w,ee,Y))}function $(w,ee,Y){return w=="string"?$:de(w,ee,Y)}return{startState:function(w){var ee={tokenize:A,state:pe,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(ee.baseIndent=w),ee},token:function(w,ee){if(!ee.tagName&&w.sol()&&(ee.indented=w.indentation()),w.eatSpace())return null;T=null;var Y=ee.tokenize(w,ee);return(Y||T)&&Y!="comment"&&(O=null,ee.state=ee.state(T||Y,w,ee),O&&(Y=O=="error"?Y+" error":O)),Y},indent:function(w,ee,Y){var ue=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+b;if(ue&&ue.noIndent)return l.Pass;if(w.tokenize!=H&&w.tokenize!=A)return Y?Y.match(/^(\s*)/)[0].length:0;if(w.tagName)return y.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+b*(y.multilineTagIndentFactor||1);if(y.alignCDATA&&/<!\[CDATA\[/.test(ee))return 0;var ze=ee&&/^<(\/)?([\w_:\.-]*)/.exec(ee);if(ze&&ze[1])for(;ue;)if(ue.tagName==ze[2]){ue=ue.prev;break}else if(y.implicitlyClosed.hasOwnProperty(D(ue.tagName)))ue=ue.prev;else break;else if(ze)for(;ue;){var Ge=y.contextGrabbers[D(ue.tagName)];if(Ge&&Ge.hasOwnProperty(D(ze[2])))ue=ue.prev;else break}for(;ue&&ue.prev&&!ue.startOfLine;)ue=ue.prev;return ue?ue.indent+b:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:y.htmlMode?"html":"xml",helperType:y.htmlMode?"html":"xml",skipAttribute:function(w){w.state==j&&(w.state=de)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var ee=[],Y=w.context;Y;Y=Y.prev)ee.push(Y.tagName);return ee.reverse()}}}),l.defineMIME("text/xml","xml"),l.defineMIME("application/xml","xml"),l.mimeModes.hasOwnProperty("text/html")||l.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();(function(r,s){(function(l){l(Yr.exports,eh.exports,Vd.exports,Vy.exports)})(function(l){var u={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(T,O,A){var H=T.current(),re=H.search(O);return re>-1?T.backUp(H.length-re):H.match(/<\/?$/)&&(T.backUp(H.length),T.match(O,!1)||T.match(H)),A}var d={};function v(T){var O=d[T];return O||(d[T]=new RegExp("\\s+"+T+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function b(T,O){var A=T.match(v(O));return A?/^\s*(.*?)\s*$/.exec(A[2])[1]:""}function y(T,O){return new RegExp((O?"^":"")+"</\\s*"+T+"\\s*>","i")}function x(T,O){for(var A in T)for(var H=O[A]||(O[A]=[]),re=T[A],V=re.length-1;V>=0;V--)H.unshift(re[V])}function S(T,O){for(var A=0;A<T.length;A++){var H=T[A];if(!H[0]||H[1].test(b(O,H[0])))return H[2]}}l.defineMode("htmlmixed",function(T,O){var A=l.getMode(T,{name:"xml",htmlMode:!0,multilineTagIndentFactor:O.multilineTagIndentFactor,multilineTagIndentPastTag:O.multilineTagIndentPastTag,allowMissingTagName:O.allowMissingTagName}),H={},re=O&&O.tags,V=O&&O.scriptTypes;if(x(u,H),re&&x(re,H),V)for(var N=V.length-1;N>=0;N--)H.script.unshift(["type",V[N].matches,V[N].mode]);function D(I,B){var oe=A.token(I,B.htmlState),pe=/\btag\b/.test(oe),ye;if(pe&&!/[<>\s\/]/.test(I.current())&&(ye=B.htmlState.tagName&&B.htmlState.tagName.toLowerCase())&&H.hasOwnProperty(ye))B.inTag=ye+" ";else if(B.inTag&&pe&&/>$/.test(I.current())){var We=/^([\S]+) (.*)/.exec(B.inTag);B.inTag=null;var Ee=I.current()==">"&&S(H[We[1]],We[2]),be=l.getMode(T,Ee),de=y(We[1],!0),Ne=y(We[1],!1);B.token=function(j,$){return j.match(de,!1)?($.token=D,$.localState=$.localMode=null,null):f(j,Ne,$.localMode.token(j,$.localState))},B.localMode=be,B.localState=l.startState(be,A.indent(B.htmlState,"",""))}else B.inTag&&(B.inTag+=I.current(),I.eol()&&(B.inTag+=" "));return oe}return{startState:function(){var I=l.startState(A);return{token:D,inTag:null,localMode:null,localState:null,htmlState:I}},copyState:function(I){var B;return I.localState&&(B=l.copyState(I.localMode,I.localState)),{token:I.token,inTag:I.inTag,localMode:I.localMode,localState:B,htmlState:l.copyState(A,I.htmlState)}},token:function(I,B){return B.token(I,B)},indent:function(I,B,oe){return!I.localMode||/^\s*<\//.test(B)?A.indent(I.htmlState,B,oe):I.localMode.indent?I.localMode.indent(I.localState,B,oe):l.Pass},innerMode:function(I){return{state:I.localState||I.htmlState,mode:I.localMode||A}}}},"xml","javascript","css"),l.defineMIME("text/html","htmlmixed")})})();(function(r,s){(function(l){l(Yr.exports,eh.exports,Vd.exports)})(function(l){function u(d,v,b,y){this.state=d,this.mode=v,this.depth=b,this.prev=y}function f(d){return new u(l.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&f(d.prev))}l.defineMode("jsx",function(d,v){var b=l.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),y=l.getMode(d,v&&v.base||"javascript");function x(A){var H=A.tagName;A.tagName=null;var re=b.indent(A,"","");return A.tagName=H,re}function S(A,H){return H.context.mode==b?T(A,H,H.context):O(A,H,H.context)}function T(A,H,re){if(re.depth==2)return A.match(/^.*?\*\//)?re.depth=1:A.skipToEnd(),"comment";if(A.peek()=="{"){b.skipAttribute(re.state);var V=x(re.state),N=re.state.context;if(N&&A.match(/^[^>]*>\s*$/,!1)){for(;N.prev&&!N.startOfLine;)N=N.prev;N.startOfLine?V-=d.indentUnit:re.prev.state.lexical&&(V=re.prev.state.lexical.indented)}else re.depth==1&&(V+=d.indentUnit);return H.context=new u(l.startState(y,V),y,0,H.context),null}if(re.depth==1){if(A.peek()=="<")return b.skipAttribute(re.state),H.context=new u(l.startState(b,x(re.state)),b,0,H.context),null;if(A.match("//"))return A.skipToEnd(),"comment";if(A.match("/*"))return re.depth=2,S(A,H)}var D=b.token(A,re.state),I=A.current(),B;return/\btag\b/.test(D)?/>$/.test(I)?re.state.context?re.depth=0:H.context=H.context.prev:/^</.test(I)&&(re.depth=1):!D&&(B=I.indexOf("{"))>-1&&A.backUp(I.length-B),D}function O(A,H,re){if(A.peek()=="<"&&y.expressionAllowed(A,re.state))return H.context=new u(l.startState(b,y.indent(re.state,"","")),b,0,H.context),y.skipExpression(re.state),null;var V=y.token(A,re.state);if(!V&&re.depth!=null){var N=A.current();N=="{"?re.depth++:N=="}"&&--re.depth==0&&(H.context=H.context.prev)}return V}return{startState:function(){return{context:new u(l.startState(y),y)}},copyState:function(A){return{context:f(A.context)}},token:S,indent:function(A,H,re){return A.context.mode.indent(A.context.state,H,re)},innerMode:function(A){return A.context}}},"xml","javascript"),l.defineMIME("text/jsx","jsx"),l.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(r,s){(function(l){l(Yr.exports)})(function(l){l.defineOption("placeholder","",function(x,S,T){var O=T&&T!=l.Init;if(S&&!O)x.on("blur",v),x.on("change",b),x.on("swapDoc",b),l.on(x.getInputField(),"compositionupdate",x.state.placeholderCompose=function(){d(x)}),b(x);else if(!S&&O){x.off("blur",v),x.off("change",b),x.off("swapDoc",b),l.off(x.getInputField(),"compositionupdate",x.state.placeholderCompose),u(x);var A=x.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}S&&!x.hasFocus()&&v(x)});function u(x){x.state.placeholder&&(x.state.placeholder.parentNode.removeChild(x.state.placeholder),x.state.placeholder=null)}function f(x){u(x);var S=x.state.placeholder=document.createElement("pre");S.style.cssText="height: 0; overflow: visible",S.style.direction=x.getOption("direction"),S.className="CodeMirror-placeholder CodeMirror-line-like";var T=x.getOption("placeholder");typeof T=="string"&&(T=document.createTextNode(T)),S.appendChild(T),x.display.lineSpace.insertBefore(S,x.display.lineSpace.firstChild)}function d(x){setTimeout(function(){var S=!1;if(x.lineCount()==1){var T=x.getInputField();S=T.nodeName=="TEXTAREA"?!x.getLine(0).length:!/[^\u200b]/.test(T.querySelector(".CodeMirror-line").textContent)}S?f(x):u(x)},20)}function v(x){y(x)&&f(x)}function b(x){var S=x.getWrapperElement(),T=y(x);S.className=S.className.replace(" CodeMirror-empty","")+(T?" CodeMirror-empty":""),T?f(x):u(x)}function y(x){return x.lineCount()===1&&x.getLine(0)===""}})})();(function(r,s){(function(l){l(Yr.exports)})(function(l){var u="CodeMirror-hint",f="CodeMirror-hint-active";l.showHint=function(N,D,I){if(!D)return N.showHint(I);I&&I.async&&(D.async=!0);var B={hint:D};if(I)for(var oe in I)B[oe]=I[oe];return N.showHint(B)},l.defineExtension("showHint",function(N){N=y(this,this.getCursor("start"),N);var D=this.listSelections();if(!(D.length>1)){if(this.somethingSelected()){if(!N.hint.supportsSelection)return;for(var I=0;I<D.length;I++)if(D[I].head.line!=D[I].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var B=this.state.completionActive=new d(this,N);!B.options.hint||(l.signal(this,"startCompletion",this),B.update(!0))}}),l.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(N,D){if(this.cm=N,this.options=D,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var I=this;N.on("cursorActivity",this.activityFunc=function(){I.cursorActivity()})}}var v=window.requestAnimationFrame||function(N){return setTimeout(N,1e3/60)},b=window.cancelAnimationFrame||clearTimeout;d.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&l.signal(this.data,"close"),this.widget&&this.widget.close(),l.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(N,D){var I=N.list[D],B=this;this.cm.operation(function(){I.hint?I.hint(B.cm,N,I):B.cm.replaceRange(x(I),I.from||N.from,I.to||N.to,"complete"),l.signal(N,"pick",I),B.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(b(this.debounce),this.debounce=0);var N=this.startPos;this.data&&(N=this.data.from);var D=this.cm.getCursor(),I=this.cm.getLine(D.line);if(D.line!=this.startPos.line||I.length-D.ch!=this.startLen-this.startPos.ch||D.ch<N.ch||this.cm.somethingSelected()||!D.ch||this.options.closeCharacters.test(I.charAt(D.ch-1)))this.close();else{var B=this;this.debounce=v(function(){B.update()}),this.widget&&this.widget.disable()}},update:function(N){if(this.tick!=null){var D=this,I=++this.tick;H(this.options.hint,this.cm,this.options,function(B){D.tick==I&&D.finishUpdate(B,N)})}},finishUpdate:function(N,D){this.data&&l.signal(this.data,"update");var I=this.widget&&this.widget.picked||D&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=N,N&&N.list.length&&(I&&N.list.length==1?this.pick(N,0):(this.widget=new O(this,N),l.signal(N,"shown")))}};function y(N,D,I){var B=N.options.hintOptions,oe={};for(var pe in V)oe[pe]=V[pe];if(B)for(var pe in B)B[pe]!==void 0&&(oe[pe]=B[pe]);if(I)for(var pe in I)I[pe]!==void 0&&(oe[pe]=I[pe]);return oe.hint.resolve&&(oe.hint=oe.hint.resolve(N,D)),oe}function x(N){return typeof N=="string"?N:N.text}function S(N,D){var I={Up:function(){D.moveFocus(-1)},Down:function(){D.moveFocus(1)},PageUp:function(){D.moveFocus(-D.menuSize()+1,!0)},PageDown:function(){D.moveFocus(D.menuSize()-1,!0)},Home:function(){D.setFocus(0)},End:function(){D.setFocus(D.length-1)},Enter:D.pick,Tab:D.pick,Esc:D.close},B=/Mac/.test(navigator.platform);B&&(I["Ctrl-P"]=function(){D.moveFocus(-1)},I["Ctrl-N"]=function(){D.moveFocus(1)});var oe=N.options.customKeys,pe=oe?{}:I;function ye(be,de){var Ne;typeof de!="string"?Ne=function(j){return de(j,D)}:I.hasOwnProperty(de)?Ne=I[de]:Ne=de,pe[be]=Ne}if(oe)for(var We in oe)oe.hasOwnProperty(We)&&ye(We,oe[We]);var Ee=N.options.extraKeys;if(Ee)for(var We in Ee)Ee.hasOwnProperty(We)&&ye(We,Ee[We]);return pe}function T(N,D){for(;D&&D!=N;){if(D.nodeName.toUpperCase()==="LI"&&D.parentNode==N)return D;D=D.parentNode}}function O(N,D){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=N,this.data=D,this.picked=!1;var I=this,B=N.cm,oe=B.getInputField().ownerDocument,pe=oe.defaultView||oe.parentWindow,ye=this.hints=oe.createElement("ul");ye.setAttribute("role","listbox"),ye.setAttribute("aria-expanded","true"),ye.id=this.id;var We=N.cm.options.theme;ye.className="CodeMirror-hints "+We,this.selectedHint=D.selectedHint||0;for(var Ee=D.list,be=0;be<Ee.length;++be){var de=ye.appendChild(oe.createElement("li")),Ne=Ee[be],j=u+(be!=this.selectedHint?"":" "+f);Ne.className!=null&&(j=Ne.className+" "+j),de.className=j,be==this.selectedHint&&de.setAttribute("aria-selected","true"),de.id=this.id+"-"+be,de.setAttribute("role","option"),Ne.render?Ne.render(de,D,Ne):de.appendChild(oe.createTextNode(Ne.displayText||x(Ne))),de.hintId=be}var $=N.options.container||oe.body,w=B.cursorCoords(N.options.alignWithWord?D.from:null),ee=w.left,Y=w.bottom,ue=!0,ze=0,Ge=0;if($!==oe.body){var nt=["absolute","relative","fixed"].indexOf(pe.getComputedStyle($).position)!==-1,lt=nt?$:$.offsetParent,Ie=lt.getBoundingClientRect(),Je=oe.body.getBoundingClientRect();ze=Ie.left-Je.left-lt.scrollLeft,Ge=Ie.top-Je.top-lt.scrollTop}ye.style.left=ee-ze+"px",ye.style.top=Y-Ge+"px";var q=pe.innerWidth||Math.max(oe.body.offsetWidth,oe.documentElement.offsetWidth),Z=pe.innerHeight||Math.max(oe.body.offsetHeight,oe.documentElement.offsetHeight);$.appendChild(ye),B.getInputField().setAttribute("aria-autocomplete","list"),B.getInputField().setAttribute("aria-owns",this.id),B.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var K=N.options.moveOnOverlap?ye.getBoundingClientRect():new DOMRect,se=N.options.paddingForScrollbar?ye.scrollHeight>ye.clientHeight+1:!1,Ce;setTimeout(function(){Ce=B.getScrollInfo()});var Se=K.bottom-Z;if(Se>0){var ge=K.bottom-K.top,Te=w.top-(w.bottom-K.top);if(Te-ge>0)ye.style.top=(Y=w.top-ge-Ge)+"px",ue=!1;else if(ge>Z){ye.style.height=Z-5+"px",ye.style.top=(Y=w.bottom-K.top-Ge)+"px";var _=B.getCursor();D.from.ch!=_.ch&&(w=B.cursorCoords(_),ye.style.left=(ee=w.left-ze)+"px",K=ye.getBoundingClientRect())}}var E=K.right-q;if(se&&(E+=B.display.nativeBarWidth),E>0&&(K.right-K.left>q&&(ye.style.width=q-5+"px",E-=K.right-K.left-q),ye.style.left=(ee=w.left-E-ze)+"px"),se)for(var F=ye.firstChild;F;F=F.nextSibling)F.style.paddingRight=B.display.nativeBarWidth+"px";if(B.addKeyMap(this.keyMap=S(N,{moveFocus:function(ne,fe){I.changeActive(I.selectedHint+ne,fe)},setFocus:function(ne){I.changeActive(ne)},menuSize:function(){return I.screenAmount()},length:Ee.length,close:function(){N.close()},pick:function(){I.pick()},data:D})),N.options.closeOnUnfocus){var G;B.on("blur",this.onBlur=function(){G=setTimeout(function(){N.close()},100)}),B.on("focus",this.onFocus=function(){clearTimeout(G)})}B.on("scroll",this.onScroll=function(){var ne=B.getScrollInfo(),fe=B.getWrapperElement().getBoundingClientRect();Ce||(Ce=B.getScrollInfo());var ce=Y+Ce.top-ne.top,te=ce-(pe.pageYOffset||(oe.documentElement||oe.body).scrollTop);if(ue||(te+=ye.offsetHeight),te<=fe.top||te>=fe.bottom)return N.close();ye.style.top=ce+"px",ye.style.left=ee+Ce.left-ne.left+"px"}),l.on(ye,"dblclick",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),I.pick())}),l.on(ye,"click",function(ne){var fe=T(ye,ne.target||ne.srcElement);fe&&fe.hintId!=null&&(I.changeActive(fe.hintId),N.options.completeOnSingleClick&&I.pick())}),l.on(ye,"mousedown",function(){setTimeout(function(){B.focus()},20)});var J=this.getSelectedHintRange();return(J.from!==0||J.to!==0)&&this.scrollToActive(),l.signal(D,"select",Ee[this.selectedHint],ye.childNodes[this.selectedHint]),!0}O.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var N=this.completion.cm.getInputField();N.removeAttribute("aria-activedescendant"),N.removeAttribute("aria-owns");var D=this.completion.cm;this.completion.options.closeOnUnfocus&&(D.off("blur",this.onBlur),D.off("focus",this.onFocus)),D.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var N=this;this.keyMap={Enter:function(){N.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(N,D){if(N>=this.data.list.length?N=D?this.data.list.length-1:0:N<0&&(N=D?0:this.data.list.length-1),this.selectedHint!=N){var I=this.hints.childNodes[this.selectedHint];I&&(I.className=I.className.replace(" "+f,""),I.removeAttribute("aria-selected")),I=this.hints.childNodes[this.selectedHint=N],I.className+=" "+f,I.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",I.id),this.scrollToActive(),l.signal(this.data,"select",this.data.list[this.selectedHint],I)}},scrollToActive:function(){var N=this.getSelectedHintRange(),D=this.hints.childNodes[N.from],I=this.hints.childNodes[N.to],B=this.hints.firstChild;D.offsetTop<this.hints.scrollTop?this.hints.scrollTop=D.offsetTop-B.offsetTop:I.offsetTop+I.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=I.offsetTop+I.offsetHeight-this.hints.clientHeight+B.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var N=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-N),to:Math.min(this.data.list.length-1,this.selectedHint+N)}}};function A(N,D){if(!N.somethingSelected())return D;for(var I=[],B=0;B<D.length;B++)D[B].supportsSelection&&I.push(D[B]);return I}function H(N,D,I,B){if(N.async)N(D,B,I);else{var oe=N(D,I);oe&&oe.then?oe.then(B):B(oe)}}function re(N,D){var I=N.getHelpers(D,"hint"),B;if(I.length){var oe=function(pe,ye,We){var Ee=A(pe,I);function be(de){if(de==Ee.length)return ye(null);H(Ee[de],pe,We,function(Ne){Ne&&Ne.list.length>0?ye(Ne):be(de+1)})}be(0)};return oe.async=!0,oe.supportsSelection=!0,oe}else return(B=N.getHelper(N.getCursor(),"hintWords"))?function(pe){return l.hint.fromList(pe,{words:B})}:l.hint.anyword?function(pe,ye){return l.hint.anyword(pe,ye)}:function(){}}l.registerHelper("hint","auto",{resolve:re}),l.registerHelper("hint","fromList",function(N,D){var I=N.getCursor(),B=N.getTokenAt(I),oe,pe=l.Pos(I.line,B.start),ye=I;B.start<I.ch&&/\w/.test(B.string.charAt(I.ch-B.start-1))?oe=B.string.substr(0,I.ch-B.start):(oe="",pe=I);for(var We=[],Ee=0;Ee<D.words.length;Ee++){var be=D.words[Ee];be.slice(0,oe.length)==oe&&We.push(be)}if(We.length)return{list:We,from:pe,to:ye}}),l.commands.autocomplete=l.showHint;var V={hint:l.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};l.defineOption("hintOptions",null)})})();function e0(r,s,l={}){const u=Qy.fromTextArea(r.value,Il({theme:"vars"},Re(l)));It(l,d=>Object.entries(d).forEach(([v,b])=>u.setOption(v,b)));let f=!1;return u.on("change",()=>{if(f){f=!1;return}s.value=u.getValue()}),It(s,d=>{if(d!==u.getValue()){f=!0;const v=u.listSelections();u.replaceRange(d,u.posFromIndex(0),u.posFromIndex(1/0)),u.setSelections(v)}},{immediate:!0}),u}const t0={relative:"","font-mono":"","text-sm":""},r0=Rr({props:{modelValue:null,mode:null,readOnly:{type:Boolean},matched:null,getHint:null},emits:["update:modelValue"],setup(r,{emit:s}){const l=r,u={html:"htmlmixed",vue:"htmlmixed",svelte:"htmlmixed",js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},f=At(),d=$y(l,"modelValue",s,{passive:!0}),v=ct(()=>u[l.mode||""]||l.mode),b=ct(()=>l.getHint?{"Ctrl-Space":"autocomplete","Ctrl-.":"autocomplete","Cmd-Space":"autocomplete","Cmd-.":"autocomplete",Tab:"autocomplete"}:{}),y=ct(()=>l.getHint?{hint:l.getHint}:{});return Pa(async()=>{const x=e0(f,d,Ci(jf(Il({},mv(l)),{mode:v,hintOptions:y,extraKeys:b})));x.setSize("100%","100%"),l.getHint&&x.on("keyup",(H,re)=>{re.key.match(/^[\w:-]$/)&&H.execCommand("autocomplete")}),setTimeout(()=>x.refresh(),100);const S=[];function T(H,re){S.push(x.markText(x.posFromIndex(H),x.posFromIndex(re),{className:"highlighted"}))}function O(){S.forEach(H=>H.clear()),Zy(l.modelValue,Array.from(l.matched||[])).forEach(H=>T(H[0],H[1]))}let A=0;It(()=>[l.modelValue,l.matched],async()=>{clearTimeout(A),l.matched&&(A=setTimeout(O,200))},{immediate:!0})}),(x,S)=>(gt(),Bt("div",t0,[Fe("textarea",{ref_key:"el",ref:f},null,512)]))}});var th=(r,s)=>{const l=r.__vccOpts||r;for(const[u,f]of s)l[u]=f;return l};const n0={},i0={"bg-gray4:10":"","p-5":"",b:"b main",text:"sm gray5 dark:gray3"};function o0(r,s){return gt(),Bt("div",i0,[jd(r.$slots,"default")])}var s0=th(n0,[["render",o0]]);const l0="/@vite/client",rh=vo(),nh=vo(),a0=rh.on,ih=nh.on;da(()=>import(l0),[]).then(r=>{const s=r.createHotContext("/");s.on("vite:beforeUpdate",l=>{l.updates.forEach(u=>{rh.trigger(u)})}),s.on("unocss:config-changed",()=>{nh.trigger()})}).catch(r=>{console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates"),console.error(r)});const Ks="/__unocss_api",oh=Us(Ks).json(),Fa=Us(`${Ks}/overview`,{immediate:!1}).json(),Mt=oh.data,hs=Fa.data;ih(()=>{oh.execute(),Fa.execute()});function Mw(r){const s=Us(ct(()=>`${Ks}/module?id=${encodeURIComponent(Re(r))}`),{refetch:!0}).json();return ih(()=>s.execute()),a0(l=>{var u;(l.path===Re(r)||l.path===Re(r).slice(((u=Mt.value)==null?void 0:u.root.length)||0))&&setTimeout(()=>{s.execute()},50)}),s}function Ew(r){const s=ey(r,500);return Us(ct(()=>`${Ks}/repl?token=${encodeURIComponent(s.value)}`),{refetch:!0}).json()}const ps=ct(()=>{if(!Mt.value)return{workspace:{children:{},items:[]},root:{children:{},items:[]}};const r=Mt.value.modules.map(u=>({full:u,path:u})),s=r.filter(u=>u.full.startsWith(Mt.value.root)),l=r.filter(u=>!u.full.startsWith(Mt.value.root));return s.forEach(u=>u.path=u.path.slice(Mt.value.root.length+1)),{workspace:Mc(s,"Project Root"),root:Mc(l,"Disk Root")}});function Mc(r,s){const l={name:s,children:{},items:[]};function u(f,d,v=l){if(d.length<=1){v.items.push(f);return}const b=d.shift();v.children[b]||(v.children[b]={name:b,children:{},items:[]}),u(f,d,v.children[b])}return r.forEach(f=>{const d=f.path.split(/\//g).filter(Boolean);u(f,d)}),l}const u0={key:0,"ws-wrap":""},f0=Fe("span",{op80:""},".",-1),c0={key:1},d0=Rr({props:{id:null},setup(r){return(s,l)=>r.id&&Re(Mt)?(gt(),Bt("span",u0,[r.id.startsWith(Re(Mt).root)?(gt(),Bt(rr,{key:0},[f0,Fe("span",null,tr(r.id.slice(Re(Mt).root.length)),1)],64)):(gt(),Bt("span",c0,tr(r.id),1))])):Ls("",!0)}}),h0=(r,s)=>{const l=At(null);return Hy(r,()=>{var f;const u=(f=Da(r))==null?void 0:f.clientHeight;l.value=u?`--${s}: calc(100vh - ${u}px - 2px);`:null}),l},p0={"h-full":""},g0={p:"x4 y2",grid:"~ cols-4 gap-4"},v0=Fe("div",{op80:""}," Presets ",-1),m0={op50:"","ws-pre":""},y0={overflow:"auto"},b0=Fe("div",{op80:""}," Rules ",-1),w0=Fe("span",{op50:""},"dynamic",-1),x0=Fe("br",null,null,-1),k0=Fe("span",{op50:""},"static",-1),S0=Fe("div",{op80:""}," Variants ",-1),C0=Fe("div",{op80:""}," Shortcuts ",-1),_0={key:0},T0=Fe("div",{op80:""}," Config File ",-1),L0=Fe("div",{op80:""}," Version ",-1),P0={op50:"","ws-pre":""},O0={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},M0=Fe("div",{op80:""}," Included Files ",-1),E0=Fe("div",{op80:""}," CSS Size ",-1),A0=Fe("span",{op50:""},"gzipped",-1),N0=Fe("div",{op80:""}," Matched Rules ",-1),z0=Fe("div",{op80:""}," Layers ",-1),R0={op50:"","ws-pre":""},D0=Rr({setup(r){const s=At(null),l=h0(s,"overview-scrolls");return Fa.execute(),(u,f)=>{var y;const d=d0,v=s0,b=r0;return gt(),Bt("div",p0,[ot(v,{ref_key:"status",ref:s,p0:""},{default:gn(()=>{var x,S,T,O,A,H,re,V,N,D,I,B,oe,pe,ye,We,Ee,be;return[Fe("div",g0,[Fe("div",null,[v0,Fe("div",m0,tr((T=(S=(x=Re(Mt))==null?void 0:x.config)==null?void 0:S.presets)==null?void 0:T.map(de=>de.name).join(`
25
25
  `)),1)]),Fe("div",y0,[b0,Ar(" "+tr((H=(A=(O=Re(Mt))==null?void 0:O.config)==null?void 0:A.rulesDynamic)==null?void 0:H.filter(Boolean).length)+" ",1),w0,x0,Ar(" "+tr(Object.keys(((V=(re=Re(Mt))==null?void 0:re.config)==null?void 0:V.rulesStaticMap)||{}).length)+" ",1),k0]),Fe("div",null,[S0,Ar(" "+tr((I=(D=(N=Re(Mt))==null?void 0:N.config)==null?void 0:D.variants)==null?void 0:I.length),1)]),Fe("div",null,[C0,Ar(" "+tr((B=Re(Mt))==null?void 0:B.config.shortcuts.length),1)]),(oe=Re(Mt))!=null&&oe.configPath?(gt(),Bt("div",_0,[T0,ot(d,{id:Re(Mt).configPath},null,8,["id"])])):Ls("",!0),Fe("div",null,[L0,Fe("div",P0,tr((pe=Re(Mt))==null?void 0:pe.version),1)])]),Fe("div",O0,[Fe("div",null,[M0,Ar(" "+tr((ye=Re(Mt))==null?void 0:ye.modules.length),1)]),Fe("div",null,[E0,Ar(" "+tr(((((We=Re(hs))==null?void 0:We.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),A0]),Fe("div",null,[N0,Ar(" "+tr((Ee=Re(hs))==null?void 0:Ee.matched.length),1)]),Fe("div",null,[z0,Fe("div",R0,tr((be=Re(hs))==null?void 0:be.layers.join(`
26
- `)),1)])])]}),_:1},512),ot(b,{"model-value":((y=Re(hs))==null?void 0:y.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:To(Re(l))},null,8,["model-value","style"])])}}}),F0={};function I0(r,s){const l=D0;return gt(),mi(l)}var H0=th(F0,[["render",I0]]);const W0=()=>da(()=>import("./repl.1c2094be.js"),["assets/repl.1c2094be.js","assets/repl.1241e426.css"]),B0=()=>da(()=>import("./_id_.eecb48a1.js"),["assets/_id_.eecb48a1.js","assets/_id_.b12126d7.css"]),j0=[{name:"index",path:"/",component:H0,props:!0},{name:"repl",path:"/repl",component:W0,props:!0},{name:"module-id",path:"/module/:id",component:B0,props:!0}];/*!
26
+ `)),1)])])]}),_:1},512),ot(b,{"model-value":((y=Re(hs))==null?void 0:y.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls overview-scrolls",style:To(Re(l))},null,8,["model-value","style"])])}}}),F0={};function I0(r,s){const l=D0;return gt(),mi(l)}var H0=th(F0,[["render",I0]]);const W0=()=>da(()=>import("./repl.970e70ef.js"),["assets/repl.970e70ef.js","assets/repl.1241e426.css"]),B0=()=>da(()=>import("./_id_.d75c7481.js"),["assets/_id_.d75c7481.js","assets/_id_.b12126d7.css"]),j0=[{name:"index",path:"/",component:H0,props:!0},{name:"repl",path:"/repl",component:W0,props:!0},{name:"module-id",path:"/module/:id",component:B0,props:!0}];/*!
27
27
  * vue-router v4.0.14
28
28
  * (c) 2022 Eduardo San Martin Morote
29
29
  * @license MIT