qword 1.1.13 → 1.1.14
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.
- package/ChangeLog +5 -0
- package/client/options.js +2 -2
- package/dist/qword.js +1 -1
- package/dist/qword.js.map +1 -1
- package/dist-dev/qword.js +1 -1
- package/package.json +1 -1
package/dist/qword.js
CHANGED
|
@@ -215,5 +215,5 @@ button {
|
|
|
215
215
|
</button>`),o.map(a(s)).join("")}
|
|
216
216
|
</div>
|
|
217
217
|
</div>
|
|
218
|
-
</div>`),className:"smalltalk",style:`z-index: ${G(G()+1)}`});for(let e of en(f,["ok","input"]))e.focus();for(let e of en(f,["input"]))e.setSelectionRange(0,i.length);for(let e of(function(e,t,i,n){for(let r of en(t,i))r.addEventListener(e,n)}("click",f,["cancel","close","ok"],e=>{et(e.target,f,h(),c())}),["click","contextmenu"]))f.addEventListener(e,e=>{for(let t of(e.stopPropagation(),en(f,["ok","input"])))t.focus()});return f.addEventListener("keydown",q(f,h(),c())),Object.assign(u,{dialog:f,ok:h})}function J(e){return e.getAttribute("data-name").replace("js-","")}function ee(e,t){let i=J(document.activeElement),n=t.length-1,r=t.indexOf(i);for(let i of en(e,[t[r===n?0:r+1]]))i.focus()}function et(e,t,i,n){let r=e.getAttribute("data-name").replace("js-","");if(/close|cancel/.test(r)){n(),er(t);return}let s=null;for(let e of en(t,["input"]))({value:s}=e);i(s),er(t)}let ei=V((e,t)=>e.querySelector(`[data-name="js-${t}"]`));function en(e,t){return t.map(ei(e)).filter(Boolean)}function er(e){let{parentElement:t}=e;t&&t.removeChild(e)}let es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo="ARRAYBUFFER not supported by this environment",ea="UINT8ARRAY not supported by this environment";function el(e,t,i,n){let r,s,o,a=t||[0],l=(i=i||0)>>>3,h=3*(-1===n);for(r=0;r<e.length;r+=1)s=(o=r+l)>>>2,a.length<=s&&a.push(0),a[s]|=e[r]<<8*(h+o%4*n);return{value:a,binLen:8*e.length+i}}function eh(e,t,i){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,i,n){let r,s,o,a;if(0!=e.length%2)throw Error("String of HEX type must be in byte increments");let l=t||[0],h=(i=i||0)>>>3,c=3*(-1===n);for(r=0;r<e.length;r+=2){if(isNaN(s=parseInt(e.substr(r,2),16)))throw Error("String of HEX type contains invalid characters");for(o=(a=(r>>>1)+h)>>>2;l.length<=o;)l.push(0);l[o]|=s<<8*(c+a%4*n)}return{value:l,binLen:4*e.length+i}}(e,t,n,i)};case"TEXT":return function(e,n,r){return function(e,t,i,n,r){let s,o,a,l,h,c,u,f,d=0,p=i||[0],O=(n=n||0)>>>3;if("UTF8"===t)for(u=3*(-1===r),a=0;a<e.length;a+=1)for(s=e.charCodeAt(a),o=[],128>s?o.push(s):2048>s?(o.push(192|s>>>6),o.push(128|63&s)):55296>s||57344<=s?o.push(224|s>>>12,128|s>>>6&63,128|63&s):(a+=1,s=65536+((1023&s)<<10|1023&e.charCodeAt(a)),o.push(240|s>>>18,128|s>>>12&63,128|s>>>6&63,128|63&s)),l=0;l<o.length;l+=1){for(h=(c=d+O)>>>2;p.length<=h;)p.push(0);p[h]|=o[l]<<8*(u+c%4*r),d+=1}else for(u=2*(-1===r),f="UTF16LE"===t&&1!==r||"UTF16LE"!==t&&1===r,a=0;a<e.length;a+=1){for(s=e.charCodeAt(a),!0===f&&(s=(l=255&s)<<8|s>>>8),h=(c=d+O)>>>2;p.length<=h;)p.push(0);p[h]|=s<<8*(u+c%4*r),d+=2}return{value:p,binLen:8*d+n}}(e,t,n,r,i)};case"B64":return function(e,t,n){return function(e,t,i,n){let r,s,o,a,l,h,c=0,u=t||[0],f=(i=i||0)>>>3,d=3*(-1===n),p=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==p&&p<e.length)throw Error("Invalid '=' found in base-64 string");for(r=0;r<e.length;r+=4){for(a=e.substr(r,4),o=0,s=0;s<a.length;s+=1)o|=es.indexOf(a.charAt(s))<<18-6*s;for(s=0;s<a.length-1;s+=1){for(l=(h=c+f)>>>2;u.length<=l;)u.push(0);u[l]|=(o>>>16-8*s&255)<<8*(d+h%4*n),c+=1}}return{value:u,binLen:8*c+i}}(e,t,n,i)};case"BYTES":return function(e,t,n){return function(e,t,i,n){let r,s,o,a,l=t||[0],h=(i=i||0)>>>3,c=3*(-1===n);for(s=0;s<e.length;s+=1)r=e.charCodeAt(s),o=(a=s+h)>>>2,l.length<=o&&l.push(0),l[o]|=r<<8*(c+a%4*n);return{value:l,binLen:8*e.length+i}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw Error(eo)}return function(e,t,n){return el(new Uint8Array(e),t,n,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw Error(ea)}return function(e,t,n){return el(e,t,n,i)};default:throw Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function ec(e,t,i,n){switch(e){case"HEX":return function(e){return function(e,t,i,n){let r="0123456789abcdef",s,o,a="",l=t/8,h=3*(-1===i);for(s=0;s<l;s+=1)a+=r.charAt((o=e[s>>>2]>>>8*(h+s%4*i))>>>4&15)+r.charAt(15&o);return n.outputUpper?a.toUpperCase():a}(e,t,i,n)};case"B64":return function(e){return function(e,t,i,n){let r,s,o,a,l,h="",c=t/8,u=3*(-1===i);for(r=0;r<c;r+=3)for(a=r+1<c?e[r+1>>>2]:0,l=r+2<c?e[r+2>>>2]:0,o=(e[r>>>2]>>>8*(u+r%4*i)&255)<<16|(a>>>8*(u+(r+1)%4*i)&255)<<8|l>>>8*(u+(r+2)%4*i)&255,s=0;s<4;s+=1)h+=8*r+6*s<=t?es.charAt(o>>>6*(3-s)&63):n.b64Pad;return h}(e,t,i,n)};case"BYTES":return function(e){var n=e,r=t,s=i;let o,a="",l=r/8,h=3*(-1===s);for(o=0;o<l;o+=1)a+=String.fromCharCode(n[o>>>2]>>>8*(h+o%4*s)&255);return a};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw Error(eo)}return function(e){return function(e,t,i){let n,r=t/8,s=new ArrayBuffer(r),o=new Uint8Array(s),a=3*(-1===i);for(n=0;n<r;n+=1)o[n]=e[n>>>2]>>>8*(a+n%4*i)&255;return s}(e,t,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw Error(ea)}return function(e){let n,r=t/8,s=3*(-1===i),o=new Uint8Array(r);for(n=0;n<r;n+=1)o[n]=e[n>>>2]>>>8*(s+n%4*i)&255;return o};default:throw Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}let eu=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],ef=[0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4],ed=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],ep="Chosen SHA variant is not supported",eO="Cannot set numRounds with MAC";function eg(e,t){let i,n,r=e.binLen>>>3,s=t.binLen>>>3,o=r<<3,a=4-r<<3;if(r%4!=0){for(i=0;i<s;i+=4)n=r+i>>>2,e.value[n]|=t.value[i>>>2]<<o,e.value.push(0),e.value[n+1]|=t.value[i>>>2]>>>a;return(e.value.length<<2)-4>=s+r&&e.value.pop(),{value:e.value,binLen:e.binLen+t.binLen}}return{value:e.value.concat(t.value),binLen:e.binLen+t.binLen}}function em(e){let t={outputUpper:!1,b64Pad:"=",outputLen:-1},i=e||{},n="Output length must be a multiple of 8";if(t.outputUpper=i.outputUpper||!1,i.b64Pad&&(t.b64Pad=i.b64Pad),i.outputLen){if(i.outputLen%8!=0)throw Error(n);t.outputLen=i.outputLen}else if(i.shakeLen){if(i.shakeLen%8!=0)throw Error(n);t.outputLen=i.shakeLen}if("boolean"!=typeof t.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw Error("Invalid b64Pad formatting option");return t}function ev(e,t,i,n){let r=e+" must include a value and format";if(!t){if(!n)throw Error(r);return n}if(void 0===t.value||!t.format)throw Error(r);return eh(t.format,t.encoding||"UTF8",i)(t.value)}class ey{constructor(e,t,i){let n=i||{};if(this.t=t,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw Error("numRounds must a integer >= 1");this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.H=!1,this.S=[],this.p=[]}update(e){let t,i=0,n=this.m>>>5,r=this.C(e,this.h,this.u),s=r.binLen,o=r.value,a=s>>>5;for(t=0;t<a;t+=n)i+this.m<=s&&(this.U=this.R(o.slice(t,t+n),this.U),i+=this.m);return this.A+=i,this.h=o.slice(i>>>5),this.u=s%this.m,this.l=!0,this}getHash(e,t){let i,n,r=this.K,s=em(t);if(this.v){if(-1===s.outputLen)throw Error("Output length must be specified in options");r=s.outputLen}let o=ec(e,r,this.T,s);if(this.H&&this.F)return o(this.F(s));for(n=this.L(this.h.slice(),this.u,this.A,this.B(this.U),r),i=1;i<this.numRounds;i+=1)this.v&&r%32!=0&&(n[n.length-1]&=0xffffff>>>24-r%32),n=this.L(n,r,0,this.M(this.o),r);return o(n)}setHMACKey(e,t,i){if(!this.k)throw Error("Variant does not support HMAC");if(this.l)throw Error("Cannot set MAC key after calling update");let n=eh(t,(i||{}).encoding||"UTF8",this.T);this.Y(n(e))}Y(e){let t,i=this.m>>>3,n=i/4-1;if(1!==this.numRounds)throw Error(eO);if(this.H)throw Error("MAC key already set");for(i<e.binLen/8&&(e.value=this.L(e.value,e.binLen,0,this.M(this.o),this.K));e.value.length<=n;)e.value.push(0);for(t=0;t<=n;t+=1)this.S[t]=0x36363636^e.value[t],this.p[t]=0x5c5c5c5c^e.value[t];this.U=this.R(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(e,t){let i=em(t);return ec(e,this.K,this.T,i)(this.N())}N(){let e;if(!this.H)throw Error("Cannot call getHMAC without first setting MAC key");let t=this.L(this.h.slice(),this.u,this.A,this.B(this.U),this.K);return e=this.R(this.p,this.M(this.o)),e=this.L(t,this.K,this.m,e,this.K)}}function ew(e,t){return e<<t|e>>>32-t}function eb(e,t){return e>>>t|e<<32-t}function ex(e,t){let i=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(i>>>16))<<16|65535&i}function eS(e,t,i,n,r){let s=(65535&e)+(65535&t)+(65535&i)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(r>>>16)+(s>>>16))<<16|65535&s}function ek(e){return[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]}function eQ(e,t){let i,n,r,s,o,a,l,h=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],l=0;l<80;l+=1){var c,u,f,d;h[l]=l<16?e[l]:ew(h[l-3]^h[l-8]^h[l-14]^h[l-16],1),a=l<20?eS(ew(i,5),(c=n)&r^~c&s,o,0x5a827999,h[l]):l<40?eS(ew(i,5),n^r^s,o,0x6ed9eba1,h[l]):l<60?eS(ew(i,5),(u=n)&(f=r)^u&(d=s)^f&d,o,0x8f1bbcdc,h[l]):eS(ew(i,5),n^r^s,o,0xca62c1d6,h[l]),o=s,s=r,r=ew(n,30),n=i,i=a}return t[0]=ex(i,t[0]),t[1]=ex(n,t[1]),t[2]=ex(r,t[2]),t[3]=ex(s,t[3]),t[4]=ex(o,t[4]),t}function e$(e,t,i,n){let r,s=15+(t+65>>>9<<4),o=t+i;for(;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=0|o,e[s-1]=o/0x100000000|0,r=0;r<e.length;r+=16)n=eQ(e.slice(r,r+16),n);return n}let eP=class extends ey{constructor(e,t,i){if("SHA-1"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.k=!0,this.F=this.N,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eQ,this.B=function(e){return e.slice()},this.M=ek,this.L=e$,this.U=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.m=512,this.K=160,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}};function eA(e){return"SHA-224"==e?ef.slice():ed.slice()}function eC(e,t){let i,n,r,s,o,a,l,h,c,u,f,d=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],h=t[7],f=0;f<64;f+=1){var p,O,g,m,v,y,w,b;d[f]=f<16?e[f]:function(e,t,i,n){let r=(65535&e)+(65535&t)+(65535&i)+(65535&n);return(65535&(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(r>>>16))<<16|65535&r}(eb(w=d[f-2],17)^eb(w,19)^w>>>10,d[f-7],eb(b=d[f-15],7)^eb(b,18)^b>>>3,d[f-16]),c=eS(h,eb(p=o,6)^eb(p,11)^eb(p,25),(O=o)&a^~O&l,eu[f],d[f]),u=ex(eb(g=i,2)^eb(g,13)^eb(g,22),(m=i)&(v=n)^m&(y=r)^v&y),h=l,l=a,a=o,o=ex(s,c),s=r,r=n,n=i,i=ex(c,u)}return t[0]=ex(i,t[0]),t[1]=ex(n,t[1]),t[2]=ex(r,t[2]),t[3]=ex(s,t[3]),t[4]=ex(o,t[4]),t[5]=ex(a,t[5]),t[6]=ex(l,t[6]),t[7]=ex(h,t[7]),t}let e_=class extends ey{constructor(e,t,i){if("SHA-224"!==e&&"SHA-256"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.F=this.N,this.k=!0,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eC,this.B=function(e){return e.slice()},this.M=eA,this.L=function(t,i,n,r){let s;var o=r;let a=15+(i+65>>>9<<4),l=i+n;for(;t.length<=a;)t.push(0);for(t[i>>>5]|=128<<24-i%32,t[a]=0|l,t[a-1]=l/0x100000000|0,s=0;s<t.length;s+=16)o=eC(t.slice(s,s+16),o);return"SHA-224"===e?[o[0],o[1],o[2],o[3],o[4],o[5],o[6]]:o},this.U=eA(e),this.m=512,this.K="SHA-224"===e?224:256,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}};class eT{constructor(e,t){this.I=e,this.X=t}}function eM(e,t){let i;return t>32?(i=64-t,new eT(e.X<<t|e.I>>>i,e.I<<t|e.X>>>i)):0!==t?(i=32-t,new eT(e.I<<t|e.X>>>i,e.X<<t|e.I>>>i)):e}function eZ(e,t){let i;return t<32?(i=32-t,new eT(e.I>>>t|e.X<<i,e.X>>>t|e.I<<i)):(i=64-t,new eT(e.X>>>t|e.I<<i,e.I>>>t|e.X<<i))}function eR(e,t){return new eT(e.I>>>t,e.X>>>t|e.I<<32-t)}function eX(e,t){let i,n;i=(65535&e.X)+(65535&t.X);let r=(65535&(n=(e.X>>>16)+(t.X>>>16)+(i>>>16)))<<16|65535&i;return i=(65535&e.I)+(65535&t.I)+(n>>>16),new eT((65535&(n=(e.I>>>16)+(t.I>>>16)+(i>>>16)))<<16|65535&i,r)}function eE(e,t){return new eT(e.I^t.I,e.X^t.X)}let ej=[new eT(eu[0],0xd728ae22),new eT(eu[1],0x23ef65cd),new eT(eu[2],0xec4d3b2f),new eT(eu[3],0x8189dbbc),new eT(eu[4],0xf348b538),new eT(eu[5],0xb605d019),new eT(eu[6],0xaf194f9b),new eT(eu[7],0xda6d8118),new eT(eu[8],0xa3030242),new eT(eu[9],0x45706fbe),new eT(eu[10],0x4ee4b28c),new eT(eu[11],0xd5ffb4e2),new eT(eu[12],0xf27b896f),new eT(eu[13],0x3b1696b1),new eT(eu[14],0x25c71235),new eT(eu[15],0xcf692694),new eT(eu[16],0x9ef14ad2),new eT(eu[17],0x384f25e3),new eT(eu[18],0x8b8cd5b5),new eT(eu[19],0x77ac9c65),new eT(eu[20],0x592b0275),new eT(eu[21],0x6ea6e483),new eT(eu[22],0xbd41fbd4),new eT(eu[23],0x831153b5),new eT(eu[24],0xee66dfab),new eT(eu[25],0x2db43210),new eT(eu[26],0x98fb213f),new eT(eu[27],0xbeef0ee4),new eT(eu[28],0x3da88fc2),new eT(eu[29],0x930aa725),new eT(eu[30],0xe003826f),new eT(eu[31],0xa0e6e70),new eT(eu[32],0x46d22ffc),new eT(eu[33],0x5c26c926),new eT(eu[34],0x5ac42aed),new eT(eu[35],0x9d95b3df),new eT(eu[36],0x8baf63de),new eT(eu[37],0x3c77b2a8),new eT(eu[38],0x47edaee6),new eT(eu[39],0x1482353b),new eT(eu[40],0x4cf10364),new eT(eu[41],0xbc423001),new eT(eu[42],0xd0f89791),new eT(eu[43],0x654be30),new eT(eu[44],0xd6ef5218),new eT(eu[45],0x5565a910),new eT(eu[46],0x5771202a),new eT(eu[47],0x32bbd1b8),new eT(eu[48],0xb8d2d0c8),new eT(eu[49],0x5141ab53),new eT(eu[50],0xdf8eeb99),new eT(eu[51],0xe19b48a8),new eT(eu[52],0xc5c95a63),new eT(eu[53],0xe3418acb),new eT(eu[54],0x7763e373),new eT(eu[55],0xd6b2b8a3),new eT(eu[56],0x5defb2fc),new eT(eu[57],0x43172f60),new eT(eu[58],0xa1f0ab72),new eT(eu[59],0x1a6439ec),new eT(eu[60],0x23631e28),new eT(eu[61],0xde82bde9),new eT(eu[62],0xb2c67915),new eT(eu[63],0xe372532b),new eT(0xca273ece,0xea26619c),new eT(0xd186b8c7,0x21c0c207),new eT(0xeada7dd6,0xcde0eb1e),new eT(0xf57d4f7f,0xee6ed178),new eT(0x6f067aa,0x72176fba),new eT(0xa637dc5,0xa2c898a6),new eT(0x113f9804,0xbef90dae),new eT(0x1b710b35,0x131c471b),new eT(0x28db77f5,0x23047d84),new eT(0x32caab7b,0x40c72493),new eT(0x3c9ebe0a,0x15c9bebc),new eT(0x431d67c4,0x9c100d4c),new eT(0x4cc5d4be,0xcb3e42b6),new eT(0x597f299c,0xfc657e2a),new eT(0x5fcb6fab,0x3ad6faec),new eT(0x6c44198c,0x4a475817)];function eB(e){return"SHA-384"===e?[new eT(0xcbbb9d5d,ef[0]),new eT(0x629a292a,ef[1]),new eT(0x9159015a,ef[2]),new eT(0x152fecd8,ef[3]),new eT(0x67332667,ef[4]),new eT(0x98eb44a87,ef[5]),new eT(0xdb0c2e0d,ef[6]),new eT(0x47b5481d,ef[7])]:[new eT(ed[0],0xf3bcc908),new eT(ed[1],0x84caa73b),new eT(ed[2],0xfe94f82b),new eT(ed[3],0x5f1d36f1),new eT(ed[4],0xade682d1),new eT(ed[5],0x2b3e6c1f),new eT(ed[6],0xfb41bd6b),new eT(ed[7],0x137e2179)]}function eL(e,t){let i,n,r,s,o,a,l,h,c,u,f,d,p=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],h=t[7],f=0;f<80;f+=1){var O,g,m,v,y,w;f<16?(d=2*f,p[f]=new eT(e[d],e[d+1])):p[f]=function(e,t,i,n){let r,s;r=(65535&e.X)+(65535&t.X)+(65535&i.X)+(65535&n.X);let o=(65535&(s=(e.X>>>16)+(t.X>>>16)+(i.X>>>16)+(n.X>>>16)+(r>>>16)))<<16|65535&r;return r=(65535&e.I)+(65535&t.I)+(65535&i.I)+(65535&n.I)+(s>>>16),new eT((65535&(s=(e.I>>>16)+(t.I>>>16)+(i.I>>>16)+(n.I>>>16)+(r>>>16)))<<16|65535&r,o)}(function(e){let t=eZ(e,19),i=eZ(e,61),n=eR(e,6);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(p[f-2]),p[f-7],function(e){let t=eZ(e,1),i=eZ(e,8),n=eR(e,7);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(p[f-15]),p[f-16]),c=function(e,t,i,n,r){let s,o;s=(65535&e.X)+(65535&t.X)+(65535&i.X)+(65535&n.X)+(65535&r.X);let a=(65535&(o=(e.X>>>16)+(t.X>>>16)+(i.X>>>16)+(n.X>>>16)+(r.X>>>16)+(s>>>16)))<<16|65535&s;return s=(65535&e.I)+(65535&t.I)+(65535&i.I)+(65535&n.I)+(65535&r.I)+(o>>>16),new eT((65535&(o=(e.I>>>16)+(t.I>>>16)+(i.I>>>16)+(n.I>>>16)+(r.I>>>16)+(s>>>16)))<<16|65535&s,a)}(h,function(e){let t=eZ(e,14),i=eZ(e,18),n=eZ(e,41);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(o),(O=o,g=a,m=l,new eT(O.I&g.I^~O.I&m.I,O.X&g.X^~O.X&m.X)),ej[f],p[f]),u=eX(function(e){let t=eZ(e,28),i=eZ(e,34),n=eZ(e,39);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(i),(v=i,y=n,w=r,new eT(v.I&y.I^v.I&w.I^y.I&w.I,v.X&y.X^v.X&w.X^y.X&w.X))),h=l,l=a,a=o,o=eX(s,c),s=r,r=n,n=i,i=eX(c,u)}return t[0]=eX(i,t[0]),t[1]=eX(n,t[1]),t[2]=eX(r,t[2]),t[3]=eX(s,t[3]),t[4]=eX(o,t[4]),t[5]=eX(a,t[5]),t[6]=eX(l,t[6]),t[7]=eX(h,t[7]),t}let eI=class extends ey{constructor(e,t,i){if("SHA-384"!==e&&"SHA-512"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.F=this.N,this.k=!0,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eL,this.B=function(e){return e.slice()},this.M=eB,this.L=function(t,i,n,r){let s;var o=r;let a=31+(i+129>>>10<<5),l=i+n;for(;t.length<=a;)t.push(0);for(t[i>>>5]|=128<<24-i%32,t[a]=0|l,t[a-1]=l/0x100000000|0,s=0;s<t.length;s+=32)o=eL(t.slice(s,s+32),o);return"SHA-384"===e?[o[0].I,o[0].X,o[1].I,o[1].X,o[2].I,o[2].X,o[3].I,o[3].X,o[4].I,o[4].X,o[5].I,o[5].X]:[o[0].I,o[0].X,o[1].I,o[1].X,o[2].I,o[2].X,o[3].I,o[3].X,o[4].I,o[4].X,o[5].I,o[5].X,o[6].I,o[6].X,o[7].I,o[7].X]},this.U=eB(e),this.m=1024,this.K="SHA-384"===e?384:512,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}},ez=[new eT(0,1),new eT(0,32898),new eT(0x80000000,32906),new eT(0x80000000,0x80008000),new eT(0,32907),new eT(0,0x80000001),new eT(0x80000000,0x80008081),new eT(0x80000000,32777),new eT(0,138),new eT(0,136),new eT(0,0x80008009),new eT(0,0x8000000a),new eT(0,0x8000808b),new eT(0x80000000,139),new eT(0x80000000,32905),new eT(0x80000000,32771),new eT(0x80000000,32770),new eT(0x80000000,128),new eT(0,32778),new eT(0x80000000,0x8000000a),new eT(0x80000000,0x80008081),new eT(0x80000000,32896),new eT(0,0x80000001),new eT(0x80000000,0x80008008)],eY=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function eV(e){let t,i=[];for(t=0;t<5;t+=1)i[t]=[new eT(0,0),new eT(0,0),new eT(0,0),new eT(0,0),new eT(0,0)];return i}function eW(e){let t,i=[];for(t=0;t<5;t+=1)i[t]=e[t].slice();return i}function eD(e,t){let i,n,r,s,o=[],a=[];if(null!==e)for(n=0;n<e.length;n+=2)t[(n>>>1)%5][(n>>>1)/5|0]=eE(t[(n>>>1)%5][(n>>>1)/5|0],new eT(e[n+1],e[n]));for(i=0;i<24;i+=1){for(s=eV(),n=0;n<5;n+=1){var l,h,c,u,f;o[n]=(l=t[n][0],h=t[n][1],c=t[n][2],u=t[n][3],f=t[n][4],new eT(l.I^h.I^c.I^u.I^f.I,l.X^h.X^c.X^u.X^f.X))}for(n=0;n<5;n+=1)a[n]=eE(o[(n+4)%5],eM(o[(n+1)%5],1));for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)t[n][r]=eE(t[n][r],a[n]);for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)s[r][(2*n+3*r)%5]=eM(t[n][r],eY[n][r]);for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)t[n][r]=eE(s[n][r],new eT(~s[(n+1)%5][r].I&s[(n+2)%5][r].I,~s[(n+1)%5][r].X&s[(n+2)%5][r].X));t[0][0]=eE(t[0][0],ez[i])}return t}function eq(e){let t,i,n=0,r=[0,0],s=[0|e,e/0x100000000&2097151];for(t=6;t>=0;t--)0==(i=s[t>>2]>>>8*t&255)&&0===n||(r[n+1>>2]|=i<<8*(n+1),n+=1);return n=0!==n?n:1,r[0]|=n,{value:n+1>4?r:[r[0]],binLen:8+8*n}}function eN(e){return eg(eq(e.binLen),e)}function eU(e,t){let i,n=eq(t);n=eg(n,e);let r=t>>>2,s=(r-n.value.length%r)%r;for(i=0;i<s;i++)n.value.push(0);return n.value}let eG=class extends ey{constructor(e,t,i){let n=6,r=0;super(e,t,i);let s=i||{};if(1!==this.numRounds){if(s.kmacKey||s.hmacKey)throw Error(eO);if("CSHAKE128"===this.o||"CSHAKE256"===this.o)throw Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=eh(this.t,this.i,this.T),this.R=eD,this.B=eW,this.M=eV,this.U=eV(),this.v=!1,e){case"SHA3-224":this.m=r=1152,this.K=224,this.k=!0,this.F=this.N;break;case"SHA3-256":this.m=r=1088,this.K=256,this.k=!0,this.F=this.N;break;case"SHA3-384":this.m=r=832,this.K=384,this.k=!0,this.F=this.N;break;case"SHA3-512":this.m=r=576,this.K=512,this.k=!0,this.F=this.N;break;case"SHAKE128":n=31,this.m=r=1344,this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"SHAKE256":n=31,this.m=r=1088,this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"KMAC128":n=4,this.m=r=1344,this._(i),this.K=-1,this.v=!0,this.k=!1,this.F=this.O;break;case"KMAC256":n=4,this.m=r=1088,this._(i),this.K=-1,this.v=!0,this.k=!1,this.F=this.O;break;case"CSHAKE128":this.m=r=1344,n=this.P(i),this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"CSHAKE256":this.m=r=1088,n=this.P(i),this.K=-1,this.v=!0,this.k=!1,this.F=null;break;default:throw Error(ep)}this.L=function(e,t,i,s,o){return function(e,t,i,n,r,s){let o,a,l=0,h=[],c=n>>>5,u=t>>>5;for(o=0;o<u&&t>=n;o+=c)i=eD(e.slice(o,o+c),i),t-=n;for(e=e.slice(o),t%=n;e.length<c;)e.push(0);for(o=t>>>3,e[o>>2]^=r<<o%4*8,e[c-1]^=0x80000000,i=eD(e,i);32*h.length<s&&(h.push((a=i[l%5][l/5|0]).X),!(32*h.length>=s));)h.push(a.I),0==64*(l+=1)%n&&(eD(null,i),l=0);return h}(e,t,s,r,n,o)},s.hmacKey&&this.Y(ev("hmacKey",s.hmacKey,this.T))}P(e,t){let i,n={funcName:ev("funcName",(i=e||{}).funcName,1,{value:[],binLen:0}),customization:ev("Customization",i.customization,1,{value:[],binLen:0})};t&&(n.funcName=t);let r=eg(eN(n.funcName),eN(n.customization));if(0!==n.customization.binLen||0!==n.funcName.binLen){let e=eU(r,this.m>>>3);for(let t=0;t<e.length;t+=this.m>>>5)this.U=this.R(e.slice(t,t+(this.m>>>5)),this.U),this.A+=this.m;return 4}return 31}_(e){let t,i={kmacKey:ev("kmacKey",(t=e||{}).kmacKey,1),funcName:{value:[0x43414d4b],binLen:32},customization:ev("Customization",t.customization,1,{value:[],binLen:0})};this.P(e,i.funcName);let n=eU(eN(i.kmacKey),this.m>>>3);for(let e=0;e<n.length;e+=this.m>>>5)this.U=this.R(n.slice(e,e+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}O(e){let t=eg({value:this.h.slice(),binLen:this.u},function(e){let t,i,n=0,r=[0,0],s=[0|e,e/0x100000000&2097151];for(t=6;t>=0;t--)0==(i=s[t>>2]>>>8*t&255)&&0===n||(r[n>>2]|=i<<8*n,n+=1);return n=0!==n?n:1,r[n>>2]|=n<<8*n,{value:n+1>4?r:[r[0]],binLen:8+8*n}}(e.outputLen));return this.L(t.value,t.binLen,this.A,this.B(this.U),e.outputLen)}};class eF{constructor(e,t,i){if("SHA-1"==e)this.V=new eP(e,t,i);else if("SHA-224"==e||"SHA-256"==e)this.V=new e_(e,t,i);else if("SHA-384"==e||"SHA-512"==e)this.V=new eI(e,t,i);else{if("SHA3-224"!=e&&"SHA3-256"!=e&&"SHA3-384"!=e&&"SHA3-512"!=e&&"SHAKE128"!=e&&"SHAKE256"!=e&&"CSHAKE128"!=e&&"CSHAKE256"!=e&&"KMAC128"!=e&&"KMAC256"!=e)throw Error(ep);this.V=new eG(e,t,i)}}update(e){return this.V.update(e),this}getHash(e,t){return this.V.getHash(e,t)}setHMACKey(e,t,i){this.V.setHMACKey(e,t,i)}getHMAC(e,t){return this.V.getHMAC(e,t)}}var eK=i(256),eH=i(911);let eJ="/api/v1/fs",e0=(e,t,i)=>{i||"function"!=typeof t||(i=t,t=null),e1({method:"PUT",url:eJ+e,data:t,callback:i})};function e1({url:e,data:t,method:i,callback:n}){!function(e,t){let{url:i,data:n,method:r}=e,s=new XMLHttpRequest;if("function"!=typeof t)throw Error("Callback should be function!");s.open(r,i,!0),s.addEventListener("error",t),s.addEventListener("load",()=>{if(s.status>=200&&s.status<400)return t(null,s.responseText);t(Error(s.responseText))}),s.send(n)}({method:i,data:t,url:encodeURI(e).replace(/#/g,"%23")},n)}let e2=async(e,...t)=>{var i=e;if("function"!=typeof i)throw Error("fn should be a function!");try{return[null,await e(...t)]}catch(e){return[e]}};var e5=i(411);let e3=[],e6=[],e4="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<e4.length;e++)(e%2?e6:e3).push(t+=e4[e]);function e8(e){return e>=127462&&e<=127487}function e7(e,t,i){if(t==e.length)return t;t&&te(e.charCodeAt(t))&&tt(e.charCodeAt(t-1))&&t--;let n=e9(e,t);for(t+=ti(n);t<e.length;){let r=e9(e,t);if(8205==n||8205==r||i&&function(e){if(e<768)return!1;for(let t=0,i=e3.length;;){let n=t+i>>1;if(e<e3[n])i=n;else{if(!(e>=e6[n]))return!0;t=n+1}if(t==i)return!1}}(r))t+=ti(r),n=r;else if(e8(r)){let i=0,n=t-2;for(;n>=0&&e8(e9(e,n));)i++,n-=2;if(i%2==0)break;t+=2}else break}return t}function e9(e,t){let i=e.charCodeAt(t);if(!tt(i)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return te(n)?(i-55296<<10)+(n-56320)+65536:i}function te(e){return e>=56320&&e<57344}function tt(e){return e>=55296&&e<56320}function ti(e){return e<65536?1:2}class tn{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=tu(this,e,t);let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),ts.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=tu(this,e,t);let i=[];return this.decompose(e,t,i,0),ts.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new ta(this),r=new ta(e);for(let e=t,s=t;;){if(n.next(e),r.next(e),e=0,n.lineBreak!=r.lineBreak||n.done!=r.done||n.value!=r.value)return!1;if(s+=n.value.length,n.done||s>=i)return!0}}iter(e=1){return new ta(this,e)}iterRange(e,t=this.length){return new tl(this,e,t)}iterLines(e,t){let i;if(null==e)i=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new th(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new tr(e):ts.from(tr.split(e,[])):tn.empty}}class tr extends tn{constructor(e,t=function(e){let t=-1;for(let i of e)t+=i.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let r=0;;r++){let s=this.text[r],o=n+s.length;if((t?i:o)>=e)return new tc(n,o,i,s);n=o+1,i++}}decompose(e,t,i,n){var r;let s=e<=0&&t>=this.length?this:new tr((r=this.text,to(r,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=i.pop(),t=to(s.text,e.text.slice(),0,s.length);if(t.length<=32)i.push(new tr(t,e.length+s.length));else{let e=t.length>>1;i.push(new tr(t.slice(0,e)),new tr(t.slice(e)))}}else i.push(s)}replace(e,t,i){var n;if(!(i instanceof tr))return super.replace(e,t,i);[e,t]=tu(this,e,t);let r=to(this.text,to(i.text,(n=this.text,to(n,[""],0,e))),t),s=this.length+i.length-(t-e);return r.length<=32?new tr(r,s):ts.from(tr.split(r,[]),s)}sliceString(e,t=this.length,i="\n"){[e,t]=tu(this,e,t);let n="";for(let r=0,s=0;r<=t&&s<this.text.length;s++){let o=this.text[s],a=r+o.length;r>e&&s&&(n+=i),e<a&&t>r&&(n+=o.slice(Math.max(0,e-r),t-r)),r=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let r of e)i.push(r),n+=r.length+1,32==i.length&&(t.push(new tr(i,n)),i=[],n=-1);return n>-1&&t.push(new tr(i,n)),t}}class ts extends tn{constructor(e,t){for(let i of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=i.lines}lineInner(e,t,i,n){for(let r=0;;r++){let s=this.children[r],o=n+s.length,a=i+s.lines-1;if((t?a:o)>=e)return s.lineInner(e,t,i,n);n=o+1,i=a+1}}decompose(e,t,i,n){for(let r=0,s=0;s<=t&&r<this.children.length;r++){let o=this.children[r],a=s+o.length;if(e<=a&&t>=s){let r=n&(s<=e|2*(a>=t));s>=e&&a<=t&&!r?i.push(o):o.decompose(e-s,t-s,i,r)}s=a+1}}replace(e,t,i){if([e,t]=tu(this,e,t),i.lines<this.lines)for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],o=r+s.length;if(e>=r&&t<=o){let a=s.replace(e-r,t-r,i),l=this.lines-s.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let r=this.children.slice();return r[n]=a,new ts(r,this.length-(t-e)+i.length)}return super.replace(r,o,a)}r=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){[e,t]=tu(this,e,t);let n="";for(let r=0,s=0;r<this.children.length&&s<=t;r++){let o=this.children[r],a=s+o.length;s>e&&r&&(n+=i),e<a&&t>s&&(n+=o.sliceString(e-s,t-s,i)),s=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ts))return 0;let i=0,[n,r,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,r+=t){if(n==s||r==o)return i;let a=this.children[n],l=e.children[r];if(a!=l)return i+a.scanIdentical(l,t);i+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let i=0;for(let t of e)i+=t.lines;if(i<32){let i=[];for(let t of e)t.flatten(i);return new tr(i,t)}let n=Math.max(32,i>>5),r=n<<1,s=n>>1,o=[],a=0,l=-1,h=[];function c(){0!=a&&(o.push(1==h.length?h[0]:ts.from(h,l)),l=-1,a=h.length=0)}for(let t of e)!function e(t){let i;if(t.lines>r&&t instanceof ts)for(let i of t.children)e(i);else t.lines>s&&(a>s||!a)?(c(),o.push(t)):t instanceof tr&&a&&(i=h[h.length-1])instanceof tr&&t.lines+i.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new tr(i.text.concat(t.text),i.length+1+t.length)):(a+t.lines>n&&c(),a+=t.lines,l+=t.length+1,h.push(t))}(t);return c(),1==o.length?o[0]:new ts(o,t)}}function to(e,t,i=0,n=1e9){for(let r=0,s=0,o=!0;s<e.length&&r<=n;s++){let a=e[s],l=r+a.length;l>=i&&(l>n&&(a=a.slice(0,n-r)),r<i&&(a=a.slice(i-r)),o?(t[t.length-1]+=a,o=!1):t.push(a)),r=l+1}return t}tn.empty=new tr([""],0);class ta{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof tr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],r=this.offsets[i],s=r>>1,o=n instanceof tr?n.text.length:n.children.length;if(s==(t>0?o:0)){if(0==i)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[i]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof tr){let r=n.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=n.children[s+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof tr?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class tl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ta(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class th{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"u">typeof Symbol&&(tn.prototype[Symbol.iterator]=function(){return this.iter()},ta.prototype[Symbol.iterator]=tl.prototype[Symbol.iterator]=th.prototype[Symbol.iterator]=function(){return this});class tc{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}}function tu(e,t,i){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,i))]}function tf(e,t,i=!0,n=!0){return function(e,t,i=!0,n=!0){return(i?e7:function(e,t,i){for(;t>1;){let n=e7(e,t-2,i);if(n<t)return n;t--}return 0})(e,t,n)}(e,t,i,n)}function td(e,t){let i=e.charCodeAt(t);if(!(i>=55296&&i<56320)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return n>=56320&&n<57344?(i-55296<<10)+(n-56320)+65536:i}function tp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function tO(e){return e<65536?1:2}let tg=/\r\n?|\n/;var tm=((o=tm||(tm={}))[o.Simple=0]="Simple",o[o.TrackDel=1]="TrackDel",o[o.TrackBefore=2]="TrackBefore",o[o.TrackAfter=3]="TrackAfter",o);class tv{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let r=this.sections[t++],s=this.sections[t++];s<0?(e(i,n,r),n+=r):n+=s,i+=r}}iterChangedRanges(e,t=!1){tx(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new tv(e)}composeDesc(e){return this.empty?e:e.empty?this:tk(this,e)}mapDesc(e,t=!1){return e.empty?this:tS(this,e,t)}mapPos(e,t=-1,i=tm.Simple){let n=0,r=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],a=this.sections[s++],l=n+o;if(a<0){if(l>e)return r+(e-n);r+=o}else{if(i!=tm.Simple&&l>=e&&(i==tm.TrackDel&&n<e&&l>e||i==tm.TrackBefore&&n<e||i==tm.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!o)return e==n||t<0?r:r+a;r+=a}n=l}if(e>n)throw RangeError(`Position ${e} is out of range for changeset of length ${n}`);return r}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let r=this.sections[i++],s=this.sections[i++],o=n+r;if(s>=0&&n<=t&&o>=e)return!(n<e)||!(o>t)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new tv(e)}static create(e){return new tv(e)}}class ty extends tv{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return tx(this,(t,i,n,r,s)=>e=e.replace(n,n+(i-t),s),!1),e}mapDesc(e,t=!1){return tS(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,r=0;n<t.length;n+=2){let s=t[n],o=t[n+1];if(o>=0){t[n]=o,t[n+1]=s;let a=n>>1;for(;i.length<a;)i.push(tn.empty);i.push(s?e.slice(r,r+s):tn.empty)}r+=s}return new ty(t,i)}compose(e){return this.empty?e:e.empty?this:tk(this,e,!0)}map(e,t=!1){return e.empty?this:tS(this,e,t,!0)}iterChanges(e,t=!1){tx(this,e,t)}get desc(){return tv.create(this.sections)}filter(e){let t=[],i=[],n=[],r=new tQ(this);i:for(let s=0,o=0;;){let a=s==e.length?1e9:e[s++];for(;o<a||o==a&&0==r.len;){if(r.done)break i;let e=Math.min(r.len,a-o);tw(n,e,-1);let s=-1==r.ins?-1:0==r.off?r.ins:0;tw(t,e,s),s>0&&tb(i,t,r.text),r.forward(e),o+=e}let l=e[s++];for(;o<l;){if(r.done)break i;let e=Math.min(r.len,l-o);tw(t,e,-1),tw(n,e,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(e),o+=e}}return{changes:new ty(t,i),filtered:tv.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):0==n?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],r=[],s=0,o=null;function a(e=!1){if(!e&&!n.length)return;s<t&&tw(n,t-s,-1);let i=new ty(n,r);o=o?o.compose(i.map(o)):i,n=[],r=[],s=0}return!function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof ty){if(l.length!=t)throw RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),o=o?o.compose(l.map(o)):l}else{let{from:e,to:o=e,insert:h}=l;if(e>o||e<0||o>t)throw RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let c=h?"string"==typeof h?tn.of(h.split(i||tg)):h:tn.empty,u=c.length;if(e==o&&0==u)return;e<s&&a(),e>s&&tw(n,e-s,-1),tw(n,o-e,u),tb(r,n,c),s=o}}(e),a(!o),o}static empty(e){return new ty(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let r=e[n];if("number"==typeof r)t.push(r,-1);else if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==r.length)t.push(r[0],0);else{for(;i.length<n;)i.push(tn.empty);i[n]=tn.of(r.slice(1)),t.push(r[0],i[n].length)}}return new ty(t,i)}static createSet(e,t){return new ty(e,t)}}function tw(e,t,i,n=!1){if(0==t&&i<=0)return;let r=e.length-2;r>=0&&i<=0&&i==e[r+1]?e[r]+=t:r>=0&&0==t&&0==e[r]?e[r+1]+=i:n?(e[r]+=t,e[r+1]+=i):e.push(t,i)}function tb(e,t,i){if(0==i.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(i);else{for(;e.length<n;)e.push(tn.empty);e.push(i)}}function tx(e,t,i){let n=e.inserted;for(let r=0,s=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)r+=a,s+=a;else{let h=r,c=s,u=tn.empty;for(;h+=a,c+=l,l&&n&&(u=u.append(n[o-2>>1])),!i&&o!=e.sections.length&&!(e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(r,h,s,c,u),r=h,s=c}}}function tS(e,t,i,n=!1){let r=[],s=n?[]:null,o=new tQ(e),a=new tQ(t);for(let e=-1;;)if(o.done&&a.len||a.done&&o.len)throw Error("Mismatched change set lengths");else if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);tw(r,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!i))){let t=a.len;for(tw(r,a.ins,-1);t;){let i=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=i&&(tw(r,0,o.ins),s&&tb(s,r,o.text),e=o.i),o.forward(i),t-=i}a.next()}else if(o.ins>=0){let t=0,i=o.len;for(;i;)if(-1==a.ins){let e=Math.min(i,a.len);t+=e,i-=e,a.forward(e)}else if(0==a.ins&&a.len<i)i-=a.len,a.next();else break;tw(r,t,e<o.i?o.ins:0),s&&e<o.i&&tb(s,r,o.text),e=o.i,o.forward(o.len-i)}else if(o.done&&a.done)return s?ty.createSet(r,s):tv.create(r);else throw Error("Mismatched change set lengths")}function tk(e,t,i=!1){let n=[],r=i?[]:null,s=new tQ(e),o=new tQ(t);for(let e=!1;;)if(s.done&&o.done)return r?ty.createSet(n,r):tv.create(n);else if(0==s.ins)tw(n,s.len,0,e),s.next();else if(0!=o.len||o.done)if(s.done||o.done)throw Error("Mismatched change set lengths");else{let t=Math.min(s.len2,o.len),i=n.length;if(-1==s.ins){let i=-1==o.ins?-1:o.off?0:o.ins;tw(n,t,i,e),r&&i&&tb(r,n,o.text)}else -1==o.ins?(tw(n,s.off?0:s.len,t,e),r&&tb(r,n,s.textBit(t))):(tw(n,s.off?0:s.len,o.off?0:o.ins,e),r&&!o.off&&tb(r,n,o.text));e=(s.ins>t||o.ins>=0&&o.len>t)&&(e||n.length>i),s.forward2(t),o.forward(t)}else tw(n,0,o.ins,e),r&&tb(r,n,o.text),o.next()}class tQ{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?tn.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?tn.empty:t[i].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class t${constructor(e,t,i,n){this.from=e,this.to=t,this.flags=i,this.goalColumn=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get undirectional(){return(64&this.flags)>0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new t$(i,n,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return tP.range(e,t,void 0,void 0,i);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return tP.range(this.anchor,n,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return tP.range(e.anchor,e.head)}static create(e,t,i,n){return new t$(e,t,i,n)}}class tP{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:tP.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new tP([this.main],0)}addRange(e,t=!0){return tP.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,tP.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new tP(e.ranges.map(e=>t$.fromJSON(e)),e.main)}static single(e,t=e){return new tP([tP.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let r=e[n];if(r.empty?r.from<=i:r.from<i)return tP.normalized(e.slice(),t);i=r.to}return new tP(e,t)}static cursor(e,t=0,i,n){return t$.create(e,e,(0==t?0:t<0?8:16)|(null==i?7:Math.min(6,i)),n)}static range(e,t,i,n,r){let s=null==n?7:Math.min(6,n);return r||e==t||(r=t<e?1:-1),r&&(s|=r<0?8:16),t<e?t$.create(t,e,32|s,i):t$.create(e,t,s,i)}static undirectionalRange(e,t){return t$.create(e,t,64,void 0)}static normalized(e,t=0){let i=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(i);for(let i=1;i<e.length;i++){let n=e[i],r=e[i-1];if(n.empty?n.from<=r.to:n.from<r.to){let s=r.from,o=Math.max(n.to,r.to);i<=t&&t--,e.splice(--i,2,n.anchor>n.head?tP.range(o,s):tP.range(s,o))}}return new tP(e,t)}}function tA(e,t){for(let i of e.ranges)if(i.to>t)throw RangeError("Selection points outside of document")}let tC=0;class t_{constructor(e,t,i,n,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=tC++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(e={}){return new t_(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(!e.combine?tT:(e,t)=>e===t),!!e.static,e.enables)}of(e){return new tM([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new tM(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new tM(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],i=>t(i.field(e)))}}function tT(e,t){return e==t||e.length==t.length&&e.every((e,i)=>e===t[i])}class tM{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=tC++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,r=this.id,s=e[r]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:((null!=(t=e[i.id])?t:1)&1)==0&&h.push(e[i.id]);return{create:e=>(e.values[s]=i(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||tR(e,h)){let t=i(e);if(o?!tZ(t,e.values[s],n):!n(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[r];if(null!=l){let r=tW(t,l);if(this.dependencies.every(i=>i instanceof t_?t.facet(i)===e.facet(i):!(i instanceof tE)||t.field(i,!1)==e.field(i,!1))||(o?tZ(a=i(e),r,n):n(a=i(e),r)))return e.values[s]=r,0}else a=i(e);return e.values[s]=a,1}}}get extension(){return this}}function tZ(e,t,i){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0}function tR(e,t){let i=!1;for(let n of t)1&tV(e,n)&&(i=!0);return i}let tX=t_.define({static:!0});class tE{constructor(e,t,i,n,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=r,this.provides=void 0}static define(e){let t=new tE(tC++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(tX).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,i)=>{let n=e.values[t],r=this.updateF(n,i);return this.compareF(n,r)?0:(e.values[t]=r,1)},reconfigure:(e,i)=>{let n=e.facet(tX),r=i.facet(tX),s;return(s=n.find(e=>e.field==this))&&s!=r.find(e=>e.field==this)?(e.values[t]=s.create(e),1):null!=i.config.address[this.id]?(e.values[t]=i.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,tX.of({field:this,create:e})]}get extension(){return this}}function tj(e){return t=>new tL(t,e)}let tB={highest:tj(0),high:tj(1),default:tj(2),low:tj(3),lowest:tj(4)};class tL{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class tI{of(e){return new tz(this,e)}reconfigure(e){return tI.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class tz{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class tY{constructor(e,t,i,n,r,s){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,i){var n,r,s;let o,a,l=[],h=Object.create(null),c=new Map;for(let i of(n=e,r=t,s=c,o=[[],[],[],[],[]],a=new Map,!function e(t,i){let n=a.get(t);if(null!=n){if(n<=i)return;let e=o[n].indexOf(t);e>-1&&o[n].splice(e,1),t instanceof tz&&s.delete(t.compartment)}if(a.set(t,i),Array.isArray(t))for(let n of t)e(n,i);else if(t instanceof tz){if(s.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let n=r.get(t.compartment)||t.inner;s.set(t.compartment,n),e(n,i)}else if(t instanceof tL)e(t.inner,t.prec);else if(t instanceof tE)o[i].push(t),t.provides&&e(t.provides,i);else if(t instanceof tM)o[i].push(t),t.facet.extensions&&e(t.facet.extensions,2);else{let n=t.extension;if(!n)throw Error(`Unrecognized extension value in extension set (${t}).`);if(n==t)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(n,i)}}(n,2),o.reduce((e,t)=>e.concat(t))))i instanceof tE?l.push(i):(h[i.facet.id]||(h[i.facet.id]=[])).push(i);let u=Object.create(null),f=[],d=[];for(let e of l)u[e.id]=d.length<<1,d.push(t=>e.slot(t));let p=null==i?void 0:i.config.facets;for(let e in h){let t=h[e],n=t[0].facet,r=p&&p[e]||[];if(t.every(e=>0==e.type))if(u[n.id]=f.length<<1|1,tT(r,t))f.push(i.facet(n));else{let e=n.combine(t.map(e=>e.value));f.push(i&&n.compare(e,i.facet(n))?i.facet(n):e)}else{for(let e of t)0==e.type?(u[e.id]=f.length<<1|1,f.push(e.value)):(u[e.id]=d.length<<1,d.push(t=>e.dynamicSlot(t)));u[n.id]=d.length<<1,d.push(e=>(function(e,t,i){let n=i.map(t=>e[t.id]),r=i.map(e=>e.type),s=n.filter(e=>!(1&e)),o=e[t.id]>>1;function a(e){let i=[];for(let t=0;t<n.length;t++){let s=tW(e,n[t]);if(2==r[t])for(let e of s)i.push(e);else i.push(s)}return t.combine(i)}return{create(e){for(let t of n)tV(e,t);return e.values[o]=a(e),1},update(e,i){if(!tR(e,s))return 0;let n=a(e);return t.compare(n,e.values[o])?0:(e.values[o]=n,1)},reconfigure(e,r){let s=tR(e,n),l=r.config.facets[t.id],h=r.facet(t);if(l&&!s&&tT(i,l))return e.values[o]=h,0;let c=a(e);return t.compare(c,h)?(e.values[o]=h,0):(e.values[o]=c,1)}}})(e,n,t))}}return new tY(e,c,d.map(e=>e(u)),u,f,h)}}function tV(e,t){if(1&t)return 2;let i=t>>1,n=e.status[i];if(4==n)throw Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[i]=4;let r=e.computeSlot(e,e.config.dynamicSlots[i]);return e.status[i]=2|r}function tW(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let tD=t_.define(),tq=t_.define({combine:e=>e.some(e=>e),static:!0}),tN=t_.define({combine:e=>e.length?e[0]:void 0,static:!0}),tU=t_.define(),tG=t_.define(),tF=t_.define(),tK=t_.define({combine:e=>!!e.length&&e[0]});class tH{constructor(e,t){this.type=e,this.value=t}static define(){return new tJ}}class tJ{of(e){return new tH(this,e)}}class t0{constructor(e){this.map=e}of(e){return new t1(this,e)}}class t1{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new t1(this.type,t)}is(e){return this.type==e}static define(e={}){return new t0(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let e=n.map(t);e&&i.push(e)}return i}}t1.reconfigure=t1.define(),t1.appendConfig=t1.define();class t2{constructor(e,t,i,n,r,s){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,i&&tA(i,t.newLength),r.some(e=>e.type==t2.time)||(this.annotations=r.concat(t2.time.of(Date.now())))}static create(e,t,i,n,r,s){return new t2(e,t,i,n,r,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(t2.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function t5(e,t,i){var n;let r,s,o;return i?(r=t.changes,s=ty.empty(t.changes.length),o=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),s=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(r)),{changes:o,selection:t.selection?t.selection.map(s):null==(n=e.selection)?void 0:n.map(r),effects:t1.mapEffects(e.effects,r).concat(t1.mapEffects(t.effects,s)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function t3(e,t,i){let n=t.selection,r=t4(t.annotations);return t.userEvent&&(r=r.concat(t2.userEvent.of(t.userEvent))),{changes:t.changes instanceof ty?t.changes:ty.of(t.changes||[],i,e.facet(tN)),selection:n&&(n instanceof tP?n:tP.single(n.anchor,n.head)),effects:t4(t.effects),annotations:r,scrollIntoView:!!t.scrollIntoView}}t2.time=tH.define(),t2.userEvent=tH.define(),t2.addToHistory=tH.define(),t2.remote=tH.define();let t6=[];function t4(e){return null==e?t6:Array.isArray(e)?e:[e]}var t8=((a=t8||(t8={}))[a.Word=0]="Word",a[a.Space=1]="Space",a[a.Other=2]="Other",a);let t7=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{e=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class t9{constructor(e,t,i,n,r,s){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)tV(this,e<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(null==i){if(t)throw RangeError("Field is not present in this state");return}return tV(this,i),tW(this,i)}update(...e){return function e(t,i,n){let r=t3(t,i.length?i[0]:{},t.doc.length);i.length&&!1===i[0].filter&&(n=!1);for(let e=1;e<i.length;e++){!1===i[e].filter&&(n=!1);let s=!!i[e].sequential;r=t5(r,t3(t,i[e],s?r.changes.newLength:t.doc.length),s)}let s=t2.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,i=t.facet(tF),n=e;for(let r=i.length-1;r>=0;r--){let s=i[r](e);s&&Object.keys(s).length&&(n=t5(n,t3(t,s,e.changes.newLength),!0))}return n==e?e:t2.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(n?function(t){let i=t.startState,n=!0;for(let e of i.facet(tU)){let i=e(t);if(!1===i){n=!1;break}Array.isArray(i)&&(n=!0===n?i:function(e,t){let i=[];for(let n=0,r=0;;){let s,o;if(n<e.length&&(r==t.length||t[r]>=e[n]))s=e[n++],o=e[n++];else{if(!(r<t.length))return i;s=t[r++],o=t[r++]}!i.length||i[i.length-1]<s?i.push(s,o):i[i.length-1]<o&&(i[i.length-1]=o)}}(n,i))}if(!0!==n){let e,r;if(!1===n)r=t.changes.invertedDesc,e=ty.empty(i.doc.length);else{let i=t.changes.filter(n);e=i.changes,r=i.filtered.mapDesc(i.changes).invertedDesc}t=t2.create(i,e,t.selection&&t.selection.map(r),t1.mapEffects(t.effects,r),t.annotations,t.scrollIntoView)}let r=i.facet(tG);for(let n=r.length-1;n>=0;n--){let s=r[n](t);t=s instanceof t2?s:Array.isArray(s)&&1==s.length&&s[0]instanceof t2?s[0]:e(i,t4(s),!1)}return t}(s):s)}(this,e,!0)}applyTransaction(e){let t,i=this.config,{base:n,compartments:r}=i;for(let t of e.effects)t.is(tI.reconfigure)?(i&&(r=new Map,i.compartments.forEach((e,t)=>r.set(t,e)),i=null),r.set(t.value.compartment,t.value.extension)):t.is(t1.reconfigure)?(i=null,n=t.value):t.is(t1.appendConfig)&&(i=null,n=t4(n).concat(t.value));t=i?e.startState.values.slice():new t9(i=tY.resolve(n,r,this),this.doc,this.selection,i.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let s=e.startState.facet(tq)?e.newSelection:e.newSelection.asSingle();new t9(i,e.newDoc,s,t,(t,i)=>i.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:tP.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),r=[i.range],s=t4(i.effects);for(let i=1;i<t.ranges.length;i++){let o=e(t.ranges[i]),a=this.changes(o.changes),l=a.map(n);for(let e=0;e<i;e++)r[e]=r[e].map(l);let h=n.mapDesc(a,!0);r.push(o.range.map(h)),n=n.compose(l),s=t1.mapEffects(s,l).concat(t1.mapEffects(t4(o.effects),h))}return{changes:n,selection:tP.create(r,t.mainIndex),effects:s}}changes(e=[]){return e instanceof ty?e:ty.of(e,this.doc.length,this.facet(t9.lineSeparator))}toText(e){return tn.of(e.split(this.facet(t9.lineSeparator)||tg))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(tV(this,t),tW(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof tE&&null!=this.config.address[n.id]&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(e,t)){let r=i[t],s=e[t];n.push(r.init(e=>r.spec.fromJSON(s,e)))}}return t9.create({doc:e.doc,selection:tP.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=tY.resolve(e.extensions||[],new Map),i=e.doc instanceof tn?e.doc:tn.of((e.doc||"").split(t.staticFacet(t9.lineSeparator)||tg)),n=e.selection?e.selection instanceof tP?e.selection:tP.single(e.selection.anchor,e.selection.head):tP.single(0);return tA(n,i.length),t.staticFacet(tq)||(n=n.asSingle()),new t9(t,i,n,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(t9.tabSize)}get lineBreak(){return this.facet(t9.lineSeparator)||"\n"}get readOnly(){return this.facet(tK)}phrase(e,...t){for(let t of this.facet(t9.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>t.length?e:t[n-1]})),e}languageDataAt(e,t,i=-1){let n=[];for(let r of this.facet(tD))for(let s of r(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&n.push(s[e]);return n}charCategorizer(t){var i;let n=this.languageDataAt("wordChars",t);return i=n.length?n[0]:"",t=>{if(!/\S/.test(t))return t8.Space;if(function(t){if(e)return e.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||t7.test(i)))return!0}return!1}(t))return t8.Word;for(let e=0;e<i.length;e++)if(t.indexOf(i[e])>-1)return t8.Word;return t8.Other}}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),r=this.charCategorizer(e),s=e-i,o=e-i;for(;s>0;){let e=tf(t,s,!1);if(r(t.slice(e,s))!=t8.Word)break;s=e}for(;o<n;){let e=tf(t,o);if(r(t.slice(o,e))!=t8.Word)break;o=e}return s==o?null:tP.range(s+i,o+i)}}function ie(e,t,i={}){let n={};for(let t of e)for(let e of Object.keys(t)){let r=t[e],s=n[e];if(void 0===s)n[e]=r;else if(s===r||void 0===r);else if(Object.hasOwnProperty.call(i,e))n[e]=i[e](s,r);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===n[e]&&(n[e]=t[e]);return n}t9.allowMultipleSelections=tq,t9.tabSize=t_.define({combine:e=>e.length?e[0]:4}),t9.lineSeparator=tN,t9.readOnly=tK,t9.phrases=t_.define({compare(e,t){let i=Object.keys(e),n=Object.keys(t);return i.length==n.length&&i.every(i=>e[i]==t[i])}}),t9.languageData=tD,t9.changeFilter=tU,t9.transactionFilter=tG,t9.transactionExtender=tF,tI.reconfigure=t1.define();class it{eq(e){return this==e}range(e,t=e){return ir.create(e,t,this)}}function ii(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}it.prototype.startSide=it.prototype.endSide=0,it.prototype.point=!1,it.prototype.mapMode=tm.TrackDel;class ir{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ir(e,t,i)}}function is(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class io{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return il(this.to)}findIndex(e,t,i,n=0){let r=i?this.to:this.from;for(let s=n,o=r.length;;){if(s==o)return s;let n=s+o>>1,a=r[n]-e||(i?this.value[n].endSide:this.value[n].startSide)-t;if(n==s)return a>=0?s:o;a>=0?o=n:s=n+1}}between(e,t,i,n){for(let r=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,r);r<s;r++)if(!1===n(this.from[r]+e,this.to[r]+e,this.value[r]))return!1}map(e,t,i,n,r){let s=[],o=[],a=[],l=-1,h=-1;n:for(let c=0;c<this.value.length;c++){let u=this.value[c],f=this.from[c]+e,d=this.to[c]+e,p,O;if(f==d){let e=t.mapPos(f,u.startSide,u.mapMode);if(null==e||(p=O=e,u.startSide!=u.endSide&&(O=t.mapPos(f,u.endSide))<p))continue}else if((p=t.mapPos(f,u.startSide))>(O=t.mapPos(d,u.endSide))||p==O&&u.startSide>0&&u.endSide<=0)continue;if(!(0>(O-p||u.endSide-u.startSide)))if(l<0&&(l=p),u.point&&(h=Math.max(h,O-p)),(p-i||u.startSide-n)>=0)s.push(u),o.push(p-l),a.push(O-l),i=O,n=u.endSide;else{if(p==O)for(let e=s.length;e>0;e--){if((p-(a[e-1]+l)||u.startSide-s[e-1].endSide)>=0){s.splice(e,0,u),o.splice(e,0,p-l),a.splice(e,0,O-l);continue n}if((p-(o[e-1]+l)||u.endSide-s[e-1].startSide)>0)break}r(p,O,u)}}return{mapped:s.length?new io(o,a,s,h):null,pos:l}}}class ia{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new ia(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:r=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(i&&(t=t.slice().sort(is)),this.isEmpty)return t.length?ia.of(t):this;let o=new iu(this,null,-1).goto(0),a=0,l=[],h=new ih;for(;o.value||a<t.length;)if(a<t.length&&(o.from-t[a].from||o.startSide-t[a].value.startSide)>=0){let e=t[a++];h.addInner(e.from,e.to,e.value,!1)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(o.chunkIndex)<t[a].from)&&(!s||n>this.chunkEnd(o.chunkIndex)||r<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||n>o.to||r<o.from||s(o.from,o.to,o.value))&&!h.addInner(o.from,o.to,o.value,!1)&&l.push(ir.create(o.from,o.to,o.value)),o.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?ia.empty:this.nextLayer.update({add:l,filter:s,filterFrom:n,filterTo:r}))}map(e){let t;if(e.empty||this.isEmpty)return this;let i=[],n=[],r=-1,s=(e,i,n)=>{t||(t=new ih),t.addRange(e,i,n,!1)};for(let t=0;t<this.chunk.length;t++){let o=this.chunkPos[t],a=this.chunk[t],l=e.touchesRange(o,o+a.length);if(!1===l)r=Math.max(r,a.maxPoint),i.push(a),n.push(e.mapPos(o));else if(!0===l){let[t,l]=i.length?[il(n)+il(i).length,il(il(i).value).endSide]:[-1,-1],{mapped:h,pos:c}=a.map(o,e,t,l,s);h&&(r=Math.max(r,h.maxPoint),i.push(h),n.push(c))}}let o=this.nextLayer.map(e);return t&&(o=t.finishInner(o)),0==i.length?o:new ia(n,i,o||ia.empty,r)}between(e,t,i){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let r=this.chunkPos[n],s=this.chunk[n];if(t>=r&&e<=r+s.length&&!1===s.between(r,e-r,t-r,i))return}this.nextLayer.between(e,t,i)}}iter(e=0){return id.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return id.from(e).goto(t)}static compare(e,t,i,n,r=-1){let s=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),a=ic(s,o,i),l=new iO(s,a,r),h=new iO(o,a,r);i.iterGaps((e,t,i)=>ig(l,e,h,t,i,n)),i.empty&&0==i.length&&ig(l,0,h,0,0,n)}static eq(e,t,i=0,n){null==n&&(n=1e9-1);let r=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),s=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(r.length!=s.length)return!1;if(!r.length)return!0;let o=ic(r,s),a=new iO(r,o,0).goto(i),l=new iO(s,o,0).goto(i);for(;;){if(a.to!=l.to||!im(a.active,l.active)||a.point&&(!l.point||!ii(a.point,l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,i,n,r=-1){let s=new iO(e,null,r).goto(t),o=t,a=s.openStart;for(;;){let e=Math.min(s.to,i);if(s.point){let i=s.activeForPoint(s.to),r=s.pointFrom<t?i.length+1:s.point.startSide<0?i.length:Math.min(i.length,a);n.point(o,e,s.point,i,r,s.pointRank),a=Math.min(s.openEnd(e),i.length)}else e>o&&(n.span(o,e,s.active,a),a=s.openEnd(e));if(s.to>i)return a+(s.point&&s.to>i?1:0);o=s.to,s.next()}}static of(e,t=!1){let i=new ih;for(let n of e instanceof ir?[e]:t?function(e){if(e.length>1)for(let t=e[0],i=1;i<e.length;i++){let n=e[i];if(is(t,n)>0)return e.slice().sort(is);t=n}return e}(e):e)i.add(n.from,n.to,n.value);return i.finish()}static join(e){if(!e.length)return ia.empty;let t=il(e);for(let i=e.length-2;i>=0;i--)for(let n=e[i];n!=ia.empty;n=n.nextLayer)t=new ia(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}}function il(e){return e[e.length-1]}ia.empty=new ia([],[],null,-1),ia.empty.nextLayer=ia.empty;class ih{finishChunk(e){this.chunks.push(new io(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addRange(e,t,i,!0)}addRange(e,t,i,n){this.addInner(e,t,i,n)||(this.nextLayer||(this.nextLayer=new ih)).addRange(e,t,i,n)}addInner(e,t,i,n){let r=e-this.lastTo||i.startSide-this.last.endSide;if(n&&r<=0&&0>(e-this.lastFrom||i.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(ia.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=ia.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ic(e,t,i){let n=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&n.set(t.chunk[e],t.chunkPos[e]);let r=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let s=n.get(e.chunk[t]);null==s||(i?i.mapPos(s):s)!=e.chunkPos[t]||(null==i?void 0:i.touchesRange(s,s+e.chunk[t].length))||r.add(e.chunk[t])}return r}class iu{constructor(e,t,i,n=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class id{constructor(e){this.heap=e}static from(e,t=null,i=-1){let n=[];for(let r=0;r<e.length;r++)for(let s=e[r];!s.isEmpty;s=s.nextLayer)s.maxPoint>=i&&n.push(new iu(s,t,i,r));return 1==n.length?n[0]:new id(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)ip(this.heap,e);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)ip(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ip(this.heap,0)}}}function ip(e,t){for(let i=e[t];;){let n=(t<<1)+1;if(n>=e.length)break;let r=e[n];if(n+1<e.length&&r.compare(e[n+1])>=0&&(r=e[n+1],n++),0>i.compare(r))break;e[n]=i,e[t]=r,t=n}}class iO{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=id.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){iv(this.active,e),iv(this.activeTo,e),iv(this.activeRank,e),this.minActive=iw(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||n-this.activeTo[t])>0;)t++;iy(this.active,t,i),iy(this.activeTo,t,n),iy(this.activeRank,t,r),e&&iy(e,t,this.cursor.from),this.minActive=iw(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&0>(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&iv(i,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(e.point)if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}else this.addActive(i),this.cursor.next()}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let t=i.length-1;t>=0&&i[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ig(e,t,i,n,r,s){e.goto(t),i.goto(n);let o=n+r,a=n,l=n-t,h=!!s.boundChange;for(let t=!1;;){let n=e.to+l-i.to,r=n||e.endSide-i.endSide,c=r<0?e.to+l:i.to,u=Math.min(c,o);if(e.point||i.point?(e.point&&i.point&&ii(e.point,i.point)&&im(e.activeForPoint(e.to),i.activeForPoint(i.to))||s.comparePoint(a,u,e.point,i.point),t=!1):(t&&s.boundChange(a),u>a&&!im(e.active,i.active)&&s.compareRange(a,u,e.active,i.active),h&&u<o&&(n||e.openEnd(c)!=i.openEnd(c))&&(t=!0)),c>o)break;a=c,r<=0&&e.next(),r>=0&&i.next()}}function im(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!=t[i]&&!ii(e[i],t[i]))return!1;return!0}function iv(e,t){for(let i=t,n=e.length-1;i<n;i++)e[i]=e[i+1];e.pop()}function iy(e,t,i){for(let i=e.length-1;i>=t;i--)e[i+1]=e[i];e[t]=i}function iw(e,t){let i=-1,n=1e9;for(let r=0;r<t.length;r++)0>(t[r]-n||e[r].endSide-e[i].endSide)&&(i=r,n=t[r]);return i}function ib(e,t,i=e.length){let n=0;for(let r=0;r<i&&r<e.length;)9==e.charCodeAt(r)?(n+=t-n%t,r++):(n++,r=tf(e,r));return n}let ix="u"<typeof Symbol?"__ͼ":Symbol.for("ͼ"),iS="u"<typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),ik="u">typeof globalThis?globalThis:"u">typeof window?window:{};class iQ{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,r,s,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==r)return s.push(t[0]+";");for(let i in r){let o=r[i];if(/&/.test(i))e(i.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),o,s);else if(o&&"object"==typeof o){if(!l)throw RangeError("The value of a property ("+i+") should be a primitive value.");e(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(a.length||h)&&s.push((i&&!l&&!o?t.map(i):t).join(", ")+" {"+a.join(" ")+"}")}(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=ik[ix]||1;return ik[ix]=e+1,"ͼ"+e.toString(36)}static mount(e,t,i){let n=e[iS],r=i&&i.nonce;n?r&&n.setNonce(r):n=new iP(e,r),n.mount(Array.isArray(t)?t:[t],e)}}let i$=new Map;class iP{constructor(e,t){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=i$.get(i);if(t)return e[iS]=t;this.sheet=new n.CSSStyleSheet,i$.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[iS]=this}mount(e,t){let i=this.sheet,n=0,r=0;for(let t=0;t<e.length;t++){let s=e[t],o=this.modules.indexOf(s);if(o<r&&o>-1&&(this.modules.splice(o,1),r--,o=-1),-1==o){if(this.modules.splice(r++,0,s),i)for(let e=0;e<s.rules.length;e++)i.insertRule(s.rules[e],n++)}else{for(;r<o;)n+=this.modules[r++].rules.length;n+=s.rules.length,r++}}if(i)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let i=t.head||t;this.styleTag.parentNode!=i&&i.insertBefore(this.styleTag,i.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var iA={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},iC={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i_="u">typeof navigator&&/Mac/.test(navigator.platform),iT="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),iM=0;iM<10;iM++)iA[48+iM]=iA[96+iM]=String(iM);for(var iM=1;iM<=24;iM++)iA[iM+111]="F"+iM;for(var iM=65;iM<=90;iM++)iA[iM]=String.fromCharCode(iM+32),iC[iM]=String.fromCharCode(iM);for(var iZ in iA)iC.hasOwnProperty(iZ)||(iC[iZ]=iA[iZ]);let iR="u">typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},iX="u">typeof document?document:{documentElement:{style:{}}},iE=/Edge\/(\d+)/.exec(iR.userAgent),ij=/MSIE \d/.test(iR.userAgent),iB=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iR.userAgent),iL=!!(ij||iB||iE),iI=!iL&&/gecko\/(\d+)/i.test(iR.userAgent),iz=!iL&&/Chrome\/(\d+)/.exec(iR.userAgent),iY="webkitFontSmoothing"in iX.documentElement.style,iV=!iL&&/Apple Computer/.test(iR.vendor),iW=iV&&(/Mobile\/\w+/.test(iR.userAgent)||iR.maxTouchPoints>2);var iD={mac:iW||/Mac/.test(iR.platform),windows:/Win/.test(iR.platform),linux:/Linux|X11/.test(iR.platform),ie:iL,ie_version:ij?iX.documentMode||6:iB?+iB[1]:iE?+iE[1]:0,gecko:iI,gecko_version:iI?+(/Firefox\/(\d+)/.exec(iR.userAgent)||[0,0])[1]:0,chrome:!!iz,chrome_version:iz?+iz[1]:0,ios:iW,android:/Android\b/.test(iR.userAgent),webkit:iY,webkit_version:iY?+(/\bAppleWebKit\/(\d+)/.exec(iR.userAgent)||[0,0])[1]:0,safari:iV,safari_version:iV?+(/\bVersion\/(\d+(\.\d+)?)/.exec(iR.userAgent)||[0,0])[1]:0,tabSize:null!=iX.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function iq(e,t){for(let i in e)"class"==i&&t.class?t.class+=" "+e.class:"style"==i&&t.style?t.style+=";"+e.style:t[i]=e[i];return t}let iN=Object.create(null);function iU(e,t,i){if(e==t)return!0;e||(e=iN),t||(t=iN);let n=Object.keys(e),r=Object.keys(t);if(n.length-(i&&n.indexOf(i)>-1?1:0)!=r.length-(i&&r.indexOf(i)>-1?1:0))return!1;for(let s of n)if(s!=i&&(-1==r.indexOf(s)||e[s]!==t[s]))return!1;return!0}function iG(e,t,i){let n=!1;if(t)for(let r in t)i&&r in i||(n=!0,"style"==r?e.style.cssText="":e.removeAttribute(r));if(i)for(let r in i)t&&t[r]==i[r]||(n=!0,"style"==r?e.style.cssText=i[r]:e.setAttribute(r,i[r]));return n}class iF{eq(e){return!1}updateDOM(e,t,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var iK=((l=iK||(iK={}))[l.Text=0]="Text",l[l.WidgetBefore=1]="WidgetBefore",l[l.WidgetAfter=2]="WidgetAfter",l[l.WidgetRange=3]="WidgetRange",l);class iH extends it{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new iJ(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new i1(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,n;if(e.isBlockGap)i=-5e8,n=4e8;else{let{start:r,end:s}=i2(e,t);i=(r?t?-3e8:-1:5e8)-1,n=(s?t?2e8:1:-6e8)+1}return new i1(e,i,n,t,e.widget||null,!0)}static line(e){return new i0(e)}static set(e,t=!1){return ia.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}iH.none=ia.empty;class iJ extends iH{constructor(e){let{start:t,end:i}=i2(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?iq(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||iN}eq(e){return this==e||e instanceof iJ&&this.tagName==e.tagName&&iU(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}iJ.prototype.point=!1;class i0 extends iH{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof i0&&this.spec.class==e.spec.class&&iU(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}i0.prototype.mapMode=tm.TrackBefore,i0.prototype.point=!0;class i1 extends iH{constructor(e,t,i,n,r,s){super(t,i,r,e),this.block=n,this.isReplace=s,this.mapMode=n?t<=0?tm.TrackBefore:tm.TrackAfter:tm.TrackDel}get type(){return this.startSide!=this.endSide?iK.WidgetRange:this.startSide<=0?iK.WidgetBefore:iK.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,i;return e instanceof i1&&(t=this.widget,t==(i=e.widget)||!!(t&&i&&t.compare(i)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function i2(e,t=!1){let{inclusiveStart:i,inclusiveEnd:n}=e;return null==i&&(i=e.inclusive),null==n&&(n=e.inclusive),{start:null!=i?i:t,end:null!=n?n:t}}function i5(e,t,i,n=0){let r=i.length-1;r>=0&&i[r]+n>=e?i[r]=Math.max(i[r],t):i.push(e,t)}i1.prototype.point=!0;class i3 extends it{constructor(e,t,i){super(),this.tagName=e,this.attributes=t,this.rank=i}eq(e){return e==this||e instanceof i3&&this.tagName==e.tagName&&iU(this.attributes,e.attributes)}static create(e){return new i3(e.tagName,e.attributes||iN,null==e.rank?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return ia.of(e,t)}}function i6(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function i4(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function i8(e,t){if(!t.anchorNode)return!1;try{return i4(e,t.anchorNode)}catch(e){return!1}}function i7(e){return 3==e.nodeType?nf(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function i9(e,t,i,n){return!!i&&(ni(e,t,i,n,-1)||ni(e,t,i,n,1))}function ne(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function nt(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function ni(e,t,i,n,r){for(;;){if(e==i&&t==n)return!0;if(t==(r<0?0:nn(e))){if("DIV"==e.nodeName)return!1;let i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=ne(e)+(r<0?0:1),e=i}else{if(1!=e.nodeType||1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?nn(e):0}}}function nn(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function nr(e,t){let{left:i,right:n}=e;if(i==n)return e;let r=t?i:n;return{left:r,right:r,top:e.top,bottom:e.bottom}}function ns(e,t){let i=t.width/e.offsetWidth,n=t.height/e.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||1>Math.abs(t.width-e.offsetWidth))&&(i=1),(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.height-e.offsetHeight))&&(n=1),{scaleX:i,scaleY:n}}function no(e,t=!0){let i=e.ownerDocument,n=null,r=null;for(let s=e.parentNode;s;)if(s==i.body||(!t||n)&&r)break;else if(1==s.nodeType)!r&&s.scrollHeight>s.clientHeight&&(r=s),t&&!n&&s.scrollWidth>s.clientWidth&&(n=s),s=s.assignedSlot||s.parentNode;else if(11==s.nodeType)s=s.host;else break;return{x:n,y:r}}i3.prototype.startSide=i3.prototype.endSide=-1;class na{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?nn(t):0),i,Math.min(e.focusOffset,i?nn(i):0))}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}}function nl(e){let t=[];for(let i=e;i;i=11==i.nodeType?i.host:i.parentNode)1==i.nodeType&&t.push({node:i,left:i.scrollLeft,top:i.scrollTop});return t}function nh(e,t=!0){for(let{node:i,left:n,top:r}of e)t&&i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=n&&(i.scrollLeft=n)}let nc=null;function nu(e){if(e.setActive)return e.setActive();if(nc)return e.focus(nc);let t=nl(e);e.focus(null==nc?{get preventScroll(){return nc={preventScroll:!0},!0}}:void 0),nc||(nc=!1,nh(t))}function nf(e,i,n=i){let r=t||(t=document.createRange());return r.setEnd(e,n),r.setStart(e,i),r}function nd(e,t,i,n){let r={key:t,code:t,keyCode:i,which:i,cancelable:!0};n&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=n);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,e.dispatchEvent(s);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function np(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function nO(e,t){for(let i=e,n=t;;)if(3==i.nodeType&&n>0)return{node:i,offset:n};else if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;n=nn(i=i.childNodes[n-1])}else{if(!i.parentNode||nt(i))return null;n=ne(i),i=i.parentNode}}function ng(e,t){for(let i=e,n=t;;)if(3==i.nodeType&&n<i.nodeValue.length)return{node:i,offset:n};else if(1==i.nodeType&&n<i.childNodes.length){if("false"==i.contentEditable)return null;i=i.childNodes[n],n=0}else{if(!i.parentNode||nt(i))return null;n=ne(i)+1,i=i.parentNode}}iD.safari&&iD.safari_version>=26&&(nc=!1);class nm{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new nm(e.parentNode,ne(e),t)}static after(e,t){return new nm(e.parentNode,ne(e)+1,t)}}var nv=((h=nv||(nv={}))[h.LTR=0]="LTR",h[h.RTL=1]="RTL",h);let ny=nv.LTR,nw=nv.RTL;function nb(e){let t=[];for(let i=0;i<e.length;i++)t.push(1<<e[i]);return t}let nx=nb("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),nS=nb("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nk=Object.create(null),nQ=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),i=e.charCodeAt(1);nk[t]=i,nk[i]=-t}function n$(e){return e<=247?nx[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?nS[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let nP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class nA{get dir(){return this.level%2?nw:ny}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,n){let r=-1;for(let s=0;s<e.length;s++){let o=e[s];if(o.from<=t&&o.to>=t){if(o.level==i)return s;(r<0||(0!=n?n<0?o.from<t:o.to>t:e[r].level>o.level))&&(r=s)}}if(r<0)throw RangeError("Index out of range");return r}}let nC=[];function n_(e){return[new nA(0,e,0)]}let nT="",nM=t_.define(),nZ=t_.define(),nR=t_.define(),nX=t_.define(),nE=t_.define(),nj=t_.define(),nB=t_.define(),nL=t_.define(),nI=t_.define(),nz=t_.define({combine:e=>e.some(e=>e)}),nY=t_.define({combine:e=>e.some(e=>e)}),nV=t_.define();class nW{constructor(e,t,i,n,r,s=!1){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=r,this.isSnapshot=s}map(e){return e.empty?this:new nW(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new nW(tP.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let nD=t1.define({map:(e,t)=>e.map(t)}),nq=t1.define();function nN(e,t,i){let n=e.facet(nX);n.length?n[0](t):window.onerror&&window.onerror(String(t),i,void 0,void 0,t)||(i?console.error(i+":",t):console.error(t))}let nU=t_.define({combine:e=>!e.length||e[0]}),nG=0,nF=t_.define({combine:e=>e.filter((t,i)=>{for(let n=0;n<i;n++)if(e[n].plugin==t.plugin)return!1;return!0})});class nK{constructor(e,t,i,n,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=n,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(nF.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(nF.of({plugin:this,arg:e}))}static define(e,t){let{eventHandlers:i,eventObservers:n,provide:r,decorations:s}=t||{};return new nK(nG++,e,i,n,e=>{let t=[];return s&&t.push(n1.of(t=>{let i=t.plugin(e);return i?s(i):iH.none})),r&&t.push(r(e)),t})}static fromClass(e,t){return nK.define((t,i)=>new e(t,i),t)}}class nH{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(nN(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){nN(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null==(t=this.value)?void 0:t.destroy)try{this.value.destroy()}catch(t){nN(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let nJ=t_.define(),n0=t_.define(),n1=t_.define(),n2=t_.define(),n5=t_.define(),n3=t_.define(),n6=t_.define();function n4(e,t){let i=e.state.facet(n6);if(!i.length)return i;let n=i.map(t=>t instanceof Function?t(e):t),r=[];return ia.spans(n,t.from,t.to,{point(){},span(e,i,n,s){let o=e-t.from,a=i-t.from,l=r;for(let e=n.length-1;e>=0;e--,s--){let i=n[e].spec.bidiIsolate,r;if(null==i&&(i=function(e,t,i){for(let n=t;n<i;n++){let t=n$(e.charCodeAt(n));if(1==t)break;if(2==t||4==t)return nw}return ny}(t.text,o,a)),s>0&&l.length&&(r=l[l.length-1]).to==o&&r.direction==i)r.to=a,l=r.inner;else{let e={from:o,to:a,direction:i,inner:[]};l.push(e),l=e.inner}}}}),r}let n8=t_.define();function n7(e){let t=0,i=0,n=0,r=0;for(let s of e.state.facet(n8)){let o=s(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(r=Math.max(r,o.bottom)))}return{left:t,right:i,top:n,bottom:r}}let n9=t_.define();class re{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new re(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toA<i.fromA)break;i=i.join(n),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(0==t.length)return e;let i=[];for(let n=0,r=0,s=0;;){let o=Math.min(n<e.length?e[n].fromB:1e9,r<t.length?t[r]:1e9);if(1e9==o)break;let a=o+s,l=o,h=a;for(;;)if(r<t.length&&t[r]<=l){let i=t[r+1];r+=2,l=Math.max(l,i);for(let t=n;t<e.length&&e[t].fromB<=l;t++)s=e[t].toA-e[t].toB;h=Math.max(h,i+s)}else if(n<e.length&&e[n].fromB<=l){let t=e[n++];l=Math.max(l,t.toB),h=Math.max(h,t.toA),s=t.toA-t.toB}else break;i.push(new re(a,h,o,l))}return i}}class rt{constructor(e,t,i){for(let n of(this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ty.empty(this.startState.doc.length),i))this.changes=this.changes.compose(n.changes);let n=[];this.changes.iterChangedRanges((e,t,i,r)=>n.push(new re(e,t,i,r))),this.changedRanges=n}static create(e,t,i){return new rt(e,t,i)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}let ri=[];class rn{constructor(e,t,i=0){this.dom=e,this.length=t,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return ri}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let i=e.attributes.length-1;i>=0;i--){let n=e.attributes[i].name;null==t[n]&&e.removeAttribute(n)}for(let i in t){let n=t[i];"style"==i?e.style.cssText=n:e.getAttribute(i)!=n&&e.setAttribute(i,n)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let i=t;for(let t of this.children){if(t==e)return i;i+=t.length+t.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,i){return null}domPosFor(e,t){let i=ne(this.dom),n=this.length?e>0:t>0;return new nm(this.parent.dom,i+ +!!n,0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof ro)return e;return null}static get(e){return e.cmTile}}class rr extends rn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t=this.dom,i=null,n,r=(null==e?void 0:e.node)==t?e:null,s=0;for(let o of this.children){if(o.sync(e),s+=o.length+o.breakAfter,n=i?i.nextSibling:t.firstChild,r&&n!=o.dom&&(r.written=!0),o.dom.parentNode==t)for(;n&&n!=o.dom;)n=rs(n);else t.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:t.firstChild,r&&n&&(r.written=!0);n;)n=rs(n);this.length=s}}function rs(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class ro extends rr{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=rn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],i=this,n=0,r=0;;)if(n==i.children.length){if(!t.length)return;(i=i.parent).breakAfter&&r++,n=t.pop()}else{let s=i.children[n++];if(s instanceof ra)t.push(n),i=s,n=0;else{let t=r+s.length,i=e(s,r);if(void 0!==i)return i;r=t+s.breakAfter}}}resolveBlock(e,t){let i,n=-1,r,s=-1;if(this.blockTiles((o,a)=>{let l=a+o.length;if(e>=a&&e<=l){if(o.isWidget()&&t>=-1&&t<=1){if(32&o.flags)return!0;16&o.flags&&(i=void 0)}(a<e||e==l&&(t<-1?o.length:o.covers(1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,n=e-a),(l>e||e==a&&(t>1?o.length:o.covers(-1)))&&(!r||!o.isWidget()&&r.isWidget())&&(r=o,s=e-a)}}),!i&&!r)throw Error("No tile at position "+e);return i&&t<0||!r?{tile:i,offset:n}:{tile:r,offset:s}}}class ra extends rr{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let i=new ra(t||document.createElement(e.tagName),e);return t||(i.flags|=4),i}}class rl extends rr{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,i){let n=new rl(t||document.createElement("div"),e);return t&&i||(n.flags|=4),n}get domAttrs(){return this.attrs}resolveInline(e,t,i){let n=null,r=-1,s=null,o=-1;!function e(a,l){for(let h=0,c=0;h<a.children.length&&c<=l;h++){let u=a.children[h],f=c+u.length;f>=l&&(u.isComposite()?e(u,l-c):(!s||s.isHidden&&(t>0&&!(32&s.flags)||i&&function(e,t){let i=e.coordsIn(0,1),n=t.coordsIn(0,1);return i&&n&&n.top<i.bottom}(s,u)))&&(f>l||32&u.flags&&t<=1)?(s=u,o=l-c):(c<l||16&u.flags&&!u.isHidden&&t>=-1)&&(n=u,r=l-c)),c=f}}(this,e);let a=(t<0?n:s)||n||s;return a?{tile:a,offset:a==n?r:o}:null}coordsIn(e,t,i){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t,i):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let i=i7(t);return i[i.length-1]||null}(this)}domIn(e,t){let i=this.resolveInline(e,t);if(i){let{tile:e,offset:n}=i;if(this.dom.contains(e.dom))return e.isText()?new nm(e.dom,Math.min(e.dom.nodeValue.length,n)):e.domPosFor(n,16&e.flags?1:32&e.flags?-1:t);let r=i.tile.parent,s=!1;for(let e of r.children){if(s)return new nm(e.dom,0);e==i.tile&&(s=!0)}}return new nm(this.dom,0)}}class rh extends rr{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let i=new rh(t||document.createElement(e.tagName),e);return t||(i.flags|=4),i}}class rc extends rn{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,i){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,s=e,o=0;0==e&&t<0||e==n&&t>=0?!(iD.chrome||iD.gecko)&&(e?(r--,o=1):s<n&&(s++,o=-1)):t<0?r--:s<n&&s++;let a=nf(this.dom,r,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:t>=0)?0:a.length-1];return iD.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),null==i?l:nr(l,(o?o>0:t<0)==i)}static of(e,t){let i=new rc(t||document.createTextNode(e),e);return t||(i.flags|=2),i}}class ru extends rn{constructor(e,t,i,n){super(e,t,n),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,i){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;if(i)return nr(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),i=null;if(!t.length)return null;let n=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let r=n?t.length-1:0;i=t[r],e>0?0!=r:r!=t.length-1&&!(i.top<i.bottom);r+=n?-1:1);return nr(i,!n)}}get overrideDOMText(){if(!this.length)return tn.empty;let{root:e}=this;if(!e)return tn.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,i,n,r){return!r&&(r=e.toDOM(t),e.editable||(r.contentEditable="false")),new ru(r,i,e,n)}}class rf extends rn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return tn.empty}coordsIn(e,t,i){let n=this.dom.getBoundingClientRect();return null==i?n:nr(n,t>0==i)}}class rd{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,i){let{tile:n,index:r,beforeBreak:s,parents:o}=this;for(;e||t>0;)if(n.isComposite())if(s){if(!e)break;i&&i.break(),e--,s=!1}else if(r==n.children.length){if(!e&&!o.length)break;i&&i.leave(n),s=!!n.breakAfter,({tile:n,index:r}=o.pop()),r++}else{let a=n.children[r],l=a.breakAfter;(t>0?a.length<=e:a.length<e)&&(!i||!1!==i.skip(a,0,a.length)||!a.isComposite)?(s=!!l,r++,e-=a.length):(o.push({tile:n,index:r}),n=a,r=0,i&&a.isComposite()&&i.enter(a))}else{let t=n.length;if(r<t&&e){let s=Math.min(e,t-r);i&&i.skip(n,r,r+s),e-=s,r+=s}if(r==t)s=!!n.breakAfter,({tile:n,index:r}=o.pop()),r++;else if(!e)break}return this.tile=n,this.index=r,this.beforeBreak=s,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class rp{constructor(e,t,i,n){this.from=e,this.to=t,this.wrapper=i,this.rank=n}}class rO{constructor(e,t,i){this.cache=e,this.root=t,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,i,n){var r;this.flushBuffer();let s=this.ensureMarks(t,i),o=s.lastChild;o&&o.isText()&&!(8&o.flags)&&o.length+e.length<512?(this.cache.reused.set(o,2),(s.children[s.children.length-1]=new rc(o.dom,o.text+e)).parent=s):s.append(n||rc.of(e,null==(r=this.cache.find(rc))?void 0:r.dom)),this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let i=this.curLine;i.dom!=t.line.dom&&(i.setDOM(this.cache.reused.has(t.line)?rx(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let n=i;for(let e=t.marks.length-1;e>=0;e--){let i=t.marks[e],r=n.lastChild;if(r instanceof rh&&r.mark.eq(i.mark))r.dom!=i.dom&&r.setDOM(rx(i.dom)),n=r;else{if(this.cache.reused.get(i)){let e=rn.get(i.dom);e&&e.setDOM(rx(i.dom))}let e=rh.of(i.mark,i.dom);n.append(e),n=e}this.cache.reused.set(i,2)}let r=rn.get(e.text);r&&this.cache.reused.set(r,2);let s=new rc(e.text,e.text.nodeValue);s.flags|=8,this.pos=e.range.toB,n.append(s)}addInlineWidget(e,t,i){let n=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);n||this.flushBuffer();let r=this.ensureMarks(t,i);n||16&e.flags||r.append(this.getBuffer(1)),r.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,i){this.flushBuffer(),this.ensureMarks(t,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var i;e||(e=rb);let n=rl.start(e,t||(null==(i=this.cache.find(rl))?void 0:i.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var i;let n=this.curLine;for(let r=e.length-1;r>=0;r--){let s=e[r],o;if(t>0&&(o=n.lastChild)&&o instanceof rh&&o.mark.eq(s))n=o,t--;else{let e=rh.of(s,null==(i=this.cache.find(rh,e=>e.mark.eq(s)))?void 0:i.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!rw(this.curLine,!1)||"BR"!=e.dom.nodeName&&e.isWidget()&&!(iD.ios&&rw(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(rk,0,32)||new ru(rk.toDOM(),0,rk,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=102*e.rank+e.value.rank,i=new rp(e.from,e.to,e.value,t),n=this.wrappers.length;for(;n>0&&0>(this.wrappers[n-1].rank-i.rank||this.wrappers[n-1].to-i.to);)n--;this.wrappers.splice(n,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let i of this.wrappers){let n=t.lastChild;if(i.from<this.pos&&n instanceof ra&&n.wrapper.eq(i.wrapper))t=n;else{let n=ra.of(i.wrapper,null==(e=this.cache.find(ra,e=>e.wrapper.eq(i.wrapper)))?void 0:e.dom);t.append(n),t=n}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),i=this.cache.find(rf,void 0,1);return i&&(i.flags=t),i||new rf(t)}flushBuffer(){this.afterWidget&&!(32&this.afterWidget.flags)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class rg{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:i,done:n}=this.cursor.next(this.skipCount);if(this.skipCount=0,n)throw Error("Ran out of text content when drawing inline views");this.text=t;let r=this.textOff=Math.min(e,t.length);return i?null:t.slice(0,r)}let t=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,t);return this.textOff=t,i}}let rm=[ru,rl,rc,rh,rf,ra,ro];for(let e=0;e<rm.length;e++)rm[e].bucket=e;class rv{constructor(e){this.view=e,this.buckets=rm.map(()=>[]),this.index=rm.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,i=this.buckets[t];i.length<6?i.push(e):i[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,i=2){let n=e.bucket,r=this.buckets[n],s=this.index[n];for(let e=0;e<r.length;e++){let o=(e+s)%r.length,a=r[o];if((!t||t(a))&&!this.reused.has(a))return r.splice(o,1),o<s&&this.index[n]--,this.reused.set(a,i),a}return null}findWidget(e,t,i){let n=this.buckets[0];if(n.length)for(let r=0,s=0;;r++){if(r==n.length){if(s)return null;s=1,r=0}let o=n[r];if(!this.reused.has(o)&&(0==s?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget))){if(n.splice(r,1),r<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(497&o.flags)==i)return this.reused.set(o,1),o;return this.reused.set(o,2),new ru(o.dom,t,e,-498&o.flags|i)}}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class ry{constructor(e,t,i,n,r){this.view=e,this.decorations=n,this.disallowBlockEffectsFor=r,this.openWidget=!1,this.openMarks=0,this.cache=new rv(e),this.text=new rg(e.state.doc),this.builder=new rO(this.cache,new ro(e,e.contentDOM),ia.iter(i)),this.cache.reused.set(t,2),this.old=new rd(t),this.reuseWalker={skip:(e,t,i)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let i=t&&this.getCompositionContext(t.text);for(let n=0,r=0,s=0;;){let o=s<e.length?e[s++]:null,a=o?o.fromA:this.old.root.length;if(a>n){let e=a-n;this.preserve(e,!s,!o),n=a,r+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(r,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,i),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(r,o.toB)),r=o.toB,n=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,i){let n=function(e){let t=[];for(let i=e.parents.length;i>1;i--){let n=i==e.parents.length?e.tile:e.parents[i].tile;n instanceof rh&&t.push(n.mark)}return t}(this.old),r=this.openMarks;this.old.advance(e,i?1:-1,{skip:(e,t,i)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(i-t);else{let s=i>0||t<e.length?ru.of(e.widget,this.view,i-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&s.flags?(s.flags&=-2,this.builder.addBlockWidget(s)):(this.builder.ensureLine(null),this.builder.addInlineWidget(s,n,r),r=n.length)}else if(e.isText())this.builder.ensureLine(null),t||i!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,i),n,r)):this.builder.addText(e.text,n,r,this.cache.reuse(e)),r=n.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof rf)this.cache.add(e);else{if(!(e instanceof rh))return!1;this.builder.ensureLine(null),this.builder.addMark(e,n,r),this.cache.reused.set(e,1),r=n.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof rh&&n.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?n.length&&(n.length=r=0):e instanceof rh&&(n.shift(),r=Math.min(r,n.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let i=null,n=this.builder,r=-1,s=ia.spans(this.decorations,e,t,{point:(e,t,s,o,a,l)=>{var h,c,u;if(s instanceof i1){if(this.disallowBlockEffectsFor[l]){if(s.block)throw RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(r=o.length,a>o.length)n.continueWidget(t-e);else{let r,l=s.widget||(s.block?rS.block:rS.inline),c=(r=(h=s).isReplace?64*(h.startSide<0)|128*(h.endSide>0):h.startSide>0?32:16,h.block&&(r|=256),r),u=this.cache.findWidget(l,t-e,c)||ru.of(l,this.view,t-e,c);s.block?(s.startSide>0&&n.addLineStartIfNotCovered(i),n.addBlockWidget(u)):(n.ensureLine(i),n.addInlineWidget(u,o,a))}i=null}else{let e,t;c=i,e=(u=s).spec.attributes,t=u.spec.class,(e||t)&&(c||(c={class:"cm-line"}),e&&iq(e,c),t&&(c.class+=" "+t)),i=c}t>e&&this.text.skip(t-e)},span:(e,t,s,o)=>{for(let r=e;r<t;){let a=this.text.next(Math.min(512,t-r));null==a?(n.addLineStartIfNotCovered(i),n.addBreak(),r++):(n.ensureLine(i),n.addText(a,s,r==e?o:s.length),r+=a.length),i=null}r=s.length}});r>-1&&(this.openWidget=s>r),this.openWidget||n.addLineStartIfNotCovered(i),this.openMarks=s}forward(e,t,i=1){t-e<=10?this.old.advance(t-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let t=[],i=null;for(let n=e.parentNode;;n=n.parentNode){let e=rn.get(n);if(n==this.view.contentDOM)break;e instanceof rh?t.push(e):(null==e?void 0:e.isLine())?i=e:e instanceof ra||("DIV"!=n.nodeName||i||n==this.view.contentDOM?i||t.push(rh.of(new iJ({tagName:n.nodeName.toLowerCase(),attributes:function(e){let t=Object.create(null);for(let i=0;i<e.attributes.length;i++){let n=e.attributes[i];t[n.name]=n.value}return t}(n)}),n)):i=new rl(n,rb))}return{line:i,marks:t}}}function rw(e,t){let i=e=>{for(let n of e.children)if((t?n.isText():n.length)||i(n))return!0;return!1};return i(e)}let rb={class:"cm-line"};function rx(e){let t=rn.get(e);return t&&t.setDOM(e.cloneNode()),e}class rS extends iF{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}rS.inline=new rS("span"),rS.block=new rS("div");let rk=new class extends iF{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class rQ{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=iH.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new ro(e,e.contentDOM),this.updateInner([new re(0,0,0,e.state.doc.length)],null)}update(e){var t,i,n,r,s,o,a,l,h;let c,u,f,d=e.changedRanges;this.minWidth>0&&d.length&&(d.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let p=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null==(t=this.domChanged)?void 0:t.newSel)?p=this.domChanged.newSel.head:(i=e.changes,n=this.hasComposition,c=!1,n&&i.iterChangedRanges((e,t)=>{e<n.to&&t>n.from&&(c=!0)}),c||e.selectionSet||(p=e.state.selection.main.head)));let O=p>-1?function(e,t,i){let n=rP(e,i);if(!n)return null;let{node:r,from:s,to:o}=n,a=r.nodeValue;if(/[\n\r]/.test(a)||e.state.doc.sliceString(n.from,n.to)!=a)return null;let l=t.invertedDesc;return{range:new re(l.mapPos(s),l.mapPos(o),s,o),text:r}}(this.view,e.changes,p):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:i}=this.hasComposition;d=new re(t,i,e.changes.mapPos(t,-1),e.changes.mapPos(i,1)).addToSet(d.slice())}this.hasComposition=O?{from:O.range.fromB,to:O.range.toB}:null,(iD.ie||iD.chrome)&&!O&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let g=this.decorations,m=this.blockWrappers;this.updateDeco();let v=(r=g,s=this.decorations,o=e.changes,u=new rA,ia.compare(r,s,o,u),u.changes);v.length&&(d=re.extendWithRanges(d,v));let y=(a=m,l=this.blockWrappers,h=e.changes,f=new rC,ia.compare(a,l,h,f),f.changes);return y.length&&(d=re.extendWithRanges(d,y)),O&&!d.some(e=>e.fromA<=O.range.fromA&&e.toA>=O.range.toA)&&(d=O.range.addToSet(d.slice())),(!(2&this.tile.flags)||0!=d.length)&&(this.updateInner(d,O),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(t||e.length){let i=this.tile,n=new ry(this.view,i,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&rn.get(t.text)&&n.cache.reused.set(rn.get(t.text),2),this.tile=n.run(e,t),r$(i,n.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let n=iD.chrome||iD.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(n),n&&(n.written||i.selectionRange.focusNode!=n.node||!this.tile.dom.contains(n.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof r_&&n.push(e.dom);i.updateGaps(n)}updateEditContextFormatting(e){for(let t of(this.editContextFormatting=this.editContextFormatting.map(e.changes),e.transactions))for(let e of t.effects)e.is(nq)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){var i;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,s=r==n,o=!s&&!(this.view.state.facet(nU)||n.tabIndex>-1)&&i8(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(s||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h,c;if(l.empty?c=h=this.inlineDOMNearPos(l.anchor,l.assoc||1):(c=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),h=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),iD.gecko&&l.empty&&!this.hasComposition&&1==(i=h).node.nodeType&&i.node.firstChild&&(0==i.offset||"false"==i.node.childNodes[i.offset-1].contentEditable)&&(i.offset==i.node.childNodes.length||"false"==i.node.childNodes[i.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(e,h.node.childNodes[h.offset]||null)),h=c=new nm(e,0),a=!0}let u=this.view.observer.selectionRange;!a&&u.focusNode&&(i9(h.node,h.offset,u.anchorNode,u.anchorOffset)&&i9(c.node,c.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,l))||(this.view.observer.ignore(()=>{iD.android&&iD.chrome&&n.contains(u.focusNode)&&function(e,t){for(let i=e;i&&i!=t;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=i6(this.view.root);if(e)if(l.empty){if(iD.gecko){var t,i;let e=(t=h.node,i=h.offset,1!=t.nodeType?0:(i&&"false"==t.childNodes[i-1].contentEditable?1:0)|2*(i<t.childNodes.length&&"false"==t.childNodes[i].contentEditable));if(e&&3!=e){let t=(1==e?nO:ng)(h.node,h.offset);t&&(h=new nm(t.node,t.offset))}}e.collapse(h.node,h.offset),null!=l.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=l.bidiLevel)}else if(e.extend){e.collapse(h.node,h.offset);try{e.extend(c.node,c.offset)}catch(e){}}else{let t=document.createRange();l.anchor>l.head&&([h,c]=[c,h]),t.setEnd(c.node,c.offset),t.setStart(h.node,h.offset),e.removeAllRanges(),e.addRange(t)}o&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,c)),this.impreciseAnchor=h.precise?null:new nm(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new nm(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&i9(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=i6(e.root),{anchorNode:n,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let s=this.lineAt(t.head,t.assoc);if(!s)return;let o=s.posAtStart;if(t.head==o||t.head==o+s.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(t.head+t.assoc,t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(n,r)}posFromDOM(e,t){let i=this.tile.nearest(e);if(!i)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let n=i.posAtStart;if(i.isComposite()){let r;if(e==i.dom)r=i.dom.childNodes[t];else{let n=0==nn(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==i.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}r=n<0?e:e.nextSibling}if(r==i.dom.firstChild)return n;for(;r&&!rn.get(r);)r=r.nextSibling;if(!r)return n+i.length;for(let e=0,t=n;;e++){let n=i.children[e];if(n.dom==r)return t;t+=n.length+n.breakAfter}}else if(i.isText())return e==i.dom?n+t:n+(t?i.length:0);else return n}domAtPos(e,t){let{tile:i,offset:n}=this.tile.resolveBlock(e,t);return i.isWidget()?i.domPosFor(n,t):i.domIn(n,t)}inlineDOMNearPos(e,t){let i,n=-1,r=!1,s,o=-1,a=!1;return(this.tile.blockTiles((t,l)=>{if(t.isWidget()){if(32&t.flags&&l>=e)return!0;16&t.flags&&(r=!0)}else{let h=l+t.length;if(l<=e&&(i=t,n=e-l,r=h<e),h>=e&&!s&&(s=t,o=e-l,a=l>e),l>e&&s)return!0}}),i||s)?(r&&s?i=null:a&&i&&(s=null),i&&t<0||!s?i.domIn(n,t):s.domIn(o,t)):this.domAtPos(e,t)}coordsAt(e,t,i){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof r_?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t,i)}lineAt(e,t){let{tile:i}=this.tile.resolveBlock(e,t);return i.isLine()?i:null}coordsForChar(e){let{tile:t,offset:i}=this.tile.resolveBlock(e,1);return t.isLine()?function e(t,i){if(t.isComposite())for(let n of t.children){if(n.length>=i){let t=e(n,i);if(t)return t}if((i-=n.length)<0)break}else if(t.isText()&&i<t.length){let e=tf(t.text,i);if(e==i)return null;let n=nf(t.dom,i,e).getClientRects();for(let e=0;e<n.length;e++){let t=n[e];if(e==n.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}(t,i):null}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,r=this.view.contentDOM.clientWidth,s=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==nv.LTR,l=0,h=(e,c,u)=>{for(let f=0;f<e.children.length&&!(c>n);f++){let n=e.children[f],d=c+n.length,p=n.dom.getBoundingClientRect(),{height:O}=p;if(u&&!f&&(l+=p.top-u.top),n instanceof ra)d>i&&h(n,c,p);else if(c>=i&&(l>0&&t.push(-l),t.push(O+l),l=0,s)){let e=n.dom.lastChild,t=e?i7(e):[];if(t.length){let e=t[t.length-1],i=a?e.right-p.left:p.right-e.left;i>o&&(o=i,this.minWidth=r,this.minWidthFrom=c,this.minWidthTo=d)}}u&&f==e.children.length-1&&(l+=u.bottom-p.bottom),c=d+n.breakAfter}};return h(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?nv.RTL:nv.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,i;for(let n of e.children){if(!n.isText()||/[^ -~]/.test(n.text))return;let e=i7(n.dom);if(1!=e.length)return;t+=e[0].width,i=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:i}}});if(e)return e;let t=document.createElement("div"),i,n,r;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=i7(t.firstChild)[0];i=t.getBoundingClientRect().height,n=e&&e.width?e.width/27:7,r=e&&e.height?e.height:i,t.remove()}),{lineHeight:i,charWidth:n,textHeight:r}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let r=n==t.viewports.length?null:t.viewports[n],s=r?r.from-1:this.view.state.doc.length;if(s>i){let n=(t.lineBlockAt(s).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(iH.replace({widget:new r_(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!r)break;i=r.to+1}return iH.set(e)}updateDeco(){let e=1,t=this.view.state.facet(n1).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),i=!1,n=this.view.state.facet(n5).map((e,t)=>{let n="function"==typeof e;return n&&(i=!0),n?e(this.view):e});for(n.length&&(this.dynamicDecorationMap[e++]=i,t.push(ia.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(n2).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(nV))try{if(t(this.view,e.range,e))return!0}catch(e){nN(this.view.state,e,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),n;if(!i)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});let r=n7(this.view),s={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;if(!function(e,t,i,n,r,s,o,a){let l=e.ownerDocument,h=l.defaultView||window;for(let c=e,u=!1;c&&!u;)if(1==c.nodeType){let e,f=c==l.body,d=1,p=1;if(f)e=function(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(u=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:d,scaleY:p}=ns(c,t)),e={left:t.left,right:t.left+c.clientWidth*d,top:t.top,bottom:t.top+c.clientHeight*p}}let O=0,g=0;if("nearest"==r)t.top<e.top+o?(g=t.top-(e.top+o),i>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,i<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let n=t.bottom-t.top,s=e.bottom-e.top;g=("center"==r&&n<=s?t.top+n/2-s/2:"start"==r||"center"==r&&i<0?t.top-o:t.bottom-s+o)-e.top}if("nearest"==n?t.left<e.left+s?(O=t.left-(e.left+s),i>0&&t.right>e.right+O&&(O=t.right-e.right+s)):t.right>e.right-s&&(O=t.right-e.right+s,i<0&&t.left<e.left+O&&(O=t.left-(e.left+s))):O=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==a?t.left-s:t.right-(e.right-e.left)+s)-e.left,O||g)if(f)h.scrollBy(O,g);else{let e=0,i=0;if(g){let e=c.scrollTop;c.scrollTop+=g/p,i=(c.scrollTop-e)*p}if(O){let t=c.scrollLeft;c.scrollLeft+=O/d,e=(c.scrollLeft-t)*d}t={left:t.left-e,top:t.top-i,right:t.right-e,bottom:t.bottom-i},e&&1>Math.abs(e-O)&&(n="nearest"),i&&1>Math.abs(i-g)&&(r="nearest")}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),c=c.assignedSlot||c.parentNode}else if(11==c.nodeType)c=c.host;else break}(this.view.scrollDOM,s,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==nv.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=nl(e.dom);e.dom.scrollIntoView({block:"nearest"}),nh(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){r$(this.tile)}}function r$(e,t){let i=null==t?void 0:t.get(e);if(1!=i)for(let n of(null==i&&e.destroy(),e.children))r$(n,t)}function rP(e,t){let i=e.observer.selectionRange;if(!i.focusNode)return null;let n=nO(i.focusNode,i.focusOffset),r=ng(i.focusNode,i.focusOffset),s=n||r;if(r&&n&&r.node!=n.node){let t=rn.get(r.node);if(!t||t.isText()&&t.text!=r.node.nodeValue)s=r;else if(e.docView.lastCompositionAfterCursor){let e=rn.get(n.node);!e||e.isText()&&e.text!=n.node.nodeValue||(s=r)}}if(e.docView.lastCompositionAfterCursor=s!=n,!s)return null;let o=t-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}let rA=class{constructor(){this.changes=[]}compareRange(e,t){i5(e,t,this.changes)}comparePoint(e,t){i5(e,t,this.changes)}boundChange(e){i5(e,e,this.changes)}};class rC{constructor(){this.changes=[]}compareRange(e,t){i5(e,t,this.changes)}comparePoint(){}boundChange(e){i5(e,e,this.changes)}}class r_ extends iF{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function rT(e,t,i){let n=e.lineBlockAt(t);if(Array.isArray(n.type)){let e;for(let r of n.type){if(r.from>t)break;if(!(r.to<t)){if(r.from<t&&r.to>t)return r;(!e||r.type==iK.Text&&(e.type!=r.type||(i<0?r.from<t:r.to>t)))&&(e=r)}}return e||n}return n}function rM(e,t,i,n){let r=e.state.doc.lineAt(t.head),s=e.bidiSpans(r),o=e.textDirectionAt(r.from);for(let a=t,l=null;;){let t=function(e,t,i,n,r){var s;let o=n.head-e.from,a=nA.find(t,o,null!=(s=n.bidiLevel)?s:-1,n.assoc),l=t[a],h=l.side(r,i);if(o==h){let e=a+=r?1:-1;if(e<0||e>=t.length)return null;o=(l=t[a=e]).side(!r,i),h=l.side(r,i)}let c=tf(e.text,o,l.forward(r,i));(c<l.from||c>l.to)&&(c=h),nT=e.text.slice(Math.min(o,c),Math.max(o,c));let u=a==(r?t.length-1:0)?null:t[a+(r?1:-1)];return u&&c==h&&u.level+ +!r<l.level?tP.cursor(u.side(!r,i)+e.from,u.forward(r,i)?1:-1,u.level):tP.cursor(c+e.from,l.forward(r,i)?-1:1,l.level)}(r,s,o,a,i),h=nT;if(!t){if(r.number==(i?e.state.doc.lines:1))return a;h="\n",r=e.state.doc.line(r.number+(i?1:-1)),s=e.bidiSpans(r),t=e.visualLineSide(r,!i)}if(l){if(!l(h))return a}else{if(!n)return t;l=n(h)}a=t}}function rZ(e,t,i){for(;;){let n=0;for(let r of e)r.between(t-1,t+1,(e,r,s)=>{if(t>e&&t<r){let s=n||i||(t-e<r-t?-1:1);t=s<0?e:r,n=s}});if(!n)return t}}function rR(e,t){let i=null;for(let n=0;n<t.ranges.length;n++){let r=t.ranges[n],s=null;if(r.empty){let t=rZ(e,r.from,0);t!=r.from&&(s=tP.cursor(t,-1))}else{let t=rZ(e,r.from,-1),i=rZ(e,r.to,1);(t!=r.from||i!=r.to)&&(s=r.undirectional?tP.undirectionalRange(r.from,r.to):tP.range(r.from==r.anchor?t:i,r.from==r.head?t:i))}s&&(i||(i=t.ranges.slice()),i[n]=s)}return i?tP.create(i,t.mainIndex):t}function rX(e,t,i){let n=rZ(e.state.facet(n3).map(t=>t(e)),i.from,t.head>i.from?-1:1);return n==i.from?i:tP.cursor(n,n<i.from?1:-1)}class rE{constructor(e,t){this.pos=e,this.assoc=t}}function rj(e,t,i,n){let r=e.contentDOM.getBoundingClientRect(),s=r.top+e.viewState.paddingTop,{x:o,y:a}=t,l=a-s,h;for(;;){if(l<0)return new rE(0,1);if(l>e.viewState.docHeight)return new rE(e.state.doc.length,-1);if(h=e.elementAtHeight(l),null==n)break;if(h.type==iK.Text){if(n<0?h.to<e.viewport.from:h.from>e.viewport.to)break;let t=e.docView.coordsAt(n<0?h.from:h.to,n>0?-1:1);if(t&&(n<0?t.top<=l+s:t.bottom>=l+s))break}let t=e.viewState.heightOracle.textHeight/2;l=n>0?h.bottom+t:h.top-t}if(e.viewport.from>=h.to||e.viewport.to<=h.from){if(i)return null;if(h.type==iK.Text){let t=function(e,t,i,n,r){let s=Math.round((n-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&i.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;s+=Math.floor((r-i.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(i.from,i.to);return i.from+function(e,t,i){for(let n=0,r=0;;){if(r>=t)return n;if(n==e.length)break;r+=9==e.charCodeAt(n)?i-r%i:1,n=tf(e,n)}return e.length}(o,s,e.state.tabSize)}(e,r,h,o,a);return new rE(t,t==h.from?1:-1)}}if(h.type!=iK.Text)return l<(h.top+h.bottom)/2?new rE(h.from,1):new rE(h.to,-1);let c=e.docView.lineAt(h.from,2);return c&&c.length==h.length||(c=e.docView.lineAt(h.from,-2)),new rB(e,o,a,e.textDirectionAt(h.from)).scanTile(c,h.from)}class rB{constructor(e,t,i,n){this.view=e,this.x=t,this.y=i,this.baseDir=n,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:i,spans:n}=this.bidiSpansAt(e);return n[nA.find(n,e-i.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:i,spans:n}=this.bidiSpansAt(e);return n[nA.find(n,e-i.from,-1,t)].dir}bidiIn(e,t){let{spans:i,line:n}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+n.from<t)}scan(e,t,i=!1){let n,r,s=0,o=e.length-1,a=new Set,l=this.bidiIn(e[0],e[o]),h=-1,c=1e9,u;for(;s<o;){let i=o-s,f=s+o>>1;r:if(a.has(f)){for(let e=1;e<i;e++){let t=f+e;if(t>=o&&(t-=i),!a.has(t)){f=t;break r}}break}a.add(f);let d=t(f),p=0;if(d)for(let e=0;e<d.length;e++){let t=d[e];if(0!=t.width||!(d.length>1))if(t.bottom<this.y)(!n||n.bottom<t.bottom)&&(n=t),p=1;else if(t.top>this.y)(!r||r.top>t.top)&&(r=t),p=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,i=Math.abs(e);i<c&&(h=f,c=i,u=t),e&&(p=e<0==(this.baseDir==nv.LTR)?-1:1)}}-1==p&&(!l||this.baseDirAt(e[f],1))?o=f:1==p&&(!l||this.baseDirAt(e[f+1],-1))&&(s=f+1)}if(!u){if(!r&&!n)return{i:0,after:!1};let i=n&&(!r||this.y-n.bottom<r.top-this.y)?n:r;return this.y=(i.top+i.bottom)/2,this.scan(e,t,!0)}if(c&&!i){let{top:i,bottom:s}=u;if(n&&n.bottom>(i+i+s)/3)return this.y=n.bottom-1,this.scan(e,t,!0);if(r&&r.top<(i+s+s)/3)return this.y=r.top+1,this.scan(e,t,!0)}let f=(l?this.dirAt(e[h],1):this.baseDir)==nv.LTR;return{i:h,after:this.x>(u.left+u.right)/2==f}}scanText(e,t){let i=[];for(let n=0;n<e.length;n=tf(e.text,n))i.push(t+n);i.push(t+e.length);let n=this.scan(i,n=>{let r=i[n]-t,s=i[n+1]-t;return nf(e.dom,r,s).getClientRects()});return n.after?new rE(i[n.i+1],-1):new rE(i[n.i],1)}scanTile(e,t){if(!e.length)return new rE(t,1);if(1==e.children.length){let i=e.children[0];if(i.isText())return this.scanText(i,t);if(i.isComposite())return this.scanTile(i,t)}let i=[t];for(let n=0,r=t;n<e.children.length;n++)i.push(r+=e.children[n].length);let n=this.scan(i,t=>{let i=e.children[t];return 48&i.flags?null:(1==i.dom.nodeType?i.dom:nf(i.dom,0,i.length)).getClientRects()}),r=e.children[n.i],s=i[n.i];return r.isText()?this.scanText(r,s):r.isComposite()?this.scanTile(r,s):n.after?new rE(i[n.i+1],-1):new rE(s,1)}}class rL{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(t9.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n);let e=this.text.length;this.readNode(n);let r=rn.get(n),s=n.nextSibling;if(s==t){(null==r?void 0:r.breakAfter)&&!s&&i!=this.view.contentDOM&&this.lineBreak();break}let o=rn.get(s);(r&&o?r.breakAfter:(r?r.breakAfter:nt(n))||nt(s)&&("BR"!=n.nodeName||(null==r?void 0:r.isWidget()))&&this.text.length>e)&&!function(e,t){let i;for(;e!=t&&e;e=e.nextSibling){let t=rn.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(i||(i=[])).push(t)}if(i)for(let e of i){let t=e.overrideDOMText;if(null==t?void 0:t.length)return!1}return!0}(s,t)&&this.lineBreak(),n=s}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,s=1,o;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(o=n.exec(t))&&(r=o.index,s=o[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);i=r+s}}readNode(e){let t=rn.get(e),i=t&&t.overrideDOMText;if(null!=i){this.findPointInside(e,i.length);for(let e=i.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(!function(e,t,i){for(;;){if(!t||i<nn(t))return!1;if(t==e)return!0;i=ne(t)+1,t=t.parentNode}}(e,i.node,i.offset)?0:t))}}class rI{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class rz{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:s}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=function e(t,i,n,r){if(t.isComposite()){let s=-1,o=-1,a=-1,l=-1;for(let h=0,c=r,u=r;h<t.children.length;h++){let r=t.children[h],f=c+r.length;if(c<i&&f>n)return e(r,i,n,c);if(f>=i&&-1==s&&(s=h,o=c),c>n&&r.dom.parentNode==t.dom){a=h,l=u;break}u=f,c=f+r.breakAfter}return{from:o,to:l<0?r+t.length:l,startDOM:(s?t.children[s-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}(e.docView.tile,t,i,0))){let t=r||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:s}=e.observer.selectionRange;return i&&(t.push(new rI(i,n)),(r!=i||s!=n)&&t.push(new rI(r,s))),t}(e),i=new rL(t,e);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(e,t){if(0==e.length)return null;let i=e[0].pos,n=2==e.length?e[1].pos:i;return i>-1&&n>-1?tP.single(i+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,i=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!i4(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!i4(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((iD.ios||iD.chrome)&&i!=n&&Math.min(i,n)<=o.main.from&&Math.max(i,n)>=o.main.to&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(i,n),r=Math.max(i,n),s=a.from-t,o=a.to-r;(0==s||1==s||0==t)&&(0==o||-1==o||r==e.state.doc.length)&&(i=0,n=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(tP.range(n,i));else if(e.lineWrapping&&n==i&&!(o.main.empty&&o.main.head==i)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(i,-1),n=0;t&&(n=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=tP.create([tP.cursor(i,n)])}else this.newSel=tP.single(n,i)}}}function rY(e,t){let i,{newSel:n}=t,{state:r}=e,s=r.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:n}=t.bounds,a=s.from,l=null;(8===o||iD.android&&t.text.length<n-e)&&(a=s.to,l="end");let h=r.doc.sliceString(e,n,""),c,u;!s.empty&&s.from>=e&&s.to<=n&&(t.typeOver||h!=t.text)&&h.slice(0,s.from-e)==t.text.slice(0,s.from-e)&&h.slice(s.to-e)==t.text.slice(c=t.text.length-(h.length-(s.to-e)))?i={from:s.from,to:s.to,insert:tn.of(t.text.slice(s.from-e,c).split(""))}:(u=rW(h,t.text,a-e,l))&&(iD.chrome&&13==o&&u.toB==u.from+2&&""==t.text.slice(u.from,u.toB)&&u.toB--,i={from:e+u.from,to:e+u.toA,insert:tn.of(t.text.slice(u.from,u.toB).split(""))})}else n&&(!e.hasFocus&&r.facet(nU)||rD(n,s))&&(n=null);if(!i&&!n)return!1;if((iD.mac||iD.android)&&i&&i.from==i.to&&i.from==s.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=tP.single(n.main.anchor-1,n.main.head-1)),i={from:i.from,to:i.to,insert:tn.of([i.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).to<s.to&&e.docView.lineHasWidget(s.to)&&e.inputState.insertingTextAt>Date.now()-50?i={from:s.from,to:s.to,insert:r.toText(e.inputState.insertingText)}:iD.chrome&&i&&i.from==i.to&&i.from==s.head&&"\n "==i.insert.toString()&&e.lineWrapping&&(n&&(n=tP.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:tn.of([" "])}),i)return rV(e,i,n,o);if(!n||rD(n,s))return!1;{let t=!1,i="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),"select.pointer"==(i=e.inputState.lastSelectionOrigin)&&(n=rR(r.facet(n3).map(t=>t(e)),n))),e.dispatch({selection:n,scrollIntoView:t,userEvent:i}),!0}}function rV(e,t,i,n=-1){let r;if(iD.ios&&e.inputState.flushIOSKey(t))return!0;let s=e.state.selection.main;if(iD.android&&(t.to==s.to&&(t.from==s.from||t.from==s.from-1&&" "==e.state.sliceDoc(t.from,s.from))&&1==t.insert.length&&2==t.insert.lines&&nd(e.contentDOM,"Enter",13)||(t.from==s.from-1&&t.to==s.to&&0==t.insert.length||8==n&&t.insert.length<t.to-t.from&&t.to>s.head)&&nd(e.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&0==t.insert.length&&nd(e.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>r||(r=function(e,t,i){let n,r=e.state,s=r.selection.main,o=-1;if(t.from==t.to&&t.from<s.from||t.from>s.to){let i=t.from<s.from?-1:1,n=i<0?s.from:s.to,a=rZ(r.facet(n3).map(t=>t(e)),n,i);t.from==a&&(o=a)}if(o>-1)n={changes:t,selection:tP.cursor(t.from+t.insert.length,-1)};else if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let i=s.from<t.from?r.sliceDoc(s.from,t.from):"",o=s.to>t.to?r.sliceDoc(t.to,s.to):"";n=r.replaceSelection(e.state.toText(i+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=r.changes(t),a=i&&i.main.to<=o.newLength?i.main:void 0;if(r.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=s.to+10&&t.to>=s.to-10){let l=e.state.sliceDoc(t.from,t.to),h,c=i&&rP(e,i.main.head);if(c){let e=t.insert.length-(t.to-t.from);h={from:c.from,to:c.to-e}}else h=e.state.doc.lineAt(s.head);let u=s.to-t.to;n=r.changeByRange(i=>{if(i.from==s.from&&i.to==s.to)return{changes:o,range:a||i.map(o)};let n=i.to-u,c=n-l.length;if(e.state.sliceDoc(c,n)!=l||n>=h.from&&c<=h.to)return{range:i};let f=r.changes({from:c,to:n,insert:t.insert}),d=i.to-s.to;return{changes:f,range:a?tP.range(Math.max(0,a.anchor+d),Math.max(0,a.head+d)):i.map(f)}})}else n={changes:o,selection:a&&r.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),r.update(n,{userEvent:a,scrollIntoView:!0})}(e,t,i));return e.state.facet(nj).some(i=>i(e,t.from,t.to,o,a))||e.dispatch(a()),!0}function rW(e,t,i,n){let r=Math.min(e.length,t.length),s=0;for(;s<r&&e.charCodeAt(s)==t.charCodeAt(s);)s++;if(s==r&&e.length==t.length)return null;let o=e.length,a=t.length;for(;o>0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;if("end"==n){let e=Math.max(0,s-Math.min(o,a));i-=o+e-s}if(o<s&&e.length<t.length){let e=i<=s&&i>=o?s-i:0;s-=e,a=s+(a-o),o=s}else if(a<s){let e=i<=s&&i>=a?s-i:0;s-=e,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function rD(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class rq{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,iD.safari&&e.contentDOM.addEventListener("input",()=>null),iD.gecko&&(t=e.contentDOM.ownerDocument,ss.has(t)||(ss.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let i=t.target,n;i!=e.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(n=rn.get(i))&&n.isWidget()&&!n.isHidden&&n.widget.ignoreEvent(t))return!1;return!0}(this.view,e)||this.ignoreDuringComposition(e)||"keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let e of i.observers)e(this.view,t);for(let e of i.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function i(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,n=e&&e.plugin.domEventHandlers,r=e&&e.plugin.domEventObservers;if(n)for(let e in n){let r=n[e];r&&i(e).handlers.push(rN(t.value,r))}if(r)for(let e in r){let n=r[e];n&&i(e).observers.push(rN(t.value,n))}}for(let e in rJ)i(e).handlers.push(rJ[e]);for(let e in r0)i(e).observers.push(r0[e]);return t}(e),i=this.handlers,n=this.view.contentDOM;for(let e in t)if("scroll"!=e){let r=!t[e].handlers.length,s=i[e];s&&!s.handlers.length!=r&&(n.removeEventListener(e,this.handleEvent),s=null),s||n.addEventListener(e,this.handleEvent,{passive:r})}for(let e in i)"scroll"==e||t[e]||n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&0>rF.indexOf(e.keyCode)&&(this.tabFocusMode=-1),iD.android&&iD.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(iD.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(rU.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||rG.indexOf(e.key)>-1&&e.ctrlKey)){var t;let i={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return i.shiftKey&&iD.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&(t=this.view.win).visualViewport&&t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85&&(i.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:i},setTimeout(()=>this.flushIOSKey(),50),!0}return 229!=e.keyCode&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||this.view.observer.pendingRecords().length||"Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,nd(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&!e.synthetic&&(this.composing>0||!!(iD.safari&&!iD.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function rN(e,t){return(i,n)=>{try{return t.call(e,n,i)}catch(e){nN(i.state,e)}}}let rU=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],rG="dthko",rF=[16,17,18,20,91,92,224,225];function rK(e){return .7*Math.max(0,e)+8}class rH{constructor(e,t,i,n){var r,s;let o;this.view=e,this.startEvent=t,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=no(e.contentDOM),this.atoms=e.state.facet(n3).map(t=>t(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(t9.allowMultipleSelections)&&(r=e,s=t,(o=r.state.facet(nM)).length?o[0](s):iD.mac?s.metaKey:s.ctrlKey),this.dragging=!!function(e,t){let{main:i}=e.state.selection;if(i.empty)return!1;let n=i6(e.root);if(!n||0==n.rangeCount)return!0;let r=n.getRangeAt(0).getClientRects();for(let e=0;e<r.length;e++){let i=r[e];if(i.left<=t.clientX&&i.right>=t.clientX&&i.top<=t.clientY&&i.bottom>=t.clientY)return!0}return!1}(e,t)&&1==r9(t)&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>(t=this.startEvent,Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))return;this.select(this.lastEvent=e);let i=0,n=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=n7(this.view);e.clientX-l.left<=r+6?i=-rK(r-e.clientX):e.clientX+l.right>=o-6&&(i=rK(e.clientX-o)),e.clientY-l.top<=s+6?n=-rK(s-e.clientY):e.clientY+l.bottom>=a-6&&(n=rK(e.clientY-a)),this.setScrollSpeed(i,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,i=rR(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,!1===this.dragging))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}let rJ=Object.create(null),r0=Object.create(null),r1=iD.ie&&iD.ie_version<15||iD.ios&&iD.webkit_version<604;function r2(e,t,i){for(let n of e.facet(t))i=n(i,e);return i}function r5(e,t){t=r2(e.state,nL,t);let{state:i}=e,n,r=1,s=i.toText(t),o=s.lines==i.selection.ranges.length;if(null!=st&&i.selection.ranges.every(e=>e.empty)&&st==s.toString()){let e=-1;n=i.changeByRange(n=>{let a=i.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=i.toText((o?s.line(r++).text:t)+i.lineBreak);return{changes:{from:a.from,insert:l},range:tP.cursor(n.from+l.length)}})}else n=o?i.changeByRange(e=>{let t=s.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:tP.cursor(e.from+t.length)}}):i.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function r3(e,t,i,n){if(1==n)return tP.cursor(t,i);{if(2==n)return function(e,t,i=1){let n=e.charCategorizer(t),r=e.doc.lineAt(t),s=t-r.from;if(0==r.length)return tP.cursor(t);0==s?i=1:s==r.length&&(i=-1);let o=s,a=s;i<0?o=tf(r.text,s,!1):a=tf(r.text,s);let l=n(r.text.slice(o,a));for(;o>0;){let e=tf(r.text,o,!1);if(n(r.text.slice(e,o))!=l)break;o=e}for(;a<r.length;){let e=tf(r.text,a);if(n(r.text.slice(a,e))!=l)break;a=e}return tP.undirectionalRange(o+r.from,a+r.from)}(e.state,t,i);let r=e.docView.lineAt(t,i),s=e.state.doc.lineAt(r?r.posAtEnd:t),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return a<e.state.doc.length&&a==s.to&&a++,tP.undirectionalRange(o,a)}}r0.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,iD.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},r0.wheel=r0.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},rJ.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),r0.touchstart=(e,t)=>{let i=e.inputState,n=t.targetTouches[0];i.touchActive=!0,i.lastTouchTime=Date.now(),n&&(i.lastTouchX=n.clientX,i.lastTouchY=n.clientY),i.setSelectionOrigin("select.pointer")},r0.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},r0.touchend=(e,t)=>{e.inputState.touchActive=!1},rJ.mousedown=(e,t)=>{var i,n;let r,s,o;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let a=null;for(let i of e.state.facet(nR))if(a=i(e,t))break;if(a||0!=t.button||(i=e,n=t,r=i.posAndSideAtCoords({x:n.clientX,y:n.clientY},!1),s=r9(n),o=i.state.selection,a={update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),o=o.map(e.changes))},get(e,t,n){let a=i.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),l,h=r3(i,a.pos,a.assoc,s);if(r.pos!=a.pos&&!t){let e=r3(i,r.pos,r.assoc,s),t=Math.min(e.from,h.from),n=Math.max(e.to,h.to);h=t<h.from?tP.range(t,n,h.assoc):tP.range(n,t,h.assoc)}return t?o.replaceRange(o.main.extend(h.from,h.to,h.assoc)):n&&1==s&&o.ranges.length>1&&(l=function(e,t){for(let i=0;i<e.ranges.length;i++){let{from:n,to:r}=e.ranges[i];if(n<=t&&r>=t)return tP.create(e.ranges.slice(0,i).concat(e.ranges.slice(i+1)),e.mainIndex==i?0:e.mainIndex-(e.mainIndex>i))}return null}(o,a.pos))?l:n?o.addRange(h):tP.create([h])}}),a){let i=!e.hasFocus;e.inputState.startMouseSelection(new rH(e,t,a,i)),i&&e.observer.ignore(()=>{nu(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let n=e.inputState.mouseSelection;if(n)return n.start(t),!1===n.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let r6=iD.ie&&iD.ie_version<=11,r4=null,r8=0,r7=0;function r9(e){if(!r6)return e.detail;let t=r4,i=r7;return r4=e,r7=Date.now(),r8=!t||i>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(r8+1)%3:1}function se(e,t,i,n){let r;if(!(i=r2(e.state,nL,i)))return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,a=n&&o&&((r=e.state.facet(nZ)).length?r[0](t):iD.mac?!t.altKey:!t.ctrlKey)?{from:o.from,to:o.to}:null,l={from:s,insert:i},h=e.state.changes(a?[a,l]:l);e.focus(),e.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}rJ.dragstart=(e,t)=>{let{selection:{main:i}}=e.state;if(t.target.draggable){let n=e.docView.tile.nearest(t.target);if(n&&n.isWidget()){let e=n.posAtStart,t=e+n.length;(e>=i.to||t<=i.from)&&(i=tP.undirectionalRange(e,t))}}let{inputState:n}=e;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=i,t.dataTransfer&&(t.dataTransfer.setData("Text",r2(e.state,nI,e.state.sliceDoc(i.from,i.to))),t.dataTransfer.effectAllowed="copyMove"),!1},rJ.dragend=e=>(e.inputState.draggedContent=null,!1),rJ.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let i=t.dataTransfer.files;if(i&&i.length){let n=Array(i.length),r=0,s=()=>{++r==i.length&&se(e,t,n.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<i.length;e++){let t=new FileReader;t.onerror=s,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),s()},t.readAsText(i[e])}return!0}{let i=t.dataTransfer.getData("Text");if(i)return se(e,t,i,!0),!0}return!1},rJ.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let i=r1?null:t.clipboardData;return i?(r5(e,i.getData("text/plain")||i.getData("text/uri-list")),!0):(!function(e){let t=e.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{e.focus(),i.remove(),r5(e,i.value)},50)}(e),!1)};let st=null;rJ.copy=rJ.cut=(e,t)=>{if(!i8(e.contentDOM,e.observer.selectionRange))return!1;let{text:i,ranges:n,linewise:r}=function(e){let t=[],i=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),i.push(n));if(!t.length){let r=-1;for(let{from:n}of e.selection.ranges){let s=e.doc.lineAt(n);s.number>r&&(t.push(s.text),i.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),r=s.number}n=!0}return{text:r2(e,nI,t.join(e.lineBreak)),ranges:i,linewise:n}}(e.state);if(!i&&!r)return!1;st=r?i:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=r1?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",i),!0):(!function(e,t){let i=e.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout(()=>{n.remove(),e.focus()},50)}(e,i),!1)};let si=tH.define();function sn(e,t){let i=[];for(let n of e.facet(nB)){let r=n(e,t);r&&i.push(r)}return i.length?e.update({effects:i,annotations:si.of(!0)}):null}function sr(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let i=sn(e.state,t);i?e.dispatch(i):e.update([])}},10)}r0.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),sr(e)},r0.blur=e=>{e.observer.clearSelectionRange(),sr(e)},r0.compositionstart=r0.compositionupdate=e=>{!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},r0.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,iD.chrome&&iD.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},r0.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},rJ.beforeinput=(e,t)=>{var i,n;let r;if(("insertText"==t.inputType||"insertCompositionText"==t.inputType)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let n=null==(i=t.dataTransfer)?void 0:i.getData("text/plain"),r=t.getTargetRanges();if(n&&r.length){let t=r[0],i=e.posAtDOM(t.startContainer,t.startOffset),s=e.posAtDOM(t.endContainer,t.endOffset);return rV(e,{from:i,to:s,insert:e.state.toText(n)},null),!0}}if(iD.chrome&&iD.android&&(r=rU.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null==(n=window.visualViewport)?void 0:n.height)||0;setTimeout(()=>{var i;((null==(i=window.visualViewport)?void 0:i.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return iD.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),iD.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>r0.compositionend(e,t),20),!1};let ss=new Set,so=["pre-wrap","normal","pre-line","break-spaces"],sa=!1;class sl{constructor(e){this.lineWrapping=e,this.doc=tn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return so.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let n=e[i];n<0?i++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,i,n,r,s){let o=so.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=r,a){this.heightSamples={};for(let e=0;e<s.length;e++){let t=s[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class sh{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class sc{constructor(e,t,i,n,r){this.from=e,this.length=t,this.top=i,this.height=n,this._content=r}get type(){return"number"==typeof this._content?iK.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof i1?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new sc(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var su=((c=su||(su={}))[c.ByPos=0]="ByPos",c[c.ByHeight=1]="ByHeight",c[c.ByPosNoHeight=2]="ByPosNoHeight",c);class sf{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=2*!!e|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>.001&&(sa=!0),this.height=e)}replace(e,t,i){return sf.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let r=this,s=i.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:h,toB:c}=n[o],u=r.lineAt(a,su.ByPosNoHeight,i.setDoc(t),0,0),f=u.to>=l?u:r.lineAt(l,su.ByPosNoHeight,i,0,0);for(c+=f.to-l,l=f.to;o>0&&u.from<=n[o-1].toA;)a=n[o-1].fromA,h=n[o-1].fromB,o--,a<u.from&&(u=r.lineAt(a,su.ByPosNoHeight,i,0,0));h+=u.from-a,a=u.from;let d=sw.build(i.setDoc(s),e,h,c);r=sd(r,r.replace(a,l,d))}return r.updateHeight(i,0)}static empty(){return new sg(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,i=e.length,n=0,r=0;for(;;)if(t==i)if(n>2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),i+=1+r.break,n-=r.size}else if(r>2*n){let t=e[i];t.break?e.splice(i,1,t.left,null,t.right):e.splice(i,1,t.left,t.right),i+=2+t.break,r-=t.size}else break;else if(n<r){let i=e[t++];i&&(n+=i.size)}else{let t=e[--i];t&&(r+=t.size)}let s=0;return null==e[t-1]?(s=1,t--):null==e[t]&&(s=1,i++),new sv(sf.of(e.slice(0,t)),s,sf.of(e.slice(i)))}}function sd(e,t){return e==t?e:(e.constructor!=t.constructor&&(sa=!0),t)}sf.prototype.size=1;let sp=iH.replace({});class sO extends sf{constructor(e,t,i){super(e,t),this.deco=i,this.spaceAbove=0}mainBlock(e,t){return new sc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,i,n){return this.spaceAbove&&e<i+this.spaceAbove?new sc(n,0,i,this.spaceAbove,sp):this.mainBlock(i,n)}lineAt(e,t,i,n,r){let s=this.mainBlock(n,r);return this.spaceAbove?this.blockAt(0,i,n,r).join(s):s}forEachLine(e,t,i,n,r,s){e<=r+this.length&&t>=r&&s(this.lineAt(0,su.ByPos,i,n,r))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setMeasuredHeight(n),this.outdated=!1,this}toString(){return`block(${this.length})`}}class sg extends sO{constructor(e,t,i){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,t){return new sc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,i){let n=i[0];return 1==i.length&&(n instanceof sg||n instanceof sm&&4&n.flags)&&10>Math.abs(this.length-n.length)?(n instanceof sm?n=new sg(n.length,this.height,this.spaceAbove):n.height=this.height,this.outdated||(n.outdated=!1),n):sf.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setMeasuredHeight(n):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class sm extends sf{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,r=n-i+1,s,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*r);s=t/r,this.length>r+1&&(o=(this.height-t)/(this.length-r-1))}else s=this.height/r;return{firstLine:i,lastLine:n,perLine:s,perChar:o}}blockAt(e,t,i,n){let{firstLine:r,lastLine:s,perLine:o,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let r=n+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),s=t.doc.lineAt(r),l=o+s.length*a,h=Math.max(i,e-l/2);return new sc(s.from,s.length,h,l,0)}{let n=Math.max(0,Math.min(s-r,Math.floor((e-i)/o))),{from:a,length:l}=t.doc.line(r+n);return new sc(a,l,i+o*n,o,0)}}lineAt(e,t,i,n,r){if(t==su.ByHeight)return this.blockAt(e,i,n,r);if(t==su.ByPosNoHeight){let{from:t,to:n}=i.doc.lineAt(e);return new sc(t,n-t,0,0,0)}let{firstLine:s,perLine:o,perChar:a}=this.heightMetrics(i,r),l=i.doc.lineAt(e),h=o+l.length*a,c=l.number-s,u=n+o*c+a*(l.from-r-c);return new sc(l.from,l.length,Math.max(n,Math.min(u,n+this.height-h)),h,0)}forEachLine(e,t,i,n,r,s){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(i,r);for(let h=e,c=n;h<=t;){let t=i.doc.lineAt(h);if(h==e){let i=t.number-o;c+=a*i+l*(e-r-i)}let n=a+l*t.length;s(new sc(t.from,t.length,c,n,0)),c+=n,h=t.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let e=i[i.length-1];e instanceof sm?i[i.length-1]=new sm(e.length+n):i.push(null,new sm(n-1))}if(e>0){let t=i[0];t instanceof sm?i[0]=new sm(e+t.length):i.unshift(new sm(e-1),null)}return sf.of(i)}decomposeLeft(e,t){t.push(new sm(e-1),null)}decomposeRight(e,t){t.push(null,new sm(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let r=t+this.length;if(n&&n.from<=t+this.length&&n.more){let i=[],s=Math.max(t,n.from),o=-1;for(n.from>t&&i.push(new sm(n.from-t-1).updateHeight(e,t));s<=r&&n.more;){let t=e.doc.lineAt(s).length;i.length&&i.push(null);let r=n.heights[n.index++],a=0;r<0&&(a=-r,r=n.heights[n.index++]),-1==o?o=r:Math.abs(r-o)>=.001&&(o=-2);let l=new sg(t,r,a);l.outdated=!1,i.push(l),s+=t+1}s<=r&&i.push(null,new sm(r-s).updateHeight(e,s));let a=sf.of(i);return(o<0||Math.abs(a.height-this.height)>=.001||Math.abs(o-this.heightMetrics(e,t).perLine)>=.001)&&(sa=!0),sd(this,a)}return(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class sv extends sf{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return 1&this.flags}blockAt(e,t,i,n){let r=i+this.left.height;return e<r?this.left.blockAt(e,t,i,n):this.right.blockAt(e,t,r,n+this.left.length+this.break)}lineAt(e,t,i,n,r){let s=n+this.left.height,o=r+this.left.length+this.break,a=t==su.ByHeight?e<s:e<o,l=a?this.left.lineAt(e,t,i,n,r):this.right.lineAt(e,t,i,s,o);if(this.break||(a?l.to<o:l.from>o))return l;let h=t==su.ByPosNoHeight?su.ByPosNoHeight:su.ByPos;return a?l.join(this.right.lineAt(o,h,i,s,o)):this.left.lineAt(o,h,i,n,r).join(l)}forEachLine(e,t,i,n,r,s){let o=n+this.left.height,a=r+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,n,r,s),t>=a&&this.right.forEachLine(e,t,i,o,a,s);else{let l=this.lineAt(a,su.ByPos,i,n,r);e<l.from&&this.left.forEachLine(e,l.from-1,i,n,r,s),l.to>=e&&l.from<=t&&s(l),t>l.to&&this.right.forEachLine(l.to+1,t,i,o,a,s)}}replace(e,t,i){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let r=[];e>0&&this.decomposeLeft(e,r);let s=r.length;for(let e of i)r.push(e);if(e>0&&sy(r,s-1),t<this.length){let e=r.length;this.decomposeRight(t,r),sy(r,e)}return sf.of(r)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++i&&t.push(null),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?sf.of(this.break?[e,null,t]:[e,t]):(this.left=sd(this.left,e),this.right=sd(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:r,right:s}=this,o=t+r.length+this.break,a=null;return(n&&n.from<=t+r.length&&n.more?a=r=r.updateHeight(e,t,i,n):r.updateHeight(e,t,i),n&&n.from<=o+s.length&&n.more?a=s=s.updateHeight(e,o,i,n):s.updateHeight(e,o,i),a)?this.balanced(r,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function sy(e,t){let i,n;null==e[t]&&(i=e[t-1])instanceof sm&&(n=e[t+1])instanceof sm&&e.splice(t-1,3,new sm(i.length+1+n.length))}class sw{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof sg?i.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new sg(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let n=i.widget?i.widget.estimatedHeight:0,r=i.widget?i.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let s=t-e;i.block?this.addBlock(new sO(s,n,i)):(s||r||n>=5)&&this.addLineDeco(n,r,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new sg(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let i=new sm(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof sg)return e;let t=new sg(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof sg||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new sg(0,-1,0));let i=e;for(let e of this.nodes)e instanceof sg&&e.updateHeight(this.oracle,i),i+=e?e.length:1;return this.nodes}static build(e,t,i,n){let r=new sw(i,e);return ia.spans(t,i,n,r,0),r.finish(i)}}class sb{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,n){(e<t||i&&i.heightRelevant||n&&n.heightRelevant)&&i5(e,t,this.changes,5)}}class sx{constructor(e,t,i,n){this.from=e,this.to=t,this.size=i,this.displaySize=n}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],r=t[i];if(n.from!=r.from||n.to!=r.to||n.size!=r.size)return!1}return!0}draw(e,t){return iH.replace({widget:new sS(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class sS extends iF{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class sk{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sA,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=nv.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let i=t.facet(n0).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new sl(i),this.stateDeco=sC(t),this.heightMap=sf.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle.setDoc(t.doc),[new re(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=iH.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some(({from:e,to:t})=>n>=e&&n<=t)){let{from:t,to:i}=this.lineBlockAt(n);e.push(new sQ(t,i))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?sA:new s_(this.heightOracle,this.heightMap,this.viewports),2*!e.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(sT(e,this.scaler))})}update(e,t=null){var i,n;let r;this.state=e.state;let s=this.stateDeco;this.stateDeco=sC(this.state);let o=e.changedRanges,a=re.extendWithRanges(o,(i=this.stateDeco,n=e?e.changes:ty.empty(this.state.doc.length),r=new sb,ia.compare(s,i,n,r,0),r.changes)),l=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);sa=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=l||sa)&&(e.flags|=2),h?(this.scrollAnchorPos=e.changes.mapPos(h.from,-1),this.scrollAnchorHeight=h.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=l);let c=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let u=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(u||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(nY)&&(this.mustEnforceCursorAssoc=!0)}measure(){var e;let t,i,{view:n}=this,r=n.contentDOM,s=window.getComputedStyle(r),o=this.heightOracle,a=s.whiteSpace;this.defaultTextDirection="rtl"==s.direction?nv.RTL:nv.LTR;let l=this.heightOracle.mustRefreshForWrapping(a)||"refresh"===this.mustMeasureContent,h=r.getBoundingClientRect(),c=l||this.mustMeasureContent||this.contentDOMHeight!=h.height;this.contentDOMHeight=h.height,this.mustMeasureContent=!1;let u=0,f=0;if(h.width&&h.height){let{scaleX:e,scaleY:t}=ns(r,h);(e>.005&&Math.abs(this.scaleX-e)>.005||t>.005&&Math.abs(this.scaleY-t)>.005)&&(this.scaleX=e,this.scaleY=t,u|=16,l=c=!0)}let d=(parseInt(s.paddingTop)||0)*this.scaleY,p=(parseInt(s.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=p)&&(this.paddingTop=d,this.paddingBottom=p,u|=18),this.editorWidth!=n.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=n.scrollDOM.clientWidth,u|=16);let O=no(this.view.contentDOM,!1).y;O!=this.scrollParent&&(this.scrollParent=O,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=np(this.scrollParent||n.win);let m=(this.printing?function(e,t){let i=e.getBoundingClientRect();return{left:0,right:i.right-i.left,top:t,bottom:i.bottom-(i.top+t)}}:function(e,t){let i=e.getBoundingClientRect(),n=e.ownerDocument,r=n.defaultView||window,s=Math.max(0,i.left),o=Math.min(r.innerWidth,i.right),a=Math.max(0,i.top),l=Math.min(r.innerHeight,i.bottom);for(let t=e.parentNode;t&&t!=n.body;)if(1==t.nodeType){let i=t,n=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();s=Math.max(s,n.left),o=Math.min(o,n.right),a=Math.max(a,n.top),l=Math.min(t==e.parentNode?r.innerHeight:l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else if(11==t.nodeType)t=t.host;else break;return{left:s-i.left,right:Math.max(s,o)-i.left,top:a-(i.top+t),bottom:Math.max(a,l)-(i.top+t)}})(r,this.paddingTop),v=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(c=!0)),!this.inView&&!this.scrollTarget&&(t=(e=n.dom).getBoundingClientRect(),i=e.ownerDocument.defaultView||window,!(t.left<i.innerWidth)||!(t.right>0)||!(t.top<i.innerHeight)||!(t.bottom>0)))return 0;let b=h.width;if((this.contentDOMWidth!=b||this.editorHeight!=n.scrollDOM.clientHeight)&&(this.contentDOMWidth=h.width,this.editorHeight=n.scrollDOM.clientHeight,u|=16),c){let e=n.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(e)&&(l=!0),l||o.lineWrapping&&Math.abs(b-this.contentDOMWidth)>o.charWidth){let{lineHeight:t,charWidth:i,textHeight:r}=n.docView.measureTextSize();(l=t>0&&o.refresh(a,t,i,r,Math.max(5,b/i),e))&&(n.docView.minWidth=0,u|=16)}for(let t of(v>0&&y>0?f=Math.max(v,y):v<0&&y<0&&(f=Math.min(v,y)),sa=!1,this.viewports)){let i=t.from==this.viewport.from?e:n.docView.measureVisibleLineHeights(t);this.heightMap=(l?sf.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle,[new re(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(o,0,l,new sh(t.from,i))}sa&&(u|=2)}let x=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(2&u&&(u|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),u|=this.updateForViewport()),(2&u||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,n)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,r=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,a=new sQ(n.lineAt(s-1e3*i,su.ByHeight,r,0,0).from,n.lineAt(o+(1-i)*1e3,su.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=n.lineAt(e,su.ByPos,r,0,0),o;o="center"==t.y?(s.top+s.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-i,a=new sQ(n.lineAt(o-500,su.ByHeight,r,0,0).from,n.lineAt(o+i+500,su.ByHeight,r,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new sQ(this.heightMap.lineAt(i,su.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,su.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,su.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,su.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:o}=this;return(0==e||n<=s-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||r>=o+Math.max(10,Math.min(i,250)))&&n>s-2e3&&r<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let n of e)t.touchesRange(n.from,n.to)||i.push(new sx(t.mapPos(n.from),t.mapPos(n.to),n.size,n.displaySize));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,n=i?1e4:2e3,r=n>>1,s=n<<1;if(this.defaultTextDirection!=nv.LTR&&!i)return[];let o=[],a=(n,s,l,h)=>{if(s-n<r)return;let c=this.state.selection.main,u=[c.from];for(let e of(c.empty||u.push(c.to),u))if(e>n&&e<s){a(n,e-10,l,h),a(e+10,s,l,h);return}let f=function(e,t){for(let i of e)if(t(i))return i}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<r&&Math.abs(e.to-s)<r&&!u.some(t=>e.from<t&&e.to>t));if(!f){if(s<l.to&&t&&i&&t.visibleRanges.some(e=>e.from<=s&&e.to>=s)){let e=t.moveToLineBoundary(tP.cursor(s),!1,!0).head;e>n&&(s=e)}let e=this.gapSize(l,n,s,h),r=i||e<2e6?e:2e6;f=new sx(n,s,e,r)}o.push(f)},l=t=>{var r,o,l;let h,c,u,f,d;if(t.length<s||t.type!=iK.Text)return;let p=(r=t.from,o=t.to,l=this.stateDeco,u=[],f=r,d=0,ia.spans(l,r,o,{span(){},point(e,t){e>f&&(u.push({from:f,to:e}),d+=e-f),f=t}},20),f<o&&(u.push({from:f,to:o}),d+=o-f),{total:d,ranges:u});if(p.total<s)return;let O=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let e,i,r=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=O){let n=sP(p,O),s=((this.visibleBottom-this.visibleTop)/2+r)/t.height;e=n-s,i=n+s}else e=(this.visibleTop-t.top-r)/t.height,i=(this.visibleBottom-t.top+r)/t.height;h=s$(p,e),c=s$(p,i)}else{let i,r,s=p.total*this.heightOracle.charWidth,o=n*this.heightOracle.charWidth,a=0;if(s>2e6)for(let i of e)i.from>=t.from&&i.from<t.to&&i.size!=i.displaySize&&i.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=i.size-i.displaySize);let l=this.pixelViewport.left+a,u=this.pixelViewport.right+a;if(null!=O){let e=sP(p,O),t=((u-l)/2+o)/s;i=e-t,r=e+t}else i=(l-o)/s,r=(u+o)/s;h=s$(p,i),c=s$(p,r)}h>t.from&&a(t.from,h,t,p),c<t.to&&a(c,t.to,t,p)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return o}gapSize(e,t,i,n){let r=sP(n,i)-sP(n,t);return this.heightOracle.lineWrapping?e.height*r:n.total*this.heightOracle.charWidth*r}updateLineGaps(e){sx.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=iH.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let i=[];ia.spans(t,this.viewport.from,this.viewport.to,{span(e,t){i.push({from:e,to:t})},point(){}},20);let n=0;if(i.length!=this.visibleRanges.length)n=12;else for(let t=0;t<i.length&&!(8&n);t++){let r=this.visibleRanges[t],s=i[t];(r.from!=s.from||r.to!=s.to)&&(n|=4,e&&e.mapPos(r.from,-1)==s.from&&e.mapPos(r.to,1)==s.to||(n|=8))}return this.visibleRanges=i,n}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||sT(this.heightMap.lineAt(e,su.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||sT(this.heightMap.lineAt(this.scaler.fromDOM(e),su.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return sT(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class sQ{constructor(e,t){this.from=e,this.to=t}}function s$({total:e,ranges:t},i){if(i<=0)return t[0].from;if(i>=1)return t[t.length-1].to;let n=Math.floor(e*i);for(let e=0;;e++){let{from:i,to:r}=t[e],s=r-i;if(n<=s)return i+n;n-=s}}function sP(e,t){let i=0;for(let{from:n,to:r}of e.ranges){if(t<=r){i+=t-n;break}i+=r-n}return i/e.total}let sA={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function sC(e){let t=e.facet(n1).filter(e=>"function"!=typeof e),i=e.facet(n5).filter(e=>"function"!=typeof e);return i.length&&t.push(ia.join(i)),t}class s_{constructor(e,t,i){let n=0,r=0,s=0;for(let o of(this.viewports=i.map(({from:i,to:r})=>{let s=t.lineAt(i,su.ByPos,e,0,0).top,o=t.lineAt(r,su.ByPos,e,0,0).bottom;return n+=o-s,{from:i,to:r,top:s,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n),this.viewports))o.domTop=s+(o.top-r)*this.scale,s=o.domBottom=o.domTop+(o.bottom-o.top),r=o.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return n+(e-i)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);i=r.bottom,n=r.domBottom}}fromDOM(e){for(let t=0,i=0,n=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return i+(e-n)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);i=r.bottom,n=r.domBottom}}eq(e){return e instanceof s_&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to)}}function sT(e,t){if(1==t.scale)return e;let i=t.toDOM(e.top),n=t.toDOM(e.bottom);return new sc(e.from,e.length,i,n-i,Array.isArray(e._content)?e._content.map(e=>sT(e,t)):e._content)}let sM=t_.define({combine:e=>e.join(" ")}),sZ=t_.define({combine:e=>e.indexOf(!0)>-1}),sR=iQ.newName(),sX=iQ.newName(),sE=iQ.newName(),sj={"&light":"."+sX,"&dark":"."+sE};function sB(e,t,i){return new iQ(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!i||!i[t])throw RangeError(`Unsupported selector: ${t}`);return i[t]}):e+" "+t})}let sL=sB("."+sR,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},sj),sI={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sz=iD.ie&&iD.ie_version<=11;class sY{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new na,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(iD.ie&&iD.ie_version<=11||iD.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&iD.android&&!1!==e.constructor.EDIT_CONTEXT&&!(iD.chrome&&iD.chrome_version<126)&&(this.editContext=new sD(e),e.state.facet(nU)&&(e.contentDOM.editContext=this.editContext.editContext)),sz&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null==(e=this.view.docView)?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){for(let t of(this.gapIntersection.disconnect(),e))this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(nU)?i.root.activeElement!=this.dom:!i8(this.dom,n))return;let r=n.anchorNode&&i.docView.tile.nearest(n.anchorNode);if(r&&r.isWidget()&&r.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(iD.ie&&iD.ie_version<=11||iD.android&&iD.chrome)&&!i.state.selection.main.empty&&n.focusNode&&i9(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=i6(e.root);if(!t)return!1;let i=iD.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return sW(e,i)}let i=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),i=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),i?sW(e,i):null}(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let n=i8(this.dom,i);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let i=t.focusNode,n=t.focusOffset;if(!i||t.anchorNode!=i||t.anchorOffset!=n)return!1;for(n=Math.min(n,nn(i));;)if(n){if(1!=i.nodeType)return!1;let e=i.childNodes[n-1];"false"==e.contentEditable?n--:n=nn(i=e)}else{if(i==e)return!0;n=ne(i),i=i.parentNode}}(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(1==i.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(11==i.nodeType)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sI),sz&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),sz&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&nd(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null==(i=this.delayedAndroidKey)?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(n=!0),-1==t?{from:t,to:i}=e:(t=Math.min(e.from,t),i=Math.max(e.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&i8(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new rz(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,n=rY(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!rD(this.view.state.selection,t.newSel.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let i=sV(t,e.previousSibling||e.target.previousSibling,-1),n=sV(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(nU)!=e.state.facet(nU)&&(e.view.contentDOM.editContext=e.state.facet(nU)?this.editContext.editContext:null))}destroy(){var e,t,i;for(let n of(this.stop(),null==(e=this.intersection)||e.disconnect(),null==(t=this.gapIntersection)||t.disconnect(),null==(i=this.resizeScroll)||i.disconnect(),this.scrollTargets))n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function sV(e,t,i){for(;t;){let n=rn.get(t);if(n&&n.parent==e)return n;let r=t.parentNode;t=r!=e.dom?r:i>0?t.nextSibling:t.previousSibling}return null}function sW(e,t){let i=t.startContainer,n=t.startOffset,r=t.endContainer,s=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return i9(o.node,o.offset,r,s)&&([i,n,r,s]=[r,s,i,n]),{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:s}}class sD{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});for(let i in this.handlers.textupdate=i=>{let n=e.state.selection.main,{anchor:r,head:s}=n,o=this.toEditorPos(i.updateRangeStart),a=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:o,drifted:!1});let l=a-o>i.text.length;o==this.from&&r<this.from?o=r:a==this.to&&r>this.to&&(a=r);let h=rW(e.state.sliceDoc(o,a),i.text,(l?n.from:n.to)-o,l?"end":null);if(!h){let t=tP.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));rD(t,n)||e.dispatch({selection:t,userEvent:"select"});return}let c={from:h.from+o,to:h.toA+o,insert:tn.of(i.text.slice(h.from,h.toB).split("\n"))};if((iD.mac||iD.android)&&c.from==s-1&&/^\. ?$/.test(i.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(c={from:o,to:a,insert:tn.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let t=this.to-this.from+(c.to-c.from+c.insert.length);rV(e,c,tP.single(this.toEditorPos(i.selectionStart,t),this.toEditorPos(i.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from<c.to&&!c.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let n=[],r=null;for(let t=this.toEditorPos(i.rangeStart),s=this.toEditorPos(i.rangeEnd);t<s;t++){let i=e.coordsForChar(t);r=i&&new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top)||r||new DOMRect,n.push(r)}t.updateCharacterBounds(i.rangeStart,n)},this.handlers.textformatupdate=t=>{let i=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,n=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(n)){let r=this.toEditorPos(e.rangeStart),s=this.toEditorPos(e.rangeEnd);if(r<s){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(n)?1:2}px`;i.push(iH.mark({attributes:{style:e}}).range(r,s))}}}e.dispatch({effects:nq.of(iH.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}},this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:e=>{let t=i6(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,n=this.pendingContextChange;return e.changes.iterChanges((r,s,o,a,l)=>{if(i)return;let h=l.length-(s-r);if(n&&s>=n.to)if(n.from==r&&n.to==s&&n.insert.eq(l)){n=this.pendingContextChange=null,t+=h,this.to+=h;return}else n=null,this.revertPending(e.state);if(r+=t,(s+=t)<=this.from)this.from+=h,this.to+=h;else if(r<this.to){if(r<this.from||s>this.to||this.to-this.from+l.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(s),l.toString()),this.to+=h}t+=h}),n&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(i,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class sq{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;for(let t of(this.dispatchTransactions=e.dispatchTransactions||i&&(e=>e.forEach(e=>i(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new sk(this,e.state||t9.create(e)),e.scrollTo&&e.scrollTo.is(nD)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(nF).map(e=>new nH(e)),this.plugins))t.update(this);this.observer=new sY(this),this.inputState=new rq(this),this.inputState.ensureHandlers(this.plugins),this.docView=new rQ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null==(t=document.fonts)?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof t2?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,n,r=this.state;for(let t of e){if(t.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed){this.viewState.state=r;return}let s=this.hasFocus,o=0,a=null;e.some(e=>e.annotation(si))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,(a=sn(r,s))||(o=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),((h=this.observer.readChange())&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(h=null)):this.observer.clear(),r.facet(t9.phrases)!=this.state.facet(t9.phrases))return this.setState(r);n=rt.create(this,r,e),n.flags|=o;let c=this.viewState.scrollTarget;try{for(let t of(this.updateState=2,e)){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection,{x:i,y:n}=this.state.facet(sq.cursorScrollMargin);c=new nW(e.empty?e:tP.cursor(e.head,e.head>e.anchor?-1:1),"nearest","nearest",n,i)}for(let e of t.effects)e.is(nD)&&(c=e.value.clip(this.state))}this.viewState.update(n,c),this.bidiCache=sG.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(n9)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(sM)!=n.state.facet(sM)&&(this.viewState.mustMeasureContent=!0),(t||i||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let e of this.state.facet(nE))try{e(n)}catch(e){nN(this.state,e,"update listener")}(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!rY(this,h)&&l.force&&nd(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);for(let t of(this.viewState=new sk(this,e),this.plugins=e.facet(nF).map(e=>new nH(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new rQ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(nF),i=e.state.facet(nF);if(t!=i){let n=[];for(let r of i){let i=t.indexOf(r);if(i<0)n.push(new nH(r));else{let t=this.plugins[i];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){nN(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.viewState.scrollParent,n=this.viewState.getScrollOffset(),{scrollAnchorPos:r,scrollAnchorHeight:s,scaleY:o}=this.viewState;Math.abs(n-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(s<0){if(np(i||this.win))r=-1,s=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(n);r=e.from,s=e.top}o=this.viewState.scaleY}this.updateState=1;let a=this.viewState.measure();if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let h=l.map(e=>{try{return e.read(this)}catch(e){return nN(this.state,e),sU}}),c=rt.create(this,this.state,[]),u=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,!c.empty&&(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),(u=this.docView.update(c))&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(h[e]!=sU)try{let t=l[e];t.write&&t.write(h[e],this)}catch(e){nN(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let e=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)/this.viewState.scaleY-s/o;if((e>1||e<-1)&&!(iD.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){n+=e,i?r<0?i.scrollTop=i.scrollHeight:i.scrollTop+=e:this.win.scrollBy(0,e),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(nE))e(t)}get themeClasses(){return sR+" "+(this.state.facet(sZ)?sE:sX)+" "+this.state.facet(sM)}updateAttrs(){let e=sF(this,nJ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(nU)?"true":"false",class:"cm-content",style:`${iD.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),sF(this,n0,t);let i=this.observer.ignore(()=>{let i=iG(this.contentDOM,this.contentAttrs,t),n=iG(this.dom,this.editorAttrs,e);return i||n});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let e of i.effects)e.is(sq.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(n9);let e=this.state.facet(sq.cspNonce);iQ.mount(this.root,this.styleModules.concat(sL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if((this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e)&&!(this.measureRequests.indexOf(e)>-1)){if(null!=e.key){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return rX(this,e,rM(this,e,t,i))}moveByGroup(e,t){return rX(this,e,rM(this,e,t,t=>{var i;let n,r;return i=e.head,r=(n=this.state.charCategorizer(i))(t),e=>{let t=n(e);return r==t8.Space&&(r=t),r==t}}))}visualLineSide(e,t){let i=this.bidiSpans(e),n=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return tP.cursor(r.side(t,n)+e.from,r.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,i=!0){return function(e,t,i,n){let r=rT(e,t.head,t.assoc||-1),s=n&&r.type==iK.Text&&(e.lineWrapping||r.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(r.from),o=e.posAtCoords({x:i==(n==nv.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=o)return tP.cursor(o,i?-1:1)}return tP.cursor(i?r.to:r.from,i?-1:1)}(this,e,t,i)}moveVertically(e,t,i){return rX(this,e,function(e,t,i,n){let r=t.head,s=i?1:-1;if(r==(i?e.state.doc.length:0))return tP.cursor(r,t.assoc);let o=t.goalColumn,a,l=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(r,t.assoc||((t.empty?i:t.head==t.from)?1:-1)),c=e.documentTop;if(h)null==o&&(o=h.left-l.left),a=s<0?h.top:h.bottom;else{let t=e.viewState.lineBlockAt(r);null==o&&(o=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),a=(s<0?t.top:t.bottom)+c}let u=l.left+o,f=e.viewState.heightOracle.textHeight>>1,d=null!=n?n:f;for(let t=0;;t+=f){let n=a+(d+t)*s,r=rj(e,{x:u,y:n},!1,s);if(i?n>l.bottom:n<l.top)return tP.cursor(r.pos,r.assoc);let h=e.coordsAtPos(r.pos,r.assoc),c=h?(h.top+h.bottom)/2:0;if(!h||(i?c>a:c<a))return tP.cursor(r.pos,r.assoc,void 0,o)}}(this,e,t,i))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let i=rj(this,e,t);return i&&i.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),rj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.state.doc.lineAt(e),n=this.bidiSpans(i),r=n[nA.find(n,e-i.from,-1,t)];return this.docView.coordsAt(e,t,r.dir==nv.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nz)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>sN)return n_(e.length);let t=this.textDirectionAt(e.from),i;for(let n of this.bidiCache)if(n.from==e.from&&n.dir==t&&(n.fresh||function e(t,i){if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],s=i[n];if(r.from!=s.from||r.to!=s.to||r.direction!=s.direction||!e(r.inner,s.inner))return!1}return!0}(n.isolates,i=n4(this,e))))return n.order;i||(i=n4(this,e));let n=function(e,t,i){if(!e)return[new nA(0,0,+(t==nw))];if(t==ny&&!i.length&&!nP.test(e))return n_(e.length);if(i.length)for(;e.length>nC.length;)nC[nC.length]=256;let n=[],r=+(t!=ny);return function e(t,i,n,r,s,o,a){let l=i%2?2:1;!function(e,t,i,n,r){for(let s=0;s<=n.length;s++){let o=s?n[s-1].to:t,a=s<n.length?n[s].from:i,l=s?256:r;for(let t=o,i=l,n=l;t<a;t++){let r=n$(e.charCodeAt(t));512==r?r=i:8==r&&4==n&&(r=16),nC[t]=4==r?2:r,7&r&&(n=r),i=r}for(let e=o,t=l,n=l;e<a;e++){let r=nC[e];if(128==r)e<a-1&&t==nC[e+1]&&24&t?r=nC[e]=t:nC[e]=256;else if(64==r){let r=e+1;for(;r<a&&64==nC[r];)r++;let s=e&&8==t||r<i&&8==nC[r]?1==n?1:8:256;for(let t=e;t<r;t++)nC[t]=s;e=r-1}else 8==r&&1==n&&(nC[e]=1);t=r,7&r&&(n=r)}}}(t,s,o,r,l),function(e,t,i,n,r){let s=1==r?2:1;for(let o=0,a=0,l=0;o<=n.length;o++){let h=o?n[o-1].to:t,c=o<n.length?n[o].from:i;for(let t=h,i,n,o;t<c;t++)if(n=nk[i=e.charCodeAt(t)])if(n<0){for(let e=a-3;e>=0;e-=3)if(nQ[e+1]==-n){let i=nQ[e+2],n=2&i?r:4&i?1&i?s:r:0;n&&(nC[t]=nC[nQ[e]]=n),a=e;break}}else if(189==nQ.length)break;else nQ[a++]=t,nQ[a++]=i,nQ[a++]=l;else if(2==(o=nC[t])||1==o){let e=o==r;l=+!e;for(let t=a-3;t>=0;t-=3){let i=nQ[t+2];if(2&i)break;if(e)nQ[t+2]|=2;else{if(4&i)break;nQ[t+2]|=4}}}}}(t,s,o,r,l),function(e,t,i,n){for(let r=0,s=n;r<=i.length;r++){let o=r?i[r-1].to:e,a=r<i.length?i[r].from:t;for(let l=o;l<a;){let o=nC[l];if(256==o){let o=l+1;for(;;)if(o==a){if(r==i.length)break;o=i[r++].to,a=r<i.length?i[r].from:t}else if(256==nC[o])o++;else break;let h=1==s,c=h==((o<t?nC[o]:n)==1)?h?1:2:n;for(let t=o,n=r,s=n?i[n-1].to:e;t>l;)t==s&&(t=i[--n].from,s=n?i[n-1].to:e),nC[--t]=c;l=o}else s=o,l++}}}(s,o,r,l),function t(i,n,r,s,o,a,l){let h=s%2?2:1;if(s%2==o%2)for(let c=n,u=0;c<r;){let n=!0,f=!1;if(u==a.length||c<a[u].from){let e=nC[c];e!=h&&(n=!1,f=16==e)}let d=n||1!=h?null:[],p=n?s:s+1,O=c;s:for(;;)if(u<a.length&&O==a[u].from){if(f)break;let t=a[u];if(!n)for(let e=t.to,i=u+1;;){if(e==r)break s;if(i<a.length&&a[i].from==e)e=a[i++].to;else if(nC[e]==h)break s;else break}u++,d?d.push(t):(t.from>c&&l.push(new nA(c,t.from,p)),e(i,t.direction==ny!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,l),c=t.to),O=t.to}else if(O==r||(n?nC[O]!=h:nC[O]==h))break;else O++;d?t(i,c,O,s+1,o,d,l):c<O&&l.push(new nA(c,O,p)),c=O}else for(let c=r,u=a.length;c>n;){let r=!0,f=!1;if(!u||c>a[u-1].to){let e=nC[c-1];e!=h&&(r=!1,f=16==e)}let d=r||1!=h?null:[],p=r?s:s+1,O=c;s:for(;;)if(u&&O==a[u-1].to){if(f)break;let t=a[--u];if(!r)for(let e=t.from,i=u;;){if(e==n)break s;if(i&&a[i-1].to==e)e=a[--i].from;else if(nC[e-1]==h)break s;else break}d?d.push(t):(t.to<c&&l.push(new nA(t.to,c,p)),e(i,t.direction==ny!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,l),c=t.from),O=t.from}else if(O==n||(r?nC[O-1]!=h:nC[O-1]==h))break;else O--;d?t(i,O,c,s+1,o,d,l):O<c&&l.push(new nA(O,c,p)),c=O}}(t,s,o,i,n,r,a)}(e,r,r,i,0,e.length,n),n}(e.text,t,i);return this.bidiCache.push(new sG(e.from,e.to,t,i,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||iD.safari&&(null==(e=this.inputState)?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{nu(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var i,n,r,s;return nD.of(new nW("number"==typeof e?tP.cursor(e):e,null!=(i=t.y)?i:"nearest",null!=(n=t.x)?n:"nearest",null!=(r=t.yMargin)?r:5,null!=(s=t.xMargin)?s:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return nD.of(new nW(tP.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return nK.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return nK.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=iQ.newName(),n=[sM.of(i),n9.of(sB(`.${i}`,e))];return t&&t.dark&&n.push(sZ.of(!0)),n}static baseTheme(e){return tB.lowest(n9.of(sB("."+sR,e,sj)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&rn.get(i)||rn.get(e);return(null==(t=null==n?void 0:n.root)?void 0:t.view)||null}}sq.styleModule=n9,sq.inputHandler=nj,sq.clipboardInputFilter=nL,sq.clipboardOutputFilter=nI,sq.scrollHandler=nV,sq.focusChangeEffect=nB,sq.perLineTextDirection=nz,sq.exceptionSink=nX,sq.updateListener=nE,sq.editable=nU,sq.mouseSelectionStyle=nR,sq.dragMovesSelection=nZ,sq.clickAddsSelectionRange=nM,sq.decorations=n1,sq.blockWrappers=n2,sq.outerDecorations=n5,sq.atomicRanges=n3,sq.bidiIsolatedRanges=n6,sq.cursorScrollMargin=t_.define({combine:e=>{let t=5,i=5;for(let n of e)"number"==typeof n?t=i=n:{x:t,y:i}=n;return{x:t,y:i}}}),sq.scrollMargins=n8,sq.darkTheme=sZ,sq.cspNonce=t_.define({combine:e=>e.length?e[0]:""}),sq.contentAttributes=n0,sq.editorAttributes=nJ,sq.lineWrapping=sq.contentAttributes.of({class:"cm-lineWrapping"}),sq.announce=t1.define();let sN=4096,sU={};class sG{constructor(e,t,i,n,r,s){this.from=e,this.to=t,this.dir=i,this.isolates=n,this.fresh=r,this.order=s}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let i=[],n=e.length?e[e.length-1].dir:nv.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let s=e[r];s.dir!=n||t.touchesRange(s.from,s.to)||i.push(new sG(t.mapPos(s.from,1),t.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return i}}function sF(e,t,i){for(let n=e.state.facet(t),r=n.length-1;r>=0;r--){let t=n[r],s="function"==typeof t?t(e):t;s&&iq(s,i)}return i}let sK=iD.mac?"mac":iD.windows?"win":iD.linux?"linux":"key";function sH(e,t,i){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==i&&t.shiftKey&&(e="Shift-"+e),e}let sJ=tB.default(sq.domEventHandlers({keydown:(e,t)=>s4(s2(t.state),e,t,"editor")})),s0=t_.define({enables:sJ}),s1=new WeakMap;function s2(e){let t=e.facet(s0),i=s1.get(t);return i||s1.set(t,i=function(e,t=sK){let i=Object.create(null),n=Object.create(null),r=(e,t)=>{let i=n[e];if(null==i)n[e]=t;else if(i!=t)throw Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},s=(e,n,s,o,a)=>{var l,h;let c=i[e]||(i[e]=Object.create(null)),u=n.split(/ (?!$)/).map(e=>(function(e,t){let i,n,r,s,o=e.split(/-(?!$)/),a=o[o.length-1];"Space"==a&&(a=" ");for(let e=0;e<o.length-1;++e){let a=o[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))i=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))r=!0;else if(/^mod$/i.test(a))"mac"==t?s=!0:n=!0;else throw Error("Unrecognized modifier name: "+a)}return i&&(a="Alt-"+a),n&&(a="Ctrl-"+a),s&&(a="Meta-"+a),r&&(a="Shift-"+a),a})(e,t));for(let t=1;t<u.length;t++){let i=u.slice(0,t).join(" ");r(i,!0),c[i]||(c[i]={preventDefault:!0,stopPropagation:!1,run:[t=>{let n=s3={view:t,prefix:i,scope:e};return setTimeout(()=>{s3==n&&(s3=null)},4e3),!0}]})}let f=u.join(" ");r(f,!1);let d=c[f]||(c[f]={preventDefault:!1,stopPropagation:!1,run:(null==(h=null==(l=c._any)?void 0:l.run)?void 0:h.slice())||[]});s&&d.run.push(s),o&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=i[t]||(i[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:r}=n;for(let t in e)e[t].run.push(e=>r(e,s6))}let r=n[t]||n.key;if(r)for(let t of e)s(t,r,n.run,n.preventDefault,n.stopPropagation),n.shift&&s(t,"Shift-"+r,n.shift,n.preventDefault,n.stopPropagation)}return i}(t.reduce((e,t)=>e.concat(t),[]))),i}function s5(e,t,i){return s4(s2(e.state),t,e,i)}let s3=null,s6=null;function s4(e,t,i,n){var r;s6=t;let s=("Esc"==(r=!(i_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iT&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?iC:iA)[t.keyCode]||t.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),o=tO(td(s,0))==s.length&&" "!=s,a="",l=!1,h=!1,c=!1;s3&&s3.view==i&&s3.scope==n&&(a=s3.prefix+" ",0>rF.indexOf(t.keyCode)&&(h=!0,s3=null));let u=new Set,f=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(i)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),h=!0)}return!1},d=e[n],p,O;return d&&(f(d[a+sH(s,t,!o)])?l=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(iD.windows&&t.ctrlKey&&t.altKey)&&!(iD.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=iA[t.keyCode])&&p!=s?f(d[a+sH(p,t,!0)])?l=!0:t.shiftKey&&(O=iC[t.keyCode])!=s&&O!=p&&f(d[a+sH(O,t,!1)])&&(l=!0):o&&t.shiftKey&&f(d[a+sH(s,t,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),h&&(l=!0),l&&c&&t.stopPropagation(),s6=null,l}class s8{constructor(e,t,i,n,r){this.className=e,this.left=t,this.top=i,this.width=n,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(!i.empty)return function(e,t,i){if(i.to<=e.viewport.from||i.from>=e.viewport.to)return[];let n=Math.max(i.from,e.viewport.from),r=Math.min(i.to,e.viewport.to),s=e.textDirection==nv.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=s7(e),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),u=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=rT(e,n,1),p=rT(e,r,-1),O=d.type==iK.Text?d:null,g=p.type==iK.Text?p:null;if(O&&(e.lineWrapping||d.widgetLineBreaks)&&(O=s9(e,n,1,O)),g&&(e.lineWrapping||p.widgetLineBreaks)&&(g=s9(e,r,-1,g)),O&&g&&O.from==g.from&&O.to==g.to)return v(y(i.from,i.to,O));{let t=O?y(i.from,null,O):w(d,!1),n=g?y(null,i.to,g):w(p,!0),r=[];return(O||d).to<(g||p).from-(O&&g?1:0)||d.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<n.top?r.push(m(u,t.bottom,f,n.top)):t.bottom<n.top&&e.elementAtHeight((t.bottom+n.top)/2).type==iK.Text&&(t.bottom=n.top=(t.bottom+n.top)/2),v(t).concat(r).concat(v(n))}function m(e,i,n,r){return new s8(t,e-l.left,i-l.top,Math.max(0,n-e),r-i)}function v({top:e,bottom:t,horizontal:i}){let n=[];for(let r=0;r<i.length;r+=2)n.push(m(i[r],e,i[r+1],t));return n}function y(t,i,n){let r=1e9,o=-1e9,a=[];function l(t,i,l,h,c){let d=e.coordsAtPos(t,t==n.to?-2:2),p=e.coordsAtPos(l,l==n.from?2:-2);d&&p&&(r=Math.min(d.top,p.top,r),o=Math.max(d.bottom,p.bottom,o),c==nv.LTR?a.push(s&&i?u:d.left,s&&h?f:p.right):a.push(!s&&h?u:p.left,!s&&i?f:d.right))}let h=null!=t?t:n.from,c=null!=i?i:n.to;for(let n of e.visibleRanges)if(n.to>h&&n.from<c)for(let r=Math.max(n.from,h),s=Math.min(n.to,c);;){let n=e.state.doc.lineAt(r);for(let o of e.bidiSpans(n)){let e=o.from+n.from,a=o.to+n.from;if(e>=s)break;a>r&&l(Math.max(e,r),null==t&&e<=h,Math.min(a,s),null==i&&a>=c,o.dir)}if((r=n.to+1)>=s)break}return 0==a.length&&l(h,null==t,c,null==i,e.textDirection),{top:r,bottom:o,horizontal:a}}function w(e,t){let i=a.top+(t?e.top:e.bottom);return{top:i,bottom:i,horizontal:[]}}}(e,t,i);{let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let r=s7(e);return[new s8(t,n.left-r.left,n.top-r.top,null,n.bottom-n.top)]}}}function s7(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==nv.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function s9(e,t,i,n){let r=e.coordsAtPos(t,2*i);if(!r)return n;let s=e.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=e.posAtCoords({x:s.left+1,y:o}),l=e.posAtCoords({x:s.right-1,y:o});return null==a||null==l?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}class oe{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ot)!=e.state.facet(ot)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(ot);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{var i;return i=this.drawn[t],!(e.constructor==i.constructor&&e.eq(i))})){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,iD.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let ot=t_.define();function oi(e){return[nK.define(t=>new oe(t,e)),ot.of(e)]}let on=t_.define({combine:e=>ie(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function or(e){return e.startState.facet(on)!=e.state.facet(on)}let os=oi({above:!0,markers(e){let{state:t}=e,i=t.facet(on),n=[];for(let r of t.selection.ranges){let s=r==t.selection.main;if(r.empty||i.drawRangeCursor&&!(s&&iD.ios&&i.iosSelectionHandles)){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=r.empty?r:tP.cursor(r.head,r.assoc);for(let r of s8.forRange(e,t,i))n.push(r)}}return n},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let i=or(e);return i&&oo(e.state,t),e.docChanged||e.selectionSet||i},mount(e,t){oo(t.state,e)},class:"cm-cursorLayer"});function oo(e,t){t.style.animationDuration=e.facet(on).cursorBlinkRate+"ms"}let oa=oi({above:!1,markers(e){let t=[],{main:i,ranges:n}=e.state.selection;for(let i of n)if(!i.empty)for(let n of s8.forRange(e,"cm-selectionBackground",i))t.push(n);if(iD.ios&&!i.empty&&e.state.facet(on).iosSelectionHandles){for(let n of s8.forRange(e,"cm-selectionHandle cm-selectionHandle-start",tP.cursor(i.from,1)))t.push(n);for(let n of s8.forRange(e,"cm-selectionHandle cm-selectionHandle-end",tP.cursor(i.to,1)))t.push(n)}return t},update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||or(e),class:"cm-selectionLayer"}),ol=iD.gecko&&153==iD.gecko_version?"#ffffff01":"transparent",oh=tB.highest(sq.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${ol} !important`},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));/x/.unicode;let oc="-10000px";class ou{constructor(e,t,i,n){this.facet=t,this.createTooltipView=i,this.removeTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let r=null;this.tooltipViews=this.tooltips.map(e=>r=i(e,r))}update(e,t){var i;let n=e.state.facet(this.facet),r=n.filter(e=>e);if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],o=t?[]:null;for(let i=0;i<r.length;i++){let n=r[i],a=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(a=e)}if(a<0)s[i]=this.createTooltipView(n,i?s[i-1]:null),o&&(o[i]=!!n.above);else{let n=s[i]=this.tooltipViews[a];o&&(o[i]=t[a]),n.update&&n.update(e)}}}for(let e of this.tooltipViews)0>s.indexOf(e)&&(this.removeTooltipView(e),null==(i=e.destroy)||i.call(e));return t&&(o.forEach((e,i)=>t[i]=e),t.length=o.length),this.input=n,this.tooltips=r,this.tooltipViews=s,!0}}function of(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}let od=t_.define({combine:e=>{var t,i,n;return{position:iD.ios?"absolute":(null==(t=e.find(e=>e.position))?void 0:t.position)||"fixed",parent:(null==(i=e.find(e=>e.parent))?void 0:i.parent)||null,tooltipSpace:(null==(n=e.find(e=>e.tooltipSpace))?void 0:n.tooltipSpace)||of}}}),op=new WeakMap,oO=nK.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(od);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ou(e,oy,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let e of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(e.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let i=t||e.geometryChanged,n=e.state.facet(od);if(n.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=n.position,this.manager.tooltipViews))e.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(e.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(e,t){let i=e.create(this.view),n=t?t.dom:null;if(i.dom.classList.add("cm-tooltip"),e.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",i.dom.appendChild(e)}return i.dom.style.position=this.position,i.dom.style.top=oc,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var e,t,i;for(let t of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))t.dom.remove(),null==(e=t.destroy)||e.call(t);this.parent&&this.container.remove(),null==(t=this.resizeObserver)||t.disconnect(),null==(i=this.intersectionObserver)||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(iD.safari){let t=e.getBoundingClientRect();i=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else i=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(i||"absolute"==this.position)if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),r=n7(this.view);return{visible:{left:n.left+r.left,top:n.top+r.top,right:n.right-r.right,bottom:n.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(od).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(e){var t;if(e.makeAbsolute)for(let e of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))e.dom.style.position="absolute";let{visible:i,space:n,scaleX:r,scaleY:s}=e,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:c}=h,u=e.pos[a],f=e.size[a];if(!u||!1!==l.clip&&(u.bottom<=Math.max(i.top,n.top)||u.top>=Math.min(i.bottom,n.bottom)||u.right<Math.max(i.left,n.left)-.1||u.left>Math.min(i.right,n.right)+.1)){c.style.top=oc;continue}let d=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=7*!!d,O=f.right-f.left,g=null!=(t=op.get(h))?t:f.bottom-f.top,m=h.offset||ov,v=this.view.textDirection==nv.LTR,y=f.width>n.right-n.left?v?n.left:n.right-f.width:v?Math.max(n.left,Math.min(u.left-14*!!d+m.x,n.right-O)):Math.min(Math.max(n.left,u.left-O+14*!!d-m.x),n.right-O),w=this.above[a];!l.strictSide&&(w?u.top-g-p-m.y<n.top:u.bottom+g+p+m.y>n.bottom)&&w==n.bottom-u.bottom>u.top-n.top&&(w=this.above[a]=!w);let b=(w?u.top-n.top:n.bottom-u.bottom)-p;if(b<g&&!1!==h.resize){if(b<this.view.defaultLineHeight){c.style.top=oc;continue}op.set(h,g),c.style.height=(g=b)/s+"px"}else c.style.height&&(c.style.height="");let x=w?u.top-g-p-m.y:u.bottom+p+m.y,S=y+O;if(!0!==h.overlap)for(let e of o)e.left<S&&e.right>y&&e.top<x+g&&e.bottom>x&&(x=w?e.top-g-2-p:e.bottom+p+2);if("absolute"==this.position?(c.style.top=(x-e.parent.top)/s+"px",og(c,(y-e.parent.left)/r)):(c.style.top=x/s+"px",og(c,y/r)),d){let e=u.left+(v?m.x:-m.x)-(y+14-7);d.style.left=e/r+"px"}!0!==h.overlap&&o.push({left:y,top:x,right:S,bottom:x+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView)&&(this.inView=this.view.inView,!this.inView))for(let e of this.manager.tooltipViews)e.dom.style.top=oc}},{eventObservers:{scroll(){this.maybeMeasure()}}});function og(e,t){let i=parseInt(e.style.left,10);(isNaN(i)||Math.abs(t-i)>1)&&(e.style.left=t+"px")}let om=sq.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ov={x:0,y:0},oy=t_.define({enables:[oO,om]}),ow=t_.define({combine(e){let t,i;for(let n of e)t=t||n.topContainer,i=i||n.bottomContainer;return{topContainer:t,bottomContainer:i}}}),ob=nK.fromClass(class{constructor(e){this.input=e.state.facet(ok),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(ow);for(let i of(this.top=new ox(e,!0,t.topContainer),this.bottom=new ox(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top)),this.panels))i.dom.classList.add("cm-panel"),i.mount&&i.mount()}update(e){let t=e.state.facet(ow);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ox(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ox(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=e.state.facet(ok);if(i!=this.input){let t=i.filter(e=>e),n=[],r=[],s=[],o=[];for(let i of t){let t=this.specs.indexOf(i),a;t<0?(a=i(e.view),o.push(a)):(a=this.panels[t]).update&&a.update(e),n.push(a),(a.top?r:s).push(a)}for(let e of(this.specs=t,this.panels=n,this.top.sync(r),this.bottom.sync(s),o))e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>sq.scrollMargins.of(t=>{let i=t.plugin(e);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}})});class ox{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&0>e.indexOf(t)&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=oS(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=oS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function oS(e){let t=e.nextSibling;return e.remove(),t}let ok=t_.define({enables:ob});class oQ extends it{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}oQ.prototype.elementClass="",oQ.prototype.toDOM=void 0,oQ.prototype.mapMode=tm.TrackBefore,oQ.prototype.startSide=oQ.prototype.endSide=-1,oQ.prototype.point=!0;let o$=t_.define(),oP=t_.define(),oA={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>ia.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},oC=t_.define(),o_=t_.define({combine:e=>e.some(e=>e)});function oT(e){let t=[oM];return e&&!1===e.fixed&&t.push(o_.of(!0)),t}let oM=nK.fromClass(class{constructor(e){for(let t of(this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(oC).map(t=>new oE(e,t)),this.fixed=!e.state.facet(o_),this.gutters))"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,i=e.view.viewport,n=Math.min(t.to,i.to)-Math.max(t.from,i.from);this.syncGutters(n<(i.to-i.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(o_)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let i=ia.iter(this.view.state.facet(o$),this.view.viewport.from),n=[],r=this.gutters.map(e=>new oX(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(e.type)){let t=!0;for(let s of e.type)if(s.type==iK.Text&&t){for(let e of(oR(i,n,s.from),r))e.line(this.view,s,n);t=!1}else if(s.widget)for(let e of r)e.widget(this.view,s)}else if(e.type==iK.Text)for(let t of(oR(i,n,e.from),r))t.line(this.view,e,n);else if(e.widget)for(let t of r)t.widget(this.view,e);for(let e of r)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(oC),i=e.state.facet(oC),n=e.docChanged||e.heightChanged||e.viewportChanged||!ia.eq(e.startState.facet(o$),e.state.facet(o$),e.view.viewport.from,e.view.viewport.to);if(t==i)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let r=[];for(let n of i){let i=t.indexOf(n);i<0?r.push(new oE(this.view,n)):(this.gutters[i].update(e),r.push(this.gutters[i]))}for(let e of this.gutters)e.dom.remove(),0>r.indexOf(e)&&e.destroy();for(let e of r)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=r}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>sq.scrollMargins.of(t=>{let i=t.plugin(e);if(!i||0==i.gutters.length||!i.fixed)return null;let n=i.dom.offsetWidth*t.scaleX,r=i.domAfter?i.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==nv.LTR?{left:n,right:r}:{right:n,left:r}})});function oZ(e){return Array.isArray(e)?e:[e]}function oR(e,t,i){for(;e.value&&e.from<=i;)e.from==i&&t.push(e.value),e.next()}class oX{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=ia.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:n}=this,r=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==n.elements.length){let t=new oj(e,s,r,i);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,s,r,i);this.height=t.bottom,this.i++}line(e,t,i){let n=[];oR(this.cursor,n,t.from),i.length&&(n=n.concat(i));let r=this.gutter.config.lineMarker(e,t,n);r&&n.unshift(r);let s=this.gutter;(0!=n.length||s.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),n=i?[i]:null;for(let i of e.state.facet(oP)){let r=i(e,t.widget,t);r&&(n||(n=[])).push(r)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class oE{constructor(e,t){for(let i in this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),t.domEventHandlers)this.dom.addEventListener(i,n=>{let r=n.target,s;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let e=r.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=n.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[i](e,o,n)&&n.preventDefault()});this.markers=oZ(t.markers(e)),t.initialSpacer&&(this.spacer=new oj(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=oZ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let i=e.view.viewport;return!ia.eq(this.markers,t,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class oj{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),!function(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].compare(t[i]))return!1;return!0}(this.markers,n)&&this.setMarkers(e,n)}setMarkers(e,t){let i="cm-gutterElement",n=this.dom.firstChild;for(let r=0,s=0;;){let o=s,a=r<t.length?t[r++]:null,l=!1;if(a){let e=a.elementClass;e&&(i+=" "+e);for(let e=s;e<this.markers.length;e++)if(this.markers[e].compare(a)){o=e,l=!0;break}}else o=this.markers.length;for(;s<o;){let e=this.markers[s++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!a)break;a.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),l&&s++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}}let oB=t_.define(),oL=t_.define(),oI=t_.define({combine:e=>ie(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let e in t){let n=i[e],r=t[e];i[e]=n?(e,t,i)=>n(e,t,i)||r(e,t,i):r}return i}})});class oz extends oQ{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function oY(e,t){return e.state.facet(oI).formatNumber(t,e.state)}let oV=oC.compute([oI],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(oB),lineMarker:(e,t,i)=>i.some(e=>e.toDOM)?null:new oz(oY(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,i)=>{for(let n of e.state.facet(oL)){let r=n(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(oI)!=e.state.facet(oI),initialSpacer:e=>new oz(oY(e,oW(e.state.doc.lines))),updateSpacer(e,t){let i=oY(t.view,oW(t.view.state.doc.lines));return i==e.number?e:new oz(i)},domEventHandlers:e.facet(oI).domEventHandlers,side:"before"}));function oW(e){let t=9;for(;t<e;)t=10*t+9;return t}let oD=0;class oq{constructor(e,t){this.from=e,this.to=t}}class oN{constructor(e={}){this.id=oD++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=oF.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}oN.closedBy=new oN({deserialize:e=>e.split(" ")}),oN.openedBy=new oN({deserialize:e=>e.split(" ")}),oN.group=new oN({deserialize:e=>e.split(" ")}),oN.isolate=new oN({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),oN.contextHash=new oN({perNode:!0}),oN.lookAhead=new oN({perNode:!0}),oN.mounted=new oN({perNode:!0});class oU{constructor(e,t,i,n=!1){this.tree=e,this.overlay=t,this.parser=i,this.bracketed=n}static get(e){return e&&e.props&&e.props[oN.mounted.id]}}let oG=Object.create(null);class oF{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):oG,i=!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),n=new oF(e.name||"",t,e.id,i);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(oN.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(oN.group),n=-1;n<(i?i.length:0);n++){let r=t[n<0?e.name:i[n]];if(r)return r}}}}oF.none=new oF("",Object.create(null),0,8);class oK{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let n=null;for(let t of e){let e=t(i);if(e){n||(n=Object.assign({},i.props));let t=e[1],r=e[0];r.combine&&r.id in n&&(t=r.combine(n[r.id],t)),n[r.id]=t}}t.push(n?new oF(i.name,n,i.id,i.flags):i)}return new oK(t)}}let oH=new WeakMap,oJ=new WeakMap;(u=Q||(Q={}))[u.ExcludeBuffers=1]="ExcludeBuffers",u[u.IncludeAnonymous=2]="IncludeAnonymous",u[u.IgnoreMounts=4]="IgnoreMounts",u[u.IgnoreOverlays=8]="IgnoreOverlays",u[u.EnterBracketed=16]="EnterBracketed";class o0{constructor(e,t,i,n,r){if(this.type=e,this.children=t,this.positions=i,this.length=n,this.props=null,r&&r.length)for(let[e,t]of(this.props=Object.create(null),r))this.props["number"==typeof e?e:e.id]=t}toString(){let e=oU.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let i=e.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new an(this.topNode,e)}cursorAt(e,t=0,i=0){let n=new an(oH.get(this)||this.topNode);return n.moveTo(e,t),oH.set(this,n._tree),n}get topNode(){return new o4(this,0,0,null)}resolve(e,t=0){let i=o3(oH.get(this)||this.topNode,e,t,!1);return oH.set(this,i),i}resolveInner(e,t=0){let i=o3(oJ.get(this)||this.topNode,e,t,!0);return oJ.set(this,i),i}resolveStack(e,t=0){return function(e,t,i){let n=e.resolveInner(t,i),r=null;for(let e=n instanceof o4?n:n.context.parent;e;e=e.parent)if(e.index<0){let s=e.parent;(r||(r=[n])).push(s.resolve(t,i)),e=s}else{let s=oU.get(e.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let o=new o4(s.tree,s.overlay[0].from+e.from,-1,e);(r||(r=[n])).push(o3(o,t,i,!1))}}return r?at(r):n}(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:r=this.length}=e,s=e.mode||0,o=(s&Q.IncludeAnonymous)>0;for(let e=this.cursor(s|Q.IncludeAnonymous);;){let s=!1;if(e.from<=r&&e.to>=n&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;s=!0}for(;s&&i&&(o||!e.type.isAnonymous)&&i(e),!e.nextSibling();){if(!e.parent())return;s=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:aa(oF.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,i)=>new o0(this.type,e,t,i,this.propValues),e.makeTree||((e,t,i)=>new o0(oF.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:n,maxBufferLength:r=1024,reused:s=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(i)?new o1(i,i.length):i,l=n.types,h=0,c=0;function u(e,t,i,r,s,o,a,l,h){let c=[],u=[];for(;e.length>r;)c.push(e.pop()),u.push(t.pop()+i-s);e.push(f(n.types[a],c,u,o-s,l-o,h)),t.push(s-i)}function f(e,t,i,n,r,s,o){if(s){let e=[oN.contextHash,s];o=o?[e].concat(o):[e]}if(r>25){let e=[oN.lookAhead,r];o=o?[e].concat(o):[e]}return new o0(e,t,i,n,o)}let d=[],p=[];for(;a.pos>0;)!function e(t,i,d,p,O,g){let{id:m,start:v,end:y,size:w}=a,b=c,x=h;if(w<0){if(a.next(),-1==w){let e=s[m];d.push(e),p.push(v-t);return}if(-3==w){h=m;return}if(-4==w){c=m;return}else throw RangeError(`Unrecognized record size: ${w}`)}let S=l[m],k,Q,$=v-t;if(y-v<=r&&(Q=function(e,t){let i=a.fork(),n=0,s=0,l=0,h=i.end-r,c={size:0,start:0,skip:0};o:for(let r=i.pos-e;i.pos>r;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=s,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-e;if(e<0||a<r||i.start<h)break;let u=4*(i.id>=o),f=i.start;for(i.next();i.pos>a;){if(i.size<0)if(-3==i.size||-4==i.size)u+=4;else break o;else i.id>=o&&(u+=4);i.next()}s=f,n+=e,l+=u}return(t<0||n==e)&&(c.size=n,c.start=s,c.skip=l),c.size>4?c:void 0}(a.pos-i,O))){let e=new Uint16Array(Q.size-Q.skip),i=a.pos-Q.size,r=e.length;for(;a.pos>i;)r=function e(t,i,n){let{id:r,start:s,end:l,size:u}=a;if(a.next(),u>=0&&r<o){let o=n;if(u>4){let r=a.pos-(u-4);for(;a.pos>r;)n=e(t,i,n)}i[--n]=o,i[--n]=l-t,i[--n]=s-t,i[--n]=r}else -3==u?h=r:-4==u&&(c=r);return n}(Q.start,e,r);k=new o2(e,y-Q.start,n),$=Q.start-t}else{let t=a.pos-w;a.next();let i=[],s=[],l=m>=o?m:-1,h=0,c=y;for(;a.pos>t;)l>=0&&a.id==l&&a.size>=0?(a.end<=c-r&&(u(i,s,v,h,a.end,c,l,b,x),h=i.length,c=a.end),a.next()):g>2500?function(e,t,i,s){let o=[],l=0,h=-1;for(;a.pos>t;){let{id:e,start:t,end:i,size:n}=a;if(n>4)a.next();else if(h>-1&&t<h)break;else h<0&&(h=i-r),o.push(e,t,i),l++,a.next()}if(l){let t=new Uint16Array(4*l),r=o[o.length-2];for(let e=o.length-3,i=0;e>=0;e-=3)t[i++]=o[e],t[i++]=o[e+1]-r,t[i++]=o[e+2]-r,t[i++]=i;i.push(new o2(t,o[2]-r,n)),s.push(r-e)}}(v,t,i,s):e(v,t,i,s,l,g+1);if(l>=0&&h>0&&h<i.length&&u(i,s,v,h,v,c,l,b,x),i.reverse(),s.reverse(),l>-1&&h>0){let e=function(e,t){return(i,n,r)=>{let s=0,o=i.length-1,a,l;if(o>=0&&(a=i[o])instanceof o0){if(!o&&a.type==e&&a.length==r)return a;(l=a.prop(oN.lookAhead))&&(s=n[o]+a.length+l)}return f(e,i,n,r,s,t)}}(S,x);k=aa(S,i,s,0,i.length,0,y-v,e,e)}else k=f(S,i,s,y-v,b-y,x)}d.push(k),p.push($)}(e.start||0,e.bufferStart||0,d,p,-1,0);let O=null!=(t=e.length)?t:d.length?p[0]+d[0].length:0;return new o0(l[e.topID],d.reverse(),p.reverse(),O)}(e)}}o0.empty=new o0(oF.none,[],[],0);class o1{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new o1(this.buffer,this.index)}}class o2{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return oF.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],n=this.set.types[t],r=n.name;if(/\W/.test(r)&&!n.isError&&(r=JSON.stringify(r)),i==(e+=4))return r;let s=[];for(;e<i;)s.push(this.childString(e)),e=this.buffer[e+3];return r+"("+s.join(",")+")"}findChild(e,t,i,n,r){let{buffer:s}=this,o=-1;for(let a=e;a!=t&&(!o5(r,n,s[a+1],s[a+2])||(o=a,!(i>0)));a=s[a+3]);return o}slice(e,t,i){let n=this.buffer,r=new Uint16Array(t-e),s=0;for(let o=e,a=0;o<t;){r[a++]=n[o++],r[a++]=n[o++]-i;let t=r[a++]=n[o++]-i;r[a++]=n[o++]-e,s=Math.max(s,t)}return new o2(r,s,this.set)}}function o5(e,t,i,n){switch(e){case -2:return i<t;case -1:return n>=t&&i<t;case 0:return i<t&&n>t;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function o3(e,t,i,n){for(var r;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof o4&&e.index<0?null:e.parent;if(!t)return e;e=t}let s=n?0:Q.IgnoreOverlays;if(n)for(let n=e,o=n.parent;o;o=(n=o).parent)n instanceof o4&&n.index<0&&(null==(r=o.enter(t,i,s))?void 0:r.from)!=n.from&&(e=o);for(;;){let n=e.enter(t,i,s);if(!n)return e;e=n}}class o6{cursor(e=0){return new an(this,e)}getChild(e,t=null,i=null){let n=o8(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return o8(this,e,t,i)}resolve(e,t=0){return o3(this,e,t,!1)}resolveInner(e,t=0){return o3(this,e,t,!0)}matchContext(e){return o7(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(i=t,t=e.prevSibling):t=e}return i}get node(){return this}get next(){return this.parent}}class o4 extends o6{constructor(e,t,i,n){super(),this._tree=e,this.from=t,this.index=i,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,n,r=0){for(let s=this;;){for(let{children:o,positions:a}=s._tree,l=t>0?o.length:-1;e!=l;e+=t){let l=o[e],h=a[e]+s.from,c;if(r&Q.EnterBracketed&&l instanceof o0&&(c=oU.get(l))&&!c.overlay&&c.bracketed&&i>=h&&i<=h+l.length||o5(n,i,h,h+l.length)){if(l instanceof o2){if(r&Q.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,i-h,n);if(o>-1)return new ae(new o9(s,l,e,h),null,o)}else if(r&Q.IncludeAnonymous||!l.type.isAnonymous||ar(l)){let o;if(!(r&Q.IgnoreMounts)&&(o=oU.get(l))&&!o.overlay)return new o4(o.tree,h,e,s);let a=new o4(l,h,e,s);return r&Q.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,i,n,r)}}}if(r&Q.IncludeAnonymous||!s.type.isAnonymous||(e=s.index>=0?s.index+t:t<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,i=0){let n;if(!(i&Q.IgnoreOverlays)&&(n=oU.get(this._tree))&&n.overlay){let r=e-this.from,s=i&Q.EnterBracketed&&n.bracketed;for(let{from:e,to:i}of n.overlay)if((t>0||s?e<=r:e<r)&&(t<0||s?i>=r:i>r))return new o4(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function o8(e,t,i,n){let r=e.cursor(),s=[];if(!r.firstChild())return s;if(null!=i){for(let e=!1;!e;)if(e=r.type.is(i),!r.nextSibling())return s}for(;;){if(null!=n&&r.type.is(n))return s;if(r.type.is(t)&&s.push(r.node),!r.nextSibling())return null==n?s:[]}}function o7(e,t,i=t.length-1){for(let n=e;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class o9{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class ae extends o6{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new ae(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,i=0){if(i&Q.ExcludeBuffers)return null;let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new ae(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ae(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ae(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,r=i.buffer[this.index+3];if(r>n){let s=i.buffer[this.index+1];e.push(i.slice(n,r,s)),t.push(0)}return new o0(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function at(e){if(!e.length)return null;let t=0,i=e[0];for(let n=1;n<e.length;n++){let r=e[n];(r.from>i.from||r.to<i.to)&&(i=r,t=n)}let n=i instanceof o4&&i.index<0?null:i.parent,r=e.slice();return n?r[t]=n:r.splice(t,1),new ai(r,i)}class ai{constructor(e,t){this.heads=e,this.node=t}get next(){return at(this.heads)}}class an{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Q.EnterBracketed,e instanceof o4)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof o4?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?!(i&Q.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Q.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Q.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let e=i<0?0:this.stack[i]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(e)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:i}=n)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let n=t+e,r=e<0?-1:i._tree.children.length;n!=r;n+=e){let e=i._tree.children[n];if(this.mode&Q.IncludeAnonymous||e instanceof o2||!e.type.isAnonymous||ar(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)o:for(let n=this.index,r=this.stack.length;r>=0;){for(let s=e;s;s=s._parent)if(s.index==n){if(n==this.index)return s;t=s,i=r+1;break o}n=this.stack[--r]}for(let e=i;e<this.stack.length;e++)t=new ae(this.buffer,t,this.stack[e]);return this.bufferNode=new ae(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(n=!0)}for(;;){if(n&&t&&t(this),n=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,n=!0}}}matchContext(e){if(!this.buffer)return o7(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let n=e.length-1,r=this.stack.length-1;n>=0;r--){if(r<0)return o7(this._tree,e,n);let s=i[t.buffer[this.stack[r]]];if(!s.isAnonymous){if(e[n]&&e[n]!=s.name)return!1;n--}}return!0}}function ar(e){return e.children.some(e=>e instanceof o2||!e.type.isAnonymous||ar(e))}let as=new WeakMap;function ao(e,t){if(!e.isAnonymous||t instanceof o2||t.type!=e)return 1;let i=as.get(t);if(null==i){for(let n of(i=1,t.children)){if(n.type!=e||!(n instanceof o0)){i=1;break}i+=ao(e,n)}as.set(t,i)}return i}function aa(e,t,i,n,r,s,o,a,l){let h=0;for(let i=n;i<r;i++)h+=ao(e,t[i]);let c=Math.ceil(1.5*h/8),u=[],f=[];return!function t(i,n,r,o,a){for(let h=r;h<o;){let r=h,d=n[h],p=ao(e,i[h]);for(h++;h<o;h++){let t=ao(e,i[h]);if(p+t>=c)break;p+=t}if(h==r+1){if(p>c){let e=i[r];t(e.children,e.positions,0,e.children.length,n[r]+a);continue}u.push(i[r])}else{let t=n[h-1]+i[h-1].length-d;u.push(aa(e,i,n,r,h,d,t,null,l))}f.push(d+a-s)}}(t,i,n,r,0),(a||l)(u,f,o)}class al{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ae?this.setBuffer(e.context.buffer,e.index,t):e instanceof o4&&this.map.set(e.tree,t)}get(e){return e instanceof ae?this.getBuffer(e.context.buffer,e.index):e instanceof o4?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ah{constructor(e,t,i,n,r=!1,s=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=!!r|2*!!s}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],i=!1){let n=[new ah(0,e.length,e,0,!1,i)];for(let i of t)i.to>e.length&&n.push(i);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],r=1,s=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let h=o<t.length?t[o]:null,c=h?h.fromA:1e9;if(c-a>=i)for(;s&&s.from<c;){let t=s;if(a>=t.from||c<=t.to||l){let e=Math.max(t.from,a)-l,i=Math.min(t.to,c)-l;t=e>=i?null:new ah(e,i,t.tree,t.offset+l,o>0,!!h)}if(t&&n.push(t),s.to>c)break;s=r<e.length?e[r++]:null}if(!h)break;a=h.toA,l=h.toA-h.toB}return n}}class ac{startParse(e,t,i){return"string"==typeof e&&(e=new au(e)),i=i?i.length?i.map(e=>new oq(e.from,e.to)):[new oq(0,0)]:[new oq(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class au{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}class af{constructor(e,t,i,n,r,s){this.parser=e,this.parse=t,this.overlay=i,this.bracketed=n,this.target=r,this.from=s}}function ad(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class ap{constructor(e,t,i,n,r,s,o,a){this.parser=e,this.predicate=t,this.mounts=i,this.index=n,this.start=r,this.bracketed=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}let aO=new oN({perNode:!0});class ag{constructor(e,t,i,n,r){this.nest=t,this.input=i,this.fragments=n,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new o0(e.type,e.children,e.positions,e.length,e.propValues.concat([[aO,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[oN.mounted.id]=new oU(t,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new ay(this.fragments),t=null,i=null,n=new an(new o4(this.baseTree,this.ranges[0].from,0,null),Q.IncludeAnonymous|Q.IgnoreMounts);o:for(let r,s;;){let o=!0,a;if(null!=this.stoppedAt&&n.from>=this.stoppedAt)o=!1;else if(e.hasNode(n)){if(t){let e=t.mounts.find(e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay);if(e)for(let i of e.mount.overlay){let r=i.from+e.pos,s=i.to+e.pos;r>=n.from&&s<=n.to&&!t.ranges.some(e=>e.from<s&&e.to>r)&&t.ranges.push({from:r,to:s})}}o=!1}else if(i&&(s=function(e,t,i){for(let n of e){if(n.from>=i)break;if(n.to>t)return n.from<=t&&n.to>=i?2:1}return 0}(i.ranges,n.from,n.to)))o=2!=s;else if(!n.type.isAnonymous&&(r=this.nest(n,this.input))&&(n.from<n.to||!r.overlay)){!n.tree&&(function(e){let{node:t}=e,i=[],n=t.context.buffer;do i.push(e.index),e.parent();while(!e.tree)let r=e.tree,s=r.children.indexOf(n),o=r.children[s],a=o.buffer,l=[s];for(let n of(r.children[s]=function e(n,r,s,h,c,u){let f=i[u],d=[],p=[];am(o,n,f,d,p,h);let O=a[f+1],g=a[f+2];l.push(d.length);let m=u?e(f+4,a[f+3],o.set.types[a[f]],O,g-O,u-1):t.toTree();return d.push(m),p.push(O-h),am(o,a[f+3],r,d,p,h),new o0(s,d,p,c)}(0,a.length,oF.none,0,o.length,i.length-1),l)){let t=e.tree.children[n],i=e.tree.positions[n];e.yield(new o4(t,i+e.from,n,e._tree))}}(n),t&&t.depth++,i&&i.depth++);let s=e.findMounts(n.from,r.parser);if("function"==typeof r.overlay)t=new ap(r.parser,r.overlay,s,this.inner.length,n.from,!!r.bracketed,n.tree,t);else{let e=aw(this.ranges,r.overlay||(n.from<n.to?[new oq(n.from,n.to)]:[]));e.length&&ad(e),(e.length||!r.overlay)&&this.inner.push(new af(r.parser,e.length?r.parser.startParse(this.input,ab(s,e),e):r.parser.startParse(""),r.overlay?r.overlay.map(e=>new oq(e.from-n.from,e.to-n.from)):null,!!r.bracketed,n.tree,e.length?e[0].from:n.from)),r.overlay?e.length&&(i={ranges:e,depth:0,prev:i}):o=!1}}else if(t&&(a=t.predicate(n))&&(!0===a&&(a=new oq(n.from,n.to)),a.from<a.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==a.from?t.ranges[e]={from:t.ranges[e].from,to:a.to}:t.ranges.push(a)}if(o&&n.firstChild())t&&t.depth++,i&&i.depth++;else for(;!n.nextSibling();){if(!n.parent())break o;if(t&&!--t.depth){let e=aw(this.ranges,t.ranges);e.length&&(ad(e),this.inner.splice(t.index,0,new af(t.parser,t.parser.startParse(this.input,ab(t.mounts,e),e),t.ranges.map(e=>new oq(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}!i||--i.depth||(i=i.prev)}}}}function am(e,t,i,n,r,s){if(t<i){let o=e.buffer[t+1];n.push(e.slice(t,i,o)),r.push(o-s)}}class av{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Q.IncludeAnonymous|Q.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)if(t.to>=e&&t.enter(i,1,Q.IgnoreOverlays|Q.ExcludeBuffers));else if(t.to<=e)t.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&0==t.positions[0]&&t.children[0]instanceof o0)t=t.children[0];else break}return!1}}class ay{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=null!=(t=i.tree.prop(aO))?t:i.to,this.inner=new av(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!=(e=t.tree.prop(aO))?e:t.to,this.inner=new av(t.tree,-t.offset)}}findMounts(e,t){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=null==(i=e.tree)?void 0:i.prop(oN.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}}function aw(e,t){let i=null,n=t;for(let r=1,s=0;r<e.length;r++){let o=e[r-1].to,a=e[r].from;for(;s<n.length;s++){let e=n[s];if(e.from>=a)break;!(e.to<=o)&&(i||(n=i=t.slice()),e.from<o?(i[s]=new oq(e.from,o),e.to>a&&i.splice(s+1,0,new oq(a,e.to))):e.to>a?i[s--]=new oq(a,e.to):i.splice(s--,1))}}return n}function ab(e,t){let i=[];for(let{pos:n,mount:r,frag:s}of e){let e=n+(r.overlay?r.overlay[0].from:0),o=e+r.tree.length,a=Math.max(s.from,e),l=Math.min(s.to,o);if(r.overlay){let o=function(e,t,i,n){let r=0,s=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=r==e.length?1e9:o?e[r].to:e[r].from,u=s==t.length?1e9:a?t[s].to:t[s].from;if(o!=a){let e=Math.max(l,i),t=Math.min(c,u,n);e<t&&h.push(new oq(e,t))}if(1e9==(l=Math.min(c,u)))break;c==l&&(o?(o=!1,r++):o=!0),u==l&&(a?(a=!1,s++):a=!0)}return h}(t,r.overlay.map(e=>new oq(e.from+n,e.to+n)),a,l);for(let t=0,n=a;;t++){let a=t==o.length,h=a?l:o[t].from;if(h>n&&i.push(new ah(n,h,r.tree,-e,s.from>=n||s.openStart,s.to<=h||s.openEnd)),a)break;n=o[t].to}}else i.push(new ah(a,l,r.tree,-e,s.from>=e||s.openStart,s.to<=o||s.openEnd))}return i}let ax=0;class aS{constructor(e,t,i,n){this.name=e,this.set=t,this.base=i,this.modified=n,this.id=ax++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof aS&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let i=new aS("string"==typeof e?e:"?",[],null,[]);if(i.set.push(i),t)for(let e of t.set)i.set.push(e);return i}static defineModifier(e){let t=new aQ(e);return e=>e.modified.indexOf(t)>-1?e:aQ.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let ak=0;class aQ{constructor(e){this.name=e,this.instances=[],this.id=ak++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(i=>{var n,r;return i.base==e&&(n=t,r=i.modified,n.length==r.length&&n.every((e,t)=>e==r[t]))});if(i)return i;let n=[],r=new aS(e.name,n,e,t);for(let e of t)e.instances.push(r);let s=function(e){let t=[[]];for(let i=0;i<e.length;i++)for(let n=0,r=t.length;n<r;n++)t.push(t[n].concat(e[i]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of s)n.push(aQ.get(t,e));return r}}function a$(e){let t=Object.create(null);for(let i in e){let n=e[i];for(let e of(Array.isArray(n)||(n=[n]),i.split(" ")))if(e){let i=[],r=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){r=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!n)throw RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),(t+=n[0].length)==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){r=0;break}if("/"!=o)throw RangeError("Invalid path: "+e);s=e.slice(t)}let o=i.length-1,a=i[o];if(!a)throw RangeError("Invalid path: "+e);let l=new aA(n,r,o>0?i.slice(0,o):null);t[a]=l.sort(t[a])}}return aP.add(t)}let aP=new oN({combine(e,t){let i,n,r;for(;e||t;){if(!e||t&&e.depth>=t.depth?(r=t,t=t.next):(r=e,e=e.next),i&&i.mode==r.mode&&!r.context&&!i.context)continue;let s=new aA(r.tags,r.mode,r.context);i?i.next=s:n=s,i=s}return n}});class aA{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function aC(e,t){let i=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)i[e.id]=t.class;else i[t.tag.id]=t.class;let{scope:n,all:r=null}=t||{};return{style:e=>{let t=r;for(let n of e)for(let e of n.set){let n=i[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}aA.empty=new aA([],2,null);class a_{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,r){let{type:s,from:o,to:a}=e;if(o>=i||a<=t)return;s.isTop&&(r=this.highlighters.filter(e=>!e.scope||e.scope(s)));let l=n,h=function(e){let t=e.type.prop(aP);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||aA.empty,c=function(e,t){let i=null;for(let n of e){let e=n.style(t);e&&(i=i?i+" "+e:e)}return i}(r,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(t,o),l),h.opaque)return;let u=e.tree&&e.tree.prop(oN.mounted);if(u&&u.overlay){let s=e.node.enter(u.overlay[0].from+o,1),h=this.highlighters.filter(e=>!e.scope||e.scope(u.tree.type)),c=e.firstChild();for(let f=0,d=o;;f++){let p=f<u.overlay.length?u.overlay[f]:null,O=p?p.from+o:a,g=Math.max(t,d),m=Math.min(i,O);if(g<m&&c)for(;e.from<m&&(this.highlightRange(e,g,m,n,r),this.startSpan(Math.min(m,e.to),l),!(e.to>=O)&&e.nextSibling()););if(!p||O>i)break;(d=p.to+o)>t&&(this.highlightRange(s.cursor(),Math.max(t,p.from+o),Math.min(i,d),"",h),this.startSpan(Math.min(i,d),l))}c&&e.parent()}else if(e.firstChild()){u&&(n="");do{if(e.to<=t)continue;if(e.from>=i)break;this.highlightRange(e,t,i,n,r),this.startSpan(Math.min(i,e.to),l)}while(e.nextSibling())e.parent()}}}let aT=aS.define,aM=aT(),aZ=aT(),aR=aT(aZ),aX=aT(aZ),aE=aT(),aj=aT(aE),aB=aT(aE),aL=aT(),aI=aT(aL),az=aT(),aY=aT(),aV=aT(),aW=aT(aV),aD=aT(),aq={comment:aM,lineComment:aT(aM),blockComment:aT(aM),docComment:aT(aM),name:aZ,variableName:aT(aZ),typeName:aR,tagName:aT(aR),propertyName:aX,attributeName:aT(aX),className:aT(aZ),labelName:aT(aZ),namespace:aT(aZ),macroName:aT(aZ),literal:aE,string:aj,docString:aT(aj),character:aT(aj),attributeValue:aT(aj),number:aB,integer:aT(aB),float:aT(aB),bool:aT(aE),regexp:aT(aE),escape:aT(aE),color:aT(aE),url:aT(aE),keyword:az,self:aT(az),null:aT(az),atom:aT(az),unit:aT(az),modifier:aT(az),operatorKeyword:aT(az),controlKeyword:aT(az),definitionKeyword:aT(az),moduleKeyword:aT(az),operator:aY,derefOperator:aT(aY),arithmeticOperator:aT(aY),logicOperator:aT(aY),bitwiseOperator:aT(aY),compareOperator:aT(aY),updateOperator:aT(aY),definitionOperator:aT(aY),typeOperator:aT(aY),controlOperator:aT(aY),punctuation:aV,separator:aT(aV),bracket:aW,angleBracket:aT(aW),squareBracket:aT(aW),paren:aT(aW),brace:aT(aW),content:aL,heading:aI,heading1:aT(aI),heading2:aT(aI),heading3:aT(aI),heading4:aT(aI),heading5:aT(aI),heading6:aT(aI),contentSeparator:aT(aL),list:aT(aL),quote:aT(aL),emphasis:aT(aL),strong:aT(aL),link:aT(aL),monospace:aT(aL),strikethrough:aT(aL),inserted:aT(),deleted:aT(),changed:aT(),invalid:aT(),meta:aD,documentMeta:aT(aD),annotation:aT(aD),processingInstruction:aT(aD),definition:aS.defineModifier("definition"),constant:aS.defineModifier("constant"),function:aS.defineModifier("function"),standard:aS.defineModifier("standard"),local:aS.defineModifier("local"),special:aS.defineModifier("special")};for(let e in aq){let t=aq[e];t instanceof aS&&(t.name=e)}aC([{tag:aq.link,class:"tok-link"},{tag:aq.heading,class:"tok-heading"},{tag:aq.emphasis,class:"tok-emphasis"},{tag:aq.strong,class:"tok-strong"},{tag:aq.keyword,class:"tok-keyword"},{tag:aq.atom,class:"tok-atom"},{tag:aq.bool,class:"tok-bool"},{tag:aq.url,class:"tok-url"},{tag:aq.labelName,class:"tok-labelName"},{tag:aq.inserted,class:"tok-inserted"},{tag:aq.deleted,class:"tok-deleted"},{tag:aq.literal,class:"tok-literal"},{tag:aq.string,class:"tok-string"},{tag:aq.number,class:"tok-number"},{tag:[aq.regexp,aq.escape,aq.special(aq.string)],class:"tok-string2"},{tag:aq.variableName,class:"tok-variableName"},{tag:aq.local(aq.variableName),class:"tok-variableName tok-local"},{tag:aq.definition(aq.variableName),class:"tok-variableName tok-definition"},{tag:aq.special(aq.variableName),class:"tok-variableName2"},{tag:aq.definition(aq.propertyName),class:"tok-propertyName tok-definition"},{tag:aq.typeName,class:"tok-typeName"},{tag:aq.namespace,class:"tok-namespace"},{tag:aq.className,class:"tok-className"},{tag:aq.macroName,class:"tok-macroName"},{tag:aq.propertyName,class:"tok-propertyName"},{tag:aq.operator,class:"tok-operator"},{tag:aq.comment,class:"tok-comment"},{tag:aq.meta,class:"tok-meta"},{tag:aq.invalid,class:"tok-invalid"},{tag:aq.punctuation,class:"tok-punctuation"}]);let aN=new oN;function aU(e){return t_.define({combine:e?t=>t.concat(e):void 0})}let aG=new oN;class aF{constructor(e,t,i=[],n=""){this.data=e,this.name=n,t9.prototype.hasOwnProperty("tree")||Object.defineProperty(t9.prototype,"tree",{get(){return aJ(this)}}),this.parser=t,this.extension=[a9.of(this),t9.languageData.of((e,t,i)=>{let n=aK(e,t,i),r=n.type.prop(aN);if(!r)return[];let s=e.facet(r),o=n.type.prop(aG);if(o){let r=n.resolve(t-n.from,i);for(let t of o)if(t.test(r,e)){let i=e.facet(t.facet);return"replace"==t.type?i:i.concat(s)}}return s})].concat(i)}isActiveAt(e,t,i=-1){return aK(e,t,i).type.prop(aN)==this.data}findRegions(e){let t=e.facet(a9);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=(e,t)=>{if(e.prop(aN)==this.data)return void i.push({from:t,to:t+e.length});let r=e.prop(oN.mounted);if(r){if(r.tree.prop(aN)==this.data){if(r.overlay)for(let e of r.overlay)i.push({from:e.from+t,to:e.to+t});else i.push({from:t,to:t+e.length});return}else if(r.overlay){let e=i.length;if(n(r.tree,r.overlay[0].from+t),i.length>e)return}}for(let i=0;i<e.children.length;i++){let r=e.children[i];r instanceof o0&&n(r,e.positions[i]+t)}};return n(aJ(e),0),i}get allowsNesting(){return!0}}function aK(e,t,i){let n=e.facet(a9),r=aJ(e).topNode;if(!n||n.allowsNesting)for(let e=r;e;e=e.enter(t,i,Q.ExcludeBuffers|Q.EnterBracketed))e.type.isTop&&(r=e);return r}aF.setState=t1.define();class aH extends aF{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=aU(e.languageData);return new aH(t,e.parser.configure({props:[aN.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new aH(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function aJ(e){let t=e.field(aF.state,!1);return t?t.tree:o0.empty}function a0(e,t,i=50){var n;let r=null==(n=e.field(aF.state,!1))?void 0:n.context;if(!r)return null;let s=r.viewport;r.updateViewport({from:0,to:t});let o=r.isDone(t)||r.work(i,t)?r.tree:null;return r.updateViewport(s),o}class a1{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let a2=null;class a5{constructor(e,t,i=[],n,r,s,o,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=r,this.viewport=s,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new a5(e,t,[],o0.empty,0,i,[],null)}startParse(){return this.parser.startParse(new a1(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=o0.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var i;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(ah.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!=(i=this.parse.stoppedAt)?i:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ah.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=a2;a2=this;try{return e()}finally{a2=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=a3(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:r,viewport:s,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,i,n,r)=>t.push({fromA:e,toA:i,fromB:n,toB:r})),i=ah.applyChanges(i,t),n=o0.empty,r=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length)for(let t of(o=[],this.skipped)){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);i<n&&o.push({from:i,to:n})}}return new a5(this.parser,t,i,n,r,s,o,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:i,to:n}=this.skipped[t];i<e.to&&n>e.from&&(this.fragments=a3(this.fragments,i,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ac{createParse(t,i,n){let r=n[0].from,s=n[n.length-1].to;return{parsedPos:r,advance(){let t=a2;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new o0(oF.none,[],[],s-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return a2}}function a3(e,t,i){return ah.applyChanges(e,[{fromA:t,toA:i,fromB:t,toB:i}])}class a6{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new a6(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=a5.create(e.facet(a9).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new a6(i)}}aF.state=tE.define({create:a6.init,update(e,t){for(let e of t.effects)if(e.is(aF.setState))return e.value;return t.startState.facet(a9)!=t.state.facet(a9)?a6.init(t.state):e.apply(t)}});let a4=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"u">typeof requestIdleCallback&&(a4=e=>{let t=-1,i=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(i):cancelIdleCallback(t)});let a8="u">typeof navigator&&(null==($=navigator.scheduling)?void 0:$.isInputPending)?()=>navigator.scheduling.isInputPending():null,a7=nK.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(aF.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(aF.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=a4(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:n}}=this.view,r=i.field(aF.state);if(r.tree==r.context.tree&&r.context.isDone(n+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!a8?Math.max(25,e.timeRemaining()-5):1e9),o=r.context.treeLen<n&&i.doc.length>n+1e3,a=r.context.work(()=>a8&&a8()||Date.now()>s,n+1e5*!o);this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:aF.setState.of(new a6(r.context))})),this.chunkBudget>0&&!(a&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>nN(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),a9=t_.define({combine:e=>e.length?e[0]:null,enables:e=>[aF.state,a7,sq.contentAttributes.compute([e],t=>{let i=t.facet(e);return i&&i.name?{"data-language":i.name}:{}})]});class le{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let lt=t_.define(),li=t_.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function ln(e){let t=e.facet(li);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function lr(e,t){let i="",n=e.tabSize,r=e.facet(li)[0];if(" "==r){for(;t>=n;)i+=" ",t-=n;r=" "}for(let e=0;e<t;e++)i+=r;return i}function ls(e,t){for(let i of(e instanceof t9&&(e=new lo(e)),e.state.facet(lt))){let n=i(e,t);if(void 0!==n)return n}let i=aJ(e.state);return i.length>=t?function(e,t,i){let n=t.resolveStack(i),r=t.resolveInner(i,-1).resolve(i,0).enterUnfinishedNodesBefore(i);if(r!=n.node){let e=[];for(let t=r;t&&!(t.from<n.node.from||t.to>n.node.to||t.from==n.node.from&&t.type==n.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return ll(n,e,i)}(e,i,t):null}class lo{constructor(e,t={}){this.state=e,this.options=t,this.unit=ln(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:r}=this.options;if(null!=n&&n>=i.from&&n<=i.to)if(r&&n==e)return{text:"",from:e};else if(t<0?n<e:n<=e)return{text:i.text.slice(n-i.from),from:n};else return{text:i.text.slice(0,n-i.from),from:i.from};return i}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:n}=this.lineAt(e,t);return i.slice(e-n,Math.min(i.length,e+100-n))}column(e,t=1){let{text:i,from:n}=this.lineAt(e,t),r=this.countColumn(i,e-n),s=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return s>-1&&(r+=s-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return ib(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:n}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(n);if(e>-1)return e}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let la=new oN;function ll(e,t,i){for(let n=e;n;n=n.next){let e=function(e){let t=e.type.prop(la);if(t)return t;let i=e.firstChild,n;if(i&&(n=i.type.prop(oN.closedBy))){let t=e.lastChild,i=t&&n.indexOf(t.name)>-1;return e=>lu(e,!0,1,void 0,i&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?lh:null}(n.node);if(e)return e(lc.create(t,i,n))}return 0}function lh(){return 0}class lc extends lo{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new lc(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(function(e,t){for(let i=t;i;i=i.parent)if(e==i)return!0;return!1}(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return ll(this.context.next,this.base,this.pos)}}function lu(e,t,i,n,r){let s=e.textAfter,o=s.match(/^\s*/)[0].length,a=n&&s.slice(o,o+n.length)==n||r==e.pos+o,l=t?function(e){let t=e.node,i=t.childAfter(t.from),n=t.lastChild;if(!i)return null;let r=e.options.simulateBreak,s=e.state.doc.lineAt(i.from),o=null==r||r<=s.from?s.to:Math.min(s.to,r);for(let e=i.to;;){let r=t.childAfter(e);if(!r||r==n)return null;if(!r.type.isSkipped){if(r.from>=o)return null;let e=/^ */.exec(s.text.slice(i.to-s.from))[0].length;return{from:i.from,to:i.to+e}}e=r.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*i)}function lf({except:e,units:t=1}={}){return i=>{let n=e&&e.test(i.textAfter);return i.baseIndent+(n?0:t*i.unit)}}let ld=t_.define(),lp=new oN;function lO(e){let t=e.firstChild,i=e.lastChild;return t&&t.to<i.from?{from:t.to,to:i.type.isError?e.to:i.from}:null}function lg(e,t,i){for(let n of e.facet(ld)){let r=n(e,t,i);if(r)return r}return function(e,t,i){let n=aJ(e);if(n.length<i)return null;let r=n.resolveStack(i,1),s=null;for(let o=r;o;o=o.next){let r=o.node;if(r.to<=i||r.from>i)continue;if(s&&r.from<t)break;let a=r.type.prop(lp);if(a&&(r.to<n.length-50||n.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(r))){let n=a(r,e);n&&n.from<=i&&n.from>=t&&n.to>i&&(s=n)}}return s}(e,t,i)}function lm(e,t){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return i>=n?void 0:{from:i,to:n}}let lv=t1.define({map:lm}),ly=t1.define({map:lm}),lw=tE.define({create:()=>iH.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,i)=>e=lb(e,t,i)),e=e.map(t.changes);let i=[];for(let n of t.effects)n.is(lv)&&!function(e,t,i){let n=!1;return e.between(t,t,(e,r)=>{e==t&&r==i&&(n=!0)}),n}(e,n.value.from,n.value.to)?i.push(n.value):n.is(ly)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(i.length){let{preparePlaceholder:n}=t.state.facet(lk),r=i.map(e=>(n?iH.replace({widget:new lA(n(t.state,e))}):lP).range(e.from,e.to));e=e.update({add:r})}return t.selection&&(e=lb(e,t.selection.main.head)),e},provide:e=>sq.decorations.from(e),toJSON(e,t){let i=[];return e.between(0,t.doc.length,(e,t)=>{i.push(e,t)}),i},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let i=0;i<e.length;){let n=e[i++],r=e[i++];if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid JSON for fold state");t.push(lP.range(n,r))}return iH.set(t,!0)}});function lb(e,t,i=t){let n=!1;return e.between(t,i,(e,r)=>{e<i&&r>t&&(n=!0)}),n?e.update({filterFrom:t,filterTo:i,filter:(e,n)=>e>=i||n<=t}):e}function lx(e,t,i){var n;let r=null;return null==(n=e.field(lw,!1))||n.between(t,i,(e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})}),r}let lS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},lk=t_.define({combine:e=>ie(e,lS)});function lQ(e){let t=[lw,lT];return e&&t.push(lk.of(e)),t}function l$(e,t){let{state:i}=e,n=i.facet(lk),r=t=>{let i=e.lineBlockAt(e.posAtDOM(t.target)),n=lx(e.state,i.from,i.to);n&&e.dispatch({effects:ly.of(n)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r,t);let s=document.createElement("span");return s.textContent=n.placeholderText,s.setAttribute("aria-label",i.phrase("folded code")),s.title=i.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}let lP=iH.replace({widget:new class extends iF{toDOM(e){return l$(e,null)}}});class lA extends iF{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return l$(e,this.value)}}let lC={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class l_ extends oQ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}let lT=sq.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class lM{constructor(e,t){let i;function n(e){let t=iQ.newName();return(i||(i=Object.create(null)))["."+t]=e,t}this.specs=e;let r="string"==typeof t.all?t.all:t.all?n(t.all):void 0,s=t.scope;this.scope=s instanceof aF?e=>e.prop(aN)==s.data:s?e=>e==s:void 0,this.style=aC(e.map(e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))})),{all:r}).style,this.module=i?new iQ(i):null,this.themeType=t.themeType}static define(e,t){return new lM(e,t||{})}}let lZ=t_.define(),lR=t_.define({combine:e=>e.length?[e[0]]:null});function lX(e){let t=e.facet(lZ);return t.length?t:e.facet(lR)}function lE(e,t){let i=[lj],n;return e instanceof lM&&(e.module&&i.push(sq.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?i.push(lR.of(e)):n?i.push(lZ.computeN([sq.darkTheme],t=>t.facet(sq.darkTheme)==("dark"==n)?[e]:[])):i.push(lZ.of(e)),i}let lj=tB.high(nK.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=aJ(e.state),this.decorations=this.buildDeco(e,lX(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=aJ(e.state),i=lX(e.state),n=i!=lX(e.startState),{viewport:r}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!n&&t.type==this.tree.type&&s>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return iH.none;let i=new ih;for(let{from:n,to:r}of e.visibleRanges)!function(e,t,i,n=0,r=e.length){let s=new a_(n,Array.isArray(t)?t:[t],i);s.highlightRange(e.cursor(),n,r,"",s.highlighters),s.flush(r)}(this.tree,t,(e,t,n)=>{i.add(e,t,this.markCache[n]||(this.markCache[n]=iH.mark({class:n})))},n,r);return i.finish()}},{decorations:e=>e.decorations}));aq.meta,aq.link,aq.heading,aq.emphasis,aq.strong,aq.strikethrough,aq.keyword,aq.atom,aq.bool,aq.url,aq.contentSeparator,aq.labelName,aq.literal,aq.inserted,aq.string,aq.deleted,aq.regexp,aq.escape,aq.string,aq.variableName,aq.variableName,aq.typeName,aq.namespace,aq.className,aq.variableName,aq.macroName,aq.propertyName,aq.comment,aq.invalid;let lB=sq.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lL="()[]{}",lI=t_.define({combine:e=>ie(e,{afterCursor:!0,brackets:lL,maxScanDistance:1e4,renderMatch:lV})}),lz=iH.mark({class:"cm-matchingBracket"}),lY=iH.mark({class:"cm-nonmatchingBracket"});function lV(e){let t=[],i=e.matched?lz:lY;return t.push(i.range(e.start.from,e.start.to)),e.end&&t.push(i.range(e.end.from,e.end.to)),t}function lW(e){let t=[],i=e.facet(lI);for(let n of e.selection.ranges){if(!n.empty)continue;let r=lG(e,n.head,-1,i)||n.head>0&&lG(e,n.head-1,1,i)||i.afterCursor&&(lG(e,n.head,1,i)||n.head<e.doc.length&&lG(e,n.head+1,-1,i));r&&(t=t.concat(i.renderMatch(r,e)))}return iH.set(t,!0)}let lD=[nK.fromClass(class{constructor(e){this.paused=!1,this.decorations=lW(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=lW(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),lB],lq=new oN;function lN(e,t,i){let n=e.prop(t<0?oN.openedBy:oN.closedBy);if(n)return n;if(1==e.name.length){let n=i.indexOf(e.name);if(n>-1&&n%2==+(t<0))return[i[n+t]]}return null}function lU(e){let t=e.type.prop(lq);return t?t(e.node):e}function lG(e,t,i,n={}){let r=n.maxScanDistance||1e4,s=n.brackets||lL,o=aJ(e),a=o.resolveInner(t,i);for(let e=a;e;e=e.parent){let n=lN(e.type,i,s);if(n&&e.from<e.to){let r=lU(e);if(r&&(i>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return function(e,t,i,n,r){let s=t.parent,o={from:i.from,to:i.to},a=0,l=null==s?void 0:s.cursor();if(l&&(e<0?l.childBefore(t.from):l.childAfter(t.to)))do if(e<0?l.to<=t.from:l.from>=t.to){if(0==a&&n.indexOf(l.type.name)>-1&&l.from<l.to){let e=lU(l);return{start:o,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(lN(l.type,e,r))a++;else if(lN(l.type,-e,r)){if(0==a){let e=lU(l);return{start:o,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}a--}}while(e<0?l.prevSibling():l.nextSibling())return{start:o,matched:!1}}(i,e,r,n,s)}}return function(e,t,i,n,r,s,o){if(i<0?!t:t==e.doc.length)return null;let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=s;){let s=c.value;i<0&&(e+=s.length);let a=t+e*i;for(let e=i>0?0:s.length-1,t=i>0?s.length:-1;e!=t;e+=i){let t=o.indexOf(s[e]);if(!(t<0)&&n.resolveInner(a+e,1).type==r)if(t%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}i>0&&(e+=s.length)}return c.done?{start:h,matched:!1}:null}(e,t,i,o,a.type,r,s)}function lF(e,t,i,n=0,r=0){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);let s=r;for(let r=n;r<t;r++)9==e.charCodeAt(r)?s+=i-s%i:s++;return s}let lK=Object.create(null),lH=[oF.none],lJ=[],l0=Object.create(null),l1=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])l1[e]=function(e,t){let i=[];for(let n of t.split(" ")){let t=[];for(let i of n.split(".")){let n=e[i]||aq[i];n?"function"==typeof n?t.length?t=t.map(n):l2(i,`Modifier ${i} used at start of tag`):t.length?l2(i,`Tag ${i} used as modifier`):t=Array.isArray(n)?n:[n]:l2(i,`Unknown highlighting tag ${i}`)}for(let e of t)i.push(e)}if(!i.length)return 0;let n=t.replace(/ /g,"_"),r=n+" "+i.map(e=>e.id),s=l0[r];if(s)return s.id;let o=l0[r]=oF.define({id:lH.length,name:n,props:[a$({[n]:i})]});return lH.push(o),o.id}(lK,t);function l2(e,t){lJ.indexOf(e)>-1||(lJ.push(e),console.warn(t))}function l5(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let r=e(t,i);return!!r&&(n(i.update(r)),!0)}}nv.RTL,nv.LTR;let l3=l5(function(e,t,i=t.selection.ranges){let n=[],r=-1;a:for(let{from:e,to:s}of i){let i=n.length,o=1e9,a;for(let i=e;i<=s;){let l=t.doc.lineAt(i);if(void 0==a&&!(a=l8(t,l.from).line))continue a;if(l.from>r&&(e==s||s>l.from)){r=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,i=l.text.slice(e,e+a.length)==a?e:-1;e<l.text.length&&e<o&&(o=e),n.push({line:l,comment:i,token:a,indent:e,empty:t,single:!1})}i=l.to+1}if(o<1e9)for(let e=i;e<n.length;e++)n[e].indent<n[e].line.text.length&&(n[e].indent=o);n.length==i+1&&(n[i].single=!0)}if(2!=e&&n.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:i,indent:r,empty:s,single:o}of n)(o||!s)&&e.push({from:t.from+r,insert:i+" "});let i=t.changes(e);return{changes:i,selection:t.selection.map(i,1)}}if(1!=e&&n.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:i,token:r}of n)if(i>=0){let n=t.from+i,s=n+r.length;" "==t.text[s-t.from]&&s++,e.push({from:n,to:s})}return{changes:e}}return null},0),l6=l5(l7,0),l4=l5((e,t)=>l7(e,t,function(e){let t=[];for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),r=i.to<=n.to?n:e.doc.lineAt(i.to);r.from>n.from&&r.from==i.to&&(r=i.to==n.to+1?n:e.doc.lineAt(i.to-1));let s=t.length-1;s>=0&&t[s].to>n.from?t[s].to=r.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:r.to})}return t}(t)),0);function l8(e,t){let i=e.languageDataAt("commentTokens",t,1);return i.length?i[0]:{}}function l7(e,t,i=t.selection.ranges){let n=i.map(e=>l8(t,e.from).block);if(!n.every(e=>e))return null;let r=i.map((e,i)=>(function(e,{open:t,close:i},n,r){let s,o,a=e.sliceDoc(n-50,n),l=e.sliceDoc(r,r+50),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-t.length,u)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:r+c,margin:c&&1}};r-n<=100?s=o=e.sliceDoc(n,r):(s=e.sliceDoc(n,n+50),o=e.sliceDoc(r-50,r));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-i.length;return s.slice(f,f+t.length)==t&&o.slice(p,p+i.length)==i?{open:{pos:n+f+t.length,margin:+!!/\s/.test(s.charAt(f+t.length))},close:{pos:r-d-i.length,margin:+!!/\s/.test(o.charAt(p-1))}}:null})(t,n[i],e.from,e.to));if(2!=e&&!r.every(e=>e))return{changes:t.changes(i.map((e,t)=>r[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}]))};if(1!=e&&r.some(e=>e)){let e=[];for(let t=0,i;t<r.length;t++)if(i=r[t]){let r=n[t],{open:s,close:o}=i;e.push({from:s.pos-r.open.length,to:s.pos+s.margin},{from:o.pos-o.margin,to:o.pos+r.close.length})}return{changes:e}}return null}let l9=tH.define(),he=tH.define(),ht=t_.define(),hi=t_.define({combine:e=>ie(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,n)=>e(i,n)||t(i,n)})}),hn=tE.define({create:()=>hm.empty,update(e,t){let i=t.state.facet(hi),n=t.annotation(l9);if(n){let r=hc.fromTransaction(t,n.selection),s=n.side,o=0==s?e.undone:e.done;return o=r?hu(o,o.length,i.minDepth,r):hp(o,t.startState.selection),new hm(0==s?n.rest:o,0==s?o:n.rest)}let r=t.annotation(he);if(("full"==r||"before"==r)&&(e=e.isolate()),!1===t.annotation(t2.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=hc.fromTransaction(t),o=t.annotation(t2.time),a=t.annotation(t2.userEvent);return s?e=e.addChanges(s,o,a,i,t):t.selection&&(e=e.addSelection(t.startState.selection,o,a,i.newGroupDelay)),("full"==r||"after"==r)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new hm(e.done.map(hc.fromJSON),e.undone.map(hc.fromJSON))});function hr(e={}){return[hn,hi.of(e),sq.domEventHandlers({beforeinput(e,t){let i="historyUndo"==e.inputType?ho:"historyRedo"==e.inputType?ha:null;return!!i&&(e.preventDefault(),i(t))}})]}function hs(e,t){return function({state:i,dispatch:n}){if(!t&&i.readOnly)return!1;let r=i.field(hn,!1);if(!r)return!1;let s=r.pop(e,i,t);return!!s&&(n(s),!0)}}let ho=hs(0,!1),ha=hs(1,!1),hl=hs(0,!0),hh=hs(1,!0);class hc{constructor(e,t,i,n,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=r}setSelAfter(e){return new hc(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:null==(e=this.changes)?void 0:e.toJSON(),mapped:null==(t=this.mapped)?void 0:t.toJSON(),startSelection:null==(i=this.startSelection)?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new hc(e.changes&&ty.fromJSON(e.changes),[],e.mapped&&tv.fromJSON(e.mapped),e.startSelection&&tP.fromJSON(e.startSelection),e.selectionsAfter.map(tP.fromJSON))}static fromTransaction(e,t){let i=hd;for(let t of e.startState.facet(ht)){let n=t(e);n.length&&(i=i.concat(n))}return!i.length&&e.changes.empty?null:new hc(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,hd)}static selection(e){return new hc(void 0,hd,void 0,void 0,e)}}function hu(e,t,i,n){let r=e.slice(t+1>i+20?t-i-1:0,t);return r.push(n),r}function hf(e,t){return e.length?t.length?e.concat(t):e:t}let hd=[];function hp(e,t){if(!e.length)return[hc.selection([t])];{let i=e[e.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),hu(e,e.length-1,1e9,i.setSelAfter(n)))}}function hO(e,t){if(!e.length)return e;let i=e.length,n=hd;for(;i;){let r=function(e,t,i){let n=hf(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):hd,i);if(!e.changes)return hc.selection(n);let r=e.changes.map(t),s=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(s):s;return new hc(r,t1.mapEffects(e.effects,t),o,e.startSelection.map(s),n)}(e[i-1],t,n);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,i);return t[i-1]=r,t}t=r.mapped,i--,n=r.selectionsAfter}return n.length?[hc.selection(n)]:hd}let hg=/^(input\.type|delete)($|\.)/;class hm{constructor(e,t,i=0,n){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new hm(this.done,this.undone):this}addChanges(e,t,i,n,r){var s,o;let a,l,h=this.done,c=h[h.length-1];return new hm(h=c&&c.changes&&!c.changes.empty&&e.changes&&(!i||hg.test(i))&&(!c.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(r,(s=c.changes,o=e.changes,a=[],l=!1,s.iterChangedRanges((e,t)=>a.push(e,t)),o.iterChangedRanges((e,t,i,n)=>{for(let e=0;e<a.length;){let t=a[e++],r=a[e++];n>=t&&i<=r&&(l=!0)}}),l))||"input.type.compose"==i)?hu(h,h.length-1,n.minDepth,new hc(e.changes.compose(c.changes),hf(t1.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,hd)):hu(h,h.length,n.minDepth,e),hd,t,i)}addSelection(e,t,i,n){var r;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:hd;return s.length>0&&t-this.prevTime<n&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&(r=s[s.length-1],r.ranges.length==e.ranges.length&&0===r.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length)?this:new hm(hp(this.done,e),this.undone,t,i)}addMapping(e){return new hm(hO(this.done,e),hO(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=0==e?this.done:this.undone;if(0==n.length)return null;let r=n[n.length-1],s=r.selectionsAfter[0]||(r.startSelection?r.startSelection.map(r.changes.invertedDesc,1):t.selection);if(i&&r.selectionsAfter.length){let i,o;return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:l9.of({side:e,rest:(i=n[n.length-1],(o=n.slice())[n.length-1]=i.setSelAfter(i.selectionsAfter.slice(0,i.selectionsAfter.length-1)),o),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}{if(!r.changes)return null;let i=1==n.length?hd:n.slice(0,n.length-1);return r.mapped&&(i=hO(i,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:l9.of({side:e,rest:i,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}hm.empty=new hm(hd,hd);let hv=[{key:"Mod-z",run:ho,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:ha,preventDefault:!0},{linux:"Ctrl-Shift-z",run:ha,preventDefault:!0},{key:"Mod-u",run:hl,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:hh,preventDefault:!0}];function hy(e,t){return tP.create(e.ranges.map(t),e.mainIndex)}function hw(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function hb({state:e,dispatch:t},i){let n=hy(e.selection,i);return!n.eq(e.selection,!0)&&(t(hw(e,n)),!0)}function hx(e,t){return tP.cursor(t?e.to:e.from)}function hS(e,t){return hb(e,i=>i.empty?e.moveByChar(i,t):hx(i,t))}function hk(e){return e.textDirectionAt(e.state.selection.main.head)==nv.LTR}let hQ=e=>hS(e,!hk(e)),h$=e=>hS(e,hk(e));function hP(e,t){return hb(e,i=>i.empty?e.moveByGroup(i,t):hx(i,t))}function hA(e,t,i){let n,r,s=aJ(e).resolveInner(t.head),o=i?oN.closedBy:oN.openedBy;for(let n=t.head;;){let t=i?s.childAfter(n):s.childBefore(n);if(!t)break;!function(e,t,i){if(t.type.prop(i))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,o)?n=i?t.to:t.from:s=t}return r=s.type.prop(o)&&(n=i?lG(e,s.from,1):lG(e,s.to,-1))&&n.matched?i?n.end.to:n.end.from:i?s.to:s.from,tP.cursor(r,i?-1:1)}function hC(e,t){return hb(e,i=>{if(!i.empty)return hx(i,t);let n=e.moveVertically(i,t);return n.head!=i.head?n:e.moveToLineBoundary(i,t)})}"u">typeof Intl&&Intl.Segmenter;let h_=e=>hC(e,!1),hT=e=>hC(e,!0);function hM(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,i=0,n=0,r;if(t){for(let t of e.state.facet(sq.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(i=Math.max(null==r?void 0:r.top,i)),(null==r?void 0:r.bottom)&&(n=Math.max(null==r?void 0:r.bottom,n))}r=e.scrollDOM.clientHeight-i-n}else r=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:i,marginBottom:n,selfScroll:t,height:Math.max(e.defaultLineHeight,r-5)}}function hZ(e,t){let i,n=hM(e),{state:r}=e,s=hy(r.selection,i=>i.empty?e.moveVertically(i,t,n.height):hx(i,t));if(s.eq(r.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;t&&t.top>a&&t.bottom<l&&(i=sq.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(hw(r,s),{effects:i}),!0}let hR=e=>hZ(e,!1),hX=e=>hZ(e,!0);function hE(e,t,i){let n=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,i);if(r.head==t.head&&r.head!=(i?n.to:n.from)&&(r=e.moveToLineBoundary(t,i,!1)),!i&&r.head==n.from&&n.length){let i=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&t.head!=n.from+i&&(r=tP.cursor(n.from+i))}return r}let hj=e=>hb(e,t=>hE(e,t,!0)),hB=e=>hb(e,t=>hE(e,t,!1));function hL(e,t,i){let n=hy(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=tP.range(e.head,e.anchor));let n=i(e);return tP.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return!n.eq(e.state.selection)&&(e.dispatch(hw(e.state,n)),!0)}function hI(e,t){return hL(e,t,i=>e.moveByChar(i,t))}let hz=e=>hI(e,!hk(e)),hY=e=>hI(e,hk(e));function hV(e,t){return hL(e,t,i=>e.moveByGroup(i,t))}function hW(e,t){return hL(e,t,i=>e.moveVertically(i,t))}let hD=e=>hW(e,!1),hq=e=>hW(e,!0);function hN(e,t){return hL(e,t,i=>e.moveVertically(i,t,hM(e).height))}let hU=e=>hN(e,!1),hG=e=>hN(e,!0),hF=({state:e,dispatch:t})=>(t(hw(e,{anchor:0})),!0),hK=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.doc.length})),!0),hH=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.selection.main.anchor,head:0})),!0),hJ=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function h0(e,t){let{state:i}=e,n=i.selection,r=i.selection.ranges.slice();for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head);if(t?s.to<e.state.doc.length:s.from>0)for(let i=n;;){let n=e.moveVertically(i,t);if(n.head<s.from||n.head>s.to){r.some(e=>e.head==n.head)||r.push(n);break}if(n.head==i.head)break;i=n}}return r.length!=n.ranges.length&&(e.dispatch(hw(i,tP.create(r,r.length-1))),!0)}function h1(e,t){if(e.state.readOnly)return!1;let i="delete.selection",{state:n}=e,r=n.changeByRange(n=>{let{from:r,to:s}=n;if(r==s){let o=t(n);o<r?(i="delete.backward",o=h2(e,o,!1)):o>r&&(i="delete.forward",o=h2(e,o,!0)),r=Math.min(r,o),s=Math.max(s,o)}else r=h2(e,r,!1),s=h2(e,s,!0);return r==s?{range:n}:{changes:{from:r,to:s},range:tP.cursor(r,r<n.head?-1:1)}});return!r.changes.empty&&(e.dispatch(n.update(r,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?sq.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function h2(e,t,i){if(e instanceof sq)for(let n of e.state.facet(sq.atomicRanges).map(t=>t(e)))n.between(t,t,(e,n)=>{e<t&&n>t&&(t=i?n:e)});return t}let h5=(e,t,i)=>h1(e,n=>{let r=n.from,{state:s}=e,o=s.doc.lineAt(r),a,l;if(i&&!t&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,r-o.from))){if(" "==a[a.length-1])return r-1;let e=ib(a,s.tabSize)%ln(s)||ln(s);for(let t=0;t<e&&" "==a[a.length-1-t];t++)r--;l=r}else(l=tf(o.text,r-o.from,t,t)+o.from)==r&&o.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,r-o.from))&&(l=tf(o.text,l-o.from,!1,!1)+o.from);return l}),h3=e=>h5(e,!1,!0),h6=e=>h5(e,!0,!1),h4=(e,t)=>h1(e,i=>{let n=i.head,{state:r}=e,s=r.doc.lineAt(n),o=r.charCategorizer(n);for(let e=null;;){if(n==(t?s.to:s.from)){n==i.head&&s.number!=(t?r.doc.lines:1)&&(n+=t?1:-1);break}let a=tf(s.text,n-s.from,t)+s.from,l=s.text.slice(Math.min(n,a)-s.from,Math.max(n,a)-s.from),h=o(l);if(null!=e&&h!=e)break;(" "!=l||n!=i.head)&&(e=h),n=a}return n}),h8=e=>h4(e,!1);function h7(e){let t=[],i=-1;for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),s=e.doc.lineAt(n.to);if(n.empty||n.to!=s.from||(s=e.doc.lineAt(n.to-1)),i>=r.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(n)}else t.push({from:r.from,to:s.to,ranges:[n]});i=s.number+1}return t}function h9(e,t,i){if(e.readOnly)return!1;let n=[],r=[];for(let t of h7(e)){if(i?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(i?t.to+1:t.from-1),o=s.length+1;if(i)for(let i of(n.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak}),t.ranges))r.push(tP.range(Math.min(e.doc.length,i.anchor+o),Math.min(e.doc.length,i.head+o)));else for(let i of(n.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text}),t.ranges))r.push(tP.range(i.anchor-o,i.head-o))}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:tP.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function ce(e,t,i){if(e.readOnly)return!1;let n=[];for(let t of h7(e))i?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let r=e.changes(n);return t(e.update({changes:r,selection:e.selection.map(r,i?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}let ct=cn(!1),ci=cn(!0);function cn(e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{let{from:n,to:r}=i,s=t.doc.lineAt(n),o=!e&&n==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let i=aJ(e).resolveInner(t),n=i.childBefore(t),r=i.childAfter(t),s;return n&&r&&n.to<=t&&r.from>=t&&(s=n.type.prop(oN.closedBy))&&s.indexOf(r.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(n.to,r.from))?{from:n.to,to:r.from}:null}(t,n);e&&(n=r=(r<=s.to?s:t.doc.lineAt(r)).to);let a=new lo(t,{simulateBreak:n,simulateDoubleBreak:!!o}),l=ls(a,n);for(null==l&&(l=ib(/^\s*/.exec(t.doc.lineAt(n).text)[0],t.tabSize));r<s.to&&/\s/.test(s.text[r-s.from]);)r++;o?{from:n,to:r}=o:n>s.from&&n<s.from+100&&!/\S/.test(s.text.slice(0,n))&&(n=s.from);let h=["",lr(t,l)];return o&&h.push(lr(t,a.lineIndent(s.from,-1))),{changes:{from:n,to:r,insert:tn.of(h)},range:tP.cursor(n+1+h[1].length)}});return i(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function cr(e,t){let i=-1;return e.changeByRange(n=>{let r=[];for(let s=n.from;s<=n.to;){let o=e.doc.lineAt(s);o.number>i&&(n.empty||n.to>o.from)&&(t(o,r,n),i=o.number),s=o.to+1}let s=e.changes(r);return{changes:r,range:tP.range(s.mapPos(n.anchor,1),s.mapPos(n.head,1))}})}let cs=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Object.create(null),n=new lo(e,{overrideIndentation:e=>{let t=i[e];return null==t?-1:t}}),r=cr(e,(t,r,s)=>{let o=ls(n,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=lr(e,o);(a!=l||s.from<t.from+a.length)&&(i[t.from]=o,r.push({from:t.from,to:t.from+a.length,insert:l}))});return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0},co=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cr(e,(t,i)=>{i.push({from:t.from,insert:e.facet(li)})}),{userEvent:"input.indent"})),!0),ca=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cr(e,(t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let r=ib(n,e.tabSize),s=0,o=lr(e,Math.max(0,r-ln(e)));for(;s<n.length&&s<o.length&&n.charCodeAt(s)==o.charCodeAt(s);)s++;i.push({from:t.from+s,to:t.from+n.length,insert:o.slice(s)})}),{userEvent:"delete.dedent"})),!0),cl=[{key:"Ctrl-b",run:hQ,shift:hz,preventDefault:!0},{key:"Ctrl-f",run:h$,shift:hY},{key:"Ctrl-p",run:h_,shift:hD},{key:"Ctrl-n",run:hT,shift:hq},{key:"Ctrl-a",run:e=>hb(e,t=>tP.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>hL(e,!1,t=>tP.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>hb(e,t=>tP.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>hL(e,!0,t=>tP.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:h6},{key:"Ctrl-h",run:h3},{key:"Ctrl-k",run:e=>h1(e,t=>{let i=e.lineBlockAt(t.head).to;return t.head<i?i:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:h8},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:tn.of(["",""])},range:tP.cursor(e.from)}));return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let i=t.from,n=e.doc.lineAt(i),r=i==n.from?i-1:tf(n.text,i-n.from,!1)+n.from,s=i==n.to?i+1:tf(n.text,i-n.from,!0)+n.from;return{changes:{from:r,to:s,insert:e.doc.slice(i,s).append(e.doc.slice(r,i))},range:tP.cursor(s)}});return!i.changes.empty&&(t(e.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:hX}],ch=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>hb(e,t=>hA(e.state,t,!hk(e))),shift:e=>{let t=!hk(e);return hL(e,t,i=>hA(e.state,i,t))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>hb(e,t=>hA(e.state,t,hk(e))),shift:e=>{let t=hk(e);return hL(e,t,i=>hA(e.state,i,t))}},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>h9(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>ce(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>h9(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>ce(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>h0(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>h0(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let i=e.selection,n=null;return i.ranges.length>1?n=tP.create([i.main]):i.main.empty||(n=tP.create([tP.cursor(i.main.head)])),!!n&&(t(hw(e,n)),!0)}},{key:"Mod-Enter",run:ci},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let i=h7(e).map(({from:t,to:i})=>tP.undirectionalRange(t,Math.min(i+1,e.doc.length)));return t(e.update({selection:tP.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let i=hy(e.selection,t=>{let i=aJ(e),n=i.resolveStack(t.from,1);if(t.empty){let e=i.resolveStack(t.from,-1);e.node.from>=n.node.from&&e.node.to<=n.node.to&&(n=e)}for(let e=n;e;e=e.next){let{node:i}=e;if((i.from<t.from&&i.to>=t.to||i.to>t.to&&i.from<=t.from)&&e.next)return tP.undirectionalRange(i.from,i.to)}return t});return!i.eq(e.selection)&&(t(hw(e,i)),!0)},preventDefault:!0},{key:"Mod-[",run:ca},{key:"Mod-]",run:co},{key:"Mod-Alt-\\",run:cs},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,i=t.changes(h7(t).map(({from:e,to:i})=>(e>0?e--:i<t.doc.length&&i++,{from:e,to:i}))),n=hy(t.selection,t=>{let i;if(e.lineWrapping){let n=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(i=n.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,i)}).map(i);return e.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let i,n;return i=!1,n=hy(e.selection,t=>{let n=lG(e,t.head,-1)||lG(e,t.head,1)||t.head>0&&lG(e,t.head-1,1)||t.head<e.doc.length&&lG(e,t.head+1,-1);if(!n||!n.end)return t;i=!0;let r=n.start.from==t.head?n.end.to:n.end.from;return tP.cursor(r)}),!!i&&(t(hw(e,n)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,i=t.doc.lineAt(t.selection.main.from),n=l8(e.state,i.from);return n.line?l3(e):!!n.block&&l4(e)}},{key:"Alt-A",mac:"Ctrl-A",run:l6},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:hQ,shift:hz,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>hP(e,!hk(e)),shift:e=>hV(e,!hk(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>hb(e,t=>hE(e,t,!hk(e))),shift:e=>{let t=!hk(e);return hL(e,t,i=>hE(e,i,t))},preventDefault:!0},{key:"ArrowRight",run:h$,shift:hY,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>hP(e,hk(e)),shift:e=>hV(e,hk(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>hb(e,t=>hE(e,t,hk(e))),shift:e=>{let t=hk(e);return hL(e,t,i=>hE(e,i,t))},preventDefault:!0},{key:"ArrowUp",run:h_,shift:hD,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hF,shift:hH},{mac:"Ctrl-ArrowUp",run:hR,shift:hU},{key:"ArrowDown",run:hT,shift:hq,preventDefault:!0},{mac:"Cmd-ArrowDown",run:hK,shift:hJ},{mac:"Ctrl-ArrowDown",run:hX,shift:hG},{key:"PageUp",run:hR,shift:hU},{key:"PageDown",run:hX,shift:hG},{key:"Home",run:hB,shift:e=>hL(e,!1,t=>hE(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:hF,shift:hH},{key:"End",run:hj,shift:e=>hL(e,!0,t=>hE(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:hK,shift:hJ},{key:"Enter",run:ct,shift:ct},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:h3,shift:h3,preventDefault:!0},{key:"Delete",run:h6,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:h8,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>h4(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>h1(e,t=>{let i=e.moveToLineBoundary(t,!1).head;return t.head>i?i:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>h1(e,t=>{let i=e.moveToLineBoundary(t,!0).head;return t.head<i?i:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(cl.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),cc={key:"Tab",run:co,shift:ca},cu=lM.define([{tag:aq.keyword,class:"hl-keyword"},{tag:aq.definitionKeyword,class:"hl-keyword"},{tag:aq.controlKeyword,class:"hl-keyword"},{tag:aq.moduleKeyword,class:"hl-module-keyword"},{tag:aq.operatorKeyword,class:"hl-operator"},{tag:aq.string,class:"hl-string"},{tag:aq.number,class:"hl-number"},{tag:aq.integer,class:"hl-number"},{tag:aq.float,class:"hl-number"},{tag:aq.bool,class:"hl-constant"},{tag:aq.null,class:"hl-constant"},{tag:aq.comment,class:"hl-comment"},{tag:aq.lineComment,class:"hl-comment"},{tag:aq.blockComment,class:"hl-comment"},{tag:aq.variableName,class:"hl-name"},{tag:aq.function(aq.variableName),class:"hl-function"},{tag:aq.definition(aq.variableName),class:"hl-name"},{tag:aq.propertyName,class:"hl-name"},{tag:aq.className,class:"hl-class"},{tag:aq.typeName,class:"hl-type"},{tag:aq.operator,class:"hl-operator"},{tag:aq.punctuation,class:"hl-punctuation"},{tag:aq.regexp,class:"hl-regexp"},{tag:aq.escape,class:"hl-escape"},{tag:aq.tagName,class:"hl-tag"},{tag:aq.attributeName,class:"hl-attr"}]);class cf{constructor(e,t,i,n,r,s,o,a,l,h=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=r,this.score=s,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new cf(e,[],t,i,i,0,[],0,n?new cd(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=65535&e,{parser:r}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=r.dynamicPrecedence(n);if(o&&(this.score+=o),0==i){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(n,this.reducePos);return}let a=this.stack.length-(i-1)*3-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let h=this.reducePos-l;h>=2e3&&!(null==(t=this.p.parser.nodeSet.types[n])?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=h));let c=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-c;if(n<r.minRepeatTerm||131072&e){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,l,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(n,l)}storeNode(e,t,i,n=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&0==this.buffer[e-4]&&this.buffer[e-1]>-1){if(t==i)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=i;return}}}if(r&&this.pos!=i){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let e=!1;for(let t=r;t>0&&this.buffer[t-2]>i;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,n>4&&(n-=4)}this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=i,this.buffer[r+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i,n){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:r}=this.p;this.pos=n;let s=r.stateFlag(e,1);!s&&(n>i||t<=r.maxNode)&&(this.reducePos=n),this.pushState(e,s?i:Math.min(i,this.reducePos)),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,n,4)}else this.pos=n,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,n,4)}apply(e,t,i,n){65536&e?this.reduce(e):this.shift(e,t,i,n)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&0==e.buffer[t-4]&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new cf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new cp(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==i)return!1;if((65536&i)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n=0,r;n<t.length;n+=2)(r=t[n+1])!=this.state&&this.p.parser.hasAction(r,e)&&i.push(t[n],r);if(this.stack.length<120)for(let e=0;i.length<8&&e<t.length;e+=2){let n=t[e+1];i.some((e,t)=>1&t&&e==n)||i.push(t[e],n)}t=i}let i=[];for(let e=0;e<t.length&&i.length<4;e+=2){let n=t[e+1];if(n==this.state)continue;let r=this.split();r.pushState(n,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[e],this.pos),r.reducePos=this.pos,r.score-=200,i.push(r)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let i=t>>19,n=65535&t,r=this.stack.length-3*i;if(r<0||0>e.getGoto(this.stack[r],n,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(n,r)=>{if(!t.includes(n))return t.push(n),e.allActions(n,t=>{if(393216&t);else if(65536&t){let i=(t>>19)-r;if(i>1){let n=65535&t,r=this.stack.length-3*i;if(r>=0&&e.getGoto(this.stack[r],n,!1)>=0)return i<<19|65536|n}}else{let e=i(t,r+1);if(null!=e)return e}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new cd(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class cd{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class cp{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=i}}class cO{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new cO(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new cO(this.stack,this.pos,this.index)}}function cg(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,r=0;n<e.length;){let s=0;for(;;){let t=e.charCodeAt(n++),i=!1;if(126==t){s=65535;break}t>=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,i=!0),s+=r,i)break;s*=46}i?i[r++]=s:i=new t(s)}return i}class cm{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let cv=new cm;class cy{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cv,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,r=this.pos+e;for(;r<i.from;){if(!n)return null;let e=this.ranges[--n];r-=i.from-e.to,i=e}for(;t<0?r>i.to:r>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];r+=e.from-i.to,i=e}return r}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,n;if(t>=0&&t<this.chunk.length)i=this.pos+e,n=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((i=t)>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=i;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-i)),n=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),n}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=cv,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class cw{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;cS(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}cw.prototype.contextual=cw.prototype.fallback=cw.prototype.extend=!1;class cb{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data="string"==typeof e?cg(e):e}token(e,t){let i=e.pos,n=0;for(;;){let i=e.next<0,r=e.resolveOffset(1,1);if(cS(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!i&&n++,null==r)break;e.reset(r,e.token)}n&&(e.reset(i,e.token),e.acceptToken(this.elseToken,n))}}cb.prototype.contextual=cw.prototype.fallback=cw.prototype.extend=!1;class cx{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function cS(e,t,i,n,r,s){let o=0,a=1<<n,{dialect:l}=i.p.parser;o:for(;(a&e[o])!=0;){let i=e[o+1];for(let n=o+3;n<i;n+=2)if((e[n+1]&a)>0){let i=e[n];if(l.allows(i)&&(-1==t.token.value||t.token.value==i||function(e,t,i,n){let r=ck(i,n,t);return r<0||ck(i,n,e)<r}(i,t.token.value,r,s))){t.acceptToken(i);break}}let n=t.next,h=0,c=e[o+2];if(t.next<0&&c>h&&65535==e[i+3*c-3]){o=e[i+3*c-1];continue}for(;h<c;){let r=h+c>>1,s=i+r+(r<<1),a=e[s],l=e[s+1]||65536;if(n<a)c=r;else if(n>=l)h=r+1;else{o=e[s+2],t.advance();continue o}}break}}function ck(e,t,i){for(let n=t,r;65535!=(r=e[n]);n++)if(r==i)return n-t;return -1}let cQ="u">typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),c$=null;function cP(e,t,i){let n=e.cursor(Q.IncludeAnonymous);for(n.moveTo(t);;)if(!(i<0?n.childBefore(t):n.childAfter(t)))for(;;){if((i<0?n.to<t:n.from>t)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:e.length}}class cA{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?cP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?cP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],n=this.index[t];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=i.children[n],s=this.start[t]+i.positions[n];if(s>e)return this.nextStart=s,null;if(r instanceof o0){if(s==e){if(s<this.safeFrom)return null;let e=s+r.length;if(e<=this.safeTo){let t=r.prop(oN.lookAhead);if(!t||e+t<this.fragment.to)return r}}this.index[t]++,s+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class cC{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new cm)}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:r}=n,s=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let n=0;n<r.length;n++){if((1<<n&s)==0)continue;let l=r[n],h=this.tokens[n];if((!i||l.fallback)&&((l.contextual||h.start!=e.pos||h.mask!=s||h.context!=o)&&(this.updateCachedToken(h,l,e),h.mask=s,h.context=o),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!l.extend&&(i=h,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||((i=new cm).value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new cm,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let r=t.specializers[n](this.stream.read(e.start,e.end),i);if(r>=0&&i.p.parser.dialect.allows(r>>1)){(1&r)==0?e.value=r>>1:e.extended=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t<n;t+=3)if(this.actions[t]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=i,n}addActions(e,t,i,n){let{state:r}=e,{parser:s}=e.p,{data:o}=s;for(let e=0;e<2;e++)for(let a=s.stateSlot(r,e?2:1);;a+=3){if(65535==o[a])if(1==o[a+1])a=cE(o,a+2);else{0==n&&2==o[a+1]&&(n=this.putAction(cE(o,a+2),t,i,n));break}o[a]==t&&(n=this.putAction(cE(o,a+1),t,i,n))}return n}}class c_{constructor(e,t,i,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new cy(t,n),this.tokens=new cC(e,this.stream),this.topTerm=e.top[1];let{from:r}=n[0];this.stacks=[cf.start(this,e.top[0],r)],this.fragments=i.length&&this.stream.end-r>4*e.bufferLength?new cA(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[e]=i;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<i.length;s++){let o=i[s];for(;;){if(this.tokens.mainToken=null,o.pos>n)r.push(o);else{if(this.advanceStack(o,r,i))continue;e||(e=[],t=[]),e.push(o);let n=this.tokens.getMainToken(o);t.push(n.value,n.end)}break}}if(!r.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.score<i.score)&&(t=i)}return t}(e);if(t)return cQ&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw cQ&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let i=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,r);if(i)return cQ&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort((e,t)=>t.score-e.score);r.length>e;)r.pop();r.some(e=>e.reducePos>n)&&this.recovering--}else if(r.length>1){l:for(let e=0;e<r.length-1;e++){let t=r[e];for(let i=e+1;i<r.length;i++){let n=r[i];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500)if((t.score-n.score||t.buffer.length-n.buffer.length)>0)r.splice(i--,1);else{r.splice(e--,1);continue l}}}r.length>12&&(r.sort((e,t)=>t.score-e.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let e=1;e<r.length;e++)r[e].pos<this.minStackPos&&(this.minStackPos=r[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let n=e.pos,{parser:r}=this,s=cQ?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(e.state,o.type.id):-1;if(n>-1&&o.length&&(!t||(o.prop(oN.contextHash)||0)==i))return e.useNode(o,n),cQ&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof o0)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(a instanceof o0&&0==o.positions[0])o=a;else break}}let o=r.stateSlot(e.state,4);if(o>0)return e.reduce(o),cQ&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(65535&o)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;o<a.length;){let l=a[o++],h=a[o++],c=a[o++],u=o==a.length||!i,f=u?e:e.split(),d=this.tokens.mainToken;if(f.apply(l,h,d?d.start:f.pos,c),cQ&&console.log(s+this.stackID(f)+` (via ${(65536&l)==0?"shift":`reduce of ${r.getName(65535&l)}`} for ${r.getName(h)} @ ${n}${f==e?"":", split"})`),u)return!0;f.pos>n?t.push(f):i.push(f)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return cT(e,t),!0}}runRecovery(e,t,i){let n=null,r=!1;for(let s=0;s<e.length;s++){let o=e[s],a=t[s<<1],l=t[(s<<1)+1],h=cQ?this.stackID(o)+" -> ":"";if(o.deadEnd&&(r||(r=!0,o.restart(),cQ&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let c=o.split(),u=h;for(let e=0;e<10&&c.forceReduce()&&(cQ&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));e++)cQ&&(u=this.stackID(c)+" -> ");for(let e of o.recoverByInsert(a))cQ&&console.log(h+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),cQ&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),cT(o,i)):(!n||n.score<c.score)&&(n=c)}return n}stackToTree(e){return e.close(),o0.build({buffer:cO.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(c$||(c$=new WeakMap)).get(e);return t||c$.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function cT(e,t){for(let i=0;i<t.length;i++){let n=t[i];if(n.pos==e.pos&&n.sameState(e)){t[i].score<e.score&&(t[i]=e);return}}t.push(e)}class cM{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||0==this.disabled[e]}}let cZ=e=>e;class cR{constructor(e){this.start=e.start,this.shift=e.shift||cZ,this.reduce=e.reduce||cZ,this.reuse=e.reuse||cZ,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class cX extends ac{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let i=0;i<e.repeatNodeCount;i++)t.push("");let i=Object.keys(e.topRules).map(t=>e.topRules[t][1]),n=[];for(let e=0;e<t.length;e++)n.push([]);function r(e,t,i){n[e].push([t,t.deserialize(String(i))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=oN[e]);for(let i=1;i<t.length;){let n=t[i++];if(n>=0)r(n,e,t[i++]);else{let s=t[i+-n];for(let o=-n;o>0;o--)r(t[i++],e,s);i++}}}this.nodeSet=new oK(t.map((t,r)=>oF.define({name:r>=this.minRepeatTerm?void 0:t,id:r,props:n[r],top:i.indexOf(r)>-1,error:0==r,skipped:e.skippedNodes&&e.skippedNodes.indexOf(r)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let s=cg(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(cj),this.states=cg(e.states,Uint32Array),this.data=cg(e.stateData),this.goto=cg(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new cw(s,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new c_(this,e,t,i);for(let r of this.wrappers)n=r(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return -1;for(let r=n[t+1];;){let t=n[r++],s=1&t,o=n[r++];if(s&&i)return o;for(let i=r+(t>>1);r<i;r++)if(n[r]==e)return o;if(s)return -1}}hasAction(e,t){let i=this.data;for(let n=0;n<2;n++)for(let r=this.stateSlot(e,n?2:1),s;;r+=3){if(65535==(s=i[r]))if(1==i[r+1])s=i[r=cE(i,r+2)];else if(2==i[r+1])return cE(i,r+2);else break;if(s==t||0==s)return cE(i,r+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let i=this.stateSlot(e,1);null==n;i+=3){if(65535==this.data[i])if(1==this.data[i+1])i=cE(this.data,i+2);else break;n=t(cE(this.data,i+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i])if(1==this.data[i+1])i=cE(this.data,i+2);else break;if((1&this.data[i+2])==0){let e=this.data[i+1];t.some((t,i)=>1&i&&t==e)||t.push(this.data[i],e)}}return t}configure(e){let t=Object.assign(Object.create(cX.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(e=>e.from==t);return i?i.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,n)=>{let r=e.specializers.find(e=>e.from==i.external);if(!r)return i;let s=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[n]=cj(s),s})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;e<t.length;e++)if(!i[e])for(let i=this.dialects[t[e]],r;65535!=(r=this.data[i++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[r]=1;return new cM(e,i,n)}static deserialize(e){return new cX(e)}}function cE(e,t){return e[t]|e[t+1]<<16}function cj(e){if(e.external){let t=+!!e.extend;return(i,n)=>e.external(i,n)<<1|t}return e.get}let cB=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],cL=new cR({start:!1,shift:(e,t)=>5==t||6==t||320==t?e:321==t,strict:!1}),cI=new cx((e,t)=>{let{next:i}=e;(125==i||-1==i||t.context)&&e.acceptToken(318)},{contextual:!0,fallback:!0}),cz=new cx((e,t)=>{let{next:i}=e,n;cB.indexOf(i)>-1||(47!=i||47!=(n=e.peek(1))&&42!=n)&&(125==i||59==i||-1==i||t.context||e.acceptToken(316))},{contextual:!0}),cY=new cx((e,t)=>{91!=e.next||t.context||e.acceptToken(317)},{contextual:!0}),cV=new cx((e,t)=>{let{next:i}=e;if(43==i||45==i){if(e.advance(),i==e.next){e.advance();let i=!t.context&&t.canShift(1);e.acceptToken(i?1:2)}}else 63==i&&46==e.peek(1)&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(3))},{contextual:!0});function cW(e,t){return e>=65&&e<=90||e>=97&&e<=122||95==e||e>=192||!t&&e>=48&&e<=57}let cD=new cx((e,t)=>{if(60!=e.next||!t.dialectEnabled(0)||(e.advance(),47==e.next))return;let i=0;for(;cB.indexOf(e.next)>-1;)e.advance(),i++;if(cW(e.next,!0)){for(e.advance(),i++;cW(e.next,!1);)e.advance(),i++;for(;cB.indexOf(e.next)>-1;)e.advance(),i++;if(44==e.next)return;for(let t=0;;t++){if(7==t){if(!cW(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),i++}}e.acceptToken(4,-i)}),cq=a$({"get set async static":aq.modifier,"for while do if else switch try catch finally return throw break continue default case defer":aq.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":aq.operatorKeyword,"let var const using function class extends":aq.definitionKeyword,"import export from":aq.moduleKeyword,"with debugger new":aq.keyword,TemplateString:aq.special(aq.string),super:aq.atom,BooleanLiteral:aq.bool,this:aq.self,null:aq.null,Star:aq.modifier,VariableName:aq.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":aq.function(aq.variableName),VariableDefinition:aq.definition(aq.variableName),Label:aq.labelName,PropertyName:aq.propertyName,PrivatePropertyName:aq.special(aq.propertyName),"CallExpression/MemberExpression/PropertyName":aq.function(aq.propertyName),"FunctionDeclaration/VariableDefinition":aq.function(aq.definition(aq.variableName)),"ClassDeclaration/VariableDefinition":aq.definition(aq.className),"NewExpression/VariableName":aq.className,PropertyDefinition:aq.definition(aq.propertyName),PrivatePropertyDefinition:aq.definition(aq.special(aq.propertyName)),UpdateOp:aq.updateOperator,"LineComment Hashbang":aq.lineComment,BlockComment:aq.blockComment,Number:aq.number,String:aq.string,Escape:aq.escape,ArithOp:aq.arithmeticOperator,LogicOp:aq.logicOperator,BitOp:aq.bitwiseOperator,CompareOp:aq.compareOperator,RegExp:aq.regexp,Equals:aq.definitionOperator,Arrow:aq.function(aq.punctuation),": Spread":aq.punctuation,"( )":aq.paren,"[ ]":aq.squareBracket,"{ }":aq.brace,"InterpolationStart InterpolationEnd":aq.special(aq.brace),".":aq.derefOperator,", ;":aq.separator,"@":aq.meta,TypeName:aq.typeName,TypeDefinition:aq.definition(aq.typeName),"type enum interface implements namespace module declare":aq.definitionKeyword,"abstract global Privacy readonly override":aq.modifier,"is keyof unique infer asserts":aq.operatorKeyword,JSXAttributeValue:aq.attributeValue,JSXText:aq.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":aq.angleBracket,"JSXIdentifier JSXNameSpacedName":aq.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":aq.attributeName,"JSXBuiltin/JSXIdentifier":aq.standard(aq.tagName)}),cN={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},cU={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},cG={__proto__:null,"<":193},cF=cX.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0L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Q1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:cL,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[cq],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q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1},{term:95,get:e=>cG[e]||-1}],tokenPrec:15201});class cK{constructor(e,t,i,n){this.state=e,this.pos=t,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=aJ(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),n=t.text.slice(i-t.from,this.pos-t.from),r=n.search(c2(e,!1));return r<0?null:{from:i+r,to:this.pos,text:n.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,i){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function cH(e){let t=Object.keys(e).join(""),i=/\w/.test(t);return i&&(t=t.replace(/\w/g,"")),`[${i?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function cJ(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[i,n]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),i=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e<n.length;e++)i[n[e]]=!0}let n=cH(t)+cH(i)+"*$";return[RegExp("^"+n),new RegExp(n)]}(t);return e=>{let r=e.matchBefore(n);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:i}:null}}class c0{constructor(e,t,i,n){this.completion=e,this.source=t,this.match=i,this.score=n}}function c1(e){return e.selection.main.from}function c2(e,t){var i;let{source:n}=e,r=t&&"^"!=n[0],s="$"!=n[n.length-1];return r||s?RegExp(`${r?"^":""}(?:${n})${s?"$":""}`,null!=(i=e.flags)?i:e.ignoreCase?"i":""):e}let c5=tH.define(),c3=new WeakMap;function c6(e){if(!Array.isArray(e))return e;let t=c3.get(e);return t||c3.set(e,t=cJ(e)),t}let c4=t1.define(),c8=t1.define();class c7{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let i=td(e,t),n=tO(i);this.chars.push(i);let r=e.slice(t,t+n),s=r.toUpperCase();this.folded.push(td(s==r?r.toLowerCase():s,0)),t+=n}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:i,any:n,precise:r,byWord:s}=this;if(1==t.length){let n=td(e,0),r=tO(n),s=r==e.length?0:-100;if(n==t[0]);else{if(n!=i[0])return null;s+=-200}return this.ret(s,[0,r])}let o=e.indexOf(this.pattern);if(0==o)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(o<0){for(let r=0,s=Math.min(e.length,200);r<s&&l<a;){let s=td(e,r);(s==t[l]||s==i[l])&&(n[l++]=r),r+=tO(s)}if(l<a)return null}let h=0,c=0,u=!1,f=0,d=-1,p=-1,O=/[a-z]/.test(e),g=!0;for(let n=0,l=Math.min(e.length,200),m=0;n<l&&c<a;){let l=td(e,n);o<0&&(h<a&&l==t[h]&&(r[h++]=n),f<a&&(l==t[f]||l==i[f]?(0==f&&(d=n),p=n+1,f++):f=0));let v,y=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(v=tp(l))!=v.toLowerCase()?1:2*(v!=v.toUpperCase());(!n||1==y&&O||0==m&&0!=y)&&(t[c]==l||i[c]==l&&(u=!0)?s[c++]=n:s.length&&(g=!1)),m=y,n+=tO(l)}return c==a&&0==s[0]&&g?this.result(-100+(u?-200:0),s,e):f==a&&0==d?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==a?this.ret(-900-e.length,[d,p]):c==a?this.result(-100+(u?-200:0)+-700+(g?0:-1100),s,e):2==t.length?null:this.result((n[0]?-700:0)+-200+-1100,n,e)}result(e,t,i){let n=[],r=0;for(let e of t){let t=e+(this.astral?tO(td(i,e)):1);r&&n[r-1]==e?n[r-1]=t:(n[r++]=e,n[r++]=t)}return this.ret(e-i.length,n)}}class c9{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),i=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==i?null:(this.matched=[0,t.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}let ue=t_.define({combine:e=>ie(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:ui,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>ut(e(i),t(i)),optionClass:(e,t)=>i=>ut(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function ut(e,t){return e?t?e+" "+t:e:t}function ui(e,t,i,n,r,s){let o=e.textDirection==nv.RTL,a=o,l=!1,h="top",c,u,f=t.left-r.left,d=r.right-t.right,p=n.right-n.left,O=n.bottom-n.top;if(a&&f<Math.min(p,d)?a=!1:!a&&d<Math.min(p,f)&&(a=!0),p<=(a?f:d))c=Math.max(r.top,Math.min(i.top,r.bottom-O))-t.top,u=Math.min(400,a?f:d);else{l=!0,u=Math.min(400,(o?t.right:r.right-t.left)-30);let e=r.bottom-t.bottom;e>=O||e>t.top?c=i.bottom-t.top:(h="bottom",c=t.bottom-i.top)}let g=(t.bottom-t.top)/s.offsetHeight,m=(t.right-t.left)/s.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${u/m}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}let un=t1.define();function ur(e,t,i){if(e<=i)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/i);return{from:e*i,to:(e+1)*i}}let n=Math.ceil((e-t)/i);return{from:e-n*i,to:e-(n-1)*i}}class us{constructor(e,t,i){let n;this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:s,selected:o}=r.open,a=e.state.facet(ue);this.optionContent=(n=a.addToOptions.slice(),a.icons&&n.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),n.push({render(e,t,i,n){let r=document.createElement("span");r.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;e<n.length;){let t=n[e++],i=n[e++];t>o&&r.appendChild(document.createTextNode(s.slice(o,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,i))),a.className="cm-completionMatchedText",o=i}return o<s.length&&r.appendChild(document.createTextNode(s.slice(o))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),n.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=ur(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",i=>{let{options:n}=e.state.field(t).open;for(let t=i.target,r;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(r=/-(\d+)$/.exec(t.id))&&+r[1]<n.length){this.applyCompletion(e,n[+r[1]]),i.preventDefault();return}if(i.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&i.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&i.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:un.of(t)}),i.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let i=e.state.field(this.stateField,!1);i&&i.tooltip&&e.state.facet(ue).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:c8.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=n){let{options:r,selected:s,disabled:o}=i.open;n.open&&n.open.options==r||(this.range=ur(r.length,s,e.state.facet(ue).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),o!=(null==(t=n.open)?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=ur(t.options.length,t.selected,this.view.state.facet(ue).maxRenderedOptions),this.showOptions(t.options,e.id));let i=this.updateSelectedOption(t.selected);if(i){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let s="string"==typeof r?document.createTextNode(r):r(n);if(!s)return;"then"in s?s.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>nN(this.view.state,e,"completion info")):(this.addInfoPane(s,n),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)i.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:n}=e;i.appendChild(t),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,i;let n,r,s,o=null;for(let t=this.list.firstChild,i=this.range.from;t;t=t.nextSibling,i++)"LI"==t.nodeName&&t.id?i==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),o=t):t.hasAttribute("aria-selected")&&(t.removeAttribute("aria-selected"),t.removeAttribute("aria-describedby")):i--;return o&&(t=this.list,i=o,n=t.getBoundingClientRect(),r=i.getBoundingClientRect(),s=n.height/t.offsetHeight,r.top<n.top?t.scrollTop-=(n.top-r.top)/s:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/s)),o}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return n.top>Math.min(r.bottom,t.bottom)-10||n.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(ue).positionInfo(this.view,t,n,i,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,i){let n=document.createElement("ul");n.id=t,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions")),n.addEventListener("mousedown",e=>{e.target==n&&e.preventDefault()});let r=null;for(let s=i.from;s<i.to;s++){let{completion:o,match:a}=e[s],{section:l}=o;if(l){let e="string"==typeof l?l:l.name;e!=r&&(s>i.from||0==i.from)&&(r=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}let h=n.appendChild(document.createElement("li"));h.id=t+"-"+s,h.setAttribute("role","option");let c=this.optionClass(o);for(let e of(c&&(h.className=c),this.optionContent)){let t=e(o,this.view.state,this.view,a);t&&h.appendChild(t)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&n.classList.add("cm-completionListIncompleteBottom"),n}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function uo(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class ua{constructor(e,t,i,n,r,s){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=n,this.selected=r,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new ua(this.options,uu(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,n,r,s){if(n&&!s&&e.some(e=>e.isPending))return n.setDisabled();let o=function(e,t){let i=[],n=null,r=null,s=e=>{i.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some(t=>t.name==e)||n.push("string"==typeof t?{name:e}:t)}},o=t.facet(ue);for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(!1===n.result.filter)for(let t of n.result.options)s(new c0(t,n.source,e?e(t):[],1e9-i.length));else{let i=t.sliceDoc(n.from,n.to),a,l=o.filterStrict?new c9(i):new c7(i);for(let t of n.result.options)if(a=l.match(t.label)){let i=t.displayLabel?e?e(t,a.matched):[]:a.matched,o=a.score+(t.boost||0);if(s(new c0(t,n.source,i,o)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;r||(r=Object.create(null)),r[e]=Math.max(o,r[e]||-1e9)}}}}if(n){let e=Object.create(null),t=0;for(let i of n.sort((e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?r[t.name]-r[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1)))t-=1e5,e[i.name]=t;for(let t of i){let{section:i}=t.completion;i&&(t.score+=e["string"==typeof i?i:i.name])}}let a=[],l=null,h=o.compareCompletions;for(let e of i.sort((e,t)=>t.score-e.score||h(e.completion,t.completion))){let t=e.completion;l&&l.label==t.label&&l.detail==t.detail&&(null==l.type||null==t.type||l.type==t.type)&&l.apply==t.apply&&l.boost==t.boost?uo(e.completion)>uo(l)&&(a[a.length-1]=e):a.push(e),l=e.completion}return a}(e,t);if(!o.length)return n&&e.some(e=>e.isPending)?n.setDisabled():null;let a=t.facet(ue).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){a=t;break}}return new ua(o,uu(i,a),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:um,above:r.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(e){return new ua(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ua(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class ul{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new ul(uf,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ue),n=(i.override||t.languageDataAt("autocomplete",c1(t)).map(c6)).map(t=>(this.active.find(e=>e.source==t)||new ud(t,+!!this.active.some(e=>0!=e.state))).update(e,i));n.length==this.active.length&&n.every((e,t)=>e==this.active[t])&&(n=this.active);let r=this.open,s=e.effects.some(e=>e.is(uO));for(let o of(r&&e.docChanged&&(r=r.map(e.changes)),e.selection||n.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let i=0,n=0;;){for(;i<e.length&&!e[i].hasResult();)i++;for(;n<t.length&&!t[n].hasResult();)n++;let r=i==e.length,s=n==t.length;if(r||s)return r==s;if(e[i++].result!=t[n++].result)return!1}}(n,this.active)||s?r=ua.build(n,t,this.id,r,i,s):r&&r.disabled&&!n.some(e=>e.isPending)&&(r=null),!r&&n.every(e=>!e.isPending)&&n.some(e=>e.hasResult())&&(n=n.map(e=>e.hasResult()?new ud(e.source,0):e)),e.effects))o.is(un)&&(r=r&&r.setSelected(o.value,this.id));return n==this.active&&r==this.open?this:new ul(n,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?uh:uc}}let uh={"aria-autocomplete":"list"},uc={};function uu(e,t){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(i["aria-activedescendant"]=e+"-"+t),i}let uf=[];class ud{constructor(e,t,i=!1){this.source=e,this.state=t,this.explicit=i}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let i=function(e,t){if(e.isUserEvent("input.complete")){let i=e.annotation(c5);if(i&&t.activateOnCompletion(i))return 12}let i=e.isUserEvent("input.type");return i&&t.activateOnTyping?5:i?1:e.isUserEvent("delete.backward")?2:e.selection?8:16*!!e.docChanged}(e,t),n=this;for(let t of((8&i||16&i&&this.touches(e))&&(n=new ud(n.source,0)),4&i&&0==n.state&&(n=new ud(this.source,1)),n=n.updateFor(e,i),e.effects))if(t.is(c4))n=new ud(n.source,1,t.value);else if(t.is(c8))n=new ud(n.source,0);else if(t.is(uO))for(let e of t.value)e.source==n.source&&(n=e);return n}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(c1(e.state))}}class up extends ud{constructor(e,t,i,n,r,s){super(e,3,t),this.limit=i,this.result=n,this.from=r,this.to=s}hasResult(){return!0}updateFor(e,t){var i;if(!(3&t))return this.map(e.changes);let n=this.result;n.map&&!e.changes.empty&&(n=n.map(n,e.changes));let r=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),o=c1(e.state);if(o>s||!n||2&t&&(c1(e.startState)==this.from||o<this.limit))return new ud(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,i,n){if(!e)return!1;let r=t.sliceDoc(i,n);return"function"==typeof e?e(r,i,n,t):c2(e,!0).test(r)}(n.validFor,e.state,r,s)?n.update&&(n=n.update(n,r,s,new cK(e.state,o,!1)))?new up(this.source,this.explicit,a,n,n.from,null!=(i=n.to)?i:c1(e.state)):new ud(this.source,1,this.explicit):new up(this.source,this.explicit,a,n,r,s)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new up(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new ud(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let uO=t1.define({map:(e,t)=>e.map(e=>e.map(t))}),ug=tE.define({create:()=>ul.start(),update:(e,t)=>e.update(t),provide:e=>[oy.from(e,e=>e.tooltip),sq.contentAttributes.from(e,e=>e.attrs)]}),um=(f=function(e,t){let i=t.completion.apply||t.completion.label,n=e.state.field(ug).active.find(e=>e.source==t.source);return n instanceof up&&("string"==typeof i?e.dispatch({...function(e,t,i,n){let{main:r}=e.selection,s=i-r.from,o=n-r.from;return{...e.changeByRange(a=>{if(a!=r&&i!=n&&e.sliceDoc(a.from+s,a.from+o)!=e.sliceDoc(i,n))return{range:a};let l=e.toText(t);return{changes:{from:a.from+s,to:n==r.from?a.to:a.from+o,insert:l},range:tP.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(e.state,i,n.from,n.to),annotations:c5.of(t.completion)}):i(e,t.completion,n.from,n.to),!0)},e=>new us(e,ug,f));"object"==typeof navigator&&navigator.platform;let uv=sq.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class uy{constructor(e,t,i,n){this.field=e,this.line=t,this.from=i,this.to=n}}class uw{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,tm.TrackDel),i=e.mapPos(this.to,1,tm.TrackDel);return null==t||null==i?null:new uw(this.field,t,i)}}class ub{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],n=[t],r=e.doc.lineAt(t),s=/^\s*/.exec(r.text)[0];for(let r of this.lines){if(i.length){let i=s,o=/^\t*/.exec(r)[0].length;for(let t=0;t<o;t++)i+=e.facet(li);n.push(t+i.length-o),r=i+r.slice(o)}i.push(r),t+=r.length+1}return{text:i,ranges:this.fieldPositions.map(e=>new uw(e.field,n[e.line]+e.from,n[e.line]+e.to))}}static parse(e){let t=[],i=[],n=[],r;for(let s of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let e=r[1]?+r[1]:null,o=r[2]||r[3]||"",a=-1;0===e&&(e=1e9);let l=o.replace(/\\[{}]/g,e=>e[1]);for(let i=0;i<t.length;i++)(null!=e?t[i].seq==e:l&&t[i].name==l)&&(a=i);if(a<0){let i=0;for(;i<t.length&&(null==e||null!=t[i].seq&&t[i].seq<e);)i++;for(let r of(t.splice(i,0,{seq:e,name:l}),a=i,n))r.field>=a&&r.field++}for(let e of n)if(e.line==i.length&&e.from>r.index){let t=r[2]?3+(r[1]||"").length:2;e.from-=t,e.to-=t}n.push(new uy(a,i.length,r.index,r.index+l.length)),s=s.slice(0,r.index)+o+s.slice(r.index+r[0].length)}s=s.replace(/\\([{}])/g,(e,t,r)=>{for(let e of n)e.line==i.length&&e.from>r&&(e.from--,e.to--);return t}),i.push(s)}return new ub(i,n)}}let ux=iH.widget({widget:new class extends iF{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),uS=iH.mark({class:"cm-snippetField"});class uk{constructor(e,t){this.ranges=e,this.active=t,this.deco=iH.set(e.map(e=>(e.from==e.to?ux:uS).range(e.from,e.to)),!0)}map(e){let t=[];for(let i of this.ranges){let n=i.map(e);if(!n)return null;t.push(n)}return new uk(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}let uQ=t1.define({map:(e,t)=>e&&e.map(t)}),u$=t1.define(),uP=tE.define({create:()=>null,update(e,t){for(let i of t.effects){if(i.is(uQ))return i.value;if(i.is(u$)&&e)return new uk(e.ranges,i.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>sq.decorations.from(e,e=>e?e.deco:iH.none)});function uA(e,t){return tP.create(e.filter(e=>e.field==t).map(e=>tP.range(e.from,e.to)))}function uC(e){return({state:t,dispatch:i})=>{let n=t.field(uP,!1);if(!n||e<0&&0==n.active)return!1;let r=n.active+e,s=e>0&&!n.ranges.some(t=>t.field==r+e);return i(t.update({selection:uA(n.ranges,r),effects:uQ.of(s?null:new uk(n.ranges,r)),scrollIntoView:!0})),!0}}let u_=[{key:"Tab",run:uC(1),shift:uC(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(uP,!1)&&(t(e.update({effects:uQ.of(null)})),!0)}],uT=t_.define({combine:e=>e.length?e[0]:u_}),uM=tB.highest(s0.compute([uT],e=>e.facet(uT)));function uZ(e,t){let i;return{...t,apply:(i=ub.parse(e),(e,t,n,r)=>{let{text:s,ranges:o}=i.instantiate(e.state,n),{main:a}=e.state.selection,l={changes:{from:n,to:r==a.from?a.to:r,insert:tn.of(s)},scrollIntoView:!0,annotations:t?[c5.of(t),t2.userEvent.of("input.complete")]:void 0};if(o.length&&(l.selection=uA(o,0)),o.some(e=>e.field>0)){let t=new uk(o,0),i=l.effects=[uQ.of(t)];void 0===e.state.field(uP,!1)&&i.push(t1.appendConfig.of([uP,uM,uR,uv]))}e.dispatch(e.state.update(l))})}}let uR=sq.domEventHandlers({mousedown(e,t){let i=t.state.field(uP,!1),n;if(!i||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let r=i.ranges.find(e=>e.from<=n&&e.to>=n);return!!r&&r.field!=i.active&&(t.dispatch({selection:uA(i.ranges,r.field),effects:uQ.of(i.ranges.some(e=>e.field>r.field)?new uk(i.ranges,r.field):null),scrollIntoView:!0}),!0)}}),uX=new class extends it{};uX.startSide=1,uX.endSide=-1,"object"==typeof navigator&&navigator.userAgent;let uE=[uZ("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),uZ("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),uZ("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),uZ("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),uZ("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),uZ("try {\n ${}\n} catch (${error}) {\n ${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),uZ("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),uZ("if (${}) {\n ${}\n} else {\n ${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),uZ("class ${name} {\n constructor(${params}) {\n ${}\n }\n}",{label:"class",detail:"definition",type:"keyword"}),uZ('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),uZ('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uj=uE.concat([uZ("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),uZ("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),uZ("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),uB=new al,uL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function uI(e){return(t,i)=>{let n=t.node.getChild("VariableDefinition");return n&&i(n,e),!0}}let uz=["FunctionDeclaration"],uY={FunctionDeclaration:uI("function"),ClassDeclaration:uI("class"),ClassExpression:()=>!0,EnumDeclaration:uI("constant"),TypeAliasDeclaration:uI("type"),NamespaceDeclaration:uI("namespace"),VariableDefinition(e,t){e.matchContext(uz)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null},uV=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,uW=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function uD(e){let t=aJ(e.state).resolveInner(e.pos,-1);if(uW.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&uV.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)uL.has(i.name)&&(n=n.concat(function e(t,i){let n=uB.get(i);if(n)return n;let r=[],s=!0;function o(e,i){let n=t.sliceString(e.from,e.to);r.push({label:n,type:i})}return i.cursor(Q.IncludeAnonymous).iterate(i=>{if(s)s=!1;else if(i.name){let e=uY[i.name];if(e&&e(i,o)||uL.has(i.name))return!1}else if(i.to-i.from>8192){for(let n of e(t,i.node))r.push(n);return!1}}),uB.set(i,r),r}(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:uV}}let uq=aH.define({name:"javascript",parser:cF.configure({props:[la.add({IfStatement:lf({except:/^\s*({|else\b)/}),TryStatement:lf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,i=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(i?0:n?1:2)*e.unit},Block:function({closing:e,align:t=!0,units:i=1}){return n=>lu(n,t,i,e)}({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":lf({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),lp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":lO,BlockComment:e=>({from:e.from+2,to:e.to-2}),JSXElement(e){let t=e.firstChild;if(!t||"JSXSelfClosingTag"==t.name)return null;let i=e.lastChild;return{from:t.to,to:i.type.isError?e.to:i.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let i=null==(t=e.firstChild)?void 0:t.nextSibling,n=e.lastChild;return!i||i.type.isError?null:{from:i.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),uN={test:e=>/^JSX/.test(e.name),facet:aU({commentTokens:{block:{open:"{/*",close:"*/}"}}})},uU=uq.configure({dialect:"ts"},"typescript"),uG=uq.configure({dialect:"jsx",props:[aG.add(e=>e.isTop?[uN]:void 0)]}),uF=uq.configure({dialect:"jsx ts",props:[aG.add(e=>e.isTop?[uN]:void 0)]},"typescript"),uK=e=>({label:e,type:"keyword"}),uH=("break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ")).map(uK),uJ=uH.concat(["declare","implements","private","protected","public"].map(uK));function u0(e={}){var t;let i=e.jsx?e.typescript?uF:uG:e.typescript?uU:uq,n=e.typescript?uj.concat(uJ):uE.concat(uH);return new le(i,[uq.data.of({autocomplete:(t=cJ(n),e=>{for(let t=aJ(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(uW.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(e)})}),uq.data.of({autocomplete:uD}),e.jsx?u5:[]])}function u1(e,t,i=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,i));return""}let u2="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),u5=sq.inputHandler.of((e,t,i,n,r)=>{if((u2?e.composing:e.compositionStarted)||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!uq.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(e=>{var t;let{head:i}=e,r=aJ(o).resolveInner(i-1,-1),s;if("JSXStartTag"==r.name&&(r=r.parent),o.doc.sliceString(i-1,i)!=n||"JSXAttributeValue"==r.name&&r.to>i);else if(">"==n&&"JSXFragmentTag"==r.name)return{range:e,changes:{from:i,insert:"</>"}};else if("/"==n&&"JSXStartCloseTag"==r.name){let e=r.parent,n=e.parent;if(n&&e.from==i-2&&((s=u1(o.doc,n.firstChild,i))||(null==(t=n.firstChild)?void 0:t.name)=="JSXFragmentTag")){let e=`${s}>`;return{range:tP.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==n){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(r);if(t&&"JSXOpenTag"==t.name&&!/^\/?>|^<\//.test(o.doc.sliceString(i,i+2))&&(s=u1(o.doc,t,i)))return{range:e,changes:{from:i,insert:`</${s}>`}}}return{range:e}});return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),u3=a$({String:aq.string,Number:aq.number,"True False":aq.bool,PropertyName:aq.propertyName,Null:aq.null,", :":aq.separator,"[ ]":aq.squareBracket,"{ }":aq.brace}),u6=cX.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[u3],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),u4=aH.define({name:"json",parser:u6.configure({props:[la.add({Object:lf({except:/^\s*\}/}),Array:lf({except:/^\s*\]/})}),lp.add({"Object Array":lO})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}}),u8={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},u7={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},u9={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}},fe=null,ft=null,fi=0;function fn(e,t){var i;let n=e.pos+t;if(fi==n&&ft==e)return fe;let r=e.peek(t),s="";for(;45==(i=r)||46==i||58==i||i>=65&&i<=90||95==i||i>=97&&i<=122||i>=161;)s+=String.fromCharCode(r),r=e.peek(++t);return ft=e,fi=n,fe=s?s.toLowerCase():r==fr||r==fs?void 0:null}let fr=63,fs=33;function fo(e,t){this.name=e,this.parent=t}let fa=[6,10,7,8,9],fl=new cR({start:null,shift:(e,t,i,n)=>fa.indexOf(t)>-1?new fo(fn(n,1)||"",e):e,reduce:(e,t)=>21==t&&e?e.parent:e,reuse(e,t,i,n){let r=t.type.id;return 6==r||37==r?new fo(fn(n,1)||"",e):e},strict:!1}),fh=new cx((e,t)=>{if(60!=e.next){e.next<0&&t.context&&e.acceptToken(58);return}e.advance();let i=47==e.next;i&&e.advance();let n=fn(e,0);if(void 0===n)return;if(!n)return e.acceptToken(i?15:14);let r=t.context?t.context.name:null;if(i){if(n==r)return e.acceptToken(11);if(r&&u7[r])return e.acceptToken(58,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(13)}else{if("script"==n)return e.acceptToken(7);if("style"==n)return e.acceptToken(8);if("textarea"==n)return e.acceptToken(9);if(u8.hasOwnProperty(n))return e.acceptToken(10);r&&u9[r]&&u9[r][n]?e.acceptToken(58,-1):e.acceptToken(6)}},{contextual:!0}),fc=new cx(e=>{for(let t=0,i=0;;i++){if(e.next<0){i&&e.acceptToken(59);break}if(45==e.next)t++;else if(62==e.next&&t>=2){i>=3&&e.acceptToken(59,-2);break}else t=0;e.advance()}}),fu=new cx((e,t)=>{if(47==e.next&&62==e.peek(1)){let i=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(i?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function ff(e,t,i){let n=2+e.length;return new cx(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(t);break}if(0==s&&60==r.next||1==s&&47==r.next||s>=2&&s<n&&r.next==e.charCodeAt(s-2))s++,o++;else if(s==n&&62==r.next){a>o?r.acceptToken(t,-o):r.acceptToken(i,-(o-2));break}else if((10==r.next||13==r.next)&&a){r.acceptToken(t,1);break}else s=o=0;r.advance()}})}let fd=ff("script",55,1),fp=ff("style",56,2),fO=ff("textarea",57,3),fg=a$({"Text RawText IncompleteTag IncompleteCloseTag":aq.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":aq.angleBracket,TagName:aq.tagName,"MismatchedCloseTag/TagName":[aq.tagName,aq.invalid],AttributeName:aq.attributeName,"AttributeValue UnquotedAttributeValue":aq.attributeValue,Is:aq.definitionOperator,"EntityReference CharacterReference":aq.character,Comment:aq.blockComment,ProcessingInst:aq.processingInstruction,DoctypeDecl:aq.documentMeta}),fm=cX.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O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OT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:fl,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[fg],skippedNodes:[0],rep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!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fd,fp,fO,fu,fh,fc,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function fv(e,t){let i=Object.create(null);for(let n of e.getChildren(24)){let e=n.getChild(25),r=n.getChild(27)||n.getChild(28);e&&(i[t.read(e.from,e.to)]=r?27==r.type.id?t.read(r.from+1,r.to-1):t.read(r.from,r.to):"")}return i}function fy(e,t){let i=e.getChild(23);return i?t.read(i.from,i.to):" "}function fw(e,t,i){let n;for(let r of i)if(!r.attrs||r.attrs(n||(n=fv(e.node.parent.firstChild,t))))return{parser:r.parser,bracketed:!0};return null}function fb(e=[],t=[]){var i;let n=[],r=[],s=[],o=[];for(let t of e)("script"==t.tag?n:"style"==t.tag?r:"textarea"==t.tag?s:o).push(t);let a=t.length?Object.create(null):null;for(let e of t)(a[e.name]||(a[e.name]=[])).push(e);return i=(e,t)=>{let i=e.type.id;if(29==i)return fw(e,t,n);if(32==i)return fw(e,t,r);if(35==i)return fw(e,t,s);if(21==i&&o.length){let i=e.node,n=i.firstChild,r=n&&fy(n,t),s;if(r){for(let e of o)if(e.tag==r&&(!e.attrs||e.attrs(s||(s=fv(n,t))))){let t=i.lastChild,r=38==t.type.id?t.from:i.to;if(r>n.to)return{parser:e.parser,overlay:[{from:n.to,to:r}]}}}}if(a&&24==i){let i=e.node,n;if(n=i.firstChild){let e=a[t.read(n.from,n.to)];if(e)for(let n of e){if(n.tagName&&n.tagName!=fy(i.parent,t))continue;let e=i.lastChild;if(27==e.type.id){let t=e.from+1,i=e.lastChild,r=e.to-(i&&i.isError?0:1);if(r>t)return{parser:n.parser,overlay:[{from:t,to:r}],bracketed:!0}}else if(28==e.type.id)return{parser:n.parser,overlay:[{from:e.from,to:e.to}]}}}}return null},(e,t,n,r)=>new ag(e,i,t,n,r)}let fx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function fS(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function fk(e){return e>=48&&e<=57}function fQ(e){return fk(e)||e>=97&&e<=102||e>=65&&e<=70}let f$=(e,t,i)=>(n,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=n;if(fS(l)||45==l||95==l||s&&fk(l))!s&&(45!=l||a>0)&&(s=!0),o===a&&45==l&&o++,n.advance();else if(92==l&&10!=n.peek(1)){if(n.advance(),fQ(n.next)){do n.advance();while(fQ(n.next))32==n.next&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(2==o&&r.canShift(2)?t:40==l?i:e);break}}},fP=new cx(f$(149,2,150),{contextual:!0}),fA=new cx(f$(151,3,4),{contextual:!0}),fC=new cx(e=>{if(fx.includes(e.peek(-1))){let{next:t}=e;(fS(t)||95==t||35==t||46==t||42==t||91==t||58==t&&fS(e.peek(1))||45==t||38==t)&&e.acceptToken(148)}}),f_=new cx(e=>{if(!fx.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),fS(t)){do e.advance();while(fS(e.next)||fk(e.next))e.acceptToken(1)}}}),fT=a$({"AtKeyword import charset namespace keyframes media supports font-feature-values":aq.definitionKeyword,"from to selector scope MatchFlag":aq.keyword,NamespaceName:aq.namespace,KeyframeName:aq.labelName,KeyframeRangeName:aq.operatorKeyword,TagName:aq.tagName,ClassName:aq.className,PseudoClassName:aq.constant(aq.className),IdName:aq.labelName,"FeatureName PropertyName":aq.propertyName,AttributeName:aq.attributeName,NumberLiteral:aq.number,KeywordQuery:aq.keyword,UnaryQueryOp:aq.operatorKeyword,"CallTag ValueName FontName":aq.atom,VariableName:aq.variableName,Callee:aq.operatorKeyword,Unit:aq.unit,"UniversalSelector NestingSelector":aq.definitionOperator,"MatchOp CompareOp":aq.compareOperator,"ChildOp SiblingOp, LogicOp":aq.logicOperator,BinOp:aq.arithmeticOperator,Important:aq.modifier,Comment:aq.blockComment,ColorLiteral:aq.color,"ParenthesizedContent StringLiteral":aq.string,":":aq.punctuation,"PseudoOp #":aq.derefOperator,"; , |":aq.separator,"( )":aq.paren,"[ ]":aq.squareBracket,"{ }":aq.brace}),fM={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:158,"url-prefix":158,domain:158,regexp:158},fZ={__proto__:null,or:104,and:104,not:112,only:112,layer:212},fR={__proto__:null,selector:118,style:124,layer:208},fX={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},fE={__proto__:null,to:249},fj=cX.deserialize({version:14,states:"MrQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FqO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#ERO'dQdO'#ETO'oQdO'#E[O'oQdO'#E_OOQP'#Fq'#FqO)RQhO'#FQOOQS'#Fp'#FpOOQS'#FT'#FTQYQdOOO)YQdO'#EeO*iQhO'#EkO)YQdO'#EmO*pQdO'#EoO*{QdO'#ErO)}QhO'#ExO+TQdO'#EzO+`QdO'#E}O+eQaO'#CfO+lQ`O'#EbO+qQ`O'#F}O+|QdO'#F}QOQ`OOP,WO&jO'#CaP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'x'OR(b(VQ$[!nQ$^!oQ$`!pV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w'O'i'r'x(V(bQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!cW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:174,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[fT],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$_~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$_~!r`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#B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RYZ[z{a~~g~aO$b~~dP!P!Qg~lO$c~~",28,155)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:150,get:e=>fM[e]||-1},{term:151,get:e=>fZ[e]||-1},{term:4,get:e=>fR[e]||-1},{term:28,get:e=>fX[e]||-1},{term:149,get:e=>fE[e]||-1}],tokenPrec:2444}),fB=null;function fL(){if(!fB&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],i=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),i.has(n)||(t.push(n),i.add(n)));fB=t.sort().map(e=>({type:"property",label:e,apply:e+": "}))}return fB||[]}let fI=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),fz=(["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","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","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","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","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","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","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","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","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","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","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","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","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","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"].map(e=>({type:"keyword",label:e}))).concat(["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),fY=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),fV=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),fW=/^(\w[\w-]*|-\w[\w-]*|)$/,fD=/^-(-[\w-]*)?$/,fq=new al,fN=["Declaration"],fU=(s=e=>"VariableName"==e.name,e=>{let{state:t,pos:i}=e,n=aJ(t).resolveInner(i,-1),r=n.type.isError&&n.from==n.to-1&&"-"==t.doc.sliceString(n.from,n.to);if("PropertyName"==n.name||(r||"TagName"==n.name)&&/^(Block|Styles)$/.test(n.resolve(n.to).name))return{from:n.from,options:fL(),validFor:fW};if("ValueName"==n.name)return{from:n.from,options:fz,validFor:fW};if("PseudoClassName"==n.name)return{from:n.from,options:fI,validFor:fW};if(s(n)||(e.explicit||r)&&function(e,t){var i;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null==(i=e.parent)?void 0:i.firstChild;return(null==n?void 0:n.name)=="Callee"&&"var"==t.sliceString(n.from,n.to)}(n,t.doc))return{from:s(n)||r?n.from:i,options:function e(t,i,n){if(i.to-i.from>4096){let r=fq.get(i);if(r)return r;let s=[],o=new Set,a=i.cursor(Q.IncludeAnonymous);if(a.firstChild())do for(let i of e(t,a.node,n))o.has(i.label)||(o.add(i.label),s.push(i));while(a.nextSibling())return fq.set(i,s),s}{let e=[],r=new Set;return i.cursor().iterate(i=>{var s;if(n(i)&&i.matchContext(fN)&&(null==(s=i.node.nextSibling)?void 0:s.name)==":"){let n=t.sliceString(i.from,i.to);r.has(n)||(r.add(n),e.push({label:n,type:"variable"}))}}),e}}(t.doc,function(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}(n),s),validFor:fD};if("TagName"==n.name){for(let{parent:e}=n;e;e=e.parent)if("Block"==e.name)return{from:n.from,options:fL(),validFor:fW};return{from:n.from,options:fY,validFor:fW}}if("AtKeyword"==n.name)return{from:n.from,options:fV,validFor:fW};if(!e.explicit)return null;let o=n.resolve(i),a=o.childBefore(i);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:i,options:fI,validFor:fW}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:i,options:fz,validFor:fW}:"Block"==o.name||"Styles"==o.name?{from:i,options:fL(),validFor:fW}:null}),fG=aH.define({name:"css",parser:fj.configure({props:[la.add({Declaration:lf()}),lp.add({"Block KeyframeList":lO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),fF=["_blank","_self","_top","_parent"],fK=["ascii","utf-8","utf-16","latin1","latin1"],fH=["get","post","put","delete"],fJ=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],f0=["true","false"],f1={},f2={a:{attrs:{href:null,ping:null,type:null,media:null,target:fF,hreflang:null}},abbr:f1,address:f1,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:f1,aside:f1,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:f1,base:{attrs:{href:null,target:fF}},bdi:f1,bdo:f1,blockquote:{attrs:{cite:null}},body:f1,br:f1,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:fJ,formmethod:fH,formnovalidate:["novalidate"],formtarget:fF,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:f1,center:f1,cite:f1,code:f1,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:f1,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:f1,div:f1,dl:f1,dt:f1,em:f1,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:f1,figure:f1,footer:f1,form:{attrs:{action:null,name:null,"accept-charset":fK,autocomplete:["on","off"],enctype:fJ,method:fH,novalidate:["novalidate"],target:fF}},h1:f1,h2:f1,h3:f1,h4:f1,h5:f1,h6:f1,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:f1,hgroup:f1,hr:f1,html:{attrs:{manifest:null}},i:f1,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:fJ,formmethod:fH,formnovalidate:["novalidate"],formtarget:fF,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:f1,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:f1,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:f1,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:fK,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:f1,noscript:f1,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:f1,param:{attrs:{name:null,value:null}},pre:f1,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:f1,rt:f1,ruby:f1,samp:f1,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:fK}},section:f1,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:f1,source:{attrs:{src:null,type:null,media:null}},span:f1,strong:f1,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:f1,summary:f1,sup:f1,table:f1,tbody:f1,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:f1,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:f1,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:f1,time:{attrs:{datetime:null}},title:f1,tr:f1,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:f1,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:f1},f5={accesskey:null,class:null,contenteditable:f0,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:f0,autocorrect:f0,autocapitalize:f0,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":f0,"aria-autocomplete":["inline","list","both","none"],"aria-busy":f0,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":f0,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":f0,"aria-hidden":f0,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":f0,"aria-multiselectable":f0,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":f0,"aria-relevant":null,"aria-required":f0,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},f3="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of f3)f5[e]=null;class f6{constructor(e,t){this.tags={...f2,...e},this.globalAttrs={...f5,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function f4(e,t,i=e.length){if(!t)return"";let n=t.firstChild,r=n&&n.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,i)):""}function f8(e,t=!1){for(;e;e=e.parent)if("Element"==e.name)if(!t)return e;else t=!1;return null}function f7(e,t,i){let n=i.tags[f4(e,f8(t))];return(null==n?void 0:n.children)||i.allTags}function f9(e,t){let i=[];for(let n=f8(t);n&&!n.type.isTop;n=f8(n.parent)){let r=f4(e,n);if(r&&"CloseTag"==n.lastChild.name)break;r&&0>i.indexOf(r)&&("EndTag"==t.name||t.from>=n.firstChild.to)&&i.push(r)}return i}f6.default=new f6;let de=/^[:\-\.\w\u00b7-\uffff]*$/;function dt(e,t,i,n,r){let s=/\s*>/.test(e.sliceDoc(r,r+5))?"":">",o=f8(i,"StartTag"==i.name||"TagName"==i.name);return{from:n,to:r,options:f7(e.doc,o,t).map(e=>({label:e,type:"type"})).concat(f9(e.doc,i).map((e,t)=>({label:"/"+e,apply:"/"+e+s,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function di(e,t,i,n){let r=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:f9(e.doc,t).map((e,t)=>({label:e,apply:e+r,type:"type",boost:99-t})),validFor:de}}let dn=uq.parser.configure({top:"SingleExpression"}),dr=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:uU.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:uG.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:uF.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:dn},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:uq.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:fG.parser}],ds=[{name:"style",parser:fG.parser.configure({top:"Styles"})}].concat(f3.map(e=>({name:e,parser:uq.parser}))),da=aH.define({name:"html",parser:fm.configure({props:[la.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,i;for(let i=e.node;;){let e=i.lastChild;if(!e||"Element"!=e.name||e.to!=i.to)break;t=i=e}return t&&!((i=t.lastChild)&&("CloseTag"==i.name||"SelfClosingTag"==i.name))?e.lineIndent(t.from)+e.unit:null}}),lp.add({Element(e){let t=e.firstChild,i=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==i.name?i.from:e.to}:null}}),lq.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),dl=da.configure({wrap:fb(dr,ds)}),dh=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),dc=sq.inputHandler.of((e,t,i,n,r)=>{if(e.composing||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!dl.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(e=>{var t;let i=o.doc.sliceString(e.from-1,e.to)==n,{head:r}=e,s=aJ(o).resolveInner(r,-1),a;if(i&&">"==n&&"EndTag"==s.name){let t=s.parent;if((a=f4(o.doc,t.parent,r))&&!dh.has(a)&&!function(e,t,i){for(var n;;){if((null==(n=t.lastChild)?void 0:n.name)!="CloseTag")return!1;let r=t.parent;if(!r||f4(e,r)!=i)return!0;t=r}}(o.doc,t.parent,a)){let t=r+ +(">"===o.doc.sliceString(r,r+1));return{range:e,changes:{from:r,to:t,insert:`</${a}>`}}}}else if(i&&"/"==n&&"IncompleteCloseTag"==s.name){let e=s.parent;if(s.from==r-2&&(null==(t=e.lastChild)?void 0:t.name)!="CloseTag"&&(a=f4(o.doc,e,r))&&!dh.has(a)){let e=r+ +(">"===o.doc.sliceString(r,r+1)),t=`${a}>`;return{range:tP.cursor(r+t.length,-1),changes:{from:r,to:e,insert:t}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),du="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class df{constructor(e,t,i=0,n=e.length,r,s){this.test=s,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,n),this.bufferStart=i,this.normalize=r?e=>r(du(e)):du,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return td(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=tp(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=tO(e);let n=this.normalize(t);if(n.length)for(let e=0,r=i,s=!0;;e++){let i=n.charCodeAt(e),o=this.match(i,r,s,this.bufferPos+this.bufferStart,e==n.length-1);if(o)return this.value=o,this;if(e==n.length-1)break;s&&e<t.length&&t.charCodeAt(e)==i?r++:s=!1}}}match(e,t,i,n,r){let s=null;for(let t=0;t<this.matches.length;){let i=this.matches[t],o=!1;this.query.charCodeAt(i.index)==e&&(i.index==this.query.length-1?s={from:i.from,to:n,precise:r&&i.precise}:(i.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(1==this.query.length?s={from:t,to:n,precise:i&&r}:this.matches.push({from:t,index:1,precise:i})),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}"u">typeof Symbol&&(df.prototype[Symbol.iterator]=function(){return this});let dd={from:-1,to:-1,match:/.*/.exec(""),precise:!0},dp="gm"+(null==/x/.unicode?"":"u");class dO{constructor(e,t,i,n=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=dd,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new dv(e,t,i,n,r);this.re=new RegExp(t,dp+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=e.iter();let s=e.lineAt(n);this.curLineStart=s.from,this.matchPos=dy(e,n),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,n=i+t[0].length;if(this.matchPos=dy(this.text,n+ +(i==n)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<n||i>this.value.to)&&(!this.test||this.test(i,n,t)))return this.value={from:i,to:n,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let dg=new WeakMap;class dm{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,i){let n=dg.get(e);if(!n||n.from>=i||n.to<=t){let n=new dm(t,e.sliceString(t,i));return dg.set(e,n),n}if(n.from==t&&n.to==i)return n;let{text:r,from:s}=n;return s>t&&(r=e.sliceString(t,s)+r,s=t),n.to<i&&(r+=e.sliceString(n.to,i)),dg.set(e,new dm(s,r)),new dm(t,r.slice(t-s,i-s))}}class dv{constructor(e,t,i,n,r){this.text=e,this.to=r,this.done=!1,this.value=dd,this.matchPos=dy(e,n),this.re=new RegExp(t,dp+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=dm.get(e,n,this.chunkEnd(n+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,i=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,i,t)))return this.value={from:e,to:i,precise:!0,match:t},this.matchPos=dy(this.text,i+ +(e==i)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=dm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function dy(e,t){if(t>=e.length)return t;let i=e.lineAt(t),n;for(;t<i.to&&(n=i.text.charCodeAt(t-i.from))>=56320&&n<57344;)t++;return t}"u">typeof Symbol&&(dO.prototype[Symbol.iterator]=dv.prototype[Symbol.iterator]=function(){return this});class dw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,dp),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new dP(this):new dS(this)}getCursor(e,t=0,i){let n=e.doc?e:t9.create({doc:e});return null==i&&(i=n.doc.length),this.regexp?dk(this,n,t,i):dx(this,n,t,i)}}class db{constructor(e){this.spec=e}}function dx(e,t,i,n){var r,s,o,a;let l;return e.wholeWord&&(o=t.doc,a=t.charCategorizer(t.selection.main.head),l=(e,t,i,n)=>((n>e||n+i.length<t)&&(n=Math.max(0,e-2),i=o.sliceString(n,Math.min(o.length,t+2))),(a(dQ(i,e-n))!=t8.Word||a(d$(i,e-n))!=t8.Word)&&(a(d$(i,t-n))!=t8.Word||a(dQ(i,t-n))!=t8.Word))),e.test&&(r=e.test,s=l,l=(e,i,n,o)=>(!s||!!s(e,i,n,o))&&r(e>=o&&i<=o+n.length?n.slice(e-o,i-o):t.doc.sliceString(e,i),t,e,i)),new df(t.doc,e.unquoted,i,n,e.caseSensitive?void 0:e=>e.toLowerCase(),l)}class dS extends db{constructor(e){super(e)}nextMatch(e,t,i){let n=dx(this.spec,e,i,e.doc.length).nextOverlapping();if(n.done){let i=Math.min(e.doc.length,t+this.spec.unquoted.length);n=dx(this.spec,e,0,i).nextOverlapping()}return n.done||n.value.from==t&&n.value.to==i?null:n.value}prevMatchInRange(e,t,i){for(let n=i;;){let i=Math.max(t,n-1e4-this.spec.unquoted.length),r=dx(this.spec,e,i,n),s=null;for(;!r.nextOverlapping().done;)s=r.value;if(s)return s;if(i==t)return null;n-=1e4}}prevMatch(e,t,i){let n=this.prevMatchInRange(e,0,t);return n||(n=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),n&&(n.from!=t||n.to!=i)?n:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=dx(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=dx(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}function dk(e,t,i,n){var r,s,o;let a;return e.wholeWord&&(o=t.charCategorizer(t.selection.main.head),a=(e,t,i)=>!i[0].length||(o(dQ(i.input,i.index))!=t8.Word||o(d$(i.input,i.index))!=t8.Word)&&(o(d$(i.input,i.index+i[0].length))!=t8.Word||o(dQ(i.input,i.index+i[0].length))!=t8.Word)),e.test&&(r=e.test,s=a,a=(e,i,n)=>(!s||s(e,i,n))&&r(n[0],t,e,i)),new dO(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:a},i,n)}function dQ(e,t){return e.slice(tf(e,t,!1),t)}function d$(e,t){return e.slice(t,tf(e,t))}class dP extends db{nextMatch(e,t,i){let n=dk(this.spec,e,i,e.doc.length).next();return n.done&&(n=dk(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=1;;n++){let r=Math.max(t,i-1e4*n),s=dk(this.spec,e,r,i),o=null;for(;!s.next().done;)o=s.value;if(o&&(r==t||o.from>r+10))return o;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if("&"==i)return e.match[0];if("$"==i)return"$";for(let t=i.length;t>0;t--){let n=+i.slice(0,t);if(n>0&&n<e.match.length)return e.match[n]+i.slice(t)}return t})}matchAll(e,t){let i=dk(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=dk(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}let dA=t1.define();function dC(e,t){var i=t.ch,n=t.line+1;n<1&&(n=1,i=0),n>e.lines&&(n=e.lines,i=Number.MAX_VALUE);var r=e.line(n);return Math.min(r.from+Math.max(0,i),r.to)}function d_(e,t){let i=e.lineAt(t);return{line:i.number-1,ch:t-i.from}}class dT{constructor(e,t){this.line=e,this.ch=t}}function dM(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||[]).concat(i)}}function dZ(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else{var n=e._handlers,r=n&&n[t];if(r){var s=r.indexOf(i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function dR(e,t,...i){var n,r=null==(n=e._handlers)?void 0:n[t];if(r)for(var s=0;s<r.length;++s)r[s](...i)}function dX(e,...t){if(e)for(var i=0;i<e.length;++i)e[i](...t)}try{r=RegExp("[\\w\\p{Alphabetic}\\p{Number}_]","u")}catch(e){r=/[\w]/}function dE(e,t){var i=e.cm6;if(!i.state.readOnly){var n="input.type.compose";if(e.curOp&&!e.curOp.lastChange&&(n="input.type.compose.start"),t.annotations)try{t.annotations.some(function(e){"input"==e.value&&(e.value=n)})}catch(e){console.error(e)}else t.userEvent=n;return i.dispatch(t)}}function dj(e,t){var i;e.curOp&&(e.curOp.$changeStart=void 0),(t?ho:ha)(e.cm6);let n=null==(i=e.curOp)?void 0:i.$changeStart;null!=n&&e.cm6.dispatch({selection:{anchor:n}})}class dB{openDialog(e,t,i){return function(e,t,i,n){n||(n={}),dI(e,void 0);var r=dL(e,t,n.bottom),s=!1;function o(t){if("string"==typeof t)a.value=t;else{if(s)return;s=!0,dY(e,r),e.state.dialog||e.focus(),n.onClose&&n.onClose(r)}}dz(e,r);var a=r.getElementsByTagName("input")[0];return a&&(n.value&&(a.value=n.value,!1!==n.selectValueOnOpen&&a.select()),n.onInput&&dB.on(a,"input",function(e){n.onInput(e,a.value,o)}),n.onKeyUp&&dB.on(a,"keyup",function(e){n.onKeyUp(e,a.value,o)}),dB.on(a,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,a.value,o)||(13==e.keyCode&&i&&i(a.value),(27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(a.blur(),dB.e_stop(e),o()))}),!1!==n.closeOnBlur&&dB.on(a,"blur",function(){setTimeout(function(){document.activeElement!==a&&o()})}),a.focus()),o}(this,e,t,i)}openNotification(e,t){return function(e,t,i){dI(e,a);var n,r=dL(e,t,i&&i.bottom),s=!1,o=i&&void 0!==i.duration?i.duration:5e3;function a(){s||(s=!0,clearTimeout(n),r.remove(),dY(e,r))}return r.onclick=function(e){e.preventDefault(),a()},dz(e,r),o&&(n=setTimeout(a,o)),a}(this,e,t)}constructor(e){this.state={},this.marks=Object.create(null),this.$mid=0,this.options={},this._handlers={},this.$lastChangeEndOffset=0,this.virtualSelection=null,this.cm6=e,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this)}on(e,t){dM(this,e,t)}off(e,t){dZ(this,e,t)}signal(e,t,i){dR(this,e,t,i)}indexFromPos(e){return dC(this.cm6.state.doc,e)}posFromIndex(e){return d_(this.cm6.state.doc,e)}foldCode(e){let t=this.cm6,i=t.state.selection.ranges,n=dC(this.cm6.state.doc,e),r=tP.create([tP.range(n,n)],0).ranges;t.state.selection.ranges=r,(e=>{for(let n of function(e){let t=[];for(let{head:i}of e.state.selection.ranges)t.some(e=>e.from<=i&&e.to>=i)||t.push(e.lineBlockAt(i));return t}(e)){let r=lg(e.state,n.from,n.to);if(r){var t,i;return e.dispatch({effects:(t=e.state,i=[lv.of(r),function(e,t,i=!0){let n=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return sq.announce.of(`${e.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${r}.`)}(e,r)],t.field(lw,!1)?i:i.concat(t1.appendConfig.of(lQ())))}),!0}}})(t),t.state.selection.ranges=i}firstLine(){return 0}lastLine(){return this.cm6.state.doc.lines-1}lineCount(){return this.cm6.state.doc.lines}setCursor(e,t){"object"==typeof e&&(t=e.ch,e=e.line);var i=dC(this.cm6.state.doc,{line:e,ch:t||0});this.cm6.dispatch({selection:{anchor:i}},{scrollIntoView:!this.curOp}),this.curOp&&!this.curOp.isVimOp&&this.onBeforeEndOperation()}getCursor(e){var t=this.cm6.state.selection.main,i="head"!=e&&e?"anchor"==e?t.anchor:"start"==e?t.from:"end"==e?t.to:null:t.head;if(null==i)throw Error("Invalid cursor type");return this.posFromIndex(i)}listSelections(){var e=this.cm6.state.doc;return this.cm6.state.selection.ranges.map(t=>({anchor:d_(e,t.anchor),head:d_(e,t.head)}))}setSelections(e,t){var i=this.cm6.state.doc,n=e.map(e=>{var t=dC(i,e.head),n=dC(i,e.anchor);return t==n?tP.cursor(t,1):tP.range(n,t)});this.cm6.dispatch({selection:tP.create(n,t)})}setSelection(e,t,i){this.setSelections([{anchor:e,head:t}],0),i&&"*mouse"==i.origin&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?"":this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{row:e,index:this.indexFromPos(new dT(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var i=e.index,n=0;n<t.length;n++)if(null==(i=t[n].changes.mapPos(i,1,tm.TrackAfter)))return null;var r=this.posFromIndex(i);return 0==r.ch?r.line:null}releaseLineHandles(){this.$lineHandleChanges=void 0}getRange(e,t){var i=this.cm6.state.doc;return this.cm6.state.sliceDoc(dC(i,e),dC(i,t))}replaceRange(e,t,i,n){i||(i=t);var r=this.cm6.state.doc;dE(this,{changes:{from:dC(r,t),to:dC(r,i),insert:e}})}replaceSelection(e){dE(this,this.cm6.state.replaceSelection(e))}replaceSelections(e){dE(this,{changes:this.cm6.state.selection.ranges.map((t,i)=>({from:t.from,to:t.to,insert:e[i]||""}))})}getSelection(){return this.getSelections().join("\n")}getSelections(){var e=this.cm6;return e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(e=>!e.empty)}getInputField(){return this.cm6.contentDOM}clipPos(e){var t=this.cm6.state.doc,i=e.ch,n=e.line+1;n<1&&(n=1,i=0),n>t.lines&&(n=t.lines,i=Number.MAX_VALUE);var r=t.line(n);return new dT(n-1,i=Math.min(Math.max(0,i),r.to-r.from))}getValue(){return this.cm6.state.doc.toString()}setValue(e){var t=this.cm6;return t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e},selection:tP.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(e,t){var i=this.cm6.state,n=dC(i.doc,e),r=lG(i,n+1,-1);return r&&r.end||(r=lG(i,n,1))&&r.end?{to:d_(i.doc,r.end.from)}:{to:void 0}}scanForBracket(e,t,i,n){return function(e,t,i,n){for(var r=n&&n.maxScanLineLength||1e4,s=n&&n.maxScanLines||1e3,o=[],a=n&&n.bracketRegex||/[(){}[\]]/,l=i>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),h=t.line;h!=l;h+=i){var c=e.getLine(h);if(c){var u=i>0?0:c.length-1,f=i>0?c.length:-1;if(!(c.length>r))for(h==t.line&&(u=t.ch-(i<0));u!=f;u+=i){var d=c.charAt(u);if(a.test(d)){var p=dV[d];if(p&&">"==p.charAt(1)==i>0)o.push(d);else{if(!o.length)return{pos:new dT(h,u),ch:d};o.pop()}}}}}return h-i!=(i>0?e.lastLine():e.firstLine())&&null}(this,e,t,n)}indentLine(e,t){t?this.indentMore():this.indentLess()}indentMore(){co(this.cm6)}indentLess(){ca(this.cm6)}execCommand(e){if(dB.commands.hasOwnProperty(e))dB.commands[e](this);else if("goLineLeft"==e)hB(this.cm6);else if("goLineRight"==e){hj(this.cm6);let e=this.cm6.state,t=e.selection.main.head;t<e.doc.length&&"\n"!==e.sliceDoc(t,t+1)&&hS(this.cm6,!1)}else console.log(e+" is not implemented")}setBookmark(e,t){var i=(null==t?void 0:t.insertLeft)?1:-1;return new dD(this,this.indexFromPos(e),i)}addOverlay({query:e}){let t=new dw({regexp:!0,search:e.source,caseSensitive:!/i/.test(e.flags)});if(t.valid){t.forVim=!0,this.cm6Query=t;let e=dA.of(t);return this.cm6.dispatch({effects:e}),t}}removeOverlay(e){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let t=dA.of(this.cm6Query);this.cm6.dispatch({effects:t})}getSearchCursor(e,t){var i=this,n=null,r=null,s=!1;void 0==t.ch&&(t.ch=Number.MAX_VALUE);var o=dC(i.cm6.state.doc,t),a=e.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(e,t){return t||"\\"+e});function l(t,i=0,n=t.length){return new dO(t,a,{ignoreCase:e.ignoreCase},i,n)}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var t=i.cm6.state.doc;return r=(n=e?function(e){var t=i.cm6.state.doc;for(let i=1;;i++){let n=Math.max(0,e-1e4*i),r=l(t,n,e),s=null;for(;!r.next().done;)s=r.value;if(s&&(0==n||s.from>n+10))return s;if(0==n)return null}}(n?s?n.to-1:n.from:o):function(e){var t=i.cm6.state.doc;if(e>t.length)return null;let n=l(t,e).next();return n.done?null:n.value}(n?s?n.to+1:n.to:o))&&{from:d_(t,n.from),to:d_(t,n.to),match:n.match},s=!!n&&n.from==n.to,n&&n.match},from:function(){return null==r?void 0:r.from},to:function(){return null==r?void 0:r.to},replace:function(e){n&&(dE(i,{changes:{from:n.from,to:n.to,insert:e}}),n.to=n.from+e.length,r&&(r.to=d_(i.cm6.state.doc,n.to)))},get match(){return r&&r.match}}}findPosV(e,t,i,n){let{cm6:r}=this,s=r.state.doc,o="page"==i?r.dom.clientHeight:0,a=dC(s,e),l=tP.cursor(a,1,void 0,n),h=Math.round(Math.abs(t));for(let e=0;e<h;e++)"page"==i?l=r.moveVertically(l,t>0,o):"line"==i&&(l=r.moveVertically(l,t>0));let c=d_(s,l.head);return(t<0&&0==l.head&&0!=n&&0==e.line&&0!=e.ch||t>0&&l.head==s.length&&c.ch!=n&&e.line==c.line)&&(c.hitSide=!0),c}charCoords(e,t){var i=this.cm6.contentDOM.getBoundingClientRect(),n=dC(this.cm6.state.doc,e),r=this.cm6.coordsAtPos(n),s=-i.top;return{left:((null==r?void 0:r.left)||0)-i.left,top:((null==r?void 0:r.top)||0)+s,bottom:((null==r?void 0:r.bottom)||0)+s}}coordsChar(e,t){var i=this.cm6.contentDOM.getBoundingClientRect(),n=this.cm6.posAtCoords({x:e.left+i.left,y:e.top+i.top})||0;return d_(this.cm6.state.doc,n)}getScrollInfo(){var e=this.cm6.scrollDOM;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight,width:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth}}scrollTo(e,t){null!=e&&(this.cm6.scrollDOM.scrollLeft=e),null!=t&&(this.cm6.scrollDOM.scrollTop=t)}scrollIntoView(e,t){if(e){var i=this.indexFromPos(e);this.cm6.dispatch({effects:sq.scrollIntoView(i)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:"scroll"})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption("mode")}}setSize(e,t){this.cm6.dom.style.width=e+4+"px",this.cm6.dom.style.height=t+"px",this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(e){for(let t in this.$lineHandleChanges&&this.$lineHandleChanges.push(e),this.marks)this.marks[t].update(e.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(t=>t.map(e.changes)));var t=this.curOp=this.curOp||{};e.changes.iterChanges((e,i,n,r,s)=>{(null==t.$changeStart||t.$changeStart>n)&&(t.$changeStart=n),this.$lastChangeEndOffset=r;var o={text:s.toJSON()};t.lastChange?t.lastChange.next=t.lastChange=o:t.lastChange=t.change=o},!0),t.changeHandlers||(t.changeHandlers=this._handlers.change&&this._handlers.change.slice())}onSelectionChange(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice()),this.curOp.cursorActivity=!0}operation(e,t){this.curOp||(this.curOp={$d:0}),this.curOp.$d++;try{var i=e()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return i}onBeforeEndOperation(){var e=this.curOp,t=!1;e&&(e.change&&dX(e.changeHandlers,this,e.change),e&&e.cursorActivity&&(dX(e.cursorActivityHandlers,this,null),e.isVimOp&&(t=!0)),this.curOp=null),t&&this.scrollIntoView()}moveH(e,t){if("char"==t){var i=this.getCursor();this.setCursor(i.line,i.ch+e)}}setOption(e,t){switch(e){case"keyMap":this.state.keyMap=t;break;case"textwidth":this.state.textwidth=t}}getOption(e){switch(e){case"firstLineNumber":return 1;case"tabSize":return this.cm6.state.tabSize||4;case"readOnly":return this.cm6.state.readOnly;case"indentWithTabs":return" "==this.cm6.state.facet(li);case"indentUnit":return this.cm6.state.facet(li).length||2;case"textwidth":return this.state.textwidth;case"keyMap":return this.state.keyMap||"vim"}}toggleOverwrite(e){this.state.overwrite=e}getTokenTypeAt(e){var t,i=this.indexFromPos(e),n=a0(this.cm6.state,i),r=null==n?void 0:n.resolve(i),s=(null==(t=null==r?void 0:r.type)?void 0:t.name)||"";return/comment/i.test(s)?"comment":/string/i.test(s)?"string":""}overWriteSelection(e){var t=this.cm6.state.doc,i=this.cm6.state.selection,n=i.ranges.map(e=>{if(e.empty){var i=e.to<t.length?t.sliceString(e.from,e.to+1):"";if(i&&!/\n/.test(i))return tP.range(e.from,e.to+1)}return e});this.cm6.dispatch({selection:tP.create(n,i.mainIndex)}),this.replaceSelection(e)}isInMultiSelectMode(){return this.cm6.state.selection.ranges.length>1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(e){var t=this.cm6.state.selection;this.virtualSelection=tP.create(t.ranges,t.mainIndex);for(var i=0;i<this.virtualSelection.ranges.length;i++){var n=this.virtualSelection.ranges[i];n&&(this.cm6.dispatch({selection:tP.create([n])}),e(),this.virtualSelection.ranges[i]=this.cm6.state.selection.ranges[0])}this.cm6.dispatch({selection:this.virtualSelection}),this.virtualSelection=null}hardWrap(e){return function(e,t){for(var i,n=t.column||e.getOption("textwidth")||80,r=!1!=t.allowMerge,s=Math.min(t.from,t.to),o=Math.max(t.from,t.to);s<=o;){var a=e.getLine(s);if(a.length>n){var l=p(a,n,5);if(l){var h=null==(i=/^\s*/.exec(a))?void 0:i[0];e.replaceRange("\n"+h,new dT(s,l.start),new dT(s,l.end))}o++}else if(r&&/\S/.test(a)&&s!=o){var c=e.getLine(s+1);if(c&&/\S/.test(c)){var u=a.replace(/\s+$/,""),f=c.replace(/^\s+/,""),d=u+" "+f,l=p(d,n,5);l&&l.start>u.length||d.length<n?(e.replaceRange(" ",new dT(s,u.length),new dT(s+1,c.length-f.length)),s--,o--):u.length<a.length&&e.replaceRange("",new dT(s,u.length),new dT(s,a.length))}}s++}return s;function p(e,t,i){if(!(e.length<t)){var n=e.slice(0,t),r=e.slice(t),s=/^(?:(\s+)|(\S+)(\s+))/.exec(r),o=/(?:(\s+)|(\s+)(\S+))$/.exec(n),a=0,l=0;if(o&&!o[2]&&(a=t-o[1].length,l=t),s&&!s[2]&&(a||(a=t),l=t+s[1].length),a)return{start:a,end:l};if(o&&o[2]&&o.index>i)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return{start:a=t+s[2].length,end:a+s[3].length}}}}(this,e)}}function dL(e,t,i){var n=document.createElement("div");return n.appendChild(t),n}function dI(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}function dz(e,t){var i=e.state.dialog;e.state.dialog=t,t.style.flex="1",t&&i!==t&&(i&&i.contains(document.activeElement)&&e.focus(),i&&i.parentElement?i.parentElement.replaceChild(t,i):i&&i.remove(),dB.signal(e,"dialog"))}function dY(e,t){e.state.dialog==t&&(e.state.dialog=null,dB.signal(e,"dialog"))}dB.isMac="u">typeof navigator&&/Mac/.test(navigator.platform),dB.Pos=dT,dB.StringStream=class{constructor(e,t,i,n){this.string=e,this.tabSize=t,this.indentUnit=i,this.overrideIndent=n,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e instanceof RegExp?e.test(t):e(t)))return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lF(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return null!=(e=this.overrideIndent)?e:lF(this.string,null,this.tabSize)}match(e,t,i){if("string"==typeof e){let n=e=>i?e.toLowerCase():e;return n(this.string.substr(this.pos,e.length))==n(e)?(!1!==t&&(this.pos+=e.length),!0):null}{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}},dB.commands={toggleLineComment:function(e){l3(e.cm6)},cursorCharLeft:function(e){hQ(e.cm6)},redo:function(e){dj(e,!1)},undo:function(e){dj(e,!0)},newlineAndIndent:function(e){ct({state:e.cm6.state,dispatch:t=>dE(e,t)})},indentAuto:function(e){cs(e.cm6)},newlineAndIndentContinueComment:void 0,save:void 0},dB.isWordChar=function(e){return r.test(e)},dB.keys={Left:e=>s5(e.cm6,{key:"Left"},"editor"),Right:e=>s5(e.cm6,{key:"Right"},"editor"),Up:e=>s5(e.cm6,{key:"Up"},"editor"),Down:e=>s5(e.cm6,{key:"Down"},"editor"),Backspace:e=>s5(e.cm6,{key:"Backspace"},"editor"),Delete:e=>s5(e.cm6,{key:"Delete"},"editor")},dB.addClass=function(e,t){},dB.rmClass=function(e,t){},dB.e_preventDefault=function(e){e.preventDefault()},dB.e_stop=function(e){var t,i;null==(t=null==e?void 0:e.stopPropagation)||t.call(e),null==(i=null==e?void 0:e.preventDefault)||i.call(e)},dB.lookupKey=function(e,t,i){var n=dB.keys[e];!n&&/^Arrow/.test(e)&&(n=dB.keys[e.slice(5)]),n&&i(n)},dB.on=dM,dB.off=dZ,dB.signal=dR,dB.findMatchingTag=function(e,t){return null},dB.findEnclosingTag=function(e,t){var i,n,r=e.cm6.state,s=e.indexFromPos(t);s<r.doc.length&&"<"==r.sliceDoc(s,s+1)&&s++;for(var o=a0(r,s),a=(null==o?void 0:o.resolve(s))||null;a;){if((null==(i=a.firstChild)?void 0:i.type.name)=="OpenTag"&&(null==(n=a.lastChild)?void 0:n.type.name)=="CloseTag")return{open:dW(r.doc,a.firstChild),close:dW(r.doc,a.lastChild)};a=a.parent}},dB.keyName=void 0;var dV={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function dW(e,t){return{from:d_(e,t.from),to:d_(e,t.to)}}class dD{constructor(e,t,i){this.cm=e,this.id=e.$mid++,this.offset=t,this.assoc=i,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return null==this.offset?null:this.cm.posFromIndex(this.offset)}update(e){null!=this.offset&&(this.offset=e.mapPos(this.offset,this.assoc,tm.TrackDel))}}let dq=function(e){return e.facet(on)};class dN{constructor(e,t,i,n,r,s,o,a,l,h){this.left=e,this.top=t,this.height=i,this.fontFamily=n,this.fontSize=r,this.fontWeight=s,this.color=o,this.className=a,this.letter=l,this.partial=h}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",e.style.height=this.height+"px",e.style.lineHeight=this.height+"px",e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?"transparent":this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}}class dU{constructor(e,t){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=t,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer cm-vimCursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){let e=dq(this.cm.cm6.state).cursorBlinkRate;this.cursorLayer.style.animationDuration=e+"ms"}update(e){var t;(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),dq((t=e).startState)!=dq(t.state)&&this.setBlinkRate()}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,t=[];for(let i of e.selection.ranges){let n=i==e.selection.main,r=function(e,t,i,n){var r,s,o;let a=i.head,l=!1,h=1,c=e.state.vim;if(c&&(!c.insertMode||e.state.overwrite)){if(l=!0,c.visualBlock&&!n)return null;i.anchor<i.head&&"\n"!=(a<t.state.doc.length&&t.state.sliceDoc(a,a+1))&&a--,e.state.overwrite?h=.2:c.status&&(h=.5)}if(!l)return null;{let e,i=a<t.state.doc.length&&t.state.sliceDoc(a,a+1);i&&/[\uDC00-\uDFFF]/.test(i)&&a>1&&(a--,i=t.state.sliceDoc(a,a+1));let l=t.coordsAtPos(a,1);if(!l)return null;let c=(e=t.scrollDOM.getBoundingClientRect(),{left:(t.textDirection==nv.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}),f=t.domAtPos(a),d=f?f.node:t.contentDOM;for(d instanceof Text&&f.offset>=d.data.length&&(null==(r=d.parentElement)?void 0:r.nextSibling)&&(f={node:d=null==(s=d.parentElement)?void 0:s.nextSibling,offset:0});f&&f.node instanceof HTMLElement;)d=f.node,f={node:f.node.childNodes[f.offset],offset:0};if(!(d instanceof HTMLElement)){if(!d.parentNode)return null;d=d.parentNode}let p=getComputedStyle(d),O=l.left,g=null==(o=t.coordsForChar)?void 0:o.call(t,a);if(g&&(O=g.left),i&&"\n"!=i&&"\r"!=i)if(" "==i){i=" ";var u=t.coordsAtPos(a+1,-1);u&&(O=u.left-(u.left-l.left)/parseInt(p.tabSize))}else/[\uD800-\uDBFF]/.test(i)&&a<t.state.doc.length-1&&(i+=t.state.sliceDoc(a+1,a+2));else i=" ";let m=l.bottom-l.top;return new dN((O-c.left)/t.scaleX,(l.top-c.top+m*(1-h))/t.scaleY,m*h/t.scaleY,p.fontFamily,p.fontSize,p.fontWeight,p.color,n?"cm-fat-cursor cm-cursor-primary":"cm-fat-cursor cm-cursor-secondary",i,1!=h)}}(this.cm,this.view,i,n);r&&t.push(r)}return{cursors:t}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((e,t)=>!e.eq(this.cursors[t]))){let t=this.cursorLayer.children;if(t.length!==e.length)for(let t of(this.cursorLayer.textContent="",e))this.cursorLayer.appendChild(t.draw());else e.forEach((e,i)=>e.adjust(t[i]));this.cursors=e}}destroy(){this.cursorLayer.remove()}}let dG=tB.highest(sq.theme({".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-fat-cursor":{position:"absolute",background:"#ff9696",border:"none",whiteSpace:"pre"},"&:not(.cm-focused) .cm-fat-cursor":{background:"none",outline:"solid 1px #ff9696",color:"transparent !important"}}));var dF="u">typeof navigator&&/linux/i.test(navigator.platform)&&/ Gecko\/\d+/.exec(navigator.userAgent);let dK=function(e){var t,i,n,r=e.Pos;function s(e,t,i){if(t.line===i.line&&t.ch>=i.ch-1){var n=e.getLine(t.line).charCodeAt(t.ch);55296<=n&&n<=55551&&(i.ch+=1)}return{start:t,end:i}}var o=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"gc",type:"operator",operator:"toggleComment",isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"g?",type:"operator",operator:"rot13"},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],a=Object.create(null),l=o.length,h=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"put",shortName:"pu"},{name:"delmarks",shortName:"delm"},{name:"marks",excludeFromCommandHistory:!0},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],c=V("");function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(en(e.getCursor(),0,1)),ee.enterInsertMode(e,{},t))}),t.onPasteFn}var f=/[\d]/,d=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],p=[function(e){return/\S/.test(e)}],O=["<",">"],g=["-",'"',".",":","_","/","+"],m=/^\w$/,v=/^[A-Z]$/;try{v=RegExp("^[\\p{Lu}]$","u")}catch(e){}function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function w(e){return/^[a-z]$/.test(e)}function b(e){return/^\s*$/.test(e)}function x(e){return -1!=".?!".indexOf(e)}function S(e,t){for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1}var k={};function Q(e,t,i,n,r){if(void 0===t&&!r)throw Error("defaultValue is required unless callback is provided");if(i||(i="string"),k[e]={type:i,defaultValue:t,callback:r},n)for(var s=0;s<n.length;s++)k[n[s]]=k[e];t&&$(e,t)}function $(e,t,i,n){var r=k[e],s=(n=n||{}).scope;if(!r)return Error("Unknown option: "+e);if("boolean"==r.type)if(t&&!0!==t)return Error("Invalid argument: "+e+"="+t);else!1!==t&&(t=!0);r.callback?("local"!==s&&r.callback(t,void 0),"global"!==s&&i&&r.callback(t,i)):("local"!==s&&(r.value="boolean"==r.type?!!t:t),"global"!==s&&i&&(i.state.vim.options[e]={value:t}))}function P(e,t,i){var n=k[e],r=(i=i||{}).scope;if(!n)return Error("Unknown option: "+e);if(!n.callback)return("global"!==r&&t&&t.state.vim.options[e]||"local"!==r&&n||{}).value;{let e=t&&n.callback(void 0,t);return"global"!==r&&void 0!==e?e:"local"!==r?n.callback():void 0}}Q("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t)if(void 0===e){let e=t.getOption("mode");return"null"==e?"":e}else t.setOption("mode",""==e?"null":e)}),Q("textwidth",80,"number",["tw"],function(e,t){if(void 0!==t)if(void 0===e)return t.getOption("textwidth");else{var i=Math.round(e);i>1&&t.setOption("textwidth",i)}});var A=function(){var e=-1,t=0,i=0,n=Array(100);function r(r,s){(e+=s)>t?e=t:e<i&&(e=i);var o=n[(100+e)%100];if(o&&!o.find()){var a,l=s>0?1:-1,h=r.getCursor();do if(e+=l,(o=n[(100+e)%100])&&(a=o.find())&&!eo(h,a))break;while(e<t&&e>i)}return o}return{cachedCursor:void 0,add:function(r,s,o){var a=n[e%100];function l(t){var i=++e%100,s=n[i];s&&s.clear(),n[i]=r.setBookmark(t)}if(a){var h=a.find();h&&!eo(h,s)&&l(s)}else l(s);l(o),t=e,(i=e-100+1)<0&&(i=0)},find:function(t,i){var n=e,s=r(t,i);return e=n,s&&s.find()},move:r}},C=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};class _{constructor(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=C()}exitMacroRecordMode(){var e=t.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1}enterMacroRecordMode(e,i){var n=t.registerController.getRegister(i);if(n){if(n.clear(),this.latestRegister=i,e.openDialog){var r=eL("span",{class:"cm-vim-message"},"recording @"+i);this.onRecordingDone=e.openDialog(r,function(){},{bottom:!0})}this.isRecording=!0}}}function T(e){return e.state.vim||(e.state.vim={inputState:new W,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:void 0,sel:{anchor:new r(0,0),head:new r(0,0)},options:{},expectLiteralNext:!1,status:""}),e.state.vim}function M(){for(var e in t={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:A(),macroModeState:new _,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new U({}),searchHistoryController:new G,exCommandHistoryController:new G},k){var i=k[e];i.value=i.defaultValue}}class Z{constructor(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}}var R={enterVimMode:function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",e1),T(t),e.on(t.getInputField(),"paste",u(t))},leaveVimMode:function(t){t.setOption("disableInput",!1),t.off("cursorActivity",e1),e.off(t.getInputField(),"paste",u(t)),t.state.vim=null,eV&&clearTimeout(eV)},buildKeyMap:function(){},getRegisterController:function(){return t.registerController},resetVimGlobalState_:M,getVimGlobalState_:function(){return t},maybeInitVimState_:T,suppressErrorLogging:!1,InsertModeKey:Z,map:function(e,t,i){eK.map(e,t,i)},unmap:function(e,t){return eK.unmap(e,t)},noremap:function(e,t,i){eK.map(e,t,i,!0)},mapclear:function(e){var t=o.length,i=o.slice(0,t-l);if(o=o.slice(t-l),e)for(var n=i.length-1;n>=0;n--){var r=i[n];if(e!==r.context)if(r.context)this._mapCommand(r);else{var s=["normal","insert","visual"];for(var a in s)if(s[a]!==e){var h=Object.assign({},r);h.context=s[a],this._mapCommand(h)}}}},langmap:Y,vimKeyFromEvent:z,setOption:$,getOption:P,defineOption:Q,defineEx:function(e,t,i){if(t){if(0!==e.indexOf(t))throw Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;eF[e]=i,eK.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,i){var n=this.findKey(e,t,i);if("function"==typeof n)return n()},multiSelectHandleKey:function(e,t,i){var n=T(e),r=!1,n=R.maybeInitVimState_(e),s=n.visualBlock||n.wasInVisualBlock;if(e.state.closeVimNotification){var o=e.state.closeVimNotification;if(e.state.closeVimNotification=null,o(),"<CR>"==t)return D(e),!0}var a=e.isInMultiSelectMode();if(n.wasInVisualBlock&&!a?n.wasInVisualBlock=!1:a&&n.visualBlock&&(n.wasInVisualBlock=!0),"<Esc>"!=t||n.insertMode||n.visualMode||!a||"<Esc>"!=n.status)if(s||!a||e.inVirtualSelectionMode)r=R.handleKey(e,t,i);else{var l=e8(n),h=n.inputState.changeQueueList||[];e.operation(function(){e.curOp&&(e.curOp.isVimOp=!0);var s=0;e.forEachSelection(function(){e.state.vim.inputState.changeQueue=h[s];var n=e.getCursor("head"),o=e.getCursor("anchor"),a=ea(n,o)?0:-1,c=ea(n,o)?-1:0;n=en(n,0,a),o=en(o,0,c),e.state.vim.sel.head=n,e.state.vim.sel.anchor=o,r=R.handleKey(e,t,i),e.virtualSelection&&(h[s]=e.state.vim.inputState.changeQueue,e.state.vim=e8(l)),s++}),e.curOp?.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),e.state.vim=n,n.inputState.changeQueueList=h,n.inputState.changeQueue=null},!0)}else D(e);return!r||n.visualMode||n.insertMode||n.visualMode==e.somethingSelected()||e2(e,n),r},findKey:function(n,r,s){var a=T(n);function l(){if("<Esc>"==r){if(a.visualMode)ev(n);else{if(!a.insertMode)return;eH(n)}return D(n),!0}}var h=a.insertMode?function(){if(l())return!0;a.inputState.keyBuffer.push(r);var e=a.inputState.keyBuffer.join(""),s=1==r.length,h=F.matchCommand(e,o,a.inputState,"insert"),c=a.inputState.changeQueue;if("none"==h.type)return D(n),!1;if("partial"==h.type){if(h.expectLiteralNext&&(a.expectLiteralNext=!0),i&&window.clearTimeout(i),i=s&&window.setTimeout(function(){a.insertMode&&a.inputState.keyBuffer.length&&D(n)},P("insertModeEscKeysTimeout")),s){var u=n.listSelections();c&&c.removed.length==u.length||(c=a.inputState.changeQueue=new q),c.inserted+=r;for(var f=0;f<u.length;f++){var d=el(u[f].anchor,u[f].head),p=eh(u[f].anchor,u[f].head),O=n.getRange(d,n.state.overwrite?en(p,0,1):p);c.removed[f]=(c.removed[f]||"")+O}}return!s}if("full"==h.type&&(a.inputState.keyBuffer.length=0),a.expectLiteralNext=!1,i&&window.clearTimeout(i),h.command&&c){for(var u=n.listSelections(),f=0;f<u.length;f++){var g=u[f].head;n.replaceRange(c.removed[f]||"",en(g,0,-c.inserted.length),g,"+input")}t.macroModeState.lastInsertModeChanges.changes.pop()}return h.command||D(n),h.command}():function(){if(function(){var e=t.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),D(n),!0;"mapping"!=s&&function(e,i){if(!e.isPlaying){var n=e.latestRegister,r=t.registerController.getRegister(n);r&&r.pushText(i)}}(e,r)}}()||l())return!0;a.inputState.keyBuffer.push(r);var e=a.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(e))return!0;var i=/^(\d*)(.*)$/.exec(e);if(!i)return D(n),!1;var h=a.visualMode?"visual":"normal",c=i[2]||i[1];a.inputState.operatorShortcut&&a.inputState.operatorShortcut.slice(-1)==c&&(c=a.inputState.operatorShortcut);var u=F.matchCommand(c,o,a.inputState,h);return"none"==u.type?(D(n),!1):"partial"==u.type?(u.expectLiteralNext&&(a.expectLiteralNext=!0),!0):"clear"==u.type?(D(n),!0):(a.expectLiteralNext=!1,a.inputState.keyBuffer.length=0,(i=/^(\d*)(.*)$/.exec(e))&&i[1]&&"0"!=i[1]&&a.inputState.pushRepeatDigit(i[1]),u.command)}();return!1===h?!a.insertMode&&(1===r.length||e.isMac&&/<A-.>/.test(r))?function(){return!0}:void 0:!0===h?function(){return!0}:h?function(){return n.operation(function(){n.curOp.isVimOp=!0;try{if("object"!=typeof h)return;"keyToKey"==h.type?j(n,h.toKeys,h):F.processCommand(n,a,h)}catch(e){throw n.state.vim=void 0,T(n),R.suppressErrorLogging||console.log(e),e}return!0})}:void 0},handleEx:function(e,t){eK.processCommand(e,t)},defineMotion:function(e,t){K[e]=t},defineAction:function(e,t){ee[e]=t},defineOperator:function(e,t){J[e]=t},mapCommand:function(e,t,i,n,r){var s={keys:e,type:t};for(var o in s[t]=i,s[t+"Args"]=n,r)s[o]=r[o];eJ(s)},_mapCommand:eJ,defineRegister:function(e,i){var n=t.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=i,g.push(e)},exitVisualMode:ev,exitInsertMode:eH},X=[],E=!1;function j(e,t,i){var r=E;if(i){if(-1!=X.indexOf(i))return;X.push(i),E=!1!=i.noremap}try{for(var s,o=T(e),a=/<(?:[CSMA]-)*\w+>|./gi;s=a.exec(t);){var l=s[0],h=o.insertMode;if(n){!function(e){if(!n)throw Error("No prompt to send key to");if("<"==e[0]){var t=e.toLowerCase().slice(1,-1);if("lt"==(t=t.split("-").pop()||""))e="<";else if("space"==t)e=" ";else if("cr"==t)e="\n";else if(I[t]){var i=n.value||"",r={key:I[t],target:{value:i,selectionEnd:i.length,selectionStart:i.length}};n.onKeyDown&&n.onKeyDown(r,n.value,o),n&&n.onKeyUp&&n.onKeyUp(r,n.value,o);return}}if("\n"==e){var s=n;n=null,s.onClose&&s.onClose(s.value)}else n.value=(n.value||"")+e;function o(e){n&&("string"==typeof e?n.value=e:n=null)}}(l);continue}if(!R.handleKey(e,l,"mapping")&&h&&o.insertMode){if("<"==l[0]){var c=l.toLowerCase().slice(1,-1);if(c=c.split("-").pop()||"","lt"==c)l="<";else if("space"==c)l=" ";else if("cr"==c)l="\n";else if(I.hasOwnProperty(c)){l=I[c],e6(e,l);continue}else l=l[0],a.lastIndex=s.index+1}e.replaceSelection(l)}}}finally{if(X.pop(),E=!!X.length&&r,!X.length&&n){var u=n;n=null,ez(e,u)}}}var B={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},L={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},I={};function z(t,i){var n=t.key;if(!L[n]){n.length>1&&"n"==n[0]&&(n=n.replace("Numpad","")),n=B[n]||n;var r="";if(t.ctrlKey&&(r+="C-"),t.altKey&&(r+="A-"),t.metaKey&&(r+="M-"),e.isMac&&"A-"==r&&1==n.length&&(r=r.slice(2)),(r||n.length>1)&&t.shiftKey&&(r+="S-"),i&&!i.expectLiteralNext&&1==n.length){if(c.keymap&&n in c.keymap)!1==c.remapCtrl&&r||(n=c.keymap[n]);else if(n.charCodeAt(0)>128&&!a[n]){var s=t.code?.slice(-1)||"";t.shiftKey||(s=s.toLowerCase()),s&&(n=s,!r&&t.altKey&&(r="A-"))}}return(r+=n).length>1&&(r="<"+r+">"),r}}function Y(e,t){c.string!==e&&(c=V(e)),c.remapCtrl=t}function V(e){let t={};if(!e)return{keymap:t,string:""};function i(e){return e.split(/\\?(.)/).filter(Boolean)}return e.split(/((?:[^\\,]|\\.)+),/).map(e=>{if(!e)return;let n=e.split(/((?:[^\\;]|\\.)+);/);if(3==n.length){let e=i(n[1]),r=i(n[2]);if(e.length!==r.length)return;for(let i=0;i<e.length;++i)t[e[i]]=r[i]}else if(1==n.length){let n=i(e);if(n.length%2!=0)return;for(let e=0;e<n.length;e+=2)t[n[e]]=n[e+1]}}),{keymap:t,string:e}}"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(B)).forEach(function(e){I[(B[e]||"").toLowerCase()]=I[e.toLowerCase()]=e}),Q("langmap",void 0,"string",["lmap"],function(e,t){if(void 0===e)return c.string;Y(e)});class W{constructor(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=void 0,this.changeQueue=null}pushRepeatDigit(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)}getRepeat(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e}}function D(t,i){t.state.vim.inputState=new W,t.state.vim.expectLiteralNext=!1,e.signal(t,"vim-command-done",i)}function q(){this.removed=[],this.inserted=""}class N{constructor(e,t,i){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!i}setText(e,t,i){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!i}pushText(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)}pushInsertModeChanges(e){this.insertModeChanges.push(C(e))}pushSearchQuery(e){this.searchQueries.push(e)}clear(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1}toString(){return this.keyBuffer.join("")}}class U{constructor(e){this.registers=e,this.unnamedRegister=e['"']=new N,e["."]=new N,e[":"]=new N,e["/"]=new N,e["+"]=new N}pushText(e,t,i,n,r){if("_"!==e){n&&"\n"!==i.charAt(i.length-1)&&(i+="\n");var s=this.isValidRegister(e)?this.getRegister(e):null;if(!s||!e){switch(t){case"yank":this.registers["0"]=new N(i,n,r);break;case"delete":case"change":-1==i.indexOf("\n")?this.registers["-"]=new N(i,n):(this.shiftNumericRegisters_(),this.registers["1"]=new N(i,n))}this.unnamedRegister.setText(i,n,r);return}v.test(e)?s.pushText(i,n):s.setText(i,n,r),"+"===e&&navigator.clipboard.writeText(i),this.unnamedRegister.setText(s.toString(),n)}}getRegister(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new N),this.registers[e]):this.unnamedRegister}isValidRegister(e){return e&&(S(e,g)||m.test(e))}shiftNumericRegisters_(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}}class G{constructor(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}nextMatch(e,t){var i=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var r=this.iterator+n;t?r>=0:r<i.length;r+=n)for(var s=i[r],o=0;o<=s.length;o++)if(this.initialPrefix==s.substring(0,o))return this.iterator=r,s;return r>=i.length?(this.iterator=i.length,this.initialPrefix):r<0?e:void 0}pushInput(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)}reset(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}}var F={matchCommand:function(e,t,i,n){var r=function(e,t,i,n){n.operator&&(i="operatorPending");for(var r,s=[],o=[],a=E?t.length-l:0,h=a;h<t.length;h++){var c=t[h];("insert"!=i||"insert"==c.context)&&(!c.context||c.context==i)&&(!n.operator||"action"!=c.type)&&(r=function(e,t){let i="<character>"==t.slice(-11),n="<register>"==t.slice(-10);if(!i&&!n)return e==t?"full":0==t.indexOf(e)&&"partial";var r=t.length-(i?11:10),s=e.slice(0,r),o=t.slice(0,r);return s==o&&e.length>r?"full":0==o.indexOf(s)&&"partial"}(e,c.keys))&&("partial"==r&&s.push(c),"full"==r&&o.push(c))}return{partial:s,full:o}}(e,t,n,i),s=r.full[0];if(!s)return r.partial.length?{type:"partial",expectLiteralNext:1==r.partial.length&&"<character>"==r.partial[0].keys.slice(-11)}:{type:"none"};if("<character>"==s.keys.slice(-11)||"<register>"==s.keys.slice(-10)){var o=function(e){var t=/^.*(<[^>]+>)$/.exec(e),i=t?t[1]:e.slice(-1);if(i.length>1)switch(i){case"<CR>":case"<S-CR>":i="\n";break;case"<Space>":case"<S-Space>":i=" ";break;default:i=""}return i}(e);if(!o||o.length>1)return{type:"clear"};i.selectedCharacter=o}return{type:"full",command:s}},processCommand:function(e,t,i){switch(t.inputState.repeatOverride=i.repeatOverride,i.type){case"motion":this.processMotion(e,t,i);break;case"operator":this.processOperator(e,t,i);break;case"operatorMotion":this.processOperatorMotion(e,t,i);break;case"action":this.processAction(e,t,i);break;case"search":this.processSearch(e,t,i);break;case"ex":case"keyToEx":this.processEx(e,t,i)}},processMotion:function(e,t,i){t.inputState.motion=i.motion,t.inputState.motionArgs=ei(i.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,i){var n=t.inputState;if(n.operator)if(n.operator==i.operator){n.motion="expandToLine",n.motionArgs={linewise:!0,repeat:1},this.evalInput(e,t);return}else D(e);n.operator=i.operator,n.operatorArgs=ei(i.operatorArgs),i.keys.length>1&&(n.operatorShortcut=i.keys),i.exitVisualBlock&&(t.visualBlock=!1,eg(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,i){var n=t.visualMode,r=ei(i.operatorMotionArgs);r&&n&&r.visualLine&&(t.visualLine=!0),this.processOperator(e,t,i),n||this.processMotion(e,t,i)},processAction:function(e,t,i){var n=t.inputState,r=n.getRepeat(),s=!!r,o=ei(i.actionArgs)||{repeat:1};n.selectedCharacter&&(o.selectedCharacter=n.selectedCharacter),i.operator&&this.processOperator(e,t,i),i.motion&&this.processMotion(e,t,i),(i.motion||i.operator)&&this.evalInput(e,t),o.repeat=r||1,o.repeatIsExplicit=s,o.registerName=n.registerName,D(e),t.lastMotion=null,i.isEdit&&this.recordLastEdit(t,n,i),ee[i.action](e,o,t)},processSearch:function(i,n,r){if(i.getSearchCursor){var s=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;eZ(i).setReversed(!s);var a=s?"/":"?",l=eZ(i).getQuery(),h=i.getScrollInfo(),c="";switch(r.searchArgs.querySrc){case"prompt":var u=t.macroModeState;u.isPlaying?p(u.replaySearchQueries.shift()||"",!0,!1):ez(i,{onClose:function(e){i.scrollTo(h.left,h.top),p(e,!0,!0);var n=t.macroModeState;n.isRecording&&function(e,i){if(!e.isPlaying){var n=e.latestRegister,r=t.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(i)}}(n,e)},prefix:a,desc:eL("span",{$cursor:"pointer",onmousedown:function(e){e.preventDefault(),$("pcre",!P("pcre")),this.textContent=O(),g()}},O()),onKeyUp:function(e,i,n){var r,s=z(e);"<Up>"==s||"<Down>"==s?(r=e.target?e.target.selectionEnd:0,n(i=t.searchHistoryController.nextMatch(i,"<Up>"==s)||""),r&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(r,e.target.value.length))):s&&"<Left>"!=s&&"<Right>"!=s&&t.searchHistoryController.reset(),c=i,g()},onKeyDown:function(n,r,s){var o=z(n);"<Esc>"==o||"<C-c>"==o||"<C-[>"==o||"<BS>"==o&&""==r?(t.searchHistoryController.pushInput(r),t.searchHistoryController.reset(),eY(i,l?.source||""),eq(i),i.scrollTo(h.left,h.top),e.e_stop(n),D(i),s(),i.focus()):"<Up>"==o||"<Down>"==o?e.e_stop(n):"<C-u>"==o&&(e.e_stop(n),s(""))}});break;case"wordUnderCursor":var f=ew(i,{noSymbol:!0}),d=!0;if(f||(f=ew(i,{noSymbol:!1}),d=!1),!f){eI(i,"No word under cursor"),D(i);return}let n=i.getLine(f.start.line).substring(f.start.ch,f.end.ch);n=d&&o?"\\b"+n+"\\b":n.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),t.jumpList.cachedCursor=i.getCursor(),i.setCursor(f.start),p(n,!0,!1)}}function p(e,s,o){t.searchHistoryController.pushInput(e),t.searchHistoryController.reset();try{eY(i,e,s,o)}catch(t){eI(i,"Invalid regex: "+e),D(i);return}F.processMotion(i,n,{keys:"",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function O(){return P("pcre")?"(JavaScript regexp: set pcre)":"(Vim regexp: set nopcre)"}function g(){var e;try{e=eY(i,c,!0,!0)}catch(e){}e?i.scrollIntoView(eD(i,!s,e),30):(eq(i),i.scrollTo(h.left,h.top))}},processEx:function(i,n,r){if("keyToEx"==r.type)eK.processCommand(i,r.exArgs.input);else{var s={onClose:function(e){t.exCommandHistoryController.pushInput(e),t.exCommandHistoryController.reset(),eK.processCommand(i,e),i.state.vim&&D(i),eq(i)},onKeyDown:function(n,r,s){var o,a=z(n);(("<Esc>"==a||"<C-c>"==a||"<C-[>"==a||"<BS>"==a&&""==r)&&(t.exCommandHistoryController.pushInput(r),t.exCommandHistoryController.reset(),e.e_stop(n),D(i),eq(i),s(),i.focus()),"<Up>"==a||"<Down>"==a)?(e.e_stop(n),o=n.target?n.target.selectionEnd:0,s(r=t.exCommandHistoryController.nextMatch(r,"<Up>"==a)||""),o&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(o,n.target.value.length))):"<C-u>"==a?(e.e_stop(n),s("")):a&&"<Left>"!=a&&"<Right>"!=a&&t.exCommandHistoryController.reset()},onKeyUp:function(t,n){var r=new e.StringStream(n),s={};try{if(eK.parseInput_(i,r,s),"s"!=s.commandName)return void eq(i);var o=eK.matchCommand_(s.commandName);if(!o||(eK.parseCommandArgs_(r,s,o),!s.argString))return;var a=eB(s.argString.slice(1),!0,!0);a&&eW(i,a)}catch(e){}},prefix:":"};if(n.visualMode)s.value="'<,'>",s.selectValueOnOpen=!1;else{var o=n.inputState.getRepeat();o>1&&(s.value=".,.+"+(o-1),s.selectValueOnOpen=!1)}ez(i,s)}},evalInput:function(e,i){var n=i.inputState,o=n.motion,a=n.motionArgs||{repeat:1},l=n.operator,h=n.operatorArgs||{},c=n.registerName,u=i.sel,f=es(i.visualMode?et(e,u.head):e.getCursor("head")),d=es(i.visualMode?et(e,u.anchor):e.getCursor("anchor")),p=es(f),O=es(d);if(l&&this.recordLastEdit(i,n),(w=void 0!==n.repeatOverride?n.repeatOverride:n.getRepeat())>0&&a.explicitRepeat?a.repeatIsExplicit=!0:(a.noRepeat||!a.explicitRepeat&&0===w)&&(w=1,a.repeatIsExplicit=!1),n.selectedCharacter&&(a.selectedCharacter=h.selectedCharacter=n.selectedCharacter),a.repeat=w,D(e),o){var g=K[o](e,f,a,i,n);if(i.lastMotion=K[o],!g)return;if(a.toJumplist){var m=t.jumpList,v=m.cachedCursor;v?(eb(e,v,g),delete m.cachedCursor):eb(e,f,g)}g instanceof Array?(P=g[0],y=g[1]):y=g,y||(y=es(f)),i.visualMode?(i.visualBlock&&1/0===y.ch||(y=et(e,y,p)),P&&(P=et(e,P)),P=P||O,u.anchor=P,u.head=y,eg(e),eA(e,i,"<",ea(P,y)?P:y),eA(e,i,">",ea(P,y)?y:P)):l||(y=et(e,y,p),e.setCursor(y.line,y.ch))}if(l){if(h.lastSel){var y,w,x,S,k,Q,$,P=O,A=h.lastSel,C=Math.abs(A.head.line-A.anchor.line),_=Math.abs(A.head.ch-A.anchor.ch);y=A.visualLine?new r(O.line+C,O.ch):A.visualBlock?new r(O.line+C,O.ch+_):A.head.line==A.anchor.line?new r(O.line,O.ch+_):new r(O.line+C,O.ch),i.visualMode=!0,i.visualLine=A.visualLine,i.visualBlock=A.visualBlock,u=i.sel={anchor:P,head:y},eg(e)}else i.visualMode&&(h.lastSel={anchor:es(u.anchor),head:es(u.head),visualBlock:i.visualBlock,visualLine:i.visualLine});if(i.visualMode){x=el(u.head,u.anchor),S=eh(u.head,u.anchor),k=i.visualLine||h.linewise,Q=i.visualBlock?"block":k?"line":"char";var T=s(e,x,S);if($=em(e,{anchor:T.start,head:T.end},Q),k){var M=$.ranges;if("block"==Q)for(var Z=0;Z<M.length;Z++)M[Z].head.ch=eu(e,M[Z].head.line);else"line"==Q&&(M[0].head=new r(M[0].head.line+1,0))}}else{if(x=es(P||O),ea(S=es(y||p),x)){var R,X,E=x;x=S,S=E}(k=a.linewise||h.linewise)?(R=x,X=S,R.ch=0,X.ch=0,X.line++):a.forward&&function(e,t,i){var n=e.getRange(t,i);if(/\n\s*$/.test(n)){var r=n.split("\n");r.pop();for(var s=r.pop();r.length>0&&s&&b(s);s=r.pop())i.line--,i.ch=0;s?(i.line--,i.ch=eu(e,i.line)):i.ch=0}}(e,x,S),Q="char";var j=!a.inclusive||k,T=s(e,x,S);$=em(e,{anchor:T.start,head:T.end},Q,j)}e.setSelections($.ranges,$.primary),i.lastMotion=null,h.repeat=w,h.registerName=c,h.linewise=k;var B=J[l](e,h,$.ranges,O,y);i.visualMode&&ev(e,null!=B),B&&e.setCursor(B)}},recordLastEdit:function(e,i,n){var r=t.macroModeState;r.isPlaying||(e.lastEditInputState=i,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},K={moveToTopLine:function(e,t,i){var n=eN(e).top+i.repeat-1;return new r(n,ey(e.getLine(n)))},moveToMiddleLine:function(e){var t=eN(e),i=Math.floor((t.top+t.bottom)*.5);return new r(i,ey(e.getLine(i)))},moveToBottomLine:function(e,t,i){var n=eN(e).bottom-i.repeat+1;return new r(n,ey(e.getLine(n)))},expandToLine:function(e,t,i){return new r(t.line+i.repeat-1,1/0)},findNext:function(e,t,i){var n=eZ(e),r=n.getQuery();if(r){var s=!i.forward;s=n.isReversed()?!s:s,eW(e,r);var o=eD(e,s,r,i.repeat);return o||eI(e,"No match found "+r+(P("pcre")?" (set nopcre to use Vim regexps)":"")),o}},findAndSelectNextInclusive:function(t,i,n,s,o){var a=eZ(t),l=a.getQuery();if(l){var h,c,u,f,d,p=!n.forward,O=(h=t,c=p=a.isReversed()?!p:p,u=l,f=n.repeat,d=s,h.operation(function(){void 0===f&&(f=1);var e=h.getCursor(),t=h.getSearchCursor(u,e),i=t.find(!c);!d.visualMode&&i&&eo(t.from(),e)&&t.find(!c);for(var n=0;n<f;n++)if(!(i=t.find(c))&&!(t=h.getSearchCursor(u,c?new r(h.lastLine()):new r(h.firstLine(),0))).find(c))return;var s=t.from(),o=t.to();return s&&o&&[s,o]}));if(O){if(o.operator)return O;var g=O[0],m=new r(O[1].line,O[1].ch-1);if(s.visualMode){(s.visualLine||s.visualBlock)&&(s.visualLine=!1,s.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""}));var v=s.sel.anchor;if(v)if(a.isReversed())return n.forward?[v,g]:[v,m];else return n.forward?[v,m]:[v,g]}else s.visualMode=!0,s.visualLine=!1,s.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""});return p?[m,g]:[g,m]}}},goToMark:function(e,t,i,n){var r=eU(e,n,i.selectedCharacter||"");return r?i.linewise?{line:r.line,ch:ey(e.getLine(r.line))}:r:null},moveToOtherHighlightedEnd:function(e,t,i,n){var s=n.sel;return n.visualBlock&&i.sameLine?[et(e,new r(s.anchor.line,s.head.ch)),et(e,new r(s.head.line,s.anchor.ch))]:[s.head,s.anchor]},jumpToMark:function(e,t,i,n){for(var s=t,o=0;o<i.repeat;o++){var a=s;for(var l in n.marks){if(w(l)){var h=n.marks[l].find();if((i.forward?!ea(h,a):!ea(a,h))&&(!i.linewise||h.line!=a.line)){var c=eo(a,s),u=i.forward?ec(a,h,s):ec(s,h,a);(c||u)&&(s=h)}}}}return i.linewise&&(s=new r(s.line,ey(e.getLine(s.line)))),s},moveByCharacters:function(e,t,i){var n=i.repeat,s=i.forward?t.ch+n:t.ch-n;return new r(t.line,s)},moveByLines:function(e,t,i,n){var s=t.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:s=n.lastHPos;break;default:n.lastHPos=s}var o=i.repeat+(i.repeatOffset||0),a=i.forward?t.line+o:t.line-o,l=e.firstLine(),h=e.lastLine(),c=e.findPosV(t,i.forward?o:-o,"line",n.lastHSPos);return((i.forward?c.line>a:c.line<a)&&(a=c.line,s=c.ch),a<l&&t.line==l)?this.moveToStartOfLine(e,t,i,n):a>h&&t.line==h?e$(e,t,i,n,!0):(i.toFirstChar&&(n.lastHPos=s=ey(e.getLine(a))),n.lastHSPos=e.charCoords(new r(a,s),"div").left,new r(a,s))},moveByDisplayLines:function(e,t,i,n){var r=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(r,"div").left}for(var s=Math.round(i.repeat),o=0;o<s;o++){var a=e.findPosV(r,i.forward?1:-1,"line",n.lastHSPos);if(a.hitSide)break;r=a}return r!=t&&(n.lastHPos=r.ch),r},moveByPage:function(e,t,i){var n=i.repeat;return e.findPosV(t,i.forward?n:-n,"page")},moveByParagraph:function(e,t,i){var n=i.forward?1:-1;return eC(e,t,i.repeat,n).start},moveBySentence:function(e,t,i){var n=i.forward?1:-1,s=e,o=t,a=i.repeat,l=n;function h(e,t){if(null!==t.line)if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!y(e,t.ln)){t.line=null;return}t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}for(var c={ln:o.line,pos:o.ch};a>0;)c=l<0?function(e,t,i,n){var r=e.getLine(t),s={line:r,ln:t,pos:i,dir:n},o=s.ln,a=null,l=""===s.line;for(h(e,s);null!==s.line;){if(""!==s.line||l)if(x(s.line[s.pos])&&null!==a&&(s.ln!==o||s.pos+1!==a))return{ln:o,pos:a};else""===s.line||b(s.line[s.pos])||(l=!1,o=s.ln,a=s.pos);else if(null!==a)return{ln:o,pos:a};else return{ln:s.ln,pos:s.pos};h(e,s)}var r=e.getLine(o);a=0;for(var c=0;c<r.length;++c)if(!b(r[c])){a=c;break}return{ln:o,pos:a}}(s,c.ln,c.pos,l):function(e,t,i,n){var r=e.getLine(t),s=""===r,o={line:r,ln:t,pos:i,dir:n},a={ln:o.ln,pos:o.pos},l=""===o.line;for(h(e,o);null!==o.line;){if(a.ln=o.ln,a.pos=o.pos,""===o.line&&!l||s&&""!==o.line&&!b(o.line[o.pos]))return{ln:o.ln,pos:o.pos};x(o.line[o.pos])&&!s&&(o.pos===o.line.length-1||b(o.line[o.pos+1]))&&(s=!0),h(e,o)}var r=e.getLine(a.ln);a.pos=0;for(var c=r.length-1;c>=0;--c)if(!b(r[c])){a.pos=c;break}return a}(s,c.ln,c.pos,l),a--;return new r(c.ln,c.pos)},moveByScroll:function(e,t,i,n){var r=e.getScrollInfo(),s=null,o=i.repeat;o||(o=r.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(i.repeat=o,!(s=K.moveByDisplayLines(e,t,i,n)))return null;var l=e.charCoords(s,"local");return e.scrollTo(null,r.top+l.top-a.top),s},moveByWords:function(e,t,i){return function(e,t,i,n,s,o){var a=es(t),l=[];(n&&!s||!n&&s)&&i++;for(var h=!(n&&s),c=0;c<i;c++){var u=eQ(e,t,n,o,h);if(!u){var f=eu(e,e.lastLine());l.push(n?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}l.push(u),t=new r(u.line,n?u.to-1:u.from)}var d=l.length!=i,p=l[0],O=l.pop();return n&&!s?(d||p.from==a.ch&&p.line==a.line||(O=l.pop()),O&&new r(O.line,O.from)):n&&s?O&&new r(O.line,O.to-1):!n&&s?(d||p.to==a.ch&&p.line==a.line||(O=l.pop()),O&&new r(O.line,O.to)):O&&new r(O.line,O.from)}(e,t,i.repeat,!!i.forward,!!i.wordEnd,!!i.bigWord)},moveTillCharacter:function(e,t,i){var n=eP(e,i.repeat,i.forward,i.selectedCharacter,t),r=i.forward?-1:1;return(ex(r,i),n)?(n.ch+=r,n):null},moveToCharacter:function(e,t,i){var n=i.repeat;return ex(0,i),eP(e,n,i.forward,i.selectedCharacter,t)||t},moveToSymbol:function(e,t,i){var n=i.repeat;return i.selectedCharacter&&function(e,t,i,n){var s=es(e.getCursor()),o=i?1:-1,a=i?e.lineCount():-1,l=s.ch,h=s.line,c=e.getLine(h),u={lineText:c,nextCh:c.charAt(l),lastCh:null,index:l,symb:n,reverseSymb:(i?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:i,depth:0,curMoveThrough:!1},f=eS[n];if(!f)return s;var d=ek[f].init,p=ek[f].isComplete;for(d&&d(u);h!==a&&t;){if(u.index+=o,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(h+=o,u.lineText=e.getLine(h)||"",o>0)u.index=0;else{var O=u.lineText.length;u.index=O>0?O-1:0}u.nextCh=u.lineText.charAt(u.index)}p(u)&&(s.line=h,s.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?new r(h,u.index):s}(e,n,i.forward,i.selectedCharacter)||t},moveToColumn:function(e,t,i,n){var s,o,a,l=i.repeat;return n.lastHPos=l-1,n.lastHSPos=e.charCoords(t,"div").left,s=e,o=l,a=s.getCursor().line,et(s,new r(a,o-1))},moveToEol:function(e,t,i,n){return e$(e,t,i,n,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){return new r(t.line,ey(e.getLine(t.line)))},moveToMatchedSymbol:function(e,t){for(var i,n,s=t.line,o=t.ch,a=e.getLine(s);o<a.length;o++)if((i=a.charAt(o))&&(n=i,-1!="()[]{}".indexOf(n))){var l=e.getTokenTypeAt(new r(s,o+1));if("string"!==l&&"comment"!==l)break}if(!(o<a.length))return t;var h="<"===i||">"===i?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new r(s,o),{bracketRegex:h}).to},moveToStartOfLine:function(e,t){return new r(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,i){var n=i.forward?e.lastLine():e.firstLine();return i.repeatIsExplicit&&(n=i.repeat-e.getOption("firstLineNumber")),new r(n,ey(e.getLine(n)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(t,i,n,s){var o,a,l,h,c,u,f,d,p,O,g=n.selectedCharacter||"";"b"==g?g="(":"B"==g&&(g="{");var m=!n.textObjectInner;if(({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"})[g]){if(O=!0,!(p=eT(t,i,g,m))){var v=t.getSearchCursor(RegExp("\\"+g,"g"),i);v.find()&&(p=eT(t,v.from(),g,m))}}else if(({"'":!0,'"':!0,"`":!0})[g])O=!0,p=function(e,t,i,n){var s,o,a,l,h=es(t),c=e.getLine(h.line).split(""),u=c.indexOf(i);if(h.ch<u)h.ch=u;else if(u<h.ch&&c[h.ch]==i){var f=/string/.test(e.getTokenTypeAt(en(t,0,1))),d=/string/.test(e.getTokenTypeAt(t));!(f&&!d)&&(o=h.ch,--h.ch)}if(c[h.ch]!=i||o)for(a=h.ch;a>-1&&!s;a--)c[a]==i&&(s=a+1);else s=h.ch+1;if(s&&!o)for(a=s,l=c.length;a<l&&!o;a++)c[a]==i&&(o=a);return s&&o?(n&&(--s,++o),{start:new r(h.line,s),end:new r(h.line,o)}):{start:h,end:h}}(t,i,g,m);else if("W"===g||"w"===g)for(var y=n.repeat||1;y-- >0;){var w=ew(t,{inclusive:m,innerWord:!m,bigWord:"W"===g,noSymbol:"W"===g,multiline:!0},p&&p.end);w&&(p||(p=w),p.end=w.end)}else if("p"===g)if(p=eC(t,i,n.repeat,0,m),n.linewise=!0,s.visualMode)s.visualLine||(s.visualLine=!0);else{var S=s.inputState.operatorArgs;S&&(S.linewise=!0),p.end.line--}else if("t"===g)p=function(t,i,n){if(!e.findMatchingTag||!e.findEnclosingTag)return{start:i,end:i};var r=e.findMatchingTag(t,i)||e.findEnclosingTag(t,i);return r&&r.open&&r.close?n?{start:r.open.from,end:r.close.to}:{start:r.open.to,end:r.close.from}:{start:i,end:i}}(t,i,m);else if("s"===g){var k=t.getLine(i.line);i.ch>0&&x(k[i.ch])&&(i.ch-=1);var Q=e_(t,i,n.repeat,1,m),$=e_(t,i,n.repeat,-1,m);b(t.getLine($.line)[$.ch])&&b(t.getLine(Q.line)[Q.ch-1])&&($={line:$.line,ch:$.ch+1}),p={start:$,end:Q}}return p?t.state.vim.visualMode?(o=t,a=p.start,l=p.end,h=O,u=o.state.vim.sel,f=h?a:u.head,d=h?a:u.anchor,ea(l,a)&&(c=l,l=a,a=c),ea(f,d)?(f=el(a,f),d=eh(d,l)):(d=el(a,d),-1==(f=en(f=eh(f,l),0,-1)).ch&&f.line!=o.firstLine()&&(f=new r(f.line-1,eu(o,f.line-1)))),[d,f]):[p.start,p.end]:null},repeatLastCharacterSearch:function(e,i,n){var r=t.lastCharacterSearch,s=n.repeat,o=n.forward===r.forward,a=!!r.increment*(o?-1:1);n.inclusive=!!o;var l=eP(e,s,o,r.selectedCharacter,en(i,0,-a));return l?(l.ch+=a,l):i}};function H(e,t){for(var i=[],n=0;n<t;n++)i.push(e);return i}var J={change:function(e,i,n){var s,o,a=e.state.vim,l=n[0].anchor,h=n[0].head;if(a.visualMode)if(i.fullLine)h.ch=Number.MAX_VALUE,h.line--,e.setSelection(l,h),o=e.getSelection(),e.replaceSelection(""),s=l;else{o=e.getSelection();var c=H("",n.length);e.replaceSelections(c),s=el(n[0].head,n[0].anchor)}else{o=e.getRange(l,h);var u=a.lastEditInputState;if(u?.motion=="moveByWords"&&!b(o)){var f=/\s+$/.exec(o);f&&u.motionArgs&&u.motionArgs.forward&&(h=en(h,0,-f[0].length),o=o.slice(0,-f[0].length))}i.linewise&&(l=new r(l.line,ey(e.getLine(l.line))),h.line>l.line&&(h=new r(h.line-1,Number.MAX_VALUE))),e.replaceRange("",l,h),s=l}t.registerController.pushText(i.registerName,"change",o,i.linewise,n.length>1),ee.enterInsertMode(e,{head:s},e.state.vim)},delete:function(e,i,n){var s,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var l=H("",n.length);e.replaceSelections(l),s=el(n[0].head,n[0].anchor)}else{var h=n[0].anchor,c=n[0].head;i.linewise&&c.line!=e.firstLine()&&h.line==e.lastLine()&&h.line==c.line-1&&(h.line==e.firstLine()?h.ch=0:h=new r(h.line-1,eu(e,h.line-1))),o=e.getRange(h,c),e.replaceRange("",h,c),s=h,i.linewise&&(s=K.moveToFirstNonWhiteSpaceCharacter(e,h))}return t.registerController.pushText(i.registerName,"delete",o,i.linewise,a.visualBlock),et(e,s)},indent:function(e,t,i){var n=e.state.vim,r=n.visualMode&&t.repeat||1;if(n.visualBlock){for(var s,o=e.getOption("tabSize"),a=e.getOption("indentWithTabs")?" ":" ".repeat(o),l=i.length-1;l>=0;l--)if(s=el(i[l].anchor,i[l].head),t.indentRight)e.replaceRange(a.repeat(r),s,s);else{for(var h=e.getLine(s.line),c=0,u=0;u<r;u++){var f=h[s.ch+c];if(" "==f)c++;else if(" "==f){c++;for(var d=1;d<a.length&&" "===(f=h[s.ch+c]);d++)c++}else break}e.replaceRange("",s,en(s,0,c))}return s}if(e.indentMore)for(var u=0;u<r;u++)t.indentRight?e.indentMore():e.indentLess();else{var p=i[0].anchor.line,O=n.visualBlock?i[i.length-1].anchor.line:i[0].head.line;t.linewise&&O--;for(var l=p;l<=O;l++)for(var u=0;u<r;u++)e.indentLine(l,t.indentRight)}return K.moveToFirstNonWhiteSpaceCharacter(e,i[0].anchor)},indentAuto:function(e,t,i){return e.execCommand("indentAuto"),K.moveToFirstNonWhiteSpaceCharacter(e,i[0].anchor)},hardWrap:function(e,t,i,n){if(e.hardWrap){var s=i[0].anchor.line,o=i[0].head.line;t.linewise&&o--;var a=e.hardWrap({from:s,to:o});return a>s&&t.linewise&&a--,t.keepCursor?n:new r(a,0)}},toggleComment:function(e,t,i,n,r){return e.execCommand("toggleLineComment"),r},changeCase:function(e,t,i,n,r){for(var s=e.getSelections(),o=[],a=t.toLower,l=0;l<s.length;l++){var h=s[l],c="";if(!0===a)c=h.toLowerCase();else if(!1===a)c=h.toUpperCase();else for(var u=0;u<h.length;u++){var f=h.charAt(u);c+=v.test(f)?f.toLowerCase():f.toUpperCase()}o.push(c)}return(e.replaceSelections(o),t.shouldMoveCursor)?r:!e.state.vim.visualMode&&t.linewise&&i[0].anchor.line+1==i[0].head.line?K.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:el(i[0].anchor,i[0].head)},yank:function(e,i,n,r){var s=e.state.vim,o=e.getSelection(),a=s.visualMode?el(s.sel.anchor,s.sel.head,n[0].head,n[0].anchor):r;t.registerController.pushText(i.registerName,"yank",o,i.linewise,s.visualBlock);var l=Math.abs(e.getCursor("end").line-e.getCursor("start").line)||1;return eI(e,l+" lines yanked"+(i.registerName?' into "'+i.registerName:""),!1,1500),a},rot13:function(e,t,i,n,r){for(var s=e.getSelections(),o=[],a=0;a<s.length;a++){let e=s[a].split("").map(e=>{let t=e.charCodeAt(0);return t>=65&&t<=90?String.fromCharCode(65+(t-65+13)%26):t>=97&&t<=122?String.fromCharCode(97+(t-97+13)%26):e}).join("");o.push(e)}return(e.replaceSelections(o),t.shouldMoveCursor)?r:!e.state.vim.visualMode&&t.linewise&&i[0].anchor.line+1==i[0].head.line?K.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:el(i[0].anchor,i[0].head)}},ee={jumpListWalk:function(e,i,n){if(!n.visualMode){var r=i.repeat||1,s=i.forward,o=t.jumpList.move(e,s?r:-r),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,i){if(!i.visualMode){var n=t.repeat||1,r=e.defaultTextHeight(),s=e.getScrollInfo().top,o=r*n,a=t.forward?s+o:s-o,l=es(e.getCursor()),h=e.charCoords(l,"local");if(t.forward)a>h.top?(l.line+=(a-h.top)/r,l.line=Math.ceil(l.line),e.setCursor(l),h=e.charCoords(l,"local"),e.scrollTo(null,h.top)):e.scrollTo(null,a);else{var c=a+e.getScrollInfo().clientHeight;c<h.bottom?(l.line-=(h.bottom-c)/r,l.line=Math.floor(l.line),e.setCursor(l),h=e.charCoords(l,"local"),e.scrollTo(null,h.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,a)}}},scrollToCursor:function(e,t){var i=e.getCursor().line,n=e.charCoords(new r(i,0),"local"),s=e.getScrollInfo().clientHeight,o=n.top;switch(t.position){case"center":o=n.bottom-s/2;break;case"bottom":var a=new r(i,e.getLine(i).length-1),l=e.charCoords(a,"local").bottom-o;o=o-s+l}e.scrollTo(null,o)},replayMacro:function(e,i,n){var r=i.selectedCharacter||"",s=i.repeat||1,o=t.macroModeState;for("@"==r?r=o.latestRegister||"":o.latestRegister=r;s--;)!function(e,i,n,r){var s=t.registerController.getRegister(r);if(":"==r){s.keyBuffer[0]&&eK.processCommand(e,s.keyBuffer[0]),n.isPlaying=!1;return}var o=s.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=s.searchQueries.slice(0);for(var l=0;l<o.length;l++)for(var h,c,u=o[l],f=/<(?:[CSMA]-)*\w+>|./gi;h=f.exec(u);)if(c=h[0],R.handleKey(e,c,"macro"),i.insertMode){var d=s.insertModeChanges[a++].changes;t.macroModeState.lastInsertModeChanges.changes=d,e4(e,d,1),eH(e)}n.isPlaying=!1}(e,n,o,r)},enterMacroRecordMode:function(e,i){var n=t.macroModeState,r=i.selectedCharacter;t.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(i,n,o){if(!i.getOption("readOnly")){o.insertMode=!0,o.insertModeRepeat=n&&n.repeat||1;var a=n?n.insertAt:null,l=o.sel,h=n.head||i.getCursor("head"),c=i.listSelections().length;if("eol"==a)h=new r(h.line,eu(i,h.line));else if("bol"==a)h=new r(h.line,0);else if("charAfter"==a){var u=s(i,h,en(h,0,1));h=u.end}else if("firstNonBlank"==a){var u=s(i,h,K.moveToFirstNonWhiteSpaceCharacter(i,h));h=u.end}else if("startOfSelectedArea"==a){if(!o.visualMode)return;o.visualBlock?(h=new r(Math.min(l.head.line,l.anchor.line),Math.min(l.head.ch,l.anchor.ch)),c=Math.abs(l.head.line-l.anchor.line)+1):h=l.head.line<l.anchor.line?l.head:new r(l.anchor.line,0)}else if("endOfSelectedArea"==a){if(!o.visualMode)return;o.visualBlock?(h=new r(Math.min(l.head.line,l.anchor.line),Math.max(l.head.ch,l.anchor.ch)+1),c=Math.abs(l.head.line-l.anchor.line)+1):h=l.head.line>=l.anchor.line?en(l.head,0,1):new r(l.anchor.line,0)}else if("inplace"==a){if(o.visualMode)return}else"lastEdit"==a&&(h=eG(i)||h);i.setOption("disableInput",!1),n&&n.replace?(i.toggleOverwrite(!0),i.setOption("keyMap","vim-replace"),e.signal(i,"vim-mode-change",{mode:"replace"})):(i.toggleOverwrite(!1),i.setOption("keyMap","vim-insert"),e.signal(i,"vim-mode-change",{mode:"insert"})),t.macroModeState.isPlaying||(i.on("change",e0),o.insertEnd&&o.insertEnd.clear(),o.insertEnd=i.setBookmark(h,{insertLeft:!0}),e.on(i.getInputField(),"keydown",e5)),o.visualMode&&ev(i),ep(i,h,c)}},toggleVisualMode:function(t,i,n){var o,a=i.repeat,l=t.getCursor();if(n.visualMode)!!i.linewise!=n.visualLine||!!i.blockwise!=n.visualBlock?(n.visualLine=!!i.linewise,n.visualBlock=!!i.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),eg(t)):ev(t);else{n.visualMode=!0,n.visualLine=!!i.linewise,n.visualBlock=!!i.blockwise,o=et(t,new r(l.line,l.ch+a-1));var h=s(t,l,o);n.sel={anchor:h.start,head:h.end},e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),eg(t),eA(t,n,"<",el(l,o)),eA(t,n,">",eh(l,o))}},reselectLastSelection:function(t,i,n){var r=n.lastSelection;if(n.visualMode&&eO(t,n),r){var s=r.anchorMark.find(),o=r.headMark.find();if(!s||!o)return;n.sel={anchor:s,head:o},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,eg(t),eA(t,n,"<",el(s,o)),eA(t,n,">",eh(s,o)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,i){if(i.visualMode){if(n=e.getCursor("anchor"),ea(s=e.getCursor("head"),n)){var n,s,o=s;s=n,n=o}s.ch=eu(e,s.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),s=et(e,new r(n.line+a-1,1/0))}for(var l=0,h=n.line;h<s.line;h++){l=eu(e,n.line);var c="",u=0;if(!t.keepSpaces){var f=e.getLine(n.line+1);-1==(u=f.search(/\S/))?u=f.length:c=" "}e.replaceRange(c,new r(n.line,l),new r(n.line+1,u))}var d=et(e,new r(n.line,l));i.visualMode&&ev(e,!1),e.setCursor(d)},newLineAndEnterInsertMode:function(t,i,n){n.insertMode=!0;var s=es(t.getCursor());s.line!==t.firstLine()||i.after?(s.line=i.after?s.line:s.line-1,s.ch=eu(t,s.line),t.setCursor(s),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t)):(t.replaceRange("\n",new r(t.firstLine(),0)),t.setCursor(t.firstLine(),0)),this.enterInsertMode(t,{repeat:i.repeat},n)},paste:function(e,i,n){var r=t.registerController.getRegister(i.registerName);if("+"===i.registerName)navigator.clipboard.readText().then(t=>{this.continuePaste(e,i,n,t,r)});else{var s=r.toString();this.continuePaste(e,i,n,s,r)}},continuePaste:function(e,i,n,s,o){var a=es(e.getCursor());if(s){if(i.matchIndent){var l=e.getOption("tabSize"),h=function(e){return(e.split(" ").length-1)*l+ +(e.split(" ").length-1)},c=h(e.getLine(e.getCursor().line).match(/^\s*/)[0]),u=s.replace(/\n$/,""),f=s!==u,d=h(s.match(/^\s*/)[0]),s=u.replace(/^\s*/gm,function(t){var i=c+(h(t)-d);return i<0?"":e.getOption("indentWithTabs")?Array(Math.floor(i/l)+1).join(" "):Array(i+1).join(" ")});s+=f?"\n":""}i.repeat>1&&(s=Array(i.repeat+1).join(s));var p=void 0==i.linewise?o.linewise:i.linewise,O=o.blockwise,g=O?s.split("\n"):void 0;if(g){p&&g.pop();for(var m=0;m<g.length;m++)g[m]=""==g[m]?" ":g[m];a.ch+=+!!i.after,a.ch=Math.min(eu(e,a.line),a.ch)}else p?n.visualMode?s=n.visualLine?s.slice(0,-1):"\n"+s.slice(0,s.length-1)+"\n":i.after?(s="\n"+s.slice(0,s.length-1),a.ch=eu(e,a.line)):a.ch=0:a.ch+=+!!i.after;if(n.visualMode){n.lastPastedText=s;var v,y,w,b,x,S=(y=(v=e.listSelections())[0],w=v[v.length-1],[ea(y.anchor,y.head)?y.anchor:y.head,ea(w.anchor,w.head)?w.head:w.anchor]),k=S[0],Q=S[1],$=e.getSelection(),P=Array(e.listSelections().length).join("1").split("1");n.lastSelection&&(x=n.lastSelection.headMark.find()),t.registerController.unnamedRegister.setText($),O?(e.replaceSelections(P),Q=new r(k.line+s.length-1,k.ch),e.setCursor(k),ed(e,Q),e.replaceSelections(s),b=k):n.visualBlock?(e.replaceSelections(P),e.setCursor(k),e.replaceRange(s,k,k),b=k):(e.replaceRange(s,k,Q),b=e.posFromIndex(e.indexFromPos(k)+s.length-1)),x&&(n.lastSelection.headMark=e.setBookmark(x)),p&&(b.ch=0)}else if(O&&g){e.setCursor(a);for(var m=0;m<g.length;m++){var A=a.line+m;A>e.lastLine()&&e.replaceRange("\n",new r(A,0)),eu(e,A)<a.ch&&function(e,t,i){var n=eu(e,t),s=Array(i-n+1).join(" ");e.setCursor(new r(t,n)),e.replaceRange(s,e.getCursor())}(e,A,a.ch)}e.setCursor(a),ed(e,new r(a.line+g.length-1,a.ch)),e.replaceSelections(g),b=a}else if(e.replaceRange(s,a),p){var A=i.after?a.line+1:a.line;b=new r(A,ey(e.getLine(A)))}else b=es(a),/\n/.test(s)||(b.ch+=s.length-!!i.after);n.visualMode&&ev(e,!1),e.setCursor(b)}},undo:function(t,i){t.operation(function(){er(t,e.commands.undo,i.repeat)(),t.setCursor(et(t,t.getCursor("start")))})},redo:function(t,i){er(t,e.commands.redo,i.repeat)()},setRegister:function(e,t,i){i.inputState.registerName=t.selectedCharacter},insertRegister:function(e,i,n){var r=i.selectedCharacter,s=t.registerController.getRegister(r),o=s&&s.toString();o&&e.replaceSelection(o)},oneNormalCommand:function(t,i,n){eH(t,!0),n.insertModeReturn=!0,e.on(t,"vim-command-done",function i(){n.visualMode||(n.insertModeReturn&&(n.insertModeReturn=!1,n.insertMode||ee.enterInsertMode(t,{},n)),e.off(t,"vim-command-done",i))})},setMark:function(e,t,i){var n=t.selectedCharacter;n&&eA(e,i,n,e.getCursor())},replace:function(t,i,n){var o,a,l=i.selectedCharacter||"",h=t.getCursor(),c=t.listSelections();if(n.visualMode)h=t.getCursor("start"),a=t.getCursor("end");else{var u=t.getLine(h.line);(o=h.ch+i.repeat)>u.length&&(o=u.length),a=new r(h.line,o)}var f=s(t,h,a);if(h=f.start,a=f.end,"\n"==l)n.visualMode||t.replaceRange("",h,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var d=t.getRange(h,a);if(d=(d=d.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l)).replace(/[^\n]/g,l),n.visualBlock){var p=Array(t.getOption("tabSize")+1).join(" "),O=(d=(d=t.getSelection()).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l)).replace(/\t/g,p).replace(/[^\n]/g,l).split("\n");t.replaceSelections(O)}else t.replaceRange(d,h,a);n.visualMode?(h=ea(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(h),ev(t,!1)):t.setCursor(en(a,0,-1))}},incrementNumberToken:function(e,t){for(var i,n,s,o,a=e.getCursor(),l=e.getLine(a.line),h=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(i=h.exec(l))&&(s=(n=i.index)+i[0].length,!(a.ch<s)););if(t.backtrack||!(s<=a.ch)){if(!i)return;var c=i[2]||i[4],u=i[3]||i[5],f=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[c.toLowerCase()];o=(parseInt(i[1]+u,d)+f*t.repeat).toString(d);var p=c?Array(u.length-o.length+1+i[1].length).join("0"):"";o="-"===o.charAt(0)?"-"+c+p+o.substr(1):c+p+o;var O=new r(a.line,n),g=new r(a.line,s);e.replaceRange(o,O,g),e.setCursor(new r(a.line,n+o.length-1))}},repeatLastEdit:function(e,t,i){var n=i.lastEditInputState;if(n){var r=t.repeat;r&&t.repeatIsExplicit?n.repeatOverride=r:r=n.repeatOverride||r,e3(e,i,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:function(e,t){eH(e)}};function et(e,t,i){var n=e.state.vim,s=n.insertMode||n.visualMode,o=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),a=e.getLine(o),l=a.length-1+Number(!!s),h=Math.min(Math.max(0,t.ch),l),c=a.charCodeAt(h);if(56320<=c&&c<=57343){var u=1;i&&i.line==o&&i.ch>h&&(u=-1),(h+=u)>l&&(h-=2)}return new r(o,h)}function ei(e){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function en(e,t,i){return"object"==typeof t&&(i=t.ch,t=t.line),new r(e.line+t,e.ch+i)}function er(e,t,i){return function(){for(var n=0;n<i;n++)t(e)}}function es(e){return new r(e.line,e.ch)}function eo(e,t){return e.ch==t.ch&&e.line==t.line}function ea(e,t){return!!(e.line<t.line)||e.line==t.line&&!!(e.ch<t.ch)}function el(e,t){return arguments.length>2&&(t=el.apply(void 0,Array.prototype.slice.call(arguments,1))),ea(e,t)?e:t}function eh(e,t){return arguments.length>2&&(t=eh.apply(void 0,Array.prototype.slice.call(arguments,1))),ea(e,t)?t:e}function ec(e,t,i){var n=ea(e,t),r=ea(t,i);return n&&r}function eu(e,t){return e.getLine(t).length}function ef(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ed(e,t){var i=[],n=e.listSelections(),s=es(e.clipPos(t)),o=!eo(t,s),a=function(e,t){for(var i=0;i<e.length;i++){var n=eo(e[i].anchor,t),r=eo(e[i].head,t);if(n||r)return i}return -1}(n,e.getCursor("head")),l=eo(n[a].head,n[a].anchor),h=n.length-1,c=h-a>a?h:0,u=n[c].anchor,f=Math.min(u.line,s.line),d=Math.max(u.line,s.line),p=u.ch,O=s.ch,g=n[c].head.ch-p,m=O-p;g>0&&m<=0?(p++,!o&&O--):g<0&&m>=0?(p--,!l&&O++):g<0&&-1==m&&(p--,O++);for(var v=f;v<=d;v++){var y={anchor:new r(v,p),head:new r(v,O)};i.push(y)}return e.setSelections(i),t.ch=O,u.ch=p,u}function ep(e,t,i){for(var n=[],r=0;r<i;r++){var s=en(t,r,0);n.push({anchor:s,head:s})}e.setSelections(n,0)}function eO(e,t){var i=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(i)+t.lastPastedText.length),t.lastPastedText=void 0),t.lastSelection={anchorMark:e.setBookmark(i),headMark:e.setBookmark(n),anchor:es(i),head:es(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function eg(e,t,i){var n=e.state.vim;t=t||n.sel,i||(i=n.visualLine?"line":n.visualBlock?"block":"char");var r=em(e,t,i);e.setSelections(r.ranges,r.primary)}function em(e,t,i,n){var s=es(t.head),o=es(t.anchor);if("char"==i){var a=+!(n||ea(t.head,t.anchor)),l=+!!ea(t.head,t.anchor);return s=en(t.head,0,a),{ranges:[{anchor:o=en(t.anchor,0,l),head:s}],primary:0}}if("line"==i){if(ea(t.head,t.anchor))s.ch=0,o.ch=eu(e,o.line);else{o.ch=0;var h=e.lastLine();s.line>h&&(s.line=h),s.ch=eu(e,s.line)}return{ranges:[{anchor:o,head:s}],primary:0}}if("block"==i){var c=Math.min(o.line,s.line),u=o.ch,f=Math.max(o.line,s.line),d=s.ch;u<d?d+=1:u+=1;for(var p=f-c+1,O=s.line==c?0:p-1,g=[],m=0;m<p;m++)g.push({anchor:new r(c+m,u),head:new r(c+m,d)});return{ranges:g,primary:O}}throw"never happens"}function ev(t,i){var n=t.state.vim;!1!==i&&t.setCursor(et(t,n.sel.head)),eO(t,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,n.insertMode||e.signal(t,"vim-mode-change",{mode:"normal"})}function ey(e){if(!e)return 0;var t=e.search(/\S/);return -1==t?e.length:t}function ew(e,{inclusive:t,innerWord:i,bigWord:n,noSymbol:s,multiline:o},a){var l,h,c=a||(l=e.getCursor("head"),1==e.getSelection().length&&(l=el(l,e.getCursor("anchor"))),l),u=e.getLine(c.line),f=u,O=c.line,g=O,m=c.ch,v=s?d[0]:p[0];if(i&&/\s/.test(u.charAt(m)))v=function(e){return/\s/.test(e)};else{for(;!v(u.charAt(m));)if(++m>=u.length){if(!o)return null;m--,h=eQ(e,c,!0,n,!0);break}n?v=p[0]:(v=d[0])(u.charAt(m))||(v=d[1])}for(var y=m,w=m;v(u.charAt(w))&&w>=0;)w--;if(w++,h)y=h.to,g=h.line,!(f=e.getLine(g))&&0==y&&y++;else for(;v(u.charAt(y))&&y<u.length;)y++;if(t){var b=y,x=c.ch<=w&&/\s/.test(u.charAt(c.ch));if(!x)for(;/\s/.test(f.charAt(y))&&y<f.length;)y++;if(b==y||x){for(var S=w;/\s/.test(u.charAt(w-1))&&w>0;)w--;w||x||(w=S)}}return{start:new r(O,w),end:new r(g,y)}}function eb(e,i,n){eo(i,n)||t.jumpList.add(e,i,n)}function ex(e,i){t.lastCharacterSearch.increment=e,t.lastCharacterSearch.forward=i.forward,t.lastCharacterSearch.selectedCharacter=i.selectedCharacter}var eS={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ek={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)?.[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function eQ(e,t,i,n,r){var s=t.line,o=t.ch,a=e.getLine(s),l=i?1:-1,h=n?p:d;if(r&&""==a){if(s+=l,a=e.getLine(s),!y(e,s))return null;o=i?0:a.length}for(;;){if(r&&""==a)return{from:0,to:0,line:s};for(var c=l>0?a.length:-1,u=c,f=c;o!=c;){for(var O=!1,g=0;g<h.length&&!O;++g)if(h[g](a.charAt(o))){for(u=o;o!=c&&h[g](a.charAt(o));)o+=l;if(O=u!=(f=o),u==t.ch&&s==t.line&&f==u+l)continue;return{from:Math.min(u,f+1),to:Math.max(u,f),line:s}}O||(o+=l)}if(!y(e,s+=l))return null;a=e.getLine(s),o=l>0?0:a.length}}function e$(e,t,i,n,s){var o=new r(t.line+i.repeat-1,1/0),a=e.clipPos(o);return a.ch--,s||(n.lastHPos=1/0,n.lastHSPos=e.charCoords(a,"div").left),o}function eP(e,t,i,n,s){if(n){for(var o,a=s||e.getCursor(),l=a.ch,h=0;h<t;h++){if(-1==(o=function(e,t,i,n,r){var s;return n?-1==(s=t.indexOf(i,e+1))||r||(s-=1):-1==(s=t.lastIndexOf(i,e-1))||r||(s+=1),s}(l,e.getLine(a.line),n,i,!0)))return;l=o}if(void 0!=o)return new r(e.getCursor().line,o)}}function eA(e,t,i,n){(S(i,O)||m.test(i))&&(t.marks[i]&&t.marks[i].clear(),t.marks[i]=e.setBookmark(n))}function eC(e,t,i,n,s){var o,a=t.line,l=e.firstLine(),h=e.lastLine(),c=a;function u(t){return!e.getLine(t)}function f(e,t,i){return i?u(e)!=u(e+t):!u(e)&&u(e+t)}if(n){for(;l<=c&&c<=h&&i>0;)f(c,n)&&i--,c+=n;return{start:new r(c,0),end:t}}var d=e.state.vim;if(d.visualLine&&f(a,1,!0)){var p=d.sel.anchor;f(p.line,-1,!0)&&(!s||p.line!=a)&&(a+=1)}var O=u(a);for(c=a;c<=h&&i;c++)f(c,1,!0)&&(!s||u(c)!=O)&&i--;for(o=new r(c,0),c>h&&!O?O=!0:s=!1,c=a;c>l&&!((!s||u(c)==O||c==a)&&f(c,-1,!0));c--);return{start:new r(c,0),end:o}}function e_(e,t,i,n,s){function o(e){null!==e.line&&(e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir)}for(var a={ln:t.line,pos:t.ch};i>0;)a=n<0?function(e,t,i,n){var r=e.getLine(t),a={line:r,ln:t,pos:i,dir:n};if(""===a.line)return{ln:a.ln,pos:a.pos};var l=a.pos;for(o(a);null!==a.line;){if(b(a.line[a.pos])||x(a.line[a.pos])){if(x(a.line[a.pos]))if(!s)return{ln:a.ln,pos:l};else if(b(a.line[a.pos+1]))return{ln:a.ln,pos:a.pos+1};else return{ln:a.ln,pos:l}}else l=a.pos;o(a)}return(a.line=r,s&&b(a.line[a.pos]))?{ln:a.ln,pos:a.pos}:{ln:a.ln,pos:l}}(e,a.ln,a.pos,n):function(e,t,i,n){var r={line:e.getLine(t),ln:t,pos:i,dir:n};if(""===r.line)return{ln:r.ln,pos:r.pos};var a=r.pos;for(o(r);null!==r.line;){if(a=r.pos,x(r.line[r.pos]))if(!s)return{ln:r.ln,pos:r.pos+1};else{for(o(r);null!==r.line;)if(b(r.line[r.pos]))a=r.pos,o(r);else break;break}o(r)}return{ln:r.ln,pos:a+1}}(e,a.ln,a.pos,n),i--;return new r(a.ln,a.pos)}function eT(e,t,i,n){var s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[i],o=+(e.getLine(t.line).charAt(t.ch)===({"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"})[i]),a=e.scanForBracket(new r(t.line,t.ch+o),-1,void 0,{bracketRegex:s}),l=e.scanForBracket(new r(t.line,t.ch+o),1,void 0,{bracketRegex:s});if(!a||!l)return null;var h=a.pos,c=l.pos;if(h.line==c.line&&h.ch>c.ch||h.line>c.line){var u=h;h=c,c=u}return n?c.ch+=1:h.ch+=1,{start:h,end:c}}Q("pcre",!0,"boolean");class eM{constructor(){this.highlightTimeout}getQuery(){return t.query}setQuery(e){t.query=e}getOverlay(){return this.searchOverlay}setOverlay(e){this.searchOverlay=e}isReversed(){return t.isReversed}setReversed(e){t.isReversed=e}getScrollbarAnnotate(){return this.annotate}setScrollbarAnnotate(e){this.annotate=e}}function eZ(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new eM)}function eR(e,t){var i=eX(e,t)||[];if(!i.length)return[];var n=[];if(0===i[0]){for(var r=0;r<i.length;r++)"number"==typeof i[r]&&n.push(e.substring(i[r]+1,i[r+1]));return n}}function eX(e,t){t||(t="/");for(var i=!1,n=[],r=0;r<e.length;r++){var s=e.charAt(r);i||s!=t||n.push(r),i=!i&&"\\"==s}return n}var eE={"\\n":"\n","\\r":"\r","\\t":" "},ej={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":" ","\\&":"&"};function eB(e,i,n){t.registerController.getRegister("/").setText(e);var r,s,o,a,l,h,c,u,f=eX(e,"/");return(f.length?(r=e.substring(0,f[0]),s=-1!=e.substring(f[0]).indexOf("i")):r=e,r)?(P("pcre")||(o=r,l={">":"(?<=[\\w])(?=[^\\w]|$)","<":"(?<=[^\\w]|^)(?=[\\w])"},h=(a={V:"|(){+?*.[$^",M:"|(){+?*.[",m:"|(){+?",v:"<>"}).m,-1!=(u=(c=o.replace(/\\.|[\[|(){+*?.$^<>]/g,function(e){if("\\"===e[0]){var t=e[1];return"}"===t||-1!=h.indexOf(t)?t:t in a?(h=a[t],""):t in l?l[t]:e}return -1!=h.indexOf(e)?l[e]||"\\"+e:e})).indexOf("\\zs"))&&(c="(?<="+c.slice(0,u)+")"+c.slice(u+3)),-1!=(u=c.indexOf("\\ze"))&&(c=c.slice(0,u)+"(?="+c.slice(u+3)+")"),r=c),n&&(i=/^[^A-Z]*$/.test(r)),new RegExp(r,i||s?"im":"m")):null}function eL(e){"string"==typeof e&&(e=document.createElement(e));for(var t=1;t<arguments.length;t++){var i=arguments[t];if(i)if("object"!=typeof i&&(i=document.createTextNode(i)),i.nodeType)e.appendChild(i);else for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&("$"===n[0]?e.style[n.slice(1)]=i[n]:"function"==typeof i[n]?e[n]=i[n]:e.setAttribute(n,i[n]))}return e}function eI(e,t,i,n){var r=eL("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},t);e.openNotification?i?(r=eL("div",{},r,eL("div",{},"Press ENTER or type command to continue")),e.state.closeVimNotification&&e.state.closeVimNotification(),e.state.closeVimNotification=e.openNotification(r,{bottom:!0,duration:0})):e.openNotification(r,{bottom:!0,duration:n||15e3}):n||alert(r.innerText)}function ez(e,t){if(X.length){t.value||(t.value=""),n=t;return}var i,r,s=(i=t.prefix,r=t.desc,eL("div",{$display:"flex",$flex:1},eL("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1,$display:"flex"},i,eL("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$flex:1})),r&&eL("span",{$color:"#888"},r)));if(e.openDialog)e.openDialog(s,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value});else{var o="";"string"!=typeof t.prefix&&t.prefix&&(o+=t.prefix.textContent),t.desc&&(o+=" "+t.desc),t.onClose?.(prompt(o,""))}}function eY(e,t,i,n){if(t){var r,s=eZ(e),o=eB(t,!!i,!!n);if(o)return eW(e,o),r=s.getQuery(),o instanceof RegExp&&r instanceof RegExp&&o.flags==r.flags&&o.source==r.source||s.setQuery(o),o}}var eV=0;function eW(e,t){clearTimeout(eV),eZ(e).highlightTimeout=eV,eV=setTimeout(function(){if(e.state.vim){var i=eZ(e);i.highlightTimeout=void 0;var n=i.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(i){if(t&&!i.sol())return void i.skipToEnd();var n=i.match(e,!1);if(n)return 0==n[0].length?(i.next(),"searching"):i.sol()||(i.backUp(1),e.exec(i.next()+n[0]))?(i.match(e),"searching"):(i.next(),null);for(;!i.eol()&&(i.next(),!i.match(e,!1)););},query:e}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(i.getScrollbarAnnotate()&&i.getScrollbarAnnotate().clear(),i.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),i.setOverlay(n))}},50)}function eD(e,t,i,n){return e.operation(function(){void 0===n&&(n=1);for(var s=e.getCursor(),o=e.getSearchCursor(i,s),a=0;a<n;a++){var l=o.find(t);if(0==a&&l&&eo(o.from(),s)){var h=t?o.from():o.to();(l=o.find(t))&&!l[0]&&eo(o.from(),h)&&e.getLine(h.line).length==h.ch&&(l=o.find(t))}if(!l&&!(o=e.getSearchCursor(i,t?new r(e.lastLine()):new r(e.firstLine(),0))).find(t))return}return o.from()})}function eq(e){var t=eZ(e);t.highlightTimeout&&(clearTimeout(t.highlightTimeout),t.highlightTimeout=void 0),e.removeOverlay(eZ(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function eN(e){var t=e.getScrollInfo(),i=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,r=e.coordsChar({left:0,top:n},"local");return{top:i.line,bottom:r.line}}function eU(e,i,n){if("'"==n||"`"==n)return t.jumpList.find(e,-1)||new r(0,0);if("."==n)return eG(e);var s=i.marks[n];return s&&s.find()}function eG(e){if(e.getLastEditEnd)return e.getLastEditEnd();for(var t=e.doc.history.done,i=t.length;i--;)if(t[i].changes)return es(t[i].changes[0].to)}var eF={colorscheme:function(e,t){!t.args||t.args.length<1?eI(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,i,n){var r=t.args;if(!r||r.length<2){e&&eI(e,"Invalid mapping: "+t.input);return}eK.map(r[0],r[1],i,n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},omap:function(e,t){this.map(e,t,"operatorPending")},noremap:function(e,t){this.map(e,t,void 0,!0)},inoremap:function(e,t){this.map(e,t,"insert",!0)},nnoremap:function(e,t){this.map(e,t,"normal",!0)},vnoremap:function(e,t){this.map(e,t,"visual",!0)},onoremap:function(e,t){this.map(e,t,"operatorPending",!0)},unmap:function(e,t,i){var n=t.args;(!n||n.length<1||!eK.unmap(n[0],i))&&e&&eI(e,"No such mapping: "+t.input)},mapclear:function(e,t){R.mapclear()},imapclear:function(e,t){R.mapclear("insert")},nmapclear:function(e,t){R.mapclear("normal")},vmapclear:function(e,t){R.mapclear("visual")},omapclear:function(e,t){R.mapclear("operatorPending")},move:function(e,t){F.processCommand(e,e.state.vim,{keys:"",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var i=t.args,n=t.setCfg||{};if(!i||i.length<1){e&&eI(e,"Invalid mapping: "+t.input);return}var r=i[0].split("="),s=r.shift()||"",o=r.length>0?r.join("="):void 0,a=!1,l=!1;if("?"==s.charAt(s.length-1)){if(o)throw Error("Trailing characters: "+t.argString);s=s.substring(0,s.length-1),a=!0}else"!"==s.charAt(s.length-1)&&(s=s.substring(0,s.length-1),l=!0);void 0===o&&"no"==s.substring(0,2)&&(s=s.substring(2),o=!1);var h=k[s]&&"boolean"==k[s].type;if(h&&(l?o=!P(s,e,n):void 0==o&&(o=!0)),!h&&void 0===o||a){var c=P(s,e,n);c instanceof Error?eI(e,c.message):!0===c||!1===c?eI(e," "+(c?"":"no")+s):eI(e," "+s+"="+c)}else{var u=$(s,o,e,n);u instanceof Error&&eI(e,u.message)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,i){var n=i.args,r=t.registerController.registers,s="----------Registers----------\n\n";if(n)for(var o=n.join(""),a=0;a<o.length;a++){var l=o.charAt(a);if(t.registerController.isValidRegister(l)){var h=r[l]||new N;s+='"'+l+" "+h.toString()+"\n"}}else for(var l in r){var c=r[l].toString();c.length&&(s+='"'+l+" "+c+"\n")}eI(e,s,!0)},marks:function(e,t){var i=t.args,n=e.state.vim.marks,r="-----------Marks-----------\nmark line col\n\n";if(i)for(var s=i.join(""),o=0;o<s.length;o++){var a=s.charAt(o),l=n[a]&&n[a].find();l&&(r+=a+" "+l.line+" "+l.ch+"\n")}else for(var a in n){var l=n[a]&&n[a].find();l&&(r+=a+" "+l.line+" "+l.ch+"\n")}eI(e,r,!0)},sort:function(t,i){var n=function(){if(i.argString){var t=new e.StringStream(i.argString);if(t.eat("!")&&(g=!0),!t.eol()){if(!t.eatSpace())return"Invalid arguments";var n=t.match(/([dinuoxr]+)?\s*(\/.+\/)?\s*/);if(!n||!t.eol())return"Invalid arguments";if(n[1]){b=-1!=n[1].indexOf("r"),m=-1!=n[1].indexOf("i"),v=-1!=n[1].indexOf("u");var r=-1!=n[1].indexOf("d")||-1!=n[1].indexOf("n"),s=-1!=n[1].indexOf("x"),o=-1!=n[1].indexOf("o");if(Number(r)+Number(s)+Number(o)>1)return"Invalid arguments";y=r&&"decimal"||s&&"hex"||o&&"octal"}n[2]&&(w=new RegExp(n[2].substr(1,n[2].length-2),m?"i":""))}}}();if(n)return void eI(t,n+": "+i.argString);var s=i.line||t.firstLine(),o=i.lineEnd||i.line||t.lastLine();if(s!=o){var a=new r(s,0),l=new r(o,eu(t,o)),h=t.getRange(a,l).split("\n"),c="decimal"==y?/(-?)([\d]+)/:"hex"==y?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==y?/([0-7]+)/:null,u="decimal"==y?10:"hex"==y?16:"octal"==y?8:void 0,f=[],d=[];if(y||w)for(var p=0;p<h.length;p++){var O=w?h[p].match(w):null;O&&null!=O.index&&!b&&(O[0]=h[p].slice(O.index+O[0].length)),O&&""!=O[0]?f.push(O):c&&c.exec(h[p])?f.push(h[p]):d.push(h[p])}else d=h;if(f.sort(w?function(e,t){if(g){var i;i=e,e=t,t=i}return m&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:k),w)for(var p=0;p<f.length;p++)f[p]=f[p].input;else y||d.sort(k);if(h=g?f.concat(d):d.concat(f),v){var g,m,v,y,w,b,x,S=h;h=[];for(var p=0;p<S.length;p++)S[p]!=x&&h.push(S[p]),x=S[p]}t.replaceRange(h.join("\n"),a,l)}function k(e,t){if(g){var i;i=e,e=t,t=i}m&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&c.exec(e),r=c&&c.exec(t);return n&&r?parseInt((n[1]+n[2]).toLowerCase(),u)-parseInt((r[1]+r[2]).toLowerCase(),u):e<t?-1:1}},vglobal:function(e,t){this.global(e,t)},normal:function(e,t){var i=!1,n=t.argString;if(n&&"!"==n[0]&&(n=n.slice(1),i=!0),!(n=n.trimStart()))return void eI(e,"Argument is required.");var r=t.line;if("number"==typeof r)for(var s=isNaN(t.lineEnd)?r:t.lineEnd,o=r;o<=s;o++)e.setCursor(o,0),j(e,t.argString.trimStart(),{noremap:i}),e.state.vim.insertMode&&eH(e,!0);else j(e,t.argString.trimStart(),{noremap:i}),e.state.vim.insertMode&&eH(e,!0)},global:function(e,t){var i=t.argString;if(!i)return void eI(e,"Regular Expression missing from global");var n="v"===t.commandName[0];"!"===i[0]&&"g"===t.commandName[0]&&(n=!0,i=i.slice(1));var r=void 0!==t.line?t.line:e.firstLine(),s=t.lineEnd||t.line||e.lastLine(),o=eR(i,"/"),a=i,l="";if(o&&o.length&&(a=o[0],l=o.slice(1,o.length).join("/")),a)try{eY(e,a,!0,!0)}catch(t){eI(e,"Invalid regex: "+a);return}for(var h=eZ(e).getQuery(),c=[],u=r;u<=s;u++){var f=e.getLine(u);h.test(f)!==n&&c.push(l?e.getLineHandle(u):f)}if(!l)return void eI(e,c.join("\n"));var d=0,p=function(){if(d<c.length){var t=c[d++],i=e.getLineNumber(t);if(null==i)return void p();var n=i+1+l;eK.processCommand(e,n,{callback:p})}else e.releaseLineHandles&&e.releaseLineHandles()};p()},substitute:function(i,n){if(!i.getSearchCursor)throw Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var s,o,a,l=n.argString,h=l?eR(l,l[0]):[],c="",u="",d=!1,p=!1;if(h&&h.length)c=h[0],P("pcre")&&""!==c&&(c=new RegExp(c).source),void 0!==(u=h[1])&&(u=P("pcre")?function(t){for(var i=new e.StringStream(t),n=[];!i.eol();){for(;i.peek()&&"\\"!=i.peek();)n.push(i.next());var r=!1;for(var s in ej)if(i.match(s,!0)){r=!0,n.push(ej[s]);break}r||n.push(i.next())}return n.join("")}(u.replace(/([^\\])&/g,"$1$$&")):function(e){for(var t=!1,i=[],n=-1;n<e.length;n++){var r=e.charAt(n)||"",s=e.charAt(n+1)||"";eE[r+s]?(i.push(eE[r+s]),n++):t?(i.push(r),t=!1):"\\"===r?(t=!0,f.test(s)||"$"===s)?i.push("$"):"/"!==s&&"\\"!==s&&i.push("\\"):("$"===r&&i.push("$"),i.push(r),"/"===s&&i.push("\\"))}return i.join("")}(u),t.lastSubstituteReplacePart=u),s=h[2]?h[2].split(" "):[];else if(l&&l.length)return void eI(i,"Substitutions should be of the form :s/pattern/replace/");if(s&&(o=s[0],a=parseInt(s[1]),o&&(-1!=o.indexOf("c")&&(d=!0),-1!=o.indexOf("g")&&(p=!0),c=P("pcre")?c+"/"+o:c.replace(/\//g,"\\/")+"/"+o)),c)try{eY(i,c,!0,!0)}catch(e){eI(i,"Invalid regex: "+c);return}if(void 0===(u=u||t.lastSubstituteReplacePart))return void eI(i,"No previous substitute regular expression");var O=eZ(i).getQuery(),g=void 0!==n.line?n.line:i.getCursor().line,m=n.lineEnd||g;g==i.firstLine()&&m==i.lastLine()&&(m=1/0),a&&(m=(g=m)+a-1);var v=et(i,new r(g,0)),y=i.getSearchCursor(O,v);!function(t,i,n,r,s,o,a,l,h){t.state.vim.exMode=!0;var c,u,f,d=!1,p=0;function O(){t.operation(function(){for(;!d;)g(),m();v()})}function g(){var e="",i=o.match||o.pos&&o.pos.match;e=i?l.replace(/\$(\d{1,3}|[$&])/g,function(e,t){if("$"==t)return"$";if("&"==t)return i[0];for(var n=t;parseInt(n)>=i.length&&n.length>0;)n=n.slice(0,n.length-1);return n?i[n]+t.slice(n.length,t.length):e}):t.getRange(o.from(),o.to()).replace(a,l);var n=o.to().line;o.replace(e),u=o.to().line,s+=u-n,f=u<n}function m(){for(var e,i;function(){var e=c&&es(o.to()),t=o.findNext();return t&&!t[0]&&e&&eo(o.from(),e)&&(t=o.findNext()),t&&p++,t}()&&(e=o.from(),i=s,("number"!=typeof e&&(e=e.line),r instanceof Array)?S(e,r):"number"==typeof i?e>=r&&e<=i:e==r);)if(n||o.from().line!=u||f){t.scrollIntoView(o.from(),30),t.setSelection(o.from(),o.to()),c=o.from(),d=!1;return}d=!0}function v(e){if(e&&e(),t.focus(),c){t.setCursor(c);var i=t.state.vim;i.exMode=!1,i.lastHPos=i.lastHSPos=c.ch}h?h():d&&eI(t,(p?"Found "+p+" matches":"No matches found")+" for pattern: "+a+(P("pcre")?" (set nopcre to use Vim regexps)":""))}if(m(),d)return eI(t,"No matches for "+a+(P("pcre")?" (set nopcre to use vim regexps)":""));if(!i){O(),h&&h();return}ez(t,{prefix:eL("span","replace with ",eL("strong",l)," (y/n/a/q/l)"),onKeyDown:function(i,n,r){switch(e.e_stop(i),z(i)){case"y":g(),m();break;case"n":m();break;case"a":var s=h;h=void 0,t.operation(O),h=s;break;case"l":g();case"q":case"<Esc>":case"<C-c>":case"<C-[>":v(r)}return d&&v(r),!0}})}(i,d,p,g,m,y,O,u,n.callback)},startinsert:function(e,t){j(e,"!"==t.argString?"A":"i",{})},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){eq(e)},yank:function(e,i){var n=i.selectionLine,s=isNaN(i.selectionLineEnd)?n:i.selectionLineEnd;if(s<n){var o=s;s=n,n=o}var a=e.getRange(new r(n,0),new r(s+1,0)),l=i.args&&i.args[0]?i.args[0]:"0";t.registerController.pushText(l,"yank",a,!0,!1),eI(e,s+1-n+" lines yanked"+(l?' into "'+l:""),!1,1500)},put:function(e,t,i){var n={after:!0,isEdit:!0,matchIndent:!!i,repeat:1,lineWise:!0,registerName:""},s=t.args||[];"!"==s[0]&&(n.after=!1,s.shift()),s[0]&&(n.registerName=s[0]);var o=t.selectionLine;void 0!=o&&e.setCursor(new r(o,0)),ee.paste(e,n,e.state.vim)},iput:function(e,t){this.put(e,t,!0)},delete:function(e,t){var i=t.selectionLine,n=isNaN(t.selectionLineEnd)?i:t.selectionLineEnd;J.delete(e,{linewise:!0},[{anchor:new r(i,0),head:new r(n+1,0)}])},join:function(e,t){var i=t.selectionLine,n=isNaN(t.selectionLineEnd)?i:t.selectionLineEnd;e.setCursor(new r(i,0)),ee.joinLines(e,{repeat:n-i},e.state.vim)},delmarks:function(t,i){if(!i.argString||!ef(i.argString))return void eI(t,"Argument required");for(var n=t.state.vim,r=new e.StringStream(ef(i.argString));!r.eol();){r.eatSpace();var s=r.pos;if(!r.match(/[a-zA-Z]/,!1))return void eI(t,"Invalid argument: "+i.argString.substring(s));var o=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1))return void eI(t,"Invalid argument: "+i.argString.substring(s));var a=r.next();if(!o||!a||w(o)!=w(a))return void eI(t,"Invalid argument: "+o+"-");var l=o.charCodeAt(0),h=a.charCodeAt(0);if(l>=h)return void eI(t,"Invalid argument: "+i.argString.substring(s));for(var c=0;c<=h-l;c++){var u=String.fromCharCode(l+c);delete n.marks[u]}}else o&&delete n.marks[o]}}},eK=new class{constructor(){this.commandMap_,this.buildCommandMap_()}processCommand(e,t,i){var n=this;e.operation(function(){e.curOp&&(e.curOp.isVimOp=!0),n._processCommand(e,t,i)})}_processCommand(i,n,r){var s,o,a=i.state.vim,l=t.registerController.getRegister(":"),h=l.toString(),c=new e.StringStream(n);l.setText(n);var u=r||{};u.input=n;try{this.parseInput_(i,c,u)}catch(e){eI(i,e+"");return}if(a.visualMode&&ev(i),u.commandName){if(s=this.matchCommand_(u.commandName)){if(o=s.name,s.excludeFromCommandHistory&&l.setText(h),this.parseCommandArgs_(c,u,s),"exToKey"==s.type)return void j(i,s.toKeys||"",s);if("exToEx"==s.type)return void this.processCommand(i,s.toInput||"")}}else void 0!==u.line&&(o="move");if(!o)return void eI(i,'Not an editor command ":'+n+'"');try{eF[o](i,u),s&&s.possiblyAsync||!u.callback||u.callback()}catch(e){throw eI(i,e+""),e}}parseInput_(e,t,i){if(t.eatWhile(":"),t.eat("%"))i.line=e.firstLine(),i.lineEnd=e.lastLine();else if(t.eat("*")){var n=e.state.vim.lastSelection,r=n?.anchorMark.find()?.line||0,s=n?.headMark.find()?.line||0;i.line=Math.max(r,s),i.lineEnd=Math.min(r,s)}else i.line=this.parseLineSpec_(e,t),void 0!==i.line&&t.eat(",")&&(i.lineEnd=this.parseLineSpec_(e,t));void 0==i.line?e.state.vim.visualMode?(i.selectionLine=eU(e,e.state.vim,"<")?.line,i.selectionLineEnd=eU(e,e.state.vim,">")?.line):i.selectionLine=e.getCursor().line:(i.selectionLine=i.line,i.selectionLineEnd=i.lineEnd),t.eatSpace();var o=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return o?i.commandName=o[1]:i.commandName=(t.match(/.*/)||[""])[0],i}parseLineSpec_(e,t){var i=t.match(/^([\d]+)/);if(i)return this.parseLineSpecOffset_(e,t,parseInt(i[1],10)-1);switch(t.next()){case".":return this.parseLineSpecOffset_(e,t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(e,t,e.lastLine());case"'":var n=t.next()||"",r=eU(e,e.state.vim,n);if(!r)throw Error("Mark not set");return this.parseLineSpecOffset_(e,t,r.line);case"-":case"+":case"/":case"?":return t.backUp(1),this.parseLineSpecOffset_(e,t,e.getCursor().line);default:t.backUp(1);return}}parseLineSpecOffset_(e,i,n){for(;;){var s=i.match(/^([\/\?]|\\[\?\/])|([+-]?)(\d*)/);if(!s||!s[0])break;if(s[1]){var o="",a=!s[1].endsWith("?");if(1==s[1].length){var l=i.match(a?/^([^\/\\]|\\\/)*/:/^([^\/\?]|\\\?)*/);i.match(a?/^\/?/:/^\??/),o=l&&l[0]}o||(o=t.registerController.getRegister("/")?.toString()||"");var h=new RegExp(o),c=e.getSearchCursor(h,new r(n+ +!!a,0));a?c.findNext():c.findPrevious();var u=c.from();if(!u)throw Error("Pattern not found"+h);n=u.line}else{var f=parseInt(s[2]+(s[3]||"1"),10);n+=f}}return n}parseCommandArgs_(e,t,i){if(!e.eol()){t.argString=e.match(/.*/)?.[0];var n=i.argDelimiter||/\s+/,r=ef(t.argString||"").split(n);r.length&&r[0]&&(t.args=r)}}matchCommand_(e){for(var t=e.length;t>0;t--){var i=e.substring(0,t);if(this.commandMap_[i]){var n=this.commandMap_[i];if(0===n.name.indexOf(e))return n}}}buildCommandMap_(){this.commandMap_={};for(var e=0;e<h.length;e++){var t=h[e],i=t.shortName||t.name;this.commandMap_[i]=t}}map(e,t,i,n){if(":"!=e&&":"==e.charAt(0)){if(i)throw Error("Mode not supported for ex mappings");var r=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[r]={name:r,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:t,user:!0}}else{var s={keys:e,type:"keyToKey",toKeys:t,noremap:!!n};i&&(s.context=i),eJ(s)}}unmap(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var i=e.substring(1);if(this.commandMap_[i]&&this.commandMap_[i].user)return delete this.commandMap_[i],!0}else for(var n=0;n<o.length;n++)if(e==o[n].keys&&o[n].context===t)return o.splice(n,1),e.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){a[e]&&a[e]--}),!0}};function eH(i,n){var r=i.state.vim,s=t.macroModeState,o=t.registerController.getRegister("."),a=s.isPlaying,l=s.lastInsertModeChanges;a||(i.off("change",e0),r.insertEnd&&r.insertEnd.clear(),r.insertEnd=void 0,e.off(i.getInputField(),"keydown",e5)),!a&&r.insertModeRepeat&&r.insertModeRepeat>1&&(e3(i,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,n||i.setCursor(i.getCursor().line,i.getCursor().ch-1),i.setOption("keyMap","vim"),i.setOption("disableInput",!0),i.toggleOverwrite(!1),o.setText(l.changes.join("")),e.signal(i,"vim-mode-change",{mode:"normal"}),s.isRecording&&function(e){if(!e.isPlaying){var i=e.latestRegister,n=t.registerController.getRegister(i);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(s)}function eJ(e){o.unshift(e),e.keys&&e.keys.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){e&&(a[e]||(a[e]=0),a[e]++)})}function e0(e,i){var n=t.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(var s=e.state.vim;i;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==i.origin||"paste"==i.origin||void 0===i.origin){var o=e.listSelections().length;o>1&&(r.ignoreCount=o);var a=i.text.join("\n");if(r.maybeReset&&(r.changes=[],r.maybeReset=!1),a)if(e.state.overwrite&&!/\n/.test(a))r.changes.push([a]);else{if(a.length>1){var l=s&&s.insertEnd&&s.insertEnd.find(),h=e.getCursor();if(l&&l.line==h.line){var c=l.ch-h.ch;c>0&&c<a.length&&(r.changes.push([a,c]),a="")}}a&&r.changes.push(a)}}i=i.next}}function e1(e){var i=e.state.vim;if(i.insertMode){var n=t.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:(r.maybeReset=!0,i.insertEnd&&i.insertEnd.clear(),i.insertEnd=e.setBookmark(e.getCursor(),{insertLeft:!0}))}else e.curOp?.isVimOp||e2(e,i)}function e2(t,i){var n=t.getCursor("anchor"),r=t.getCursor("head");if(i.visualMode&&!t.somethingSelected()?ev(t,!1):!i.visualMode&&!i.insertMode&&t.somethingSelected()&&(i.visualMode=!0,i.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),i.visualMode){var s=ea(r,n)?0:-1,o=ea(r,n)?-1:0;r=en(r,0,s),i.sel={anchor:n=en(n,0,o),head:r},eA(t,i,"<",el(r,n)),eA(t,i,">",eh(r,n))}else i.insertMode||(i.lastHPos=t.getCursor().ch)}function e5(i){var n=t.macroModeState.lastInsertModeChanges,r=e.keyName?e.keyName(i):i.key;r&&(-1!=r.indexOf("Delete")||-1!=r.indexOf("Backspace"))&&(n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new Z(r,i)))}function e3(e,i,n,r){var s=t.macroModeState;s.isPlaying=!0;var o=i.lastEditActionCommand,a=i.inputState;function l(){o?F.processAction(e,i,o):F.evalInput(e,i)}function h(t){s.lastInsertModeChanges.changes.length>0&&(t=i.lastEditActionCommand?t:1,e4(e,s.lastInsertModeChanges.changes,t))}if(i.inputState=i.lastEditInputState,o&&o.interlaceInsertRepeat)for(var c=0;c<n;c++)l(),h(1);else r||l(),h(n);i.inputState=a,i.insertMode&&!r&&eH(e),s.isPlaying=!1}function e6(t,i){e.lookupKey(i,"vim-insert",function(i){return"string"==typeof i?e.commands[i](t):i(t),!0})}function e4(e,i,n){var r=e.getCursor("head"),s=t.macroModeState.lastInsertModeChanges.visualBlock;s&&(ep(e,r,s+1),n=e.listSelections().length,e.setCursor(r));for(var o=0;o<n;o++){s&&e.setCursor(en(r,o,0));for(var a=0;a<i.length;a++){var l=i[a];if(l instanceof Z)e6(e,l.keyName);else if("string"==typeof l)e.replaceSelection(l);else{var h=e.getCursor(),c=en(h,0,l[0].length-(l[1]||0));e.replaceRange(l[0],h,l[1]?h:c),e.setCursor(c)}}}s&&e.setCursor(en(r,0,1))}function e8(e){var t=new e.constructor;return Object.keys(e).forEach(function(i){if("insertEnd"!=i){var n=e[i];Array.isArray(n)?n=n.slice():n&&"object"==typeof n&&n.constructor!=Object&&(n=e8(n)),t[i]=n}}),e.sel&&(t.sel={head:e.sel.head&&es(e.sel.head),anchor:e.sel.anchor&&es(e.sel.anchor)}),t}return R.defineEx("version","ve",e=>{eI(e,"Codemirror-vim version: <DEV>")}),Q("insertModeEscKeysTimeout",200,"number"),M(),R}(dB),dH=sq.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:"none"},".cm-vim-panel":{padding:"0px 10px",fontFamily:"monospace",minHeight:"1.3em",display:"flex"},".cm-vim-panel input":{border:"none",outline:"none",backgroundColor:"inherit"},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"}}),dJ=nK.fromClass(class{constructor(e){this.status="",this.query=null,this.decorations=iH.none,this.waitForCopy=!1,this.lastKeydown="",this.useNextTextInput=!1,this.compositionText="",this.view=e;let t=this.cm=new dB(e);dK.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new dU(e,t),this.updateClass(),this.cm.on("vim-command-done",()=>{t.state.vim&&(t.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",e=>{t.state.vim&&(t.state.vim.mode=e.mode,e.subMode&&(t.state.vim.mode+="linewise"===e.subMode?" line":" block"),t.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus())}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():e.dispatch({effects:d1.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.spacer=document.createElement("span"),this.spacer.style.flex="1",this.statusButton=document.createElement("span"),this.statusButton.onclick=e=>{dK.handleKey(this.cm,"<Esc>","user"),this.cm.focus()},this.statusButton.style.cssText="cursor: pointer"}update(e){var t;if((e.viewportChanged||e.docChanged)&&this.query&&this.highlight(this.query),e.docChanged&&this.cm.onChange(e),e.selectionSet&&this.cm.onSelectionChange(),e.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),e.transactions){for(let i of e.transactions)for(let e of i.effects)if(e.is(dA))if(null==(t=e.value)?void 0:t.forVim){let t=e.value.create();this.highlight(t)}else this.highlight(null)}this.blockCursor.update(e)}updateClass(){let e=this.cm.state;e.vim&&(!e.vim.insertMode||e.overwrite)?this.view.scrollDOM.classList.add("cm-vimMode"):this.view.scrollDOM.classList.remove("cm-vimMode")}updateStatus(){let e=this.cm.state.statusbar,t=this.cm.state.vim;if(!e||!t)return;let i=this.cm.state.dialog;if(i)i.parentElement!=e&&(e.textContent="",e.appendChild(i));else{e.textContent="";var n=(t.mode||"normal").toUpperCase();t.insertModeReturn&&(n+="(C-O)"),this.statusButton.textContent=`--${n}--`,e.appendChild(this.statusButton),e.appendChild(this.spacer)}this.dom.textContent=t.status,e.appendChild(this.dom)}destroy(){dK.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(e){if(this.query=e,!e)return this.decorations=iH.none;let{view:t}=this,i=new ih;for(let n=0,r=t.visibleRanges,s=r.length;n<s;n++){let{from:o,to:a}=r[n];for(;n<s-1&&a>r[n+1].from-500;)a=r[++n].to;e.highlight(t.state,o,a,(e,t)=>{i.add(e,t,d0)})}return this.decorations=i.finish()}handleKey(e,t){let i=this.cm,n=i.state.vim;if(!n)return;let r=dK.vimKeyFromEvent(e,n);if(dB.signal(this.cm,"inputEvent",{type:"handleKey",key:r}),!r)return;if("<Esc>"==r&&!n.insertMode&&!n.visualMode&&this.query){let e=n.searchState_;e&&(i.removeOverlay(e.getOverlay()),e.setOverlay(null))}if("<C-c>"===r&&!dB.isMac&&i.somethingSelected())return this.waitForCopy=!0,!0;n.status=(n.status||"")+r;let s=dK.multiSelectHandleKey(i,r,"user");return n=dK.maybeInitVimState_(i),!s&&n.insertMode&&i.state.overwrite&&(e.key&&1==e.key.length&&!/\n/.test(e.key)?(s=!0,i.overWriteSelection(e.key)):"Backspace"==e.key&&(s=!0,dB.commands.cursorCharLeft(i))),s&&(dB.signal(this.cm,"vim-keypress",r),e.preventDefault(),e.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!s}},{eventHandlers:{copy:function(e,t){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var e=this.cm,t=e.state.vim;t&&(t.insertMode?e.setSelection(e.getCursor(),e.getCursor()):e.operation(()=>{e.curOp&&(e.curOp.isVimOp=!0),dK.handleKey(e,"<Esc>","user")}))}))},compositionstart:function(e,t){this.useNextTextInput=!0,dB.signal(this.cm,"inputEvent",e)},compositionupdate:function(e,t){dB.signal(this.cm,"inputEvent",e)},compositionend:function(e,t){dB.signal(this.cm,"inputEvent",e)},keypress:function(e,t){dB.signal(this.cm,"inputEvent",e),"Dead"==this.lastKeydown&&this.handleKey(e,t)},keydown:function(e,t){dB.signal(this.cm,"inputEvent",e),this.lastKeydown=e.key,"Unidentified"==this.lastKeydown||"Process"==this.lastKeydown||"Dead"==this.lastKeydown?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(e,t))}},provide:()=>[sq.inputHandler.of((e,t,i,n)=>{var r,s,o=e.cm||null;if(!o)return!1;var a=null==(r=o.state)?void 0:r.vim,l=o.state.vimPlugin;if(a&&!a.insertMode&&!(null==(s=o.curOp)?void 0:s.isVimOp)){if("\0\0"===n)return!0;if(dB.signal(o,"inputEvent",{type:"text",text:n,from:t,to:i}),1==n.length&&l.useNextTextInput){if(a.expectLiteralNext&&e.composing)return l.compositionText=n,!1;if(l.compositionText){var h=l.compositionText;l.compositionText="";var c=e.state.selection.main.head,u=e.state.sliceDoc(c-h.length,c);if(h===u){var f=o.getCursor();o.replaceRange("",o.posFromIndex(c-h.length),f)}}return l.handleKey({key:n,preventDefault:()=>{},stopPropagation:()=>{}}),function(e){var t=e.scrollDOM.parentElement;if(t){if(dF){e.contentDOM.textContent="\0\0",e.contentDOM.dispatchEvent(new CustomEvent("compositionend"));return}var i=e.scrollDOM.nextSibling,n=window.getSelection(),r=n&&{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset};e.scrollDOM.remove(),t.insertBefore(e.scrollDOM,i);try{r&&n&&(n.setPosition(r.anchorNode,r.anchorOffset),r.focusNode&&n.extend(r.focusNode,r.focusOffset))}catch(e){console.error(e)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent("compositionend"))}}(e),!0}}return!1})],decorations:e=>e.decorations}),d0=iH.mark({class:"cm-searchMatch"}),d1=t1.define(),d2=tE.define({create:()=>!1,update(e,t){for(let i of t.effects)i.is(d1)&&(e=i.value);return e},provide:e=>ok.from(e,e=>e?d5:null)});function d5(e){let t=document.createElement("div");t.className="cm-vim-panel";let i=e.cm;return i.state.dialog&&t.appendChild(i.state.dialog),{top:!1,dom:t}}function d3(e){let t=document.createElement("div");t.className="cm-vim-panel";let i=e.cm;return i.state.statusbar=t,i.state.vimPlugin.updateStatus(),{dom:t}}function d6(){return(d6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}var d4=[{tag:aq.keyword,color:"#5e81ac"},{tag:[aq.name,aq.deleted,aq.character,aq.propertyName,aq.macroName],color:"#88c0d0"},{tag:[aq.variableName],color:"#8fbcbb"},{tag:[aq.function(aq.variableName)],color:"#8fbcbb"},{tag:[aq.labelName],color:"#81a1c1"},{tag:[aq.color,aq.constant(aq.name),aq.standard(aq.name)],color:"#5e81ac"},{tag:[aq.definition(aq.name),aq.separator],color:"#a3be8c"},{tag:[aq.brace],color:"#8fbcbb"},{tag:[aq.annotation],color:"#d30102"},{tag:[aq.number,aq.changed,aq.annotation,aq.modifier,aq.self,aq.namespace],color:"#b48ead"},{tag:[aq.typeName,aq.className],color:"#ebcb8b"},{tag:[aq.operator,aq.operatorKeyword],color:"#a3be8c"},{tag:[aq.tagName],color:"#b48ead"},{tag:[aq.squareBracket],color:"#bf616a"},{tag:[aq.angleBracket],color:"#d08770"},{tag:[aq.attributeName],color:"#ebcb8b"},{tag:[aq.regexp],color:"#5e81ac"},{tag:[aq.quote],color:"#b48ead"},{tag:[aq.string],color:"#a3be8c"},{tag:aq.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[aq.url,aq.escape,aq.special(aq.string)],color:"#8fbcbb"},{tag:[aq.meta],color:"#88c0d0"},{tag:[aq.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[aq.comment],color:"#4c566a",fontStyle:"italic"},{tag:aq.strong,fontWeight:"bold",color:"#5e81ac"},{tag:aq.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:aq.strikethrough,textDecoration:"line-through"},{tag:aq.heading,fontWeight:"bold",color:"#5e81ac"},{tag:aq.special(aq.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:aq.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[aq.heading2,aq.heading3,aq.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[aq.heading5,aq.heading6],color:"#5e81ac"},{tag:[aq.atom,aq.bool,aq.special(aq.variableName)],color:"#d08770"},{tag:[aq.processingInstruction,aq.inserted],color:"#8fbcbb"},{tag:[aq.contentSeparator],color:"#ebcb8b"},{tag:aq.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"}],d8=(p=(d={}).theme,O=d.settings,g=d.styles,v=(m={theme:void 0===p?"dark":p,settings:d6({},{background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#00000073",selectionMatch:"#00000073",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a29"},void 0===O?{}:O),styles:[...d4,...void 0===g?[]:g]}).theme,w=void 0===(y=m.settings)?{}:y,b=m.styles,x={".cm-gutters":{}},S={},w.background&&(S.backgroundColor=w.background),w.backgroundImage&&(S.backgroundImage=w.backgroundImage),w.foreground&&(S.color=w.foreground),w.fontSize&&(S.fontSize=w.fontSize),(w.background||w.foreground)&&(x["&"]=S),w.fontFamily&&(x["&.cm-editor .cm-scroller"]={fontFamily:w.fontFamily}),w.gutterBackground&&(x[".cm-gutters"].backgroundColor=w.gutterBackground),w.gutterForeground&&(x[".cm-gutters"].color=w.gutterForeground),w.gutterBorder&&(x[".cm-gutters"].borderRightColor=w.gutterBorder),w.caret&&(x[".cm-content"]={caretColor:w.caret},x[".cm-cursor, .cm-dropCursor"]={borderLeftColor:w.caret}),k={},w.gutterActiveForeground&&(k.color=w.gutterActiveForeground),w.lineHighlight&&(x[".cm-activeLine"]={backgroundColor:w.lineHighlight},k.backgroundColor=w.lineHighlight),x[".cm-activeLineGutter"]=k,w.selection&&(x["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:w.selection+" !important"}),w.selectionMatch&&(x["& .cm-selectionMatch"]={backgroundColor:w.selectionMatch}),[sq.theme(x,{dark:"dark"===v}),lE(lM.define(void 0===b?[]:b))]);let d7={key:"Enter",run:({state:e,dispatch:t})=>(t(e.update(e.changeByRange(t=>{let i=/^\s*/.exec(e.doc.lineAt(t.from).text)[0];return{changes:{from:t.from,to:t.to,insert:e.lineBreak+i},range:tP.cursor(t.from+i.length+1)}}),{scrollIntoView:!0,userEvent:"input"})),!0)};function d9(e){return"vim"===e?function(e={}){return[dH,dJ,dG,e.status?ok.of(d3):d2]}():"emacs"===e?s0.of([...cl,cc]):tB.highest(s0.of([d7,cc,...ch]))}function pe(e){return"nord"===e||"dark"===e||"one-dark"===e?d8:[]}function pt(e){let t="object"==typeof e?e?.name:e;return"javascript"===t||"js"===t?u0():"json"===t?new le(u4):"html"===t?function(e={}){let t="",i;return!1===e.matchClosingTags&&(t="noMatch"),!0===e.selfClosingTags&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(i=fb((e.nestedLanguages||[]).concat(dr),(e.nestedAttributes||[]).concat(ds))),new le(i?da.configure({wrap:i,dialect:t}):t?dl.configure({dialect:t}):dl,[dl.data.of({autocomplete:function(e){let{extraTags:t,extraGlobalAttributes:i}=e,n=i||t?new f6(t,i):f6.default;return e=>(function(e,t){let{state:i,pos:n}=t,r=aJ(i).resolveInner(n,-1),s=r.resolve(n);for(let e=n,t;s==r&&(t=r.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from<i.to)break;s=r=t,e=i.from}if("TagName"==r.name)return r.parent&&/CloseTag$/.test(r.parent.name)?di(i,r,r.from,n):dt(i,e,r,r.from,n);if("StartTag"==r.name||"IncompleteTag"==r.name)return dt(i,e,r,n,n);if("StartCloseTag"==r.name||"IncompleteCloseTag"==r.name)return di(i,r,n,n);if("OpenTag"==r.name||"SelfClosingTag"==r.name||"AttributeName"==r.name){var o,a;let t,s,l;return o=r,a="AttributeName"==r.name?r.from:n,l=(s=(t=f8(o))?e.tags[f4(i.doc,t)]:null)&&s.attrs?Object.keys(s.attrs):[],{from:a,to:n,options:(s&&!1===s.globalAttrs?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames).map(e=>({label:e,type:"property"})),validFor:de}}{if("Is"==r.name||"AttributeValue"==r.name||"UnquotedAttributeValue"==r.name)return function(e,t,i,n,r){var s;let o=null==(s=i.parent)?void 0:s.getChild("AttributeName"),a=[],l;if(o){let s=e.sliceDoc(o.from,o.to),h=t.globalAttrs[s];if(!h){let n=f8(i),r=n?t.tags[f4(e.doc,n)]:null;h=(null==r?void 0:r.attrs)&&r.attrs[s]}if(h){let t=e.sliceDoc(n,r).toLowerCase(),i='"',s='"';for(let o of(/^['"]/.test(t)?(l='"'==t[0]?/^[^"]*$/:/^[^']*$/,i="",s=e.sliceDoc(r,r+1)==t[0]?"":t[0],t=t.slice(1),n++):l=/^[^\s<>='"]*$/,h))a.push({label:o,apply:i+o+s,type:"constant"})}}return{from:n,to:r,options:a,validFor:l}}(i,e,r,"Is"==r.name?n:r.from,n);if(!t.explicit||"Element"!=s.name&&"Text"!=s.name&&"Document"!=s.name)return null;var l=r;let o=[],a=0;for(let t of f7(i.doc,l,e))o.push({label:"<"+t,type:"type"});for(let e of f9(i.doc,l))o.push({label:"</"+e+">",type:"type",boost:99-a++});return{from:n,to:n,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}})(n,e)}(e)}),!1!==e.autoCloseTags?dc:[],u0().support,new le(fG,fG.data.of({autocomplete:fU})).support])}():[]}function pi(e,t){let i=t<0?0:t>e.length?e.length:t,n=e.lineAt(i);return{line:n.number-1,ch:i-n.from}}function pn(e,{line:t,ch:i}){return e.line(t+1).from+i}s0.of([cc]);let pr=e=>e.state.selection.main.head,ps=()=>{},po=t1.define(),pa=t1.define(),pl=t1.define(),ph=t1.define(),pc=tE.define({create:()=>iH.none,update(e,t){for(let i of(e=e.map(t.changes),t.effects))i.is(po)&&(e=e.update({add:[i.value],sort:!0})),i.is(pa)&&(e=iH.none);return e},provide:e=>sq.decorations.from(e)}),pu=tE.define({create:()=>iH.none,update(e,t){for(let i of(e=e.map(t.changes),t.effects)){if(i.is(pl)){let{line:n,cls:r}=i.value,{from:s}=t.state.doc.line(Math.min(n+1,t.state.doc.lines));e=e.update({add:[iH.line({class:r}).range(s)],sort:!0})}if(i.is(ph)){let{line:n,cls:r}=i.value;e=e.update({filter:(e,i,s)=>s.spec.class!==r||t.state.doc.lineAt(e).number!==n+1})}}return e},provide:e=>sq.decorations.from(e)});class pf{#e;#t=!1;#i="";#n;constructor(e,t={}){var i;this.#n=e5(),this.#e=function(e,t={}){let{value:i="",mode:n="javascript",keyMap:r="default",theme:s="default",lineNumbers:o=!0,readOnly:a=!1,foldGutter:l=!1,updateListener:h}=t,c=new tI,u=new tI,f=new tI,d=new tI,p=sq.theme({"&:not(.cm-focused) .cm-fat-cursor":{display:"none"}}),O=[d.of([hr(),s0.of(hv)]),pc,pu,c.of(pe(s)),u.of(d9(r)),function(e={}){return[lI.of(e),lD]}(),f.of(pt(n)),lE(cu),t9.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,r=i.lineAt(n);if(n>r.from+200)return e;let s=i.sliceString(r.from,n);if(!t.some(e=>e.test(s)))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let i=ls(o,t.from);if(null==i)continue;let n=/^\s*/.exec(t.text)[0],r=lr(o,i);n!=r&&l.push({from:t.from,to:t.from+n.length,insert:r})}return l.length?[e,{changes:l,sequential:!0}]:e}),li.of(" "),...o?[function(e={}){return[oI.of(e),oT(),oV]}()]:[],...l?[function(e={}){var t;let i={...lC,...e},n=new l_(i,!0),r=new l_(i,!1),s=nK.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(a9)!=e.state.facet(a9)||e.startState.field(lw,!1)!=e.state.field(lw,!1)||aJ(e.startState)!=aJ(e.state)||i.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new ih;for(let i of e.viewportLineBlocks){let s=lx(e.state,i.from,i.to)?r:lg(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:o}=i;return[s,(t={class:"cm-foldGutter",markers(e){var t;return(null==(t=e.plugin(s))?void 0:t.markers)||ia.empty},initialSpacer:()=>new l_(i,!1),domEventHandlers:{...o,click:(e,t,i)=>{if(o.click&&o.click(e,t,i))return!0;let n=lx(e.state,t.from,t.to);if(n)return e.dispatch({effects:ly.of(n)}),!0;let r=lg(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:lv.of(r)}),!0)}}},[oT(),oC.of({...oA,...t})]),lQ()]}(),lQ()]:[],...a?[t9.readOnly.of(!0)]:[],...h?[sq.updateListener.of(h)]:[],function(e={}){return[on.of(e),os,oa,oh,nY.of(!0)]}(),p],g=new sq({state:t9.create({doc:i,extensions:O}),parent:e});return g._themeCompartment=c,g._keymapCompartment=u,g._langCompartment=f,g._historyCompartment=d,g}(e,{...t,updateListener:e=>{e.docChanged&&this.#n.emit("change",{value:this.getValue(),cursor:this.getCursorIndex()}),e.selectionSet&&this.#n.emit("cursorMove",this.getCursorIndex())}}),i=this.#e,new ResizeObserver(()=>i.requestMeasure()).observe(e)}getValue(){return this.#e.state.doc.toString()}setValue(e){var t;return t=this.#e,t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}}),this}getCursorIndex(){return pr(this.#e)}getCursor(){var e;let t,i;return t=pr(e=this.#e),{row:(i=pi(e.state.doc,t)).line,column:i.ch}}posFromIndex(e){var t;return t=this.#e,pi(t.state.doc,e)}focus(){return this.#e.focus(),this}moveCursorTo(e,t=0){let i=this.#e.state.doc.line(e+1);return this.#e.dispatch({selection:{anchor:i.from+t},scrollIntoView:!0}),this}markRange(e,t,i){return function(e,t,i,{className:n}){let r=pn(e.state.doc,t),s=pn(e.state.doc,i);if(r===s)return{clear:ps};let o=iH.mark({class:n}).range(r,s);return e.dispatch({effects:po.of(o)}),{clear:()=>e.dispatch({effects:pa.of(null)})}}(this.#e,e,t,{className:i})}addLineClass(e,t){var i;return i=this.#e,i.dispatch({effects:pl.of({line:e,cls:t})}),this}removeLineClass(e,t){var i;return i=this.#e,i.dispatch({effects:ph.of({line:e,cls:t})}),this}setOption(e,t){var i;return"keyMap"===e&&(this.#t="vim"===t),i=this.#e,"theme"===e?i.dispatch({effects:i._themeCompartment.reconfigure(pe(t))}):"keyMap"===e?i.dispatch({effects:i._keymapCompartment.reconfigure(d9(t))}):"mode"===e&&i.dispatch({effects:i._langCompartment.reconfigure(pt(t))}),this}setMode(e){return this.setOption("mode",e)}setTheme(e){return this.setOption("theme",e)}setKeyMap(e){return this.setOption("keyMap",e)}setModeForPath(e){return this.setMode(e.split(".").pop())}isChanged(){return this.getValue()!==this.#i}clearHistory(){var e,t,i;return e=this.#e,t=this.#e._historyCompartment,i=this.#t,e&&e.dispatch({effects:t.reconfigure(i?[]:[hr(),s0.of(hv)])}),this}on(e,t){return this.#n.on(e,t),this}addListener(e,t){return this.on(e,t)}once(e,t){return this.#n.once(e,t),this}removeListener(e,t){return this.#n.removeListener(e,t),this}emit(...e){return this.#n.emit(...e),this}setOptions(e={}){return e.fontSize&&this._view.dispatch({effects:this._view._themeCompartment.reconfigure(sq.theme({"&":{fontSize:`${e.fontSize}px`}}))}),this}get _view(){return this.#e}}function pd(e){if("function"!=typeof e)throw TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],i=pd.Promise||Promise;if("function"!=typeof i)throw Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];return new i((i,n)=>{r.push(function(e){if(e)return n(e);for(var r=arguments.length,s=Array(1<r?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(1===s.length||!t)return i(s[0]);var a={};s.forEach((e,i)=>{var n=t[i];n&&(a[n]=e)}),i(a)}),e.apply(this,r)})}}function pp(){if(!(this instanceof pp))return new pp}pd.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",pd.Promise=void 0,pp.prototype.checkHash=async function(e){let t=await this.loadHash(e),i=`${e}-hash`;return t===localStorage.getItem(i)},pp.prototype.loadHash=pd(function(e,t){return e1({method:"GET",url:eJ+(e+"?hash"),callback:t}),this}),pp.prototype.setData=function(e,t){let i=`${e}-data`;return localStorage.setItem(i,t),this},pp.prototype.setHash=function(e,t){let i=`${e}-hash`;return localStorage.setItem(i,t),this},pp.prototype.getData=function(e){let t=`${e}-data`;return localStorage.getItem(t)||""},pp.prototype.getHash=function(e){let t=`${e}-hash`;return localStorage.getItem(t)||""};var pO=i(735),pg=i(519);function pm(e){return this._ElementMsg||(this._ElementMsg=W("div",{innerHTML:'<div class="dword-msg">/div>'}).firstChild,this._Element.appendChild(this._ElementMsg)),this._ElementMsg.textContent=e,this._ElementMsg.hidden=!1,setTimeout(()=>{this._ElementMsg.hidden=!0},2e3),this}let pv=pg(pm);var py=i(317);let pw=pd(i(955)),pb=py(function(e){e._Value=e.getValue()});async function px(){let e=this.getValue(),{length:t}=e,{_FileName:i,_maxSize:n}=this,{diff:r,zip:s}=await this._loadOptions();if(r){var o,a,l;let e,r,s=await this._doDiff(i);if(o=t,a=n,l=s,e=l?.length||0,r="string"==typeof l,l&&r&&o<a&&e<o)return this._patch(i,s)}if(!s)return this._write(i,e);let h=await pw(e);return this._write(`${i}?unzip`,h)}function pS(){let e,t=this,i=(e=location).origin||e.protocol+"//"+e.host,n=(e,t)=>{s.emit("patch",e,t)},{_prefixSocket:r}=t,s=globalThis.io.connect(i+r,{"max reconnection attempts":0x100000000,"reconnection limit":5e3,path:this._socketPath+"/socket.io"});this._socket=s,s.on("reject",()=>{this.emit("reject")}),s.on("connect",()=>{t._patch=n}),s.on("message",e=>{this._onSave(null,e)}),s.on("file",(e,i)=>{t.setModeForPath(e).setValueFirst(e,i).moveCursorTo(0,0)}),s.on("patch",(e,i,n)=>{if(e!==this._FileName||n!==this._story.getHash(e))return;let r=t.getCursor(),s=t.getValue(),o=(0,eH.applyPatch)(s,i);this.setValue(o),this._story.setData(e,s).setHash(e,this.sha()),t.moveCursorTo(r.row,r.column)}),s.on("disconnect",()=>{t.save.patch=globalThis._patchHttp}),s.on("err",e=>{F(this._TITLE,e)})}function pk(){}let pQ=pg(async e=>{let t=`${e}/modules.json`;return await eK.json(t)}),p$=pg(async e=>{let t=`${e}/options.json`;return await eK.json(t)}),pP=async({remote:e,local:t})=>{let[i]=await e2(eK.parallel,e);i&&await pA(t)},pA=async function(e){await eK.parallel(e)},pC=async(e,t={})=>{let i,n,{prefix:r=""}=t;if(t.name&&global[t.name])return;let s=[pQ(r),p$(r)],[o,[a,l]]=await e2(Promise.all.bind(Promise),s);if(o)return alert(`Error: could not load module or config: ${o.message}`);let h=l.online&&navigator.onLine,c=function(e,t){let i;if("string"!=typeof e)throw Error("name should be string!");if(!Array.isArray(t))throw Error("array should be array!");return t.some(t=>{let n=t.name===e;return n&&(i=t),n}),i}(e,a),u=Array.isArray(c.local),{version:f}=c;for(let e of(u?(i=c.remote,{local:n}=c):(i=[c.remote],n=[c.local]),n=[]))n.push(r+e);let d=[];for(let e of i)d.push(e.replace(/{{\s*version\s*}}/g,f));if(!h)return await pA(n);await pP({remote:d,local:n})},p_=()=>{};function pT(e,t,i){return"string"==typeof e&&(e=document.querySelector(e)),new pM(e,t,i)}class pM extends pf{constructor(e,t={},i=p_){super(e,t),this._initSocket=pS,this._TITLE="Qword",this._story=pp(),this._savedValue="",this._filename="",this._maxSize=t.maxSize||512e3,this._PREFIX=t.prefix||"/qword",this._prefixSocket=t.prefixSocket||"/qword",this._socketPath=t.socketPath||"",eJ=`${this._PREFIX}/api/v1/fs`,this._init().then(()=>i(this))}async _init(){let[e,t]=await e2(eK.json,`${this._PREFIX}/edit.json`);if(e)return F(this._TITLE,"Could not load edit.json!");this._Config=t,await Promise.all([p$(this._PREFIX),pQ(this._PREFIX)]),await pC("socket",{prefix:this._socketPath}),this._initSocket()}setValueFirst(e,t){return this.setModeForPath(e),this.setValue(t),this._filename=e,this._savedValue=t,this.clearHistory(),this.moveCursorTo(0,0),this}sha(){let e=new eF("SHA-1","TEXT");return e.update(this.getValue()),e.getHash("HEX")}evaluate(){if(!this._filename?.endsWith(".js"))return F(this._TITLE,"JS only");let[e]=((e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}})(Function(this.getValue()));return e&&F(this._TITLE,e.message),this}goToLine(){let e=Number(prompt("Line number"));if(!e)return;let t=this._view.state.doc.line(e);this._view.dispatch({selection:{anchor:t.from},scrollIntoView:!0}),this.focus()}remove(e){let{state:t}=this._view,{from:i,to:n}=t.selection.main,r=i===n;if("right"===e)this._view.dispatch({changes:{from:i,to:r?n+1:n,insert:""}});else{let e=r?i-1:i;e>=0&&this._view.dispatch({changes:{from:e,to:n,insert:""}})}return this}selectAll(){let{doc:e}=this._view.state;return this._view.dispatch({selection:{anchor:0,head:e.length}}),this}enableKey(){return this}cutToClipboard(){return this._clipboard("cut")}copyToClipboard(){return this._clipboard("copy")}pasteFromClipboard(){return this._clipboard("paste")}_patchHttp(e,t){var i=t,n=this._onSave.bind(this);n||"function"!=typeof i||(n=i,i=null),e1({method:"PATCH",url:eJ+e,data:i,callback:n})}_writeHttp(e,t){e0(e,t,this._onSave.bind(this))}async _doDiff(e){return await this._story.checkHash(e).catch(()=>!1)?"":(0,eH.createPatch)(this._savedValue||"",this.getValue())}}pT.prototype._clipboard=function(e){let{_view:t,_story:i}=this,n="editor-clipboard",r=()=>{let{from:e,to:i}=t.state.selection.main;return t.state.sliceDoc(e,i)},s=e=>{let{from:i,to:n}=t.state.selection.main;t.dispatch({changes:{from:i,to:n,insert:e}})};if("copy"===e){let e=r();return i.setData(n,e),pO.writeText(e)}if("cut"===e){let e=r();return i.setData(n,e),s(""),pO.writeText(e)}return pO.readText().then(s).catch(()=>{pv.call(this,"Could not paste from clipboard. Inner buffer used."),s(i.getData(n))})},pT.prototype.save=function(){return px.call(this).then(pb(this)).catch(this._onSave.bind(this)),this},pT.prototype._onSave=function(e,t){let i=this._Value,n=this._FileName,r="Try again?";if(e){r=e.message?e.message+"\n"+r:"Can't save."+r;let t=this._onSave.bind(this);return H(this._TITLE,r,"",K(void 0)||U,void 0).then(()=>{e0(this._FileName,this._Value,t)}).catch(pk).then(()=>{this.focus()})}this.showMessage(t);let s=this.sha();this._story.setData(n,i).setHash(n,s),this._Emitter.emit("save",i.length)},pT.prototype.showMessage=pm})(),qword=n.default})();
|
|
218
|
+
</div>`),className:"smalltalk",style:`z-index: ${G(G()+1)}`});for(let e of en(f,["ok","input"]))e.focus();for(let e of en(f,["input"]))e.setSelectionRange(0,i.length);for(let e of(function(e,t,i,n){for(let r of en(t,i))r.addEventListener(e,n)}("click",f,["cancel","close","ok"],e=>{et(e.target,f,h(),c())}),["click","contextmenu"]))f.addEventListener(e,e=>{for(let t of(e.stopPropagation(),en(f,["ok","input"])))t.focus()});return f.addEventListener("keydown",q(f,h(),c())),Object.assign(u,{dialog:f,ok:h})}function J(e){return e.getAttribute("data-name").replace("js-","")}function ee(e,t){let i=J(document.activeElement),n=t.length-1,r=t.indexOf(i);for(let i of en(e,[t[r===n?0:r+1]]))i.focus()}function et(e,t,i,n){let r=e.getAttribute("data-name").replace("js-","");if(/close|cancel/.test(r)){n(),er(t);return}let s=null;for(let e of en(t,["input"]))({value:s}=e);i(s),er(t)}let ei=V((e,t)=>e.querySelector(`[data-name="js-${t}"]`));function en(e,t){return t.map(ei(e)).filter(Boolean)}function er(e){let{parentElement:t}=e;t&&t.removeChild(e)}let es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo="ARRAYBUFFER not supported by this environment",ea="UINT8ARRAY not supported by this environment";function el(e,t,i,n){let r,s,o,a=t||[0],l=(i=i||0)>>>3,h=3*(-1===n);for(r=0;r<e.length;r+=1)s=(o=r+l)>>>2,a.length<=s&&a.push(0),a[s]|=e[r]<<8*(h+o%4*n);return{value:a,binLen:8*e.length+i}}function eh(e,t,i){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,i,n){let r,s,o,a;if(0!=e.length%2)throw Error("String of HEX type must be in byte increments");let l=t||[0],h=(i=i||0)>>>3,c=3*(-1===n);for(r=0;r<e.length;r+=2){if(isNaN(s=parseInt(e.substr(r,2),16)))throw Error("String of HEX type contains invalid characters");for(o=(a=(r>>>1)+h)>>>2;l.length<=o;)l.push(0);l[o]|=s<<8*(c+a%4*n)}return{value:l,binLen:4*e.length+i}}(e,t,n,i)};case"TEXT":return function(e,n,r){return function(e,t,i,n,r){let s,o,a,l,h,c,u,f,d=0,p=i||[0],O=(n=n||0)>>>3;if("UTF8"===t)for(u=3*(-1===r),a=0;a<e.length;a+=1)for(s=e.charCodeAt(a),o=[],128>s?o.push(s):2048>s?(o.push(192|s>>>6),o.push(128|63&s)):55296>s||57344<=s?o.push(224|s>>>12,128|s>>>6&63,128|63&s):(a+=1,s=65536+((1023&s)<<10|1023&e.charCodeAt(a)),o.push(240|s>>>18,128|s>>>12&63,128|s>>>6&63,128|63&s)),l=0;l<o.length;l+=1){for(h=(c=d+O)>>>2;p.length<=h;)p.push(0);p[h]|=o[l]<<8*(u+c%4*r),d+=1}else for(u=2*(-1===r),f="UTF16LE"===t&&1!==r||"UTF16LE"!==t&&1===r,a=0;a<e.length;a+=1){for(s=e.charCodeAt(a),!0===f&&(s=(l=255&s)<<8|s>>>8),h=(c=d+O)>>>2;p.length<=h;)p.push(0);p[h]|=s<<8*(u+c%4*r),d+=2}return{value:p,binLen:8*d+n}}(e,t,n,r,i)};case"B64":return function(e,t,n){return function(e,t,i,n){let r,s,o,a,l,h,c=0,u=t||[0],f=(i=i||0)>>>3,d=3*(-1===n),p=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==p&&p<e.length)throw Error("Invalid '=' found in base-64 string");for(r=0;r<e.length;r+=4){for(a=e.substr(r,4),o=0,s=0;s<a.length;s+=1)o|=es.indexOf(a.charAt(s))<<18-6*s;for(s=0;s<a.length-1;s+=1){for(l=(h=c+f)>>>2;u.length<=l;)u.push(0);u[l]|=(o>>>16-8*s&255)<<8*(d+h%4*n),c+=1}}return{value:u,binLen:8*c+i}}(e,t,n,i)};case"BYTES":return function(e,t,n){return function(e,t,i,n){let r,s,o,a,l=t||[0],h=(i=i||0)>>>3,c=3*(-1===n);for(s=0;s<e.length;s+=1)r=e.charCodeAt(s),o=(a=s+h)>>>2,l.length<=o&&l.push(0),l[o]|=r<<8*(c+a%4*n);return{value:l,binLen:8*e.length+i}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw Error(eo)}return function(e,t,n){return el(new Uint8Array(e),t,n,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw Error(ea)}return function(e,t,n){return el(e,t,n,i)};default:throw Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function ec(e,t,i,n){switch(e){case"HEX":return function(e){return function(e,t,i,n){let r="0123456789abcdef",s,o,a="",l=t/8,h=3*(-1===i);for(s=0;s<l;s+=1)a+=r.charAt((o=e[s>>>2]>>>8*(h+s%4*i))>>>4&15)+r.charAt(15&o);return n.outputUpper?a.toUpperCase():a}(e,t,i,n)};case"B64":return function(e){return function(e,t,i,n){let r,s,o,a,l,h="",c=t/8,u=3*(-1===i);for(r=0;r<c;r+=3)for(a=r+1<c?e[r+1>>>2]:0,l=r+2<c?e[r+2>>>2]:0,o=(e[r>>>2]>>>8*(u+r%4*i)&255)<<16|(a>>>8*(u+(r+1)%4*i)&255)<<8|l>>>8*(u+(r+2)%4*i)&255,s=0;s<4;s+=1)h+=8*r+6*s<=t?es.charAt(o>>>6*(3-s)&63):n.b64Pad;return h}(e,t,i,n)};case"BYTES":return function(e){var n=e,r=t,s=i;let o,a="",l=r/8,h=3*(-1===s);for(o=0;o<l;o+=1)a+=String.fromCharCode(n[o>>>2]>>>8*(h+o%4*s)&255);return a};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw Error(eo)}return function(e){return function(e,t,i){let n,r=t/8,s=new ArrayBuffer(r),o=new Uint8Array(s),a=3*(-1===i);for(n=0;n<r;n+=1)o[n]=e[n>>>2]>>>8*(a+n%4*i)&255;return s}(e,t,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw Error(ea)}return function(e){let n,r=t/8,s=3*(-1===i),o=new Uint8Array(r);for(n=0;n<r;n+=1)o[n]=e[n>>>2]>>>8*(s+n%4*i)&255;return o};default:throw Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}let eu=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],ef=[0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4],ed=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],ep="Chosen SHA variant is not supported",eO="Cannot set numRounds with MAC";function eg(e,t){let i,n,r=e.binLen>>>3,s=t.binLen>>>3,o=r<<3,a=4-r<<3;if(r%4!=0){for(i=0;i<s;i+=4)n=r+i>>>2,e.value[n]|=t.value[i>>>2]<<o,e.value.push(0),e.value[n+1]|=t.value[i>>>2]>>>a;return(e.value.length<<2)-4>=s+r&&e.value.pop(),{value:e.value,binLen:e.binLen+t.binLen}}return{value:e.value.concat(t.value),binLen:e.binLen+t.binLen}}function em(e){let t={outputUpper:!1,b64Pad:"=",outputLen:-1},i=e||{},n="Output length must be a multiple of 8";if(t.outputUpper=i.outputUpper||!1,i.b64Pad&&(t.b64Pad=i.b64Pad),i.outputLen){if(i.outputLen%8!=0)throw Error(n);t.outputLen=i.outputLen}else if(i.shakeLen){if(i.shakeLen%8!=0)throw Error(n);t.outputLen=i.shakeLen}if("boolean"!=typeof t.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw Error("Invalid b64Pad formatting option");return t}function ev(e,t,i,n){let r=e+" must include a value and format";if(!t){if(!n)throw Error(r);return n}if(void 0===t.value||!t.format)throw Error(r);return eh(t.format,t.encoding||"UTF8",i)(t.value)}class ey{constructor(e,t,i){let n=i||{};if(this.t=t,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw Error("numRounds must a integer >= 1");this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.H=!1,this.S=[],this.p=[]}update(e){let t,i=0,n=this.m>>>5,r=this.C(e,this.h,this.u),s=r.binLen,o=r.value,a=s>>>5;for(t=0;t<a;t+=n)i+this.m<=s&&(this.U=this.R(o.slice(t,t+n),this.U),i+=this.m);return this.A+=i,this.h=o.slice(i>>>5),this.u=s%this.m,this.l=!0,this}getHash(e,t){let i,n,r=this.K,s=em(t);if(this.v){if(-1===s.outputLen)throw Error("Output length must be specified in options");r=s.outputLen}let o=ec(e,r,this.T,s);if(this.H&&this.F)return o(this.F(s));for(n=this.L(this.h.slice(),this.u,this.A,this.B(this.U),r),i=1;i<this.numRounds;i+=1)this.v&&r%32!=0&&(n[n.length-1]&=0xffffff>>>24-r%32),n=this.L(n,r,0,this.M(this.o),r);return o(n)}setHMACKey(e,t,i){if(!this.k)throw Error("Variant does not support HMAC");if(this.l)throw Error("Cannot set MAC key after calling update");let n=eh(t,(i||{}).encoding||"UTF8",this.T);this.Y(n(e))}Y(e){let t,i=this.m>>>3,n=i/4-1;if(1!==this.numRounds)throw Error(eO);if(this.H)throw Error("MAC key already set");for(i<e.binLen/8&&(e.value=this.L(e.value,e.binLen,0,this.M(this.o),this.K));e.value.length<=n;)e.value.push(0);for(t=0;t<=n;t+=1)this.S[t]=0x36363636^e.value[t],this.p[t]=0x5c5c5c5c^e.value[t];this.U=this.R(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(e,t){let i=em(t);return ec(e,this.K,this.T,i)(this.N())}N(){let e;if(!this.H)throw Error("Cannot call getHMAC without first setting MAC key");let t=this.L(this.h.slice(),this.u,this.A,this.B(this.U),this.K);return e=this.R(this.p,this.M(this.o)),e=this.L(t,this.K,this.m,e,this.K)}}function ew(e,t){return e<<t|e>>>32-t}function eb(e,t){return e>>>t|e<<32-t}function ex(e,t){let i=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(i>>>16))<<16|65535&i}function eS(e,t,i,n,r){let s=(65535&e)+(65535&t)+(65535&i)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(r>>>16)+(s>>>16))<<16|65535&s}function ek(e){return[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0]}function eQ(e,t){let i,n,r,s,o,a,l,h=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],l=0;l<80;l+=1){var c,u,f,d;h[l]=l<16?e[l]:ew(h[l-3]^h[l-8]^h[l-14]^h[l-16],1),a=l<20?eS(ew(i,5),(c=n)&r^~c&s,o,0x5a827999,h[l]):l<40?eS(ew(i,5),n^r^s,o,0x6ed9eba1,h[l]):l<60?eS(ew(i,5),(u=n)&(f=r)^u&(d=s)^f&d,o,0x8f1bbcdc,h[l]):eS(ew(i,5),n^r^s,o,0xca62c1d6,h[l]),o=s,s=r,r=ew(n,30),n=i,i=a}return t[0]=ex(i,t[0]),t[1]=ex(n,t[1]),t[2]=ex(r,t[2]),t[3]=ex(s,t[3]),t[4]=ex(o,t[4]),t}function e$(e,t,i,n){let r,s=15+(t+65>>>9<<4),o=t+i;for(;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=0|o,e[s-1]=o/0x100000000|0,r=0;r<e.length;r+=16)n=eQ(e.slice(r,r+16),n);return n}let eP=class extends ey{constructor(e,t,i){if("SHA-1"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.k=!0,this.F=this.N,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eQ,this.B=function(e){return e.slice()},this.M=ek,this.L=e$,this.U=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.m=512,this.K=160,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}};function eA(e){return"SHA-224"==e?ef.slice():ed.slice()}function eC(e,t){let i,n,r,s,o,a,l,h,c,u,f,d=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],h=t[7],f=0;f<64;f+=1){var p,O,g,m,v,y,w,b;d[f]=f<16?e[f]:function(e,t,i,n){let r=(65535&e)+(65535&t)+(65535&i)+(65535&n);return(65535&(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(r>>>16))<<16|65535&r}(eb(w=d[f-2],17)^eb(w,19)^w>>>10,d[f-7],eb(b=d[f-15],7)^eb(b,18)^b>>>3,d[f-16]),c=eS(h,eb(p=o,6)^eb(p,11)^eb(p,25),(O=o)&a^~O&l,eu[f],d[f]),u=ex(eb(g=i,2)^eb(g,13)^eb(g,22),(m=i)&(v=n)^m&(y=r)^v&y),h=l,l=a,a=o,o=ex(s,c),s=r,r=n,n=i,i=ex(c,u)}return t[0]=ex(i,t[0]),t[1]=ex(n,t[1]),t[2]=ex(r,t[2]),t[3]=ex(s,t[3]),t[4]=ex(o,t[4]),t[5]=ex(a,t[5]),t[6]=ex(l,t[6]),t[7]=ex(h,t[7]),t}let e_=class extends ey{constructor(e,t,i){if("SHA-224"!==e&&"SHA-256"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.F=this.N,this.k=!0,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eC,this.B=function(e){return e.slice()},this.M=eA,this.L=function(t,i,n,r){let s;var o=r;let a=15+(i+65>>>9<<4),l=i+n;for(;t.length<=a;)t.push(0);for(t[i>>>5]|=128<<24-i%32,t[a]=0|l,t[a-1]=l/0x100000000|0,s=0;s<t.length;s+=16)o=eC(t.slice(s,s+16),o);return"SHA-224"===e?[o[0],o[1],o[2],o[3],o[4],o[5],o[6]]:o},this.U=eA(e),this.m=512,this.K="SHA-224"===e?224:256,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}};class eT{constructor(e,t){this.I=e,this.X=t}}function eM(e,t){let i;return t>32?(i=64-t,new eT(e.X<<t|e.I>>>i,e.I<<t|e.X>>>i)):0!==t?(i=32-t,new eT(e.I<<t|e.X>>>i,e.X<<t|e.I>>>i)):e}function eZ(e,t){let i;return t<32?(i=32-t,new eT(e.I>>>t|e.X<<i,e.X>>>t|e.I<<i)):(i=64-t,new eT(e.X>>>t|e.I<<i,e.I>>>t|e.X<<i))}function eR(e,t){return new eT(e.I>>>t,e.X>>>t|e.I<<32-t)}function eX(e,t){let i,n;i=(65535&e.X)+(65535&t.X);let r=(65535&(n=(e.X>>>16)+(t.X>>>16)+(i>>>16)))<<16|65535&i;return i=(65535&e.I)+(65535&t.I)+(n>>>16),new eT((65535&(n=(e.I>>>16)+(t.I>>>16)+(i>>>16)))<<16|65535&i,r)}function eE(e,t){return new eT(e.I^t.I,e.X^t.X)}let ej=[new eT(eu[0],0xd728ae22),new eT(eu[1],0x23ef65cd),new eT(eu[2],0xec4d3b2f),new eT(eu[3],0x8189dbbc),new eT(eu[4],0xf348b538),new eT(eu[5],0xb605d019),new eT(eu[6],0xaf194f9b),new eT(eu[7],0xda6d8118),new eT(eu[8],0xa3030242),new eT(eu[9],0x45706fbe),new eT(eu[10],0x4ee4b28c),new eT(eu[11],0xd5ffb4e2),new eT(eu[12],0xf27b896f),new eT(eu[13],0x3b1696b1),new eT(eu[14],0x25c71235),new eT(eu[15],0xcf692694),new eT(eu[16],0x9ef14ad2),new eT(eu[17],0x384f25e3),new eT(eu[18],0x8b8cd5b5),new eT(eu[19],0x77ac9c65),new eT(eu[20],0x592b0275),new eT(eu[21],0x6ea6e483),new eT(eu[22],0xbd41fbd4),new eT(eu[23],0x831153b5),new eT(eu[24],0xee66dfab),new eT(eu[25],0x2db43210),new eT(eu[26],0x98fb213f),new eT(eu[27],0xbeef0ee4),new eT(eu[28],0x3da88fc2),new eT(eu[29],0x930aa725),new eT(eu[30],0xe003826f),new eT(eu[31],0xa0e6e70),new eT(eu[32],0x46d22ffc),new eT(eu[33],0x5c26c926),new eT(eu[34],0x5ac42aed),new eT(eu[35],0x9d95b3df),new eT(eu[36],0x8baf63de),new eT(eu[37],0x3c77b2a8),new eT(eu[38],0x47edaee6),new eT(eu[39],0x1482353b),new eT(eu[40],0x4cf10364),new eT(eu[41],0xbc423001),new eT(eu[42],0xd0f89791),new eT(eu[43],0x654be30),new eT(eu[44],0xd6ef5218),new eT(eu[45],0x5565a910),new eT(eu[46],0x5771202a),new eT(eu[47],0x32bbd1b8),new eT(eu[48],0xb8d2d0c8),new eT(eu[49],0x5141ab53),new eT(eu[50],0xdf8eeb99),new eT(eu[51],0xe19b48a8),new eT(eu[52],0xc5c95a63),new eT(eu[53],0xe3418acb),new eT(eu[54],0x7763e373),new eT(eu[55],0xd6b2b8a3),new eT(eu[56],0x5defb2fc),new eT(eu[57],0x43172f60),new eT(eu[58],0xa1f0ab72),new eT(eu[59],0x1a6439ec),new eT(eu[60],0x23631e28),new eT(eu[61],0xde82bde9),new eT(eu[62],0xb2c67915),new eT(eu[63],0xe372532b),new eT(0xca273ece,0xea26619c),new eT(0xd186b8c7,0x21c0c207),new eT(0xeada7dd6,0xcde0eb1e),new eT(0xf57d4f7f,0xee6ed178),new eT(0x6f067aa,0x72176fba),new eT(0xa637dc5,0xa2c898a6),new eT(0x113f9804,0xbef90dae),new eT(0x1b710b35,0x131c471b),new eT(0x28db77f5,0x23047d84),new eT(0x32caab7b,0x40c72493),new eT(0x3c9ebe0a,0x15c9bebc),new eT(0x431d67c4,0x9c100d4c),new eT(0x4cc5d4be,0xcb3e42b6),new eT(0x597f299c,0xfc657e2a),new eT(0x5fcb6fab,0x3ad6faec),new eT(0x6c44198c,0x4a475817)];function eB(e){return"SHA-384"===e?[new eT(0xcbbb9d5d,ef[0]),new eT(0x629a292a,ef[1]),new eT(0x9159015a,ef[2]),new eT(0x152fecd8,ef[3]),new eT(0x67332667,ef[4]),new eT(0x98eb44a87,ef[5]),new eT(0xdb0c2e0d,ef[6]),new eT(0x47b5481d,ef[7])]:[new eT(ed[0],0xf3bcc908),new eT(ed[1],0x84caa73b),new eT(ed[2],0xfe94f82b),new eT(ed[3],0x5f1d36f1),new eT(ed[4],0xade682d1),new eT(ed[5],0x2b3e6c1f),new eT(ed[6],0xfb41bd6b),new eT(ed[7],0x137e2179)]}function eL(e,t){let i,n,r,s,o,a,l,h,c,u,f,d,p=[];for(i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=t[6],h=t[7],f=0;f<80;f+=1){var O,g,m,v,y,w;f<16?(d=2*f,p[f]=new eT(e[d],e[d+1])):p[f]=function(e,t,i,n){let r,s;r=(65535&e.X)+(65535&t.X)+(65535&i.X)+(65535&n.X);let o=(65535&(s=(e.X>>>16)+(t.X>>>16)+(i.X>>>16)+(n.X>>>16)+(r>>>16)))<<16|65535&r;return r=(65535&e.I)+(65535&t.I)+(65535&i.I)+(65535&n.I)+(s>>>16),new eT((65535&(s=(e.I>>>16)+(t.I>>>16)+(i.I>>>16)+(n.I>>>16)+(r>>>16)))<<16|65535&r,o)}(function(e){let t=eZ(e,19),i=eZ(e,61),n=eR(e,6);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(p[f-2]),p[f-7],function(e){let t=eZ(e,1),i=eZ(e,8),n=eR(e,7);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(p[f-15]),p[f-16]),c=function(e,t,i,n,r){let s,o;s=(65535&e.X)+(65535&t.X)+(65535&i.X)+(65535&n.X)+(65535&r.X);let a=(65535&(o=(e.X>>>16)+(t.X>>>16)+(i.X>>>16)+(n.X>>>16)+(r.X>>>16)+(s>>>16)))<<16|65535&s;return s=(65535&e.I)+(65535&t.I)+(65535&i.I)+(65535&n.I)+(65535&r.I)+(o>>>16),new eT((65535&(o=(e.I>>>16)+(t.I>>>16)+(i.I>>>16)+(n.I>>>16)+(r.I>>>16)+(s>>>16)))<<16|65535&s,a)}(h,function(e){let t=eZ(e,14),i=eZ(e,18),n=eZ(e,41);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(o),(O=o,g=a,m=l,new eT(O.I&g.I^~O.I&m.I,O.X&g.X^~O.X&m.X)),ej[f],p[f]),u=eX(function(e){let t=eZ(e,28),i=eZ(e,34),n=eZ(e,39);return new eT(t.I^i.I^n.I,t.X^i.X^n.X)}(i),(v=i,y=n,w=r,new eT(v.I&y.I^v.I&w.I^y.I&w.I,v.X&y.X^v.X&w.X^y.X&w.X))),h=l,l=a,a=o,o=eX(s,c),s=r,r=n,n=i,i=eX(c,u)}return t[0]=eX(i,t[0]),t[1]=eX(n,t[1]),t[2]=eX(r,t[2]),t[3]=eX(s,t[3]),t[4]=eX(o,t[4]),t[5]=eX(a,t[5]),t[6]=eX(l,t[6]),t[7]=eX(h,t[7]),t}let eI=class extends ey{constructor(e,t,i){if("SHA-384"!==e&&"SHA-512"!==e)throw Error(ep);super(e,t,i);let n=i||{};this.F=this.N,this.k=!0,this.T=-1,this.C=eh(this.t,this.i,this.T),this.R=eL,this.B=function(e){return e.slice()},this.M=eB,this.L=function(t,i,n,r){let s;var o=r;let a=31+(i+129>>>10<<5),l=i+n;for(;t.length<=a;)t.push(0);for(t[i>>>5]|=128<<24-i%32,t[a]=0|l,t[a-1]=l/0x100000000|0,s=0;s<t.length;s+=32)o=eL(t.slice(s,s+32),o);return"SHA-384"===e?[o[0].I,o[0].X,o[1].I,o[1].X,o[2].I,o[2].X,o[3].I,o[3].X,o[4].I,o[4].X,o[5].I,o[5].X]:[o[0].I,o[0].X,o[1].I,o[1].X,o[2].I,o[2].X,o[3].I,o[3].X,o[4].I,o[4].X,o[5].I,o[5].X,o[6].I,o[6].X,o[7].I,o[7].X]},this.U=eB(e),this.m=1024,this.K="SHA-384"===e?384:512,this.v=!1,n.hmacKey&&this.Y(ev("hmacKey",n.hmacKey,this.T))}},ez=[new eT(0,1),new eT(0,32898),new eT(0x80000000,32906),new eT(0x80000000,0x80008000),new eT(0,32907),new eT(0,0x80000001),new eT(0x80000000,0x80008081),new eT(0x80000000,32777),new eT(0,138),new eT(0,136),new eT(0,0x80008009),new eT(0,0x8000000a),new eT(0,0x8000808b),new eT(0x80000000,139),new eT(0x80000000,32905),new eT(0x80000000,32771),new eT(0x80000000,32770),new eT(0x80000000,128),new eT(0,32778),new eT(0x80000000,0x8000000a),new eT(0x80000000,0x80008081),new eT(0x80000000,32896),new eT(0,0x80000001),new eT(0x80000000,0x80008008)],eY=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function eV(e){let t,i=[];for(t=0;t<5;t+=1)i[t]=[new eT(0,0),new eT(0,0),new eT(0,0),new eT(0,0),new eT(0,0)];return i}function eW(e){let t,i=[];for(t=0;t<5;t+=1)i[t]=e[t].slice();return i}function eD(e,t){let i,n,r,s,o=[],a=[];if(null!==e)for(n=0;n<e.length;n+=2)t[(n>>>1)%5][(n>>>1)/5|0]=eE(t[(n>>>1)%5][(n>>>1)/5|0],new eT(e[n+1],e[n]));for(i=0;i<24;i+=1){for(s=eV(),n=0;n<5;n+=1){var l,h,c,u,f;o[n]=(l=t[n][0],h=t[n][1],c=t[n][2],u=t[n][3],f=t[n][4],new eT(l.I^h.I^c.I^u.I^f.I,l.X^h.X^c.X^u.X^f.X))}for(n=0;n<5;n+=1)a[n]=eE(o[(n+4)%5],eM(o[(n+1)%5],1));for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)t[n][r]=eE(t[n][r],a[n]);for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)s[r][(2*n+3*r)%5]=eM(t[n][r],eY[n][r]);for(n=0;n<5;n+=1)for(r=0;r<5;r+=1)t[n][r]=eE(s[n][r],new eT(~s[(n+1)%5][r].I&s[(n+2)%5][r].I,~s[(n+1)%5][r].X&s[(n+2)%5][r].X));t[0][0]=eE(t[0][0],ez[i])}return t}function eq(e){let t,i,n=0,r=[0,0],s=[0|e,e/0x100000000&2097151];for(t=6;t>=0;t--)0==(i=s[t>>2]>>>8*t&255)&&0===n||(r[n+1>>2]|=i<<8*(n+1),n+=1);return n=0!==n?n:1,r[0]|=n,{value:n+1>4?r:[r[0]],binLen:8+8*n}}function eN(e){return eg(eq(e.binLen),e)}function eU(e,t){let i,n=eq(t);n=eg(n,e);let r=t>>>2,s=(r-n.value.length%r)%r;for(i=0;i<s;i++)n.value.push(0);return n.value}let eG=class extends ey{constructor(e,t,i){let n=6,r=0;super(e,t,i);let s=i||{};if(1!==this.numRounds){if(s.kmacKey||s.hmacKey)throw Error(eO);if("CSHAKE128"===this.o||"CSHAKE256"===this.o)throw Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=eh(this.t,this.i,this.T),this.R=eD,this.B=eW,this.M=eV,this.U=eV(),this.v=!1,e){case"SHA3-224":this.m=r=1152,this.K=224,this.k=!0,this.F=this.N;break;case"SHA3-256":this.m=r=1088,this.K=256,this.k=!0,this.F=this.N;break;case"SHA3-384":this.m=r=832,this.K=384,this.k=!0,this.F=this.N;break;case"SHA3-512":this.m=r=576,this.K=512,this.k=!0,this.F=this.N;break;case"SHAKE128":n=31,this.m=r=1344,this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"SHAKE256":n=31,this.m=r=1088,this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"KMAC128":n=4,this.m=r=1344,this._(i),this.K=-1,this.v=!0,this.k=!1,this.F=this.O;break;case"KMAC256":n=4,this.m=r=1088,this._(i),this.K=-1,this.v=!0,this.k=!1,this.F=this.O;break;case"CSHAKE128":this.m=r=1344,n=this.P(i),this.K=-1,this.v=!0,this.k=!1,this.F=null;break;case"CSHAKE256":this.m=r=1088,n=this.P(i),this.K=-1,this.v=!0,this.k=!1,this.F=null;break;default:throw Error(ep)}this.L=function(e,t,i,s,o){return function(e,t,i,n,r,s){let o,a,l=0,h=[],c=n>>>5,u=t>>>5;for(o=0;o<u&&t>=n;o+=c)i=eD(e.slice(o,o+c),i),t-=n;for(e=e.slice(o),t%=n;e.length<c;)e.push(0);for(o=t>>>3,e[o>>2]^=r<<o%4*8,e[c-1]^=0x80000000,i=eD(e,i);32*h.length<s&&(h.push((a=i[l%5][l/5|0]).X),!(32*h.length>=s));)h.push(a.I),0==64*(l+=1)%n&&(eD(null,i),l=0);return h}(e,t,s,r,n,o)},s.hmacKey&&this.Y(ev("hmacKey",s.hmacKey,this.T))}P(e,t){let i,n={funcName:ev("funcName",(i=e||{}).funcName,1,{value:[],binLen:0}),customization:ev("Customization",i.customization,1,{value:[],binLen:0})};t&&(n.funcName=t);let r=eg(eN(n.funcName),eN(n.customization));if(0!==n.customization.binLen||0!==n.funcName.binLen){let e=eU(r,this.m>>>3);for(let t=0;t<e.length;t+=this.m>>>5)this.U=this.R(e.slice(t,t+(this.m>>>5)),this.U),this.A+=this.m;return 4}return 31}_(e){let t,i={kmacKey:ev("kmacKey",(t=e||{}).kmacKey,1),funcName:{value:[0x43414d4b],binLen:32},customization:ev("Customization",t.customization,1,{value:[],binLen:0})};this.P(e,i.funcName);let n=eU(eN(i.kmacKey),this.m>>>3);for(let e=0;e<n.length;e+=this.m>>>5)this.U=this.R(n.slice(e,e+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}O(e){let t=eg({value:this.h.slice(),binLen:this.u},function(e){let t,i,n=0,r=[0,0],s=[0|e,e/0x100000000&2097151];for(t=6;t>=0;t--)0==(i=s[t>>2]>>>8*t&255)&&0===n||(r[n>>2]|=i<<8*n,n+=1);return n=0!==n?n:1,r[n>>2]|=n<<8*n,{value:n+1>4?r:[r[0]],binLen:8+8*n}}(e.outputLen));return this.L(t.value,t.binLen,this.A,this.B(this.U),e.outputLen)}};class eF{constructor(e,t,i){if("SHA-1"==e)this.V=new eP(e,t,i);else if("SHA-224"==e||"SHA-256"==e)this.V=new e_(e,t,i);else if("SHA-384"==e||"SHA-512"==e)this.V=new eI(e,t,i);else{if("SHA3-224"!=e&&"SHA3-256"!=e&&"SHA3-384"!=e&&"SHA3-512"!=e&&"SHAKE128"!=e&&"SHAKE256"!=e&&"CSHAKE128"!=e&&"CSHAKE256"!=e&&"KMAC128"!=e&&"KMAC256"!=e)throw Error(ep);this.V=new eG(e,t,i)}}update(e){return this.V.update(e),this}getHash(e,t){return this.V.getHash(e,t)}setHMACKey(e,t,i){this.V.setHMACKey(e,t,i)}getHMAC(e,t){return this.V.getHMAC(e,t)}}var eK=i(256),eH=i(911);let eJ="/api/v1/fs",e0=(e,t,i)=>{i||"function"!=typeof t||(i=t,t=null),e1({method:"PUT",url:eJ+e,data:t,callback:i})};function e1({url:e,data:t,method:i,callback:n}){!function(e,t){let{url:i,data:n,method:r}=e,s=new XMLHttpRequest;if("function"!=typeof t)throw Error("Callback should be function!");s.open(r,i,!0),s.addEventListener("error",t),s.addEventListener("load",()=>{if(s.status>=200&&s.status<400)return t(null,s.responseText);t(Error(s.responseText))}),s.send(n)}({method:i,data:t,url:encodeURI(e).replace(/#/g,"%23")},n)}let e2=async(e,...t)=>{var i=e;if("function"!=typeof i)throw Error("fn should be a function!");try{return[null,await e(...t)]}catch(e){return[e]}};var e5=i(411);let e3=[],e6=[],e4="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<e4.length;e++)(e%2?e6:e3).push(t+=e4[e]);function e8(e){return e>=127462&&e<=127487}function e7(e,t,i){if(t==e.length)return t;t&&te(e.charCodeAt(t))&&tt(e.charCodeAt(t-1))&&t--;let n=e9(e,t);for(t+=ti(n);t<e.length;){let r=e9(e,t);if(8205==n||8205==r||i&&function(e){if(e<768)return!1;for(let t=0,i=e3.length;;){let n=t+i>>1;if(e<e3[n])i=n;else{if(!(e>=e6[n]))return!0;t=n+1}if(t==i)return!1}}(r))t+=ti(r),n=r;else if(e8(r)){let i=0,n=t-2;for(;n>=0&&e8(e9(e,n));)i++,n-=2;if(i%2==0)break;t+=2}else break}return t}function e9(e,t){let i=e.charCodeAt(t);if(!tt(i)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return te(n)?(i-55296<<10)+(n-56320)+65536:i}function te(e){return e>=56320&&e<57344}function tt(e){return e>=55296&&e<56320}function ti(e){return e<65536?1:2}class tn{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=tu(this,e,t);let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),ts.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=tu(this,e,t);let i=[];return this.decompose(e,t,i,0),ts.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new ta(this),r=new ta(e);for(let e=t,s=t;;){if(n.next(e),r.next(e),e=0,n.lineBreak!=r.lineBreak||n.done!=r.done||n.value!=r.value)return!1;if(s+=n.value.length,n.done||s>=i)return!0}}iter(e=1){return new ta(this,e)}iterRange(e,t=this.length){return new tl(this,e,t)}iterLines(e,t){let i;if(null==e)i=this.iter();else{null==t&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new th(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new tr(e):ts.from(tr.split(e,[])):tn.empty}}class tr extends tn{constructor(e,t=function(e){let t=-1;for(let i of e)t+=i.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let r=0;;r++){let s=this.text[r],o=n+s.length;if((t?i:o)>=e)return new tc(n,o,i,s);n=o+1,i++}}decompose(e,t,i,n){var r;let s=e<=0&&t>=this.length?this:new tr((r=this.text,to(r,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&n){let e=i.pop(),t=to(s.text,e.text.slice(),0,s.length);if(t.length<=32)i.push(new tr(t,e.length+s.length));else{let e=t.length>>1;i.push(new tr(t.slice(0,e)),new tr(t.slice(e)))}}else i.push(s)}replace(e,t,i){var n;if(!(i instanceof tr))return super.replace(e,t,i);[e,t]=tu(this,e,t);let r=to(this.text,to(i.text,(n=this.text,to(n,[""],0,e))),t),s=this.length+i.length-(t-e);return r.length<=32?new tr(r,s):ts.from(tr.split(r,[]),s)}sliceString(e,t=this.length,i="\n"){[e,t]=tu(this,e,t);let n="";for(let r=0,s=0;r<=t&&s<this.text.length;s++){let o=this.text[s],a=r+o.length;r>e&&s&&(n+=i),e<a&&t>r&&(n+=o.slice(Math.max(0,e-r),t-r)),r=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let r of e)i.push(r),n+=r.length+1,32==i.length&&(t.push(new tr(i,n)),i=[],n=-1);return n>-1&&t.push(new tr(i,n)),t}}class ts extends tn{constructor(e,t){for(let i of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=i.lines}lineInner(e,t,i,n){for(let r=0;;r++){let s=this.children[r],o=n+s.length,a=i+s.lines-1;if((t?a:o)>=e)return s.lineInner(e,t,i,n);n=o+1,i=a+1}}decompose(e,t,i,n){for(let r=0,s=0;s<=t&&r<this.children.length;r++){let o=this.children[r],a=s+o.length;if(e<=a&&t>=s){let r=n&(s<=e|2*(a>=t));s>=e&&a<=t&&!r?i.push(o):o.decompose(e-s,t-s,i,r)}s=a+1}}replace(e,t,i){if([e,t]=tu(this,e,t),i.lines<this.lines)for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],o=r+s.length;if(e>=r&&t<=o){let a=s.replace(e-r,t-r,i),l=this.lines-s.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let r=this.children.slice();return r[n]=a,new ts(r,this.length-(t-e)+i.length)}return super.replace(r,o,a)}r=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){[e,t]=tu(this,e,t);let n="";for(let r=0,s=0;r<this.children.length&&s<=t;r++){let o=this.children[r],a=s+o.length;s>e&&r&&(n+=i),e<a&&t>s&&(n+=o.sliceString(e-s,t-s,i)),s=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ts))return 0;let i=0,[n,r,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,r+=t){if(n==s||r==o)return i;let a=this.children[n],l=e.children[r];if(a!=l)return i+a.scanIdentical(l,t);i+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let i=0;for(let t of e)i+=t.lines;if(i<32){let i=[];for(let t of e)t.flatten(i);return new tr(i,t)}let n=Math.max(32,i>>5),r=n<<1,s=n>>1,o=[],a=0,l=-1,h=[];function c(){0!=a&&(o.push(1==h.length?h[0]:ts.from(h,l)),l=-1,a=h.length=0)}for(let t of e)!function e(t){let i;if(t.lines>r&&t instanceof ts)for(let i of t.children)e(i);else t.lines>s&&(a>s||!a)?(c(),o.push(t)):t instanceof tr&&a&&(i=h[h.length-1])instanceof tr&&t.lines+i.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new tr(i.text.concat(t.text),i.length+1+t.length)):(a+t.lines>n&&c(),a+=t.lines,l+=t.length+1,h.push(t))}(t);return c(),1==o.length?o[0]:new ts(o,t)}}function to(e,t,i=0,n=1e9){for(let r=0,s=0,o=!0;s<e.length&&r<=n;s++){let a=e[s],l=r+a.length;l>=i&&(l>n&&(a=a.slice(0,n-r)),r<i&&(a=a.slice(i-r)),o?(t[t.length-1]+=a,o=!1):t.push(a)),r=l+1}return t}tn.empty=new tr([""],0);class ta{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof tr?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],r=this.offsets[i],s=r>>1,o=n instanceof tr?n.text.length:n.children.length;if(s==(t>0?o:0)){if(0==i)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[i]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof tr){let r=n.text[s+(t<0?-1:0)];if(this.offsets[i]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=n.children[s+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof tr?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class tl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ta(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class th{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"u">typeof Symbol&&(tn.prototype[Symbol.iterator]=function(){return this.iter()},ta.prototype[Symbol.iterator]=tl.prototype[Symbol.iterator]=th.prototype[Symbol.iterator]=function(){return this});class tc{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}}function tu(e,t,i){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,i))]}function tf(e,t,i=!0,n=!0){return function(e,t,i=!0,n=!0){return(i?e7:function(e,t,i){for(;t>1;){let n=e7(e,t-2,i);if(n<t)return n;t--}return 0})(e,t,n)}(e,t,i,n)}function td(e,t){let i=e.charCodeAt(t);if(!(i>=55296&&i<56320)||t+1==e.length)return i;let n=e.charCodeAt(t+1);return n>=56320&&n<57344?(i-55296<<10)+(n-56320)+65536:i}function tp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function tO(e){return e<65536?1:2}let tg=/\r\n?|\n/;var tm=((o=tm||(tm={}))[o.Simple=0]="Simple",o[o.TrackDel=1]="TrackDel",o[o.TrackBefore=2]="TrackBefore",o[o.TrackAfter=3]="TrackAfter",o);class tv{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let r=this.sections[t++],s=this.sections[t++];s<0?(e(i,n,r),n+=r):n+=s,i+=r}}iterChangedRanges(e,t=!1){tx(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new tv(e)}composeDesc(e){return this.empty?e:e.empty?this:tk(this,e)}mapDesc(e,t=!1){return e.empty?this:tS(this,e,t)}mapPos(e,t=-1,i=tm.Simple){let n=0,r=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],a=this.sections[s++],l=n+o;if(a<0){if(l>e)return r+(e-n);r+=o}else{if(i!=tm.Simple&&l>=e&&(i==tm.TrackDel&&n<e&&l>e||i==tm.TrackBefore&&n<e||i==tm.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!o)return e==n||t<0?r:r+a;r+=a}n=l}if(e>n)throw RangeError(`Position ${e} is out of range for changeset of length ${n}`);return r}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let r=this.sections[i++],s=this.sections[i++],o=n+r;if(s>=0&&n<=t&&o>=e)return!(n<e)||!(o>t)||"cover";n=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new tv(e)}static create(e){return new tv(e)}}class ty extends tv{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return tx(this,(t,i,n,r,s)=>e=e.replace(n,n+(i-t),s),!1),e}mapDesc(e,t=!1){return tS(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,r=0;n<t.length;n+=2){let s=t[n],o=t[n+1];if(o>=0){t[n]=o,t[n+1]=s;let a=n>>1;for(;i.length<a;)i.push(tn.empty);i.push(s?e.slice(r,r+s):tn.empty)}r+=s}return new ty(t,i)}compose(e){return this.empty?e:e.empty?this:tk(this,e,!0)}map(e,t=!1){return e.empty?this:tS(this,e,t,!0)}iterChanges(e,t=!1){tx(this,e,t)}get desc(){return tv.create(this.sections)}filter(e){let t=[],i=[],n=[],r=new tQ(this);i:for(let s=0,o=0;;){let a=s==e.length?1e9:e[s++];for(;o<a||o==a&&0==r.len;){if(r.done)break i;let e=Math.min(r.len,a-o);tw(n,e,-1);let s=-1==r.ins?-1:0==r.off?r.ins:0;tw(t,e,s),s>0&&tb(i,t,r.text),r.forward(e),o+=e}let l=e[s++];for(;o<l;){if(r.done)break i;let e=Math.min(r.len,l-o);tw(t,e,-1),tw(n,e,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(e),o+=e}}return{changes:new ty(t,i),filtered:tv.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):0==n?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],r=[],s=0,o=null;function a(e=!1){if(!e&&!n.length)return;s<t&&tw(n,t-s,-1);let i=new ty(n,r);o=o?o.compose(i.map(o)):i,n=[],r=[],s=0}return!function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof ty){if(l.length!=t)throw RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),o=o?o.compose(l.map(o)):l}else{let{from:e,to:o=e,insert:h}=l;if(e>o||e<0||o>t)throw RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let c=h?"string"==typeof h?tn.of(h.split(i||tg)):h:tn.empty,u=c.length;if(e==o&&0==u)return;e<s&&a(),e>s&&tw(n,e-s,-1),tw(n,o-e,u),tb(r,n,c),s=o}}(e),a(!o),o}static empty(e){return new ty(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let r=e[n];if("number"==typeof r)t.push(r,-1);else if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==r.length)t.push(r[0],0);else{for(;i.length<n;)i.push(tn.empty);i[n]=tn.of(r.slice(1)),t.push(r[0],i[n].length)}}return new ty(t,i)}static createSet(e,t){return new ty(e,t)}}function tw(e,t,i,n=!1){if(0==t&&i<=0)return;let r=e.length-2;r>=0&&i<=0&&i==e[r+1]?e[r]+=t:r>=0&&0==t&&0==e[r]?e[r+1]+=i:n?(e[r]+=t,e[r+1]+=i):e.push(t,i)}function tb(e,t,i){if(0==i.length)return;let n=t.length-2>>1;if(n<e.length)e[e.length-1]=e[e.length-1].append(i);else{for(;e.length<n;)e.push(tn.empty);e.push(i)}}function tx(e,t,i){let n=e.inserted;for(let r=0,s=0,o=0;o<e.sections.length;){let a=e.sections[o++],l=e.sections[o++];if(l<0)r+=a,s+=a;else{let h=r,c=s,u=tn.empty;for(;h+=a,c+=l,l&&n&&(u=u.append(n[o-2>>1])),!i&&o!=e.sections.length&&!(e.sections[o+1]<0);)a=e.sections[o++],l=e.sections[o++];t(r,h,s,c,u),r=h,s=c}}}function tS(e,t,i,n=!1){let r=[],s=n?[]:null,o=new tQ(e),a=new tQ(t);for(let e=-1;;)if(o.done&&a.len||a.done&&o.len)throw Error("Mismatched change set lengths");else if(-1==o.ins&&-1==a.ins){let e=Math.min(o.len,a.len);tw(r,e,-1),o.forward(e),a.forward(e)}else if(a.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!i))){let t=a.len;for(tw(r,a.ins,-1);t;){let i=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=i&&(tw(r,0,o.ins),s&&tb(s,r,o.text),e=o.i),o.forward(i),t-=i}a.next()}else if(o.ins>=0){let t=0,i=o.len;for(;i;)if(-1==a.ins){let e=Math.min(i,a.len);t+=e,i-=e,a.forward(e)}else if(0==a.ins&&a.len<i)i-=a.len,a.next();else break;tw(r,t,e<o.i?o.ins:0),s&&e<o.i&&tb(s,r,o.text),e=o.i,o.forward(o.len-i)}else if(o.done&&a.done)return s?ty.createSet(r,s):tv.create(r);else throw Error("Mismatched change set lengths")}function tk(e,t,i=!1){let n=[],r=i?[]:null,s=new tQ(e),o=new tQ(t);for(let e=!1;;)if(s.done&&o.done)return r?ty.createSet(n,r):tv.create(n);else if(0==s.ins)tw(n,s.len,0,e),s.next();else if(0!=o.len||o.done)if(s.done||o.done)throw Error("Mismatched change set lengths");else{let t=Math.min(s.len2,o.len),i=n.length;if(-1==s.ins){let i=-1==o.ins?-1:o.off?0:o.ins;tw(n,t,i,e),r&&i&&tb(r,n,o.text)}else -1==o.ins?(tw(n,s.off?0:s.len,t,e),r&&tb(r,n,s.textBit(t))):(tw(n,s.off?0:s.len,o.off?0:o.ins,e),r&&!o.off&&tb(r,n,o.text));e=(s.ins>t||o.ins>=0&&o.len>t)&&(e||n.length>i),s.forward2(t),o.forward(t)}else tw(n,0,o.ins,e),r&&tb(r,n,o.text),o.next()}class tQ{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?tn.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?tn.empty:t[i].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class t${constructor(e,t,i,n){this.from=e,this.to=t,this.flags=i,this.goalColumn=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get undirectional(){return(64&this.flags)>0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new t$(i,n,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return tP.range(e,t,void 0,void 0,i);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return tP.range(this.anchor,n,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return tP.range(e.anchor,e.head)}static create(e,t,i,n){return new t$(e,t,i,n)}}class tP{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:tP.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new tP([this.main],0)}addRange(e,t=!0){return tP.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,tP.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new tP(e.ranges.map(e=>t$.fromJSON(e)),e.main)}static single(e,t=e){return new tP([tP.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let r=e[n];if(r.empty?r.from<=i:r.from<i)return tP.normalized(e.slice(),t);i=r.to}return new tP(e,t)}static cursor(e,t=0,i,n){return t$.create(e,e,(0==t?0:t<0?8:16)|(null==i?7:Math.min(6,i)),n)}static range(e,t,i,n,r){let s=null==n?7:Math.min(6,n);return r||e==t||(r=t<e?1:-1),r&&(s|=r<0?8:16),t<e?t$.create(t,e,32|s,i):t$.create(e,t,s,i)}static undirectionalRange(e,t){return t$.create(e,t,64,void 0)}static normalized(e,t=0){let i=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(i);for(let i=1;i<e.length;i++){let n=e[i],r=e[i-1];if(n.empty?n.from<=r.to:n.from<r.to){let s=r.from,o=Math.max(n.to,r.to);i<=t&&t--,e.splice(--i,2,n.anchor>n.head?tP.range(o,s):tP.range(s,o))}}return new tP(e,t)}}function tA(e,t){for(let i of e.ranges)if(i.to>t)throw RangeError("Selection points outside of document")}let tC=0;class t_{constructor(e,t,i,n,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=tC++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(e={}){return new t_(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(!e.combine?tT:(e,t)=>e===t),!!e.static,e.enables)}of(e){return new tM([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new tM(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new tM(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],i=>t(i.field(e)))}}function tT(e,t){return e==t||e.length==t.length&&e.every((e,i)=>e===t[i])}class tM{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=tC++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,r=this.id,s=e[r]>>1,o=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:((null!=(t=e[i.id])?t:1)&1)==0&&h.push(e[i.id]);return{create:e=>(e.values[s]=i(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||tR(e,h)){let t=i(e);if(o?!tZ(t,e.values[s],n):!n(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[r];if(null!=l){let r=tW(t,l);if(this.dependencies.every(i=>i instanceof t_?t.facet(i)===e.facet(i):!(i instanceof tE)||t.field(i,!1)==e.field(i,!1))||(o?tZ(a=i(e),r,n):n(a=i(e),r)))return e.values[s]=r,0}else a=i(e);return e.values[s]=a,1}}}get extension(){return this}}function tZ(e,t,i){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0}function tR(e,t){let i=!1;for(let n of t)1&tV(e,n)&&(i=!0);return i}let tX=t_.define({static:!0});class tE{constructor(e,t,i,n,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=r,this.provides=void 0}static define(e){let t=new tE(tC++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(tX).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,i)=>{let n=e.values[t],r=this.updateF(n,i);return this.compareF(n,r)?0:(e.values[t]=r,1)},reconfigure:(e,i)=>{let n=e.facet(tX),r=i.facet(tX),s;return(s=n.find(e=>e.field==this))&&s!=r.find(e=>e.field==this)?(e.values[t]=s.create(e),1):null!=i.config.address[this.id]?(e.values[t]=i.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,tX.of({field:this,create:e})]}get extension(){return this}}function tj(e){return t=>new tL(t,e)}let tB={highest:tj(0),high:tj(1),default:tj(2),low:tj(3),lowest:tj(4)};class tL{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class tI{of(e){return new tz(this,e)}reconfigure(e){return tI.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class tz{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class tY{constructor(e,t,i,n,r,s){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,i){var n,r,s;let o,a,l=[],h=Object.create(null),c=new Map;for(let i of(n=e,r=t,s=c,o=[[],[],[],[],[]],a=new Map,!function e(t,i){let n=a.get(t);if(null!=n){if(n<=i)return;let e=o[n].indexOf(t);e>-1&&o[n].splice(e,1),t instanceof tz&&s.delete(t.compartment)}if(a.set(t,i),Array.isArray(t))for(let n of t)e(n,i);else if(t instanceof tz){if(s.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let n=r.get(t.compartment)||t.inner;s.set(t.compartment,n),e(n,i)}else if(t instanceof tL)e(t.inner,t.prec);else if(t instanceof tE)o[i].push(t),t.provides&&e(t.provides,i);else if(t instanceof tM)o[i].push(t),t.facet.extensions&&e(t.facet.extensions,2);else{let n=t.extension;if(!n)throw Error(`Unrecognized extension value in extension set (${t}).`);if(n==t)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(n,i)}}(n,2),o.reduce((e,t)=>e.concat(t))))i instanceof tE?l.push(i):(h[i.facet.id]||(h[i.facet.id]=[])).push(i);let u=Object.create(null),f=[],d=[];for(let e of l)u[e.id]=d.length<<1,d.push(t=>e.slot(t));let p=null==i?void 0:i.config.facets;for(let e in h){let t=h[e],n=t[0].facet,r=p&&p[e]||[];if(t.every(e=>0==e.type))if(u[n.id]=f.length<<1|1,tT(r,t))f.push(i.facet(n));else{let e=n.combine(t.map(e=>e.value));f.push(i&&n.compare(e,i.facet(n))?i.facet(n):e)}else{for(let e of t)0==e.type?(u[e.id]=f.length<<1|1,f.push(e.value)):(u[e.id]=d.length<<1,d.push(t=>e.dynamicSlot(t)));u[n.id]=d.length<<1,d.push(e=>(function(e,t,i){let n=i.map(t=>e[t.id]),r=i.map(e=>e.type),s=n.filter(e=>!(1&e)),o=e[t.id]>>1;function a(e){let i=[];for(let t=0;t<n.length;t++){let s=tW(e,n[t]);if(2==r[t])for(let e of s)i.push(e);else i.push(s)}return t.combine(i)}return{create(e){for(let t of n)tV(e,t);return e.values[o]=a(e),1},update(e,i){if(!tR(e,s))return 0;let n=a(e);return t.compare(n,e.values[o])?0:(e.values[o]=n,1)},reconfigure(e,r){let s=tR(e,n),l=r.config.facets[t.id],h=r.facet(t);if(l&&!s&&tT(i,l))return e.values[o]=h,0;let c=a(e);return t.compare(c,h)?(e.values[o]=h,0):(e.values[o]=c,1)}}})(e,n,t))}}return new tY(e,c,d.map(e=>e(u)),u,f,h)}}function tV(e,t){if(1&t)return 2;let i=t>>1,n=e.status[i];if(4==n)throw Error("Cyclic dependency between fields and/or facets");if(2&n)return n;e.status[i]=4;let r=e.computeSlot(e,e.config.dynamicSlots[i]);return e.status[i]=2|r}function tW(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let tD=t_.define(),tq=t_.define({combine:e=>e.some(e=>e),static:!0}),tN=t_.define({combine:e=>e.length?e[0]:void 0,static:!0}),tU=t_.define(),tG=t_.define(),tF=t_.define(),tK=t_.define({combine:e=>!!e.length&&e[0]});class tH{constructor(e,t){this.type=e,this.value=t}static define(){return new tJ}}class tJ{of(e){return new tH(this,e)}}class t0{constructor(e){this.map=e}of(e){return new t1(this,e)}}class t1{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new t1(this.type,t)}is(e){return this.type==e}static define(e={}){return new t0(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let e=n.map(t);e&&i.push(e)}return i}}t1.reconfigure=t1.define(),t1.appendConfig=t1.define();class t2{constructor(e,t,i,n,r,s){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,i&&tA(i,t.newLength),r.some(e=>e.type==t2.time)||(this.annotations=r.concat(t2.time.of(Date.now())))}static create(e,t,i,n,r,s){return new t2(e,t,i,n,r,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(t2.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function t5(e,t,i){var n;let r,s,o;return i?(r=t.changes,s=ty.empty(t.changes.length),o=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),s=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(r)),{changes:o,selection:t.selection?t.selection.map(s):null==(n=e.selection)?void 0:n.map(r),effects:t1.mapEffects(e.effects,r).concat(t1.mapEffects(t.effects,s)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function t3(e,t,i){let n=t.selection,r=t4(t.annotations);return t.userEvent&&(r=r.concat(t2.userEvent.of(t.userEvent))),{changes:t.changes instanceof ty?t.changes:ty.of(t.changes||[],i,e.facet(tN)),selection:n&&(n instanceof tP?n:tP.single(n.anchor,n.head)),effects:t4(t.effects),annotations:r,scrollIntoView:!!t.scrollIntoView}}t2.time=tH.define(),t2.userEvent=tH.define(),t2.addToHistory=tH.define(),t2.remote=tH.define();let t6=[];function t4(e){return null==e?t6:Array.isArray(e)?e:[e]}var t8=((a=t8||(t8={}))[a.Word=0]="Word",a[a.Space=1]="Space",a[a.Other=2]="Other",a);let t7=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{e=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class t9{constructor(e,t,i,n,r,s){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)tV(this,e<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(null==i){if(t)throw RangeError("Field is not present in this state");return}return tV(this,i),tW(this,i)}update(...e){return function e(t,i,n){let r=t3(t,i.length?i[0]:{},t.doc.length);i.length&&!1===i[0].filter&&(n=!1);for(let e=1;e<i.length;e++){!1===i[e].filter&&(n=!1);let s=!!i[e].sequential;r=t5(r,t3(t,i[e],s?r.changes.newLength:t.doc.length),s)}let s=t2.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,i=t.facet(tF),n=e;for(let r=i.length-1;r>=0;r--){let s=i[r](e);s&&Object.keys(s).length&&(n=t5(n,t3(t,s,e.changes.newLength),!0))}return n==e?e:t2.create(t,e.changes,e.selection,n.effects,n.annotations,n.scrollIntoView)}(n?function(t){let i=t.startState,n=!0;for(let e of i.facet(tU)){let i=e(t);if(!1===i){n=!1;break}Array.isArray(i)&&(n=!0===n?i:function(e,t){let i=[];for(let n=0,r=0;;){let s,o;if(n<e.length&&(r==t.length||t[r]>=e[n]))s=e[n++],o=e[n++];else{if(!(r<t.length))return i;s=t[r++],o=t[r++]}!i.length||i[i.length-1]<s?i.push(s,o):i[i.length-1]<o&&(i[i.length-1]=o)}}(n,i))}if(!0!==n){let e,r;if(!1===n)r=t.changes.invertedDesc,e=ty.empty(i.doc.length);else{let i=t.changes.filter(n);e=i.changes,r=i.filtered.mapDesc(i.changes).invertedDesc}t=t2.create(i,e,t.selection&&t.selection.map(r),t1.mapEffects(t.effects,r),t.annotations,t.scrollIntoView)}let r=i.facet(tG);for(let n=r.length-1;n>=0;n--){let s=r[n](t);t=s instanceof t2?s:Array.isArray(s)&&1==s.length&&s[0]instanceof t2?s[0]:e(i,t4(s),!1)}return t}(s):s)}(this,e,!0)}applyTransaction(e){let t,i=this.config,{base:n,compartments:r}=i;for(let t of e.effects)t.is(tI.reconfigure)?(i&&(r=new Map,i.compartments.forEach((e,t)=>r.set(t,e)),i=null),r.set(t.value.compartment,t.value.extension)):t.is(t1.reconfigure)?(i=null,n=t.value):t.is(t1.appendConfig)&&(i=null,n=t4(n).concat(t.value));t=i?e.startState.values.slice():new t9(i=tY.resolve(n,r,this),this.doc,this.selection,i.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let s=e.startState.facet(tq)?e.newSelection:e.newSelection.asSingle();new t9(i,e.newDoc,s,t,(t,i)=>i.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:tP.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),r=[i.range],s=t4(i.effects);for(let i=1;i<t.ranges.length;i++){let o=e(t.ranges[i]),a=this.changes(o.changes),l=a.map(n);for(let e=0;e<i;e++)r[e]=r[e].map(l);let h=n.mapDesc(a,!0);r.push(o.range.map(h)),n=n.compose(l),s=t1.mapEffects(s,l).concat(t1.mapEffects(t4(o.effects),h))}return{changes:n,selection:tP.create(r,t.mainIndex),effects:s}}changes(e=[]){return e instanceof ty?e:ty.of(e,this.doc.length,this.facet(t9.lineSeparator))}toText(e){return tn.of(e.split(this.facet(t9.lineSeparator)||tg))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(tV(this,t),tW(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof tE&&null!=this.config.address[n.id]&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let t in i)if(Object.prototype.hasOwnProperty.call(e,t)){let r=i[t],s=e[t];n.push(r.init(e=>r.spec.fromJSON(s,e)))}}return t9.create({doc:e.doc,selection:tP.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=tY.resolve(e.extensions||[],new Map),i=e.doc instanceof tn?e.doc:tn.of((e.doc||"").split(t.staticFacet(t9.lineSeparator)||tg)),n=e.selection?e.selection instanceof tP?e.selection:tP.single(e.selection.anchor,e.selection.head):tP.single(0);return tA(n,i.length),t.staticFacet(tq)||(n=n.asSingle()),new t9(t,i,n,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(t9.tabSize)}get lineBreak(){return this.facet(t9.lineSeparator)||"\n"}get readOnly(){return this.facet(tK)}phrase(e,...t){for(let t of this.facet(t9.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>t.length?e:t[n-1]})),e}languageDataAt(e,t,i=-1){let n=[];for(let r of this.facet(tD))for(let s of r(this,t,i))Object.prototype.hasOwnProperty.call(s,e)&&n.push(s[e]);return n}charCategorizer(t){var i;let n=this.languageDataAt("wordChars",t);return i=n.length?n[0]:"",t=>{if(!/\S/.test(t))return t8.Space;if(function(t){if(e)return e.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||t7.test(i)))return!0}return!1}(t))return t8.Word;for(let e=0;e<i.length;e++)if(t.indexOf(i[e])>-1)return t8.Word;return t8.Other}}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),r=this.charCategorizer(e),s=e-i,o=e-i;for(;s>0;){let e=tf(t,s,!1);if(r(t.slice(e,s))!=t8.Word)break;s=e}for(;o<n;){let e=tf(t,o);if(r(t.slice(o,e))!=t8.Word)break;o=e}return s==o?null:tP.range(s+i,o+i)}}function ie(e,t,i={}){let n={};for(let t of e)for(let e of Object.keys(t)){let r=t[e],s=n[e];if(void 0===s)n[e]=r;else if(s===r||void 0===r);else if(Object.hasOwnProperty.call(i,e))n[e]=i[e](s,r);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===n[e]&&(n[e]=t[e]);return n}t9.allowMultipleSelections=tq,t9.tabSize=t_.define({combine:e=>e.length?e[0]:4}),t9.lineSeparator=tN,t9.readOnly=tK,t9.phrases=t_.define({compare(e,t){let i=Object.keys(e),n=Object.keys(t);return i.length==n.length&&i.every(i=>e[i]==t[i])}}),t9.languageData=tD,t9.changeFilter=tU,t9.transactionFilter=tG,t9.transactionExtender=tF,tI.reconfigure=t1.define();class it{eq(e){return this==e}range(e,t=e){return ir.create(e,t,this)}}function ii(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}it.prototype.startSide=it.prototype.endSide=0,it.prototype.point=!1,it.prototype.mapMode=tm.TrackDel;class ir{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ir(e,t,i)}}function is(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class io{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return il(this.to)}findIndex(e,t,i,n=0){let r=i?this.to:this.from;for(let s=n,o=r.length;;){if(s==o)return s;let n=s+o>>1,a=r[n]-e||(i?this.value[n].endSide:this.value[n].startSide)-t;if(n==s)return a>=0?s:o;a>=0?o=n:s=n+1}}between(e,t,i,n){for(let r=this.findIndex(t,-1e9,!0),s=this.findIndex(i,1e9,!1,r);r<s;r++)if(!1===n(this.from[r]+e,this.to[r]+e,this.value[r]))return!1}map(e,t,i,n,r){let s=[],o=[],a=[],l=-1,h=-1;n:for(let c=0;c<this.value.length;c++){let u=this.value[c],f=this.from[c]+e,d=this.to[c]+e,p,O;if(f==d){let e=t.mapPos(f,u.startSide,u.mapMode);if(null==e||(p=O=e,u.startSide!=u.endSide&&(O=t.mapPos(f,u.endSide))<p))continue}else if((p=t.mapPos(f,u.startSide))>(O=t.mapPos(d,u.endSide))||p==O&&u.startSide>0&&u.endSide<=0)continue;if(!(0>(O-p||u.endSide-u.startSide)))if(l<0&&(l=p),u.point&&(h=Math.max(h,O-p)),(p-i||u.startSide-n)>=0)s.push(u),o.push(p-l),a.push(O-l),i=O,n=u.endSide;else{if(p==O)for(let e=s.length;e>0;e--){if((p-(a[e-1]+l)||u.startSide-s[e-1].endSide)>=0){s.splice(e,0,u),o.splice(e,0,p-l),a.splice(e,0,O-l);continue n}if((p-(o[e-1]+l)||u.endSide-s[e-1].startSide)>0)break}r(p,O,u)}}return{mapped:s.length?new io(o,a,s,h):null,pos:l}}}class ia{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new ia(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:r=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(i&&(t=t.slice().sort(is)),this.isEmpty)return t.length?ia.of(t):this;let o=new iu(this,null,-1).goto(0),a=0,l=[],h=new ih;for(;o.value||a<t.length;)if(a<t.length&&(o.from-t[a].from||o.startSide-t[a].value.startSide)>=0){let e=t[a++];h.addInner(e.from,e.to,e.value,!1)||l.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(o.chunkIndex)<t[a].from)&&(!s||n>this.chunkEnd(o.chunkIndex)||r<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||n>o.to||r<o.from||s(o.from,o.to,o.value))&&!h.addInner(o.from,o.to,o.value,!1)&&l.push(ir.create(o.from,o.to,o.value)),o.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?ia.empty:this.nextLayer.update({add:l,filter:s,filterFrom:n,filterTo:r}))}map(e){let t;if(e.empty||this.isEmpty)return this;let i=[],n=[],r=-1,s=(e,i,n)=>{t||(t=new ih),t.addRange(e,i,n,!1)};for(let t=0;t<this.chunk.length;t++){let o=this.chunkPos[t],a=this.chunk[t],l=e.touchesRange(o,o+a.length);if(!1===l)r=Math.max(r,a.maxPoint),i.push(a),n.push(e.mapPos(o));else if(!0===l){let[t,l]=i.length?[il(n)+il(i).length,il(il(i).value).endSide]:[-1,-1],{mapped:h,pos:c}=a.map(o,e,t,l,s);h&&(r=Math.max(r,h.maxPoint),i.push(h),n.push(c))}}let o=this.nextLayer.map(e);return t&&(o=t.finishInner(o)),0==i.length?o:new ia(n,i,o||ia.empty,r)}between(e,t,i){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let r=this.chunkPos[n],s=this.chunk[n];if(t>=r&&e<=r+s.length&&!1===s.between(r,e-r,t-r,i))return}this.nextLayer.between(e,t,i)}}iter(e=0){return id.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return id.from(e).goto(t)}static compare(e,t,i,n,r=-1){let s=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),a=ic(s,o,i),l=new iO(s,a,r),h=new iO(o,a,r);i.iterGaps((e,t,i)=>ig(l,e,h,t,i,n)),i.empty&&0==i.length&&ig(l,0,h,0,0,n)}static eq(e,t,i=0,n){null==n&&(n=1e9-1);let r=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),s=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(r.length!=s.length)return!1;if(!r.length)return!0;let o=ic(r,s),a=new iO(r,o,0).goto(i),l=new iO(s,o,0).goto(i);for(;;){if(a.to!=l.to||!im(a.active,l.active)||a.point&&(!l.point||!ii(a.point,l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(e,t,i,n,r=-1){let s=new iO(e,null,r).goto(t),o=t,a=s.openStart;for(;;){let e=Math.min(s.to,i);if(s.point){let i=s.activeForPoint(s.to),r=s.pointFrom<t?i.length+1:s.point.startSide<0?i.length:Math.min(i.length,a);n.point(o,e,s.point,i,r,s.pointRank),a=Math.min(s.openEnd(e),i.length)}else e>o&&(n.span(o,e,s.active,a),a=s.openEnd(e));if(s.to>i)return a+(s.point&&s.to>i?1:0);o=s.to,s.next()}}static of(e,t=!1){let i=new ih;for(let n of e instanceof ir?[e]:t?function(e){if(e.length>1)for(let t=e[0],i=1;i<e.length;i++){let n=e[i];if(is(t,n)>0)return e.slice().sort(is);t=n}return e}(e):e)i.add(n.from,n.to,n.value);return i.finish()}static join(e){if(!e.length)return ia.empty;let t=il(e);for(let i=e.length-2;i>=0;i--)for(let n=e[i];n!=ia.empty;n=n.nextLayer)t=new ia(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}}function il(e){return e[e.length-1]}ia.empty=new ia([],[],null,-1),ia.empty.nextLayer=ia.empty;class ih{finishChunk(e){this.chunks.push(new io(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addRange(e,t,i,!0)}addRange(e,t,i,n){this.addInner(e,t,i,n)||(this.nextLayer||(this.nextLayer=new ih)).addRange(e,t,i,n)}addInner(e,t,i,n){let r=e-this.lastTo||i.startSide-this.last.endSide;if(n&&r<=0&&0>(e-this.lastFrom||i.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(ia.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=ia.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function ic(e,t,i){let n=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&n.set(t.chunk[e],t.chunkPos[e]);let r=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let s=n.get(e.chunk[t]);null==s||(i?i.mapPos(s):s)!=e.chunkPos[t]||(null==i?void 0:i.touchesRange(s,s+e.chunk[t].length))||r.add(e.chunk[t])}return r}class iu{constructor(e,t,i,n=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class id{constructor(e){this.heap=e}static from(e,t=null,i=-1){let n=[];for(let r=0;r<e.length;r++)for(let s=e[r];!s.isEmpty;s=s.nextLayer)s.maxPoint>=i&&n.push(new iu(s,t,i,r));return 1==n.length?n[0]:new id(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)ip(this.heap,e);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)ip(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ip(this.heap,0)}}}function ip(e,t){for(let i=e[t];;){let n=(t<<1)+1;if(n>=e.length)break;let r=e[n];if(n+1<e.length&&r.compare(e[n+1])>=0&&(r=e[n+1],n++),0>i.compare(r))break;e[n]=i,e[t]=r,t=n}}class iO{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=id.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){iv(this.active,e),iv(this.activeTo,e),iv(this.activeRank,e),this.minActive=iw(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||n-this.activeTo[t])>0;)t++;iy(this.active,t,i),iy(this.activeTo,t,n),iy(this.activeRank,t,r),e&&iy(e,t,this.cursor.from),this.minActive=iw(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&0>(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&iv(i,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(e.point)if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}else this.addActive(i),this.cursor.next()}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let t=i.length-1;t>=0&&i[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ig(e,t,i,n,r,s){e.goto(t),i.goto(n);let o=n+r,a=n,l=n-t,h=!!s.boundChange;for(let t=!1;;){let n=e.to+l-i.to,r=n||e.endSide-i.endSide,c=r<0?e.to+l:i.to,u=Math.min(c,o);if(e.point||i.point?(e.point&&i.point&&ii(e.point,i.point)&&im(e.activeForPoint(e.to),i.activeForPoint(i.to))||s.comparePoint(a,u,e.point,i.point),t=!1):(t&&s.boundChange(a),u>a&&!im(e.active,i.active)&&s.compareRange(a,u,e.active,i.active),h&&u<o&&(n||e.openEnd(c)!=i.openEnd(c))&&(t=!0)),c>o)break;a=c,r<=0&&e.next(),r>=0&&i.next()}}function im(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!=t[i]&&!ii(e[i],t[i]))return!1;return!0}function iv(e,t){for(let i=t,n=e.length-1;i<n;i++)e[i]=e[i+1];e.pop()}function iy(e,t,i){for(let i=e.length-1;i>=t;i--)e[i+1]=e[i];e[t]=i}function iw(e,t){let i=-1,n=1e9;for(let r=0;r<t.length;r++)0>(t[r]-n||e[r].endSide-e[i].endSide)&&(i=r,n=t[r]);return i}function ib(e,t,i=e.length){let n=0;for(let r=0;r<i&&r<e.length;)9==e.charCodeAt(r)?(n+=t-n%t,r++):(n++,r=tf(e,r));return n}let ix="u"<typeof Symbol?"__ͼ":Symbol.for("ͼ"),iS="u"<typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),ik="u">typeof globalThis?globalThis:"u">typeof window?window:{};class iQ{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,r,s,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==r)return s.push(t[0]+";");for(let i in r){let o=r[i];if(/&/.test(i))e(i.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),o,s);else if(o&&"object"==typeof o){if(!l)throw RangeError("The value of a property ("+i+") should be a primitive value.");e(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(a.length||h)&&s.push((i&&!l&&!o?t.map(i):t).join(", ")+" {"+a.join(" ")+"}")}(n(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=ik[ix]||1;return ik[ix]=e+1,"ͼ"+e.toString(36)}static mount(e,t,i){let n=e[iS],r=i&&i.nonce;n?r&&n.setNonce(r):n=new iP(e,r),n.mount(Array.isArray(t)?t:[t],e)}}let i$=new Map;class iP{constructor(e,t){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let t=i$.get(i);if(t)return e[iS]=t;this.sheet=new n.CSSStyleSheet,i$.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[iS]=this}mount(e,t){let i=this.sheet,n=0,r=0;for(let t=0;t<e.length;t++){let s=e[t],o=this.modules.indexOf(s);if(o<r&&o>-1&&(this.modules.splice(o,1),r--,o=-1),-1==o){if(this.modules.splice(r++,0,s),i)for(let e=0;e<s.rules.length;e++)i.insertRule(s.rules[e],n++)}else{for(;r<o;)n+=this.modules[r++].rules.length;n+=s.rules.length,r++}}if(i)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let i=t.head||t;this.styleTag.parentNode!=i&&i.insertBefore(this.styleTag,i.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var iA={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},iC={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i_="u">typeof navigator&&/Mac/.test(navigator.platform),iT="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),iM=0;iM<10;iM++)iA[48+iM]=iA[96+iM]=String(iM);for(var iM=1;iM<=24;iM++)iA[iM+111]="F"+iM;for(var iM=65;iM<=90;iM++)iA[iM]=String.fromCharCode(iM+32),iC[iM]=String.fromCharCode(iM);for(var iZ in iA)iC.hasOwnProperty(iZ)||(iC[iZ]=iA[iZ]);let iR="u">typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},iX="u">typeof document?document:{documentElement:{style:{}}},iE=/Edge\/(\d+)/.exec(iR.userAgent),ij=/MSIE \d/.test(iR.userAgent),iB=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iR.userAgent),iL=!!(ij||iB||iE),iI=!iL&&/gecko\/(\d+)/i.test(iR.userAgent),iz=!iL&&/Chrome\/(\d+)/.exec(iR.userAgent),iY="webkitFontSmoothing"in iX.documentElement.style,iV=!iL&&/Apple Computer/.test(iR.vendor),iW=iV&&(/Mobile\/\w+/.test(iR.userAgent)||iR.maxTouchPoints>2);var iD={mac:iW||/Mac/.test(iR.platform),windows:/Win/.test(iR.platform),linux:/Linux|X11/.test(iR.platform),ie:iL,ie_version:ij?iX.documentMode||6:iB?+iB[1]:iE?+iE[1]:0,gecko:iI,gecko_version:iI?+(/Firefox\/(\d+)/.exec(iR.userAgent)||[0,0])[1]:0,chrome:!!iz,chrome_version:iz?+iz[1]:0,ios:iW,android:/Android\b/.test(iR.userAgent),webkit:iY,webkit_version:iY?+(/\bAppleWebKit\/(\d+)/.exec(iR.userAgent)||[0,0])[1]:0,safari:iV,safari_version:iV?+(/\bVersion\/(\d+(\.\d+)?)/.exec(iR.userAgent)||[0,0])[1]:0,tabSize:null!=iX.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function iq(e,t){for(let i in e)"class"==i&&t.class?t.class+=" "+e.class:"style"==i&&t.style?t.style+=";"+e.style:t[i]=e[i];return t}let iN=Object.create(null);function iU(e,t,i){if(e==t)return!0;e||(e=iN),t||(t=iN);let n=Object.keys(e),r=Object.keys(t);if(n.length-(i&&n.indexOf(i)>-1?1:0)!=r.length-(i&&r.indexOf(i)>-1?1:0))return!1;for(let s of n)if(s!=i&&(-1==r.indexOf(s)||e[s]!==t[s]))return!1;return!0}function iG(e,t,i){let n=!1;if(t)for(let r in t)i&&r in i||(n=!0,"style"==r?e.style.cssText="":e.removeAttribute(r));if(i)for(let r in i)t&&t[r]==i[r]||(n=!0,"style"==r?e.style.cssText=i[r]:e.setAttribute(r,i[r]));return n}class iF{eq(e){return!1}updateDOM(e,t,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var iK=((l=iK||(iK={}))[l.Text=0]="Text",l[l.WidgetBefore=1]="WidgetBefore",l[l.WidgetAfter=2]="WidgetAfter",l[l.WidgetRange=3]="WidgetRange",l);class iH extends it{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new iJ(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new i1(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,n;if(e.isBlockGap)i=-5e8,n=4e8;else{let{start:r,end:s}=i2(e,t);i=(r?t?-3e8:-1:5e8)-1,n=(s?t?2e8:1:-6e8)+1}return new i1(e,i,n,t,e.widget||null,!0)}static line(e){return new i0(e)}static set(e,t=!1){return ia.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}iH.none=ia.empty;class iJ extends iH{constructor(e){let{start:t,end:i}=i2(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?iq(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||iN}eq(e){return this==e||e instanceof iJ&&this.tagName==e.tagName&&iU(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}iJ.prototype.point=!1;class i0 extends iH{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof i0&&this.spec.class==e.spec.class&&iU(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}i0.prototype.mapMode=tm.TrackBefore,i0.prototype.point=!0;class i1 extends iH{constructor(e,t,i,n,r,s){super(t,i,r,e),this.block=n,this.isReplace=s,this.mapMode=n?t<=0?tm.TrackBefore:tm.TrackAfter:tm.TrackDel}get type(){return this.startSide!=this.endSide?iK.WidgetRange:this.startSide<=0?iK.WidgetBefore:iK.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,i;return e instanceof i1&&(t=this.widget,t==(i=e.widget)||!!(t&&i&&t.compare(i)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function i2(e,t=!1){let{inclusiveStart:i,inclusiveEnd:n}=e;return null==i&&(i=e.inclusive),null==n&&(n=e.inclusive),{start:null!=i?i:t,end:null!=n?n:t}}function i5(e,t,i,n=0){let r=i.length-1;r>=0&&i[r]+n>=e?i[r]=Math.max(i[r],t):i.push(e,t)}i1.prototype.point=!0;class i3 extends it{constructor(e,t,i){super(),this.tagName=e,this.attributes=t,this.rank=i}eq(e){return e==this||e instanceof i3&&this.tagName==e.tagName&&iU(this.attributes,e.attributes)}static create(e){return new i3(e.tagName,e.attributes||iN,null==e.rank?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return ia.of(e,t)}}function i6(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function i4(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function i8(e,t){if(!t.anchorNode)return!1;try{return i4(e,t.anchorNode)}catch(e){return!1}}function i7(e){return 3==e.nodeType?nf(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function i9(e,t,i,n){return!!i&&(ni(e,t,i,n,-1)||ni(e,t,i,n,1))}function ne(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function nt(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function ni(e,t,i,n,r){for(;;){if(e==i&&t==n)return!0;if(t==(r<0?0:nn(e))){if("DIV"==e.nodeName)return!1;let i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=ne(e)+(r<0?0:1),e=i}else{if(1!=e.nodeType||1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?nn(e):0}}}function nn(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function nr(e,t){let{left:i,right:n}=e;if(i==n)return e;let r=t?i:n;return{left:r,right:r,top:e.top,bottom:e.bottom}}function ns(e,t){let i=t.width/e.offsetWidth,n=t.height/e.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||1>Math.abs(t.width-e.offsetWidth))&&(i=1),(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.height-e.offsetHeight))&&(n=1),{scaleX:i,scaleY:n}}function no(e,t=!0){let i=e.ownerDocument,n=null,r=null;for(let s=e.parentNode;s;)if(s==i.body||(!t||n)&&r)break;else if(1==s.nodeType)!r&&s.scrollHeight>s.clientHeight&&(r=s),t&&!n&&s.scrollWidth>s.clientWidth&&(n=s),s=s.assignedSlot||s.parentNode;else if(11==s.nodeType)s=s.host;else break;return{x:n,y:r}}i3.prototype.startSide=i3.prototype.endSide=-1;class na{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?nn(t):0),i,Math.min(e.focusOffset,i?nn(i):0))}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}}function nl(e){let t=[];for(let i=e;i;i=11==i.nodeType?i.host:i.parentNode)1==i.nodeType&&t.push({node:i,left:i.scrollLeft,top:i.scrollTop});return t}function nh(e,t=!0){for(let{node:i,left:n,top:r}of e)t&&i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=n&&(i.scrollLeft=n)}let nc=null;function nu(e){if(e.setActive)return e.setActive();if(nc)return e.focus(nc);let t=nl(e);e.focus(null==nc?{get preventScroll(){return nc={preventScroll:!0},!0}}:void 0),nc||(nc=!1,nh(t))}function nf(e,i,n=i){let r=t||(t=document.createRange());return r.setEnd(e,n),r.setStart(e,i),r}function nd(e,t,i,n){let r={key:t,code:t,keyCode:i,which:i,cancelable:!0};n&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=n);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,e.dispatchEvent(s);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function np(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function nO(e,t){for(let i=e,n=t;;)if(3==i.nodeType&&n>0)return{node:i,offset:n};else if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;n=nn(i=i.childNodes[n-1])}else{if(!i.parentNode||nt(i))return null;n=ne(i),i=i.parentNode}}function ng(e,t){for(let i=e,n=t;;)if(3==i.nodeType&&n<i.nodeValue.length)return{node:i,offset:n};else if(1==i.nodeType&&n<i.childNodes.length){if("false"==i.contentEditable)return null;i=i.childNodes[n],n=0}else{if(!i.parentNode||nt(i))return null;n=ne(i)+1,i=i.parentNode}}iD.safari&&iD.safari_version>=26&&(nc=!1);class nm{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new nm(e.parentNode,ne(e),t)}static after(e,t){return new nm(e.parentNode,ne(e)+1,t)}}var nv=((h=nv||(nv={}))[h.LTR=0]="LTR",h[h.RTL=1]="RTL",h);let ny=nv.LTR,nw=nv.RTL;function nb(e){let t=[];for(let i=0;i<e.length;i++)t.push(1<<e[i]);return t}let nx=nb("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),nS=nb("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),nk=Object.create(null),nQ=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),i=e.charCodeAt(1);nk[t]=i,nk[i]=-t}function n$(e){return e<=247?nx[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?nS[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let nP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class nA{get dir(){return this.level%2?nw:ny}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,n){let r=-1;for(let s=0;s<e.length;s++){let o=e[s];if(o.from<=t&&o.to>=t){if(o.level==i)return s;(r<0||(0!=n?n<0?o.from<t:o.to>t:e[r].level>o.level))&&(r=s)}}if(r<0)throw RangeError("Index out of range");return r}}let nC=[];function n_(e){return[new nA(0,e,0)]}let nT="",nM=t_.define(),nZ=t_.define(),nR=t_.define(),nX=t_.define(),nE=t_.define(),nj=t_.define(),nB=t_.define(),nL=t_.define(),nI=t_.define(),nz=t_.define({combine:e=>e.some(e=>e)}),nY=t_.define({combine:e=>e.some(e=>e)}),nV=t_.define();class nW{constructor(e,t,i,n,r,s=!1){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=r,this.isSnapshot=s}map(e){return e.empty?this:new nW(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new nW(tP.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let nD=t1.define({map:(e,t)=>e.map(t)}),nq=t1.define();function nN(e,t,i){let n=e.facet(nX);n.length?n[0](t):window.onerror&&window.onerror(String(t),i,void 0,void 0,t)||(i?console.error(i+":",t):console.error(t))}let nU=t_.define({combine:e=>!e.length||e[0]}),nG=0,nF=t_.define({combine:e=>e.filter((t,i)=>{for(let n=0;n<i;n++)if(e[n].plugin==t.plugin)return!1;return!0})});class nK{constructor(e,t,i,n,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=n,this.baseExtensions=r(this),this.extension=this.baseExtensions.concat(nF.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(nF.of({plugin:this,arg:e}))}static define(e,t){let{eventHandlers:i,eventObservers:n,provide:r,decorations:s}=t||{};return new nK(nG++,e,i,n,e=>{let t=[];return s&&t.push(n1.of(t=>{let i=t.plugin(e);return i?s(i):iH.none})),r&&t.push(r(e)),t})}static fromClass(e,t){return nK.define((t,i)=>new e(t,i),t)}}class nH{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(nN(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){nN(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null==(t=this.value)?void 0:t.destroy)try{this.value.destroy()}catch(t){nN(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let nJ=t_.define(),n0=t_.define(),n1=t_.define(),n2=t_.define(),n5=t_.define(),n3=t_.define(),n6=t_.define();function n4(e,t){let i=e.state.facet(n6);if(!i.length)return i;let n=i.map(t=>t instanceof Function?t(e):t),r=[];return ia.spans(n,t.from,t.to,{point(){},span(e,i,n,s){let o=e-t.from,a=i-t.from,l=r;for(let e=n.length-1;e>=0;e--,s--){let i=n[e].spec.bidiIsolate,r;if(null==i&&(i=function(e,t,i){for(let n=t;n<i;n++){let t=n$(e.charCodeAt(n));if(1==t)break;if(2==t||4==t)return nw}return ny}(t.text,o,a)),s>0&&l.length&&(r=l[l.length-1]).to==o&&r.direction==i)r.to=a,l=r.inner;else{let e={from:o,to:a,direction:i,inner:[]};l.push(e),l=e.inner}}}}),r}let n8=t_.define();function n7(e){let t=0,i=0,n=0,r=0;for(let s of e.state.facet(n8)){let o=s(e);o&&(null!=o.left&&(t=Math.max(t,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(n=Math.max(n,o.top)),null!=o.bottom&&(r=Math.max(r,o.bottom)))}return{left:t,right:i,top:n,bottom:r}}let n9=t_.define();class re{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new re(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toA<i.fromA)break;i=i.join(n),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(0==t.length)return e;let i=[];for(let n=0,r=0,s=0;;){let o=Math.min(n<e.length?e[n].fromB:1e9,r<t.length?t[r]:1e9);if(1e9==o)break;let a=o+s,l=o,h=a;for(;;)if(r<t.length&&t[r]<=l){let i=t[r+1];r+=2,l=Math.max(l,i);for(let t=n;t<e.length&&e[t].fromB<=l;t++)s=e[t].toA-e[t].toB;h=Math.max(h,i+s)}else if(n<e.length&&e[n].fromB<=l){let t=e[n++];l=Math.max(l,t.toB),h=Math.max(h,t.toA),s=t.toA-t.toB}else break;i.push(new re(a,h,o,l))}return i}}class rt{constructor(e,t,i){for(let n of(this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ty.empty(this.startState.doc.length),i))this.changes=this.changes.compose(n.changes);let n=[];this.changes.iterChangedRanges((e,t,i,r)=>n.push(new re(e,t,i,r))),this.changedRanges=n}static create(e,t,i){return new rt(e,t,i)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}let ri=[];class rn{constructor(e,t,i=0){this.dom=e,this.length=t,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return ri}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let i=e.attributes.length-1;i>=0;i--){let n=e.attributes[i].name;null==t[n]&&e.removeAttribute(n)}for(let i in t){let n=t[i];"style"==i?e.style.cssText=n:e.getAttribute(i)!=n&&e.setAttribute(i,n)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let i=t;for(let t of this.children){if(t==e)return i;i+=t.length+t.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,i){return null}domPosFor(e,t){let i=ne(this.dom),n=this.length?e>0:t>0;return new nm(this.parent.dom,i+ +!!n,0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof ro)return e;return null}static get(e){return e.cmTile}}class rr extends rn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t=this.dom,i=null,n,r=(null==e?void 0:e.node)==t?e:null,s=0;for(let o of this.children){if(o.sync(e),s+=o.length+o.breakAfter,n=i?i.nextSibling:t.firstChild,r&&n!=o.dom&&(r.written=!0),o.dom.parentNode==t)for(;n&&n!=o.dom;)n=rs(n);else t.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:t.firstChild,r&&n&&(r.written=!0);n;)n=rs(n);this.length=s}}function rs(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class ro extends rr{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=rn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],i=this,n=0,r=0;;)if(n==i.children.length){if(!t.length)return;(i=i.parent).breakAfter&&r++,n=t.pop()}else{let s=i.children[n++];if(s instanceof ra)t.push(n),i=s,n=0;else{let t=r+s.length,i=e(s,r);if(void 0!==i)return i;r=t+s.breakAfter}}}resolveBlock(e,t){let i,n=-1,r,s=-1;if(this.blockTiles((o,a)=>{let l=a+o.length;if(e>=a&&e<=l){if(o.isWidget()&&t>=-1&&t<=1){if(32&o.flags)return!0;16&o.flags&&(i=void 0)}(a<e||e==l&&(t<-1?o.length:o.covers(1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,n=e-a),(l>e||e==a&&(t>1?o.length:o.covers(-1)))&&(!r||!o.isWidget()&&r.isWidget())&&(r=o,s=e-a)}}),!i&&!r)throw Error("No tile at position "+e);return i&&t<0||!r?{tile:i,offset:n}:{tile:r,offset:s}}}class ra extends rr{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let i=new ra(t||document.createElement(e.tagName),e);return t||(i.flags|=4),i}}class rl extends rr{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,i){let n=new rl(t||document.createElement("div"),e);return t&&i||(n.flags|=4),n}get domAttrs(){return this.attrs}resolveInline(e,t,i){let n=null,r=-1,s=null,o=-1;!function e(a,l){for(let h=0,c=0;h<a.children.length&&c<=l;h++){let u=a.children[h],f=c+u.length;f>=l&&(u.isComposite()?e(u,l-c):(!s||s.isHidden&&(t>0&&!(32&s.flags)||i&&function(e,t){let i=e.coordsIn(0,1),n=t.coordsIn(0,1);return i&&n&&n.top<i.bottom}(s,u)))&&(f>l||32&u.flags&&t<=1)?(s=u,o=l-c):(c<l||16&u.flags&&!u.isHidden&&t>=-1)&&(n=u,r=l-c)),c=f}}(this,e);let a=(t<0?n:s)||n||s;return a?{tile:a,offset:a==n?r:o}:null}coordsIn(e,t,i){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t,i):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let i=i7(t);return i[i.length-1]||null}(this)}domIn(e,t){let i=this.resolveInline(e,t);if(i){let{tile:e,offset:n}=i;if(this.dom.contains(e.dom))return e.isText()?new nm(e.dom,Math.min(e.dom.nodeValue.length,n)):e.domPosFor(n,16&e.flags?1:32&e.flags?-1:t);let r=i.tile.parent,s=!1;for(let e of r.children){if(s)return new nm(e.dom,0);e==i.tile&&(s=!0)}}return new nm(this.dom,0)}}class rh extends rr{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let i=new rh(t||document.createElement(e.tagName),e);return t||(i.flags|=4),i}}class rc extends rn{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,i){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,s=e,o=0;0==e&&t<0||e==n&&t>=0?!(iD.chrome||iD.gecko)&&(e?(r--,o=1):s<n&&(s++,o=-1)):t<0?r--:s<n&&s++;let a=nf(this.dom,r,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:t>=0)?0:a.length-1];return iD.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),null==i?l:nr(l,(o?o>0:t<0)==i)}static of(e,t){let i=new rc(t||document.createTextNode(e),e);return t||(i.flags|=2),i}}class ru extends rn{constructor(e,t,i,n){super(e,t,n),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,i){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;if(i)return nr(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),i=null;if(!t.length)return null;let n=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let r=n?t.length-1:0;i=t[r],e>0?0!=r:r!=t.length-1&&!(i.top<i.bottom);r+=n?-1:1);return nr(i,!n)}}get overrideDOMText(){if(!this.length)return tn.empty;let{root:e}=this;if(!e)return tn.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,i,n,r){return!r&&(r=e.toDOM(t),e.editable||(r.contentEditable="false")),new ru(r,i,e,n)}}class rf extends rn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return tn.empty}coordsIn(e,t,i){let n=this.dom.getBoundingClientRect();return null==i?n:nr(n,t>0==i)}}class rd{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,i){let{tile:n,index:r,beforeBreak:s,parents:o}=this;for(;e||t>0;)if(n.isComposite())if(s){if(!e)break;i&&i.break(),e--,s=!1}else if(r==n.children.length){if(!e&&!o.length)break;i&&i.leave(n),s=!!n.breakAfter,({tile:n,index:r}=o.pop()),r++}else{let a=n.children[r],l=a.breakAfter;(t>0?a.length<=e:a.length<e)&&(!i||!1!==i.skip(a,0,a.length)||!a.isComposite)?(s=!!l,r++,e-=a.length):(o.push({tile:n,index:r}),n=a,r=0,i&&a.isComposite()&&i.enter(a))}else{let t=n.length;if(r<t&&e){let s=Math.min(e,t-r);i&&i.skip(n,r,r+s),e-=s,r+=s}if(r==t)s=!!n.breakAfter,({tile:n,index:r}=o.pop()),r++;else if(!e)break}return this.tile=n,this.index=r,this.beforeBreak=s,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class rp{constructor(e,t,i,n){this.from=e,this.to=t,this.wrapper=i,this.rank=n}}class rO{constructor(e,t,i){this.cache=e,this.root=t,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,i,n){var r;this.flushBuffer();let s=this.ensureMarks(t,i),o=s.lastChild;o&&o.isText()&&!(8&o.flags)&&o.length+e.length<512?(this.cache.reused.set(o,2),(s.children[s.children.length-1]=new rc(o.dom,o.text+e)).parent=s):s.append(n||rc.of(e,null==(r=this.cache.find(rc))?void 0:r.dom)),this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let i=this.curLine;i.dom!=t.line.dom&&(i.setDOM(this.cache.reused.has(t.line)?rx(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let n=i;for(let e=t.marks.length-1;e>=0;e--){let i=t.marks[e],r=n.lastChild;if(r instanceof rh&&r.mark.eq(i.mark))r.dom!=i.dom&&r.setDOM(rx(i.dom)),n=r;else{if(this.cache.reused.get(i)){let e=rn.get(i.dom);e&&e.setDOM(rx(i.dom))}let e=rh.of(i.mark,i.dom);n.append(e),n=e}this.cache.reused.set(i,2)}let r=rn.get(e.text);r&&this.cache.reused.set(r,2);let s=new rc(e.text,e.text.nodeValue);s.flags|=8,this.pos=e.range.toB,n.append(s)}addInlineWidget(e,t,i){let n=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);n||this.flushBuffer();let r=this.ensureMarks(t,i);n||16&e.flags||r.append(this.getBuffer(1)),r.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,i){this.flushBuffer(),this.ensureMarks(t,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var i;e||(e=rb);let n=rl.start(e,t||(null==(i=this.cache.find(rl))?void 0:i.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var i;let n=this.curLine;for(let r=e.length-1;r>=0;r--){let s=e[r],o;if(t>0&&(o=n.lastChild)&&o instanceof rh&&o.mark.eq(s))n=o,t--;else{let e=rh.of(s,null==(i=this.cache.find(rh,e=>e.mark.eq(s)))?void 0:i.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!rw(this.curLine,!1)||"BR"!=e.dom.nodeName&&e.isWidget()&&!(iD.ios&&rw(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(rk,0,32)||new ru(rk.toDOM(),0,rk,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=102*e.rank+e.value.rank,i=new rp(e.from,e.to,e.value,t),n=this.wrappers.length;for(;n>0&&0>(this.wrappers[n-1].rank-i.rank||this.wrappers[n-1].to-i.to);)n--;this.wrappers.splice(n,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let i of this.wrappers){let n=t.lastChild;if(i.from<this.pos&&n instanceof ra&&n.wrapper.eq(i.wrapper))t=n;else{let n=ra.of(i.wrapper,null==(e=this.cache.find(ra,e=>e.wrapper.eq(i.wrapper)))?void 0:e.dom);t.append(n),t=n}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),i=this.cache.find(rf,void 0,1);return i&&(i.flags=t),i||new rf(t)}flushBuffer(){this.afterWidget&&!(32&this.afterWidget.flags)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class rg{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:i,done:n}=this.cursor.next(this.skipCount);if(this.skipCount=0,n)throw Error("Ran out of text content when drawing inline views");this.text=t;let r=this.textOff=Math.min(e,t.length);return i?null:t.slice(0,r)}let t=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,t);return this.textOff=t,i}}let rm=[ru,rl,rc,rh,rf,ra,ro];for(let e=0;e<rm.length;e++)rm[e].bucket=e;class rv{constructor(e){this.view=e,this.buckets=rm.map(()=>[]),this.index=rm.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,i=this.buckets[t];i.length<6?i.push(e):i[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,i=2){let n=e.bucket,r=this.buckets[n],s=this.index[n];for(let e=0;e<r.length;e++){let o=(e+s)%r.length,a=r[o];if((!t||t(a))&&!this.reused.has(a))return r.splice(o,1),o<s&&this.index[n]--,this.reused.set(a,i),a}return null}findWidget(e,t,i){let n=this.buckets[0];if(n.length)for(let r=0,s=0;;r++){if(r==n.length){if(s)return null;s=1,r=0}let o=n[r];if(!this.reused.has(o)&&(0==s?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget))){if(n.splice(r,1),r<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(497&o.flags)==i)return this.reused.set(o,1),o;return this.reused.set(o,2),new ru(o.dom,t,e,-498&o.flags|i)}}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class ry{constructor(e,t,i,n,r){this.view=e,this.decorations=n,this.disallowBlockEffectsFor=r,this.openWidget=!1,this.openMarks=0,this.cache=new rv(e),this.text=new rg(e.state.doc),this.builder=new rO(this.cache,new ro(e,e.contentDOM),ia.iter(i)),this.cache.reused.set(t,2),this.old=new rd(t),this.reuseWalker={skip:(e,t,i)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let i=t&&this.getCompositionContext(t.text);for(let n=0,r=0,s=0;;){let o=s<e.length?e[s++]:null,a=o?o.fromA:this.old.root.length;if(a>n){let e=a-n;this.preserve(e,!s,!o),n=a,r+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(r,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,i),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(r,o.toB)),r=o.toB,n=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,i){let n=function(e){let t=[];for(let i=e.parents.length;i>1;i--){let n=i==e.parents.length?e.tile:e.parents[i].tile;n instanceof rh&&t.push(n.mark)}return t}(this.old),r=this.openMarks;this.old.advance(e,i?1:-1,{skip:(e,t,i)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(i-t);else{let s=i>0||t<e.length?ru.of(e.widget,this.view,i-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&s.flags?(s.flags&=-2,this.builder.addBlockWidget(s)):(this.builder.ensureLine(null),this.builder.addInlineWidget(s,n,r),r=n.length)}else if(e.isText())this.builder.ensureLine(null),t||i!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,i),n,r)):this.builder.addText(e.text,n,r,this.cache.reuse(e)),r=n.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof rf)this.cache.add(e);else{if(!(e instanceof rh))return!1;this.builder.ensureLine(null),this.builder.addMark(e,n,r),this.cache.reused.set(e,1),r=n.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof rh&&n.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?n.length&&(n.length=r=0):e instanceof rh&&(n.shift(),r=Math.min(r,n.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let i=null,n=this.builder,r=-1,s=ia.spans(this.decorations,e,t,{point:(e,t,s,o,a,l)=>{var h,c,u;if(s instanceof i1){if(this.disallowBlockEffectsFor[l]){if(s.block)throw RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(r=o.length,a>o.length)n.continueWidget(t-e);else{let r,l=s.widget||(s.block?rS.block:rS.inline),c=(r=(h=s).isReplace?64*(h.startSide<0)|128*(h.endSide>0):h.startSide>0?32:16,h.block&&(r|=256),r),u=this.cache.findWidget(l,t-e,c)||ru.of(l,this.view,t-e,c);s.block?(s.startSide>0&&n.addLineStartIfNotCovered(i),n.addBlockWidget(u)):(n.ensureLine(i),n.addInlineWidget(u,o,a))}i=null}else{let e,t;c=i,e=(u=s).spec.attributes,t=u.spec.class,(e||t)&&(c||(c={class:"cm-line"}),e&&iq(e,c),t&&(c.class+=" "+t)),i=c}t>e&&this.text.skip(t-e)},span:(e,t,s,o)=>{for(let r=e;r<t;){let a=this.text.next(Math.min(512,t-r));null==a?(n.addLineStartIfNotCovered(i),n.addBreak(),r++):(n.ensureLine(i),n.addText(a,s,r==e?o:s.length),r+=a.length),i=null}r=s.length}});r>-1&&(this.openWidget=s>r),this.openWidget||n.addLineStartIfNotCovered(i),this.openMarks=s}forward(e,t,i=1){t-e<=10?this.old.advance(t-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let t=[],i=null;for(let n=e.parentNode;;n=n.parentNode){let e=rn.get(n);if(n==this.view.contentDOM)break;e instanceof rh?t.push(e):(null==e?void 0:e.isLine())?i=e:e instanceof ra||("DIV"!=n.nodeName||i||n==this.view.contentDOM?i||t.push(rh.of(new iJ({tagName:n.nodeName.toLowerCase(),attributes:function(e){let t=Object.create(null);for(let i=0;i<e.attributes.length;i++){let n=e.attributes[i];t[n.name]=n.value}return t}(n)}),n)):i=new rl(n,rb))}return{line:i,marks:t}}}function rw(e,t){let i=e=>{for(let n of e.children)if((t?n.isText():n.length)||i(n))return!0;return!1};return i(e)}let rb={class:"cm-line"};function rx(e){let t=rn.get(e);return t&&t.setDOM(e.cloneNode()),e}class rS extends iF{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}rS.inline=new rS("span"),rS.block=new rS("div");let rk=new class extends iF{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class rQ{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=iH.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new ro(e,e.contentDOM),this.updateInner([new re(0,0,0,e.state.doc.length)],null)}update(e){var t,i,n,r,s,o,a,l,h;let c,u,f,d=e.changedRanges;this.minWidth>0&&d.length&&(d.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let p=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null==(t=this.domChanged)?void 0:t.newSel)?p=this.domChanged.newSel.head:(i=e.changes,n=this.hasComposition,c=!1,n&&i.iterChangedRanges((e,t)=>{e<n.to&&t>n.from&&(c=!0)}),c||e.selectionSet||(p=e.state.selection.main.head)));let O=p>-1?function(e,t,i){let n=rP(e,i);if(!n)return null;let{node:r,from:s,to:o}=n,a=r.nodeValue;if(/[\n\r]/.test(a)||e.state.doc.sliceString(n.from,n.to)!=a)return null;let l=t.invertedDesc;return{range:new re(l.mapPos(s),l.mapPos(o),s,o),text:r}}(this.view,e.changes,p):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:i}=this.hasComposition;d=new re(t,i,e.changes.mapPos(t,-1),e.changes.mapPos(i,1)).addToSet(d.slice())}this.hasComposition=O?{from:O.range.fromB,to:O.range.toB}:null,(iD.ie||iD.chrome)&&!O&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let g=this.decorations,m=this.blockWrappers;this.updateDeco();let v=(r=g,s=this.decorations,o=e.changes,u=new rA,ia.compare(r,s,o,u),u.changes);v.length&&(d=re.extendWithRanges(d,v));let y=(a=m,l=this.blockWrappers,h=e.changes,f=new rC,ia.compare(a,l,h,f),f.changes);return y.length&&(d=re.extendWithRanges(d,y)),O&&!d.some(e=>e.fromA<=O.range.fromA&&e.toA>=O.range.toA)&&(d=O.range.addToSet(d.slice())),(!(2&this.tile.flags)||0!=d.length)&&(this.updateInner(d,O),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(t||e.length){let i=this.tile,n=new ry(this.view,i,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&rn.get(t.text)&&n.cache.reused.set(rn.get(t.text),2),this.tile=n.run(e,t),r$(i,n.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let n=iD.chrome||iD.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(n),n&&(n.written||i.selectionRange.focusNode!=n.node||!this.tile.dom.contains(n.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof r_&&n.push(e.dom);i.updateGaps(n)}updateEditContextFormatting(e){for(let t of(this.editContextFormatting=this.editContextFormatting.map(e.changes),e.transactions))for(let e of t.effects)e.is(nq)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){var i;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,s=r==n,o=!s&&!(this.view.state.facet(nU)||n.tabIndex>-1)&&i8(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(s||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h,c;if(l.empty?c=h=this.inlineDOMNearPos(l.anchor,l.assoc||1):(c=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),h=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),iD.gecko&&l.empty&&!this.hasComposition&&1==(i=h).node.nodeType&&i.node.firstChild&&(0==i.offset||"false"==i.node.childNodes[i.offset-1].contentEditable)&&(i.offset==i.node.childNodes.length||"false"==i.node.childNodes[i.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(e,h.node.childNodes[h.offset]||null)),h=c=new nm(e,0),a=!0}let u=this.view.observer.selectionRange;!a&&u.focusNode&&(i9(h.node,h.offset,u.anchorNode,u.anchorOffset)&&i9(c.node,c.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,l))||(this.view.observer.ignore(()=>{iD.android&&iD.chrome&&n.contains(u.focusNode)&&function(e,t){for(let i=e;i&&i!=t;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=i6(this.view.root);if(e)if(l.empty){if(iD.gecko){var t,i;let e=(t=h.node,i=h.offset,1!=t.nodeType?0:(i&&"false"==t.childNodes[i-1].contentEditable?1:0)|2*(i<t.childNodes.length&&"false"==t.childNodes[i].contentEditable));if(e&&3!=e){let t=(1==e?nO:ng)(h.node,h.offset);t&&(h=new nm(t.node,t.offset))}}e.collapse(h.node,h.offset),null!=l.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=l.bidiLevel)}else if(e.extend){e.collapse(h.node,h.offset);try{e.extend(c.node,c.offset)}catch(e){}}else{let t=document.createRange();l.anchor>l.head&&([h,c]=[c,h]),t.setEnd(c.node,c.offset),t.setStart(h.node,h.offset),e.removeAllRanges(),e.addRange(t)}o&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,c)),this.impreciseAnchor=h.precise?null:new nm(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new nm(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&i9(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=i6(e.root),{anchorNode:n,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let s=this.lineAt(t.head,t.assoc);if(!s)return;let o=s.posAtStart;if(t.head==o||t.head==o+s.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(t.head+t.assoc,t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(n,r)}posFromDOM(e,t){let i=this.tile.nearest(e);if(!i)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let n=i.posAtStart;if(i.isComposite()){let r;if(e==i.dom)r=i.dom.childNodes[t];else{let n=0==nn(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==i.dom)break;0==n&&t.firstChild!=t.lastChild&&(n=e==t.firstChild?-1:1),e=t}r=n<0?e:e.nextSibling}if(r==i.dom.firstChild)return n;for(;r&&!rn.get(r);)r=r.nextSibling;if(!r)return n+i.length;for(let e=0,t=n;;e++){let n=i.children[e];if(n.dom==r)return t;t+=n.length+n.breakAfter}}else if(i.isText())return e==i.dom?n+t:n+(t?i.length:0);else return n}domAtPos(e,t){let{tile:i,offset:n}=this.tile.resolveBlock(e,t);return i.isWidget()?i.domPosFor(n,t):i.domIn(n,t)}inlineDOMNearPos(e,t){let i,n=-1,r=!1,s,o=-1,a=!1;return(this.tile.blockTiles((t,l)=>{if(t.isWidget()){if(32&t.flags&&l>=e)return!0;16&t.flags&&(r=!0)}else{let h=l+t.length;if(l<=e&&(i=t,n=e-l,r=h<e),h>=e&&!s&&(s=t,o=e-l,a=l>e),l>e&&s)return!0}}),i||s)?(r&&s?i=null:a&&i&&(s=null),i&&t<0||!s?i.domIn(n,t):s.domIn(o,t)):this.domAtPos(e,t)}coordsAt(e,t,i){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof r_?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t,i)}lineAt(e,t){let{tile:i}=this.tile.resolveBlock(e,t);return i.isLine()?i:null}coordsForChar(e){let{tile:t,offset:i}=this.tile.resolveBlock(e,1);return t.isLine()?function e(t,i){if(t.isComposite())for(let n of t.children){if(n.length>=i){let t=e(n,i);if(t)return t}if((i-=n.length)<0)break}else if(t.isText()&&i<t.length){let e=tf(t.text,i);if(e==i)return null;let n=nf(t.dom,i,e).getClientRects();for(let e=0;e<n.length;e++){let t=n[e];if(e==n.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}(t,i):null}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,r=this.view.contentDOM.clientWidth,s=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==nv.LTR,l=0,h=(e,c,u)=>{for(let f=0;f<e.children.length&&!(c>n);f++){let n=e.children[f],d=c+n.length,p=n.dom.getBoundingClientRect(),{height:O}=p;if(u&&!f&&(l+=p.top-u.top),n instanceof ra)d>i&&h(n,c,p);else if(c>=i&&(l>0&&t.push(-l),t.push(O+l),l=0,s)){let e=n.dom.lastChild,t=e?i7(e):[];if(t.length){let e=t[t.length-1],i=a?e.right-p.left:p.right-e.left;i>o&&(o=i,this.minWidth=r,this.minWidthFrom=c,this.minWidthTo=d)}}u&&f==e.children.length-1&&(l+=u.bottom-p.bottom),c=d+n.breakAfter}};return h(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?nv.RTL:nv.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,i;for(let n of e.children){if(!n.isText()||/[^ -~]/.test(n.text))return;let e=i7(n.dom);if(1!=e.length)return;t+=e[0].width,i=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:i}}});if(e)return e;let t=document.createElement("div"),i,n,r;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=i7(t.firstChild)[0];i=t.getBoundingClientRect().height,n=e&&e.width?e.width/27:7,r=e&&e.height?e.height:i,t.remove()}),{lineHeight:i,charWidth:n,textHeight:r}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let r=n==t.viewports.length?null:t.viewports[n],s=r?r.from-1:this.view.state.doc.length;if(s>i){let n=(t.lineBlockAt(s).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(iH.replace({widget:new r_(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!r)break;i=r.to+1}return iH.set(e)}updateDeco(){let e=1,t=this.view.state.facet(n1).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),i=!1,n=this.view.state.facet(n5).map((e,t)=>{let n="function"==typeof e;return n&&(i=!0),n?e(this.view):e});for(n.length&&(this.dynamicDecorationMap[e++]=i,t.push(ia.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(n2).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(nV))try{if(t(this.view,e.range,e))return!0}catch(e){nN(this.view.state,e,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),n;if(!i)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});let r=n7(this.view),s={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;if(!function(e,t,i,n,r,s,o,a){let l=e.ownerDocument,h=l.defaultView||window;for(let c=e,u=!1;c&&!u;)if(1==c.nodeType){let e,f=c==l.body,d=1,p=1;if(f)e=function(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(u=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:d,scaleY:p}=ns(c,t)),e={left:t.left,right:t.left+c.clientWidth*d,top:t.top,bottom:t.top+c.clientHeight*p}}let O=0,g=0;if("nearest"==r)t.top<e.top+o?(g=t.top-(e.top+o),i>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,i<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let n=t.bottom-t.top,s=e.bottom-e.top;g=("center"==r&&n<=s?t.top+n/2-s/2:"start"==r||"center"==r&&i<0?t.top-o:t.bottom-s+o)-e.top}if("nearest"==n?t.left<e.left+s?(O=t.left-(e.left+s),i>0&&t.right>e.right+O&&(O=t.right-e.right+s)):t.right>e.right-s&&(O=t.right-e.right+s,i<0&&t.left<e.left+O&&(O=t.left-(e.left+s))):O=("center"==n?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==n==a?t.left-s:t.right-(e.right-e.left)+s)-e.left,O||g)if(f)h.scrollBy(O,g);else{let e=0,i=0;if(g){let e=c.scrollTop;c.scrollTop+=g/p,i=(c.scrollTop-e)*p}if(O){let t=c.scrollLeft;c.scrollLeft+=O/d,e=(c.scrollLeft-t)*d}t={left:t.left-e,top:t.top-i,right:t.right-e,bottom:t.bottom-i},e&&1>Math.abs(e-O)&&(n="nearest"),i&&1>Math.abs(i-g)&&(r="nearest")}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),c=c.assignedSlot||c.parentNode}else if(11==c.nodeType)c=c.host;else break}(this.view.scrollDOM,s,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==nv.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=nl(e.dom);e.dom.scrollIntoView({block:"nearest"}),nh(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){r$(this.tile)}}function r$(e,t){let i=null==t?void 0:t.get(e);if(1!=i)for(let n of(null==i&&e.destroy(),e.children))r$(n,t)}function rP(e,t){let i=e.observer.selectionRange;if(!i.focusNode)return null;let n=nO(i.focusNode,i.focusOffset),r=ng(i.focusNode,i.focusOffset),s=n||r;if(r&&n&&r.node!=n.node){let t=rn.get(r.node);if(!t||t.isText()&&t.text!=r.node.nodeValue)s=r;else if(e.docView.lastCompositionAfterCursor){let e=rn.get(n.node);!e||e.isText()&&e.text!=n.node.nodeValue||(s=r)}}if(e.docView.lastCompositionAfterCursor=s!=n,!s)return null;let o=t-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}let rA=class{constructor(){this.changes=[]}compareRange(e,t){i5(e,t,this.changes)}comparePoint(e,t){i5(e,t,this.changes)}boundChange(e){i5(e,e,this.changes)}};class rC{constructor(){this.changes=[]}compareRange(e,t){i5(e,t,this.changes)}comparePoint(){}boundChange(e){i5(e,e,this.changes)}}class r_ extends iF{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function rT(e,t,i){let n=e.lineBlockAt(t);if(Array.isArray(n.type)){let e;for(let r of n.type){if(r.from>t)break;if(!(r.to<t)){if(r.from<t&&r.to>t)return r;(!e||r.type==iK.Text&&(e.type!=r.type||(i<0?r.from<t:r.to>t)))&&(e=r)}}return e||n}return n}function rM(e,t,i,n){let r=e.state.doc.lineAt(t.head),s=e.bidiSpans(r),o=e.textDirectionAt(r.from);for(let a=t,l=null;;){let t=function(e,t,i,n,r){var s;let o=n.head-e.from,a=nA.find(t,o,null!=(s=n.bidiLevel)?s:-1,n.assoc),l=t[a],h=l.side(r,i);if(o==h){let e=a+=r?1:-1;if(e<0||e>=t.length)return null;o=(l=t[a=e]).side(!r,i),h=l.side(r,i)}let c=tf(e.text,o,l.forward(r,i));(c<l.from||c>l.to)&&(c=h),nT=e.text.slice(Math.min(o,c),Math.max(o,c));let u=a==(r?t.length-1:0)?null:t[a+(r?1:-1)];return u&&c==h&&u.level+ +!r<l.level?tP.cursor(u.side(!r,i)+e.from,u.forward(r,i)?1:-1,u.level):tP.cursor(c+e.from,l.forward(r,i)?-1:1,l.level)}(r,s,o,a,i),h=nT;if(!t){if(r.number==(i?e.state.doc.lines:1))return a;h="\n",r=e.state.doc.line(r.number+(i?1:-1)),s=e.bidiSpans(r),t=e.visualLineSide(r,!i)}if(l){if(!l(h))return a}else{if(!n)return t;l=n(h)}a=t}}function rZ(e,t,i){for(;;){let n=0;for(let r of e)r.between(t-1,t+1,(e,r,s)=>{if(t>e&&t<r){let s=n||i||(t-e<r-t?-1:1);t=s<0?e:r,n=s}});if(!n)return t}}function rR(e,t){let i=null;for(let n=0;n<t.ranges.length;n++){let r=t.ranges[n],s=null;if(r.empty){let t=rZ(e,r.from,0);t!=r.from&&(s=tP.cursor(t,-1))}else{let t=rZ(e,r.from,-1),i=rZ(e,r.to,1);(t!=r.from||i!=r.to)&&(s=r.undirectional?tP.undirectionalRange(r.from,r.to):tP.range(r.from==r.anchor?t:i,r.from==r.head?t:i))}s&&(i||(i=t.ranges.slice()),i[n]=s)}return i?tP.create(i,t.mainIndex):t}function rX(e,t,i){let n=rZ(e.state.facet(n3).map(t=>t(e)),i.from,t.head>i.from?-1:1);return n==i.from?i:tP.cursor(n,n<i.from?1:-1)}class rE{constructor(e,t){this.pos=e,this.assoc=t}}function rj(e,t,i,n){let r=e.contentDOM.getBoundingClientRect(),s=r.top+e.viewState.paddingTop,{x:o,y:a}=t,l=a-s,h;for(;;){if(l<0)return new rE(0,1);if(l>e.viewState.docHeight)return new rE(e.state.doc.length,-1);if(h=e.elementAtHeight(l),null==n)break;if(h.type==iK.Text){if(n<0?h.to<e.viewport.from:h.from>e.viewport.to)break;let t=e.docView.coordsAt(n<0?h.from:h.to,n>0?-1:1);if(t&&(n<0?t.top<=l+s:t.bottom>=l+s))break}let t=e.viewState.heightOracle.textHeight/2;l=n>0?h.bottom+t:h.top-t}if(e.viewport.from>=h.to||e.viewport.to<=h.from){if(i)return null;if(h.type==iK.Text){let t=function(e,t,i,n,r){let s=Math.round((n-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&i.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;s+=Math.floor((r-i.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(i.from,i.to);return i.from+function(e,t,i){for(let n=0,r=0;;){if(r>=t)return n;if(n==e.length)break;r+=9==e.charCodeAt(n)?i-r%i:1,n=tf(e,n)}return e.length}(o,s,e.state.tabSize)}(e,r,h,o,a);return new rE(t,t==h.from?1:-1)}}if(h.type!=iK.Text)return l<(h.top+h.bottom)/2?new rE(h.from,1):new rE(h.to,-1);let c=e.docView.lineAt(h.from,2);return c&&c.length==h.length||(c=e.docView.lineAt(h.from,-2)),new rB(e,o,a,e.textDirectionAt(h.from)).scanTile(c,h.from)}class rB{constructor(e,t,i,n){this.view=e,this.x=t,this.y=i,this.baseDir=n,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:i,spans:n}=this.bidiSpansAt(e);return n[nA.find(n,e-i.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:i,spans:n}=this.bidiSpansAt(e);return n[nA.find(n,e-i.from,-1,t)].dir}bidiIn(e,t){let{spans:i,line:n}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+n.from<t)}scan(e,t,i=!1){let n,r,s=0,o=e.length-1,a=new Set,l=this.bidiIn(e[0],e[o]),h=-1,c=1e9,u;for(;s<o;){let i=o-s,f=s+o>>1;r:if(a.has(f)){for(let e=1;e<i;e++){let t=f+e;if(t>=o&&(t-=i),!a.has(t)){f=t;break r}}break}a.add(f);let d=t(f),p=0;if(d)for(let e=0;e<d.length;e++){let t=d[e];if(0!=t.width||!(d.length>1))if(t.bottom<this.y)(!n||n.bottom<t.bottom)&&(n=t),p=1;else if(t.top>this.y)(!r||r.top>t.top)&&(r=t),p=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,i=Math.abs(e);i<c&&(h=f,c=i,u=t),e&&(p=e<0==(this.baseDir==nv.LTR)?-1:1)}}-1==p&&(!l||this.baseDirAt(e[f],1))?o=f:1==p&&(!l||this.baseDirAt(e[f+1],-1))&&(s=f+1)}if(!u){if(!r&&!n)return{i:0,after:!1};let i=n&&(!r||this.y-n.bottom<r.top-this.y)?n:r;return this.y=(i.top+i.bottom)/2,this.scan(e,t,!0)}if(c&&!i){let{top:i,bottom:s}=u;if(n&&n.bottom>(i+i+s)/3)return this.y=n.bottom-1,this.scan(e,t,!0);if(r&&r.top<(i+s+s)/3)return this.y=r.top+1,this.scan(e,t,!0)}let f=(l?this.dirAt(e[h],1):this.baseDir)==nv.LTR;return{i:h,after:this.x>(u.left+u.right)/2==f}}scanText(e,t){let i=[];for(let n=0;n<e.length;n=tf(e.text,n))i.push(t+n);i.push(t+e.length);let n=this.scan(i,n=>{let r=i[n]-t,s=i[n+1]-t;return nf(e.dom,r,s).getClientRects()});return n.after?new rE(i[n.i+1],-1):new rE(i[n.i],1)}scanTile(e,t){if(!e.length)return new rE(t,1);if(1==e.children.length){let i=e.children[0];if(i.isText())return this.scanText(i,t);if(i.isComposite())return this.scanTile(i,t)}let i=[t];for(let n=0,r=t;n<e.children.length;n++)i.push(r+=e.children[n].length);let n=this.scan(i,t=>{let i=e.children[t];return 48&i.flags?null:(1==i.dom.nodeType?i.dom:nf(i.dom,0,i.length)).getClientRects()}),r=e.children[n.i],s=i[n.i];return r.isText()?this.scanText(r,s):r.isComposite()?this.scanTile(r,s):n.after?new rE(i[n.i+1],-1):new rE(s,1)}}class rL{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(t9.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n);let e=this.text.length;this.readNode(n);let r=rn.get(n),s=n.nextSibling;if(s==t){(null==r?void 0:r.breakAfter)&&!s&&i!=this.view.contentDOM&&this.lineBreak();break}let o=rn.get(s);(r&&o?r.breakAfter:(r?r.breakAfter:nt(n))||nt(s)&&("BR"!=n.nodeName||(null==r?void 0:r.isWidget()))&&this.text.length>e)&&!function(e,t){let i;for(;e!=t&&e;e=e.nextSibling){let t=rn.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(i||(i=[])).push(t)}if(i)for(let e of i){let t=e.overrideDOMText;if(null==t?void 0:t.length)return!1}return!0}(s,t)&&this.lineBreak(),n=s}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,s=1,o;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(o=n.exec(t))&&(r=o.index,s=o[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);i=r+s}}readNode(e){let t=rn.get(e),i=t&&t.overrideDOMText;if(null!=i){this.findPointInside(e,i.length);for(let e=i.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(3==e.nodeType?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(!function(e,t,i){for(;;){if(!t||i<nn(t))return!1;if(t==e)return!0;i=ne(t)+1,t=t.parentNode}}(e,i.node,i.offset)?0:t))}}class rI{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class rz{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:s}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=function e(t,i,n,r){if(t.isComposite()){let s=-1,o=-1,a=-1,l=-1;for(let h=0,c=r,u=r;h<t.children.length;h++){let r=t.children[h],f=c+r.length;if(c<i&&f>n)return e(r,i,n,c);if(f>=i&&-1==s&&(s=h,o=c),c>n&&r.dom.parentNode==t.dom){a=h,l=u;break}u=f,c=f+r.breakAfter}return{from:o,to:l<0?r+t.length:l,startDOM:(s?t.children[s-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}(e.docView.tile,t,i,0))){let t=r||s?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:s}=e.observer.selectionRange;return i&&(t.push(new rI(i,n)),(r!=i||s!=n)&&t.push(new rI(r,s))),t}(e),i=new rL(t,e);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(e,t){if(0==e.length)return null;let i=e[0].pos,n=2==e.length?e[1].pos:i;return i>-1&&n>-1?tP.single(i+t,n+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,i=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!i4(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),n=s&&s.node==t.anchorNode&&s.offset==t.anchorOffset||!i4(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((iD.ios||iD.chrome)&&i!=n&&Math.min(i,n)<=o.main.from&&Math.max(i,n)>=o.main.to&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(i,n),r=Math.max(i,n),s=a.from-t,o=a.to-r;(0==s||1==s||0==t)&&(0==o||-1==o||r==e.state.doc.length)&&(i=0,n=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(tP.range(n,i));else if(e.lineWrapping&&n==i&&!(o.main.empty&&o.main.head==i)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(i,-1),n=0;t&&(n=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=tP.create([tP.cursor(i,n)])}else this.newSel=tP.single(n,i)}}}function rY(e,t){let i,{newSel:n}=t,{state:r}=e,s=r.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:n}=t.bounds,a=s.from,l=null;(8===o||iD.android&&t.text.length<n-e)&&(a=s.to,l="end");let h=r.doc.sliceString(e,n,""),c,u;!s.empty&&s.from>=e&&s.to<=n&&(t.typeOver||h!=t.text)&&h.slice(0,s.from-e)==t.text.slice(0,s.from-e)&&h.slice(s.to-e)==t.text.slice(c=t.text.length-(h.length-(s.to-e)))?i={from:s.from,to:s.to,insert:tn.of(t.text.slice(s.from-e,c).split(""))}:(u=rW(h,t.text,a-e,l))&&(iD.chrome&&13==o&&u.toB==u.from+2&&""==t.text.slice(u.from,u.toB)&&u.toB--,i={from:e+u.from,to:e+u.toA,insert:tn.of(t.text.slice(u.from,u.toB).split(""))})}else n&&(!e.hasFocus&&r.facet(nU)||rD(n,s))&&(n=null);if(!i&&!n)return!1;if((iD.mac||iD.android)&&i&&i.from==i.to&&i.from==s.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(n&&2==i.insert.length&&(n=tP.single(n.main.anchor-1,n.main.head-1)),i={from:i.from,to:i.to,insert:tn.of([i.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).to<s.to&&e.docView.lineHasWidget(s.to)&&e.inputState.insertingTextAt>Date.now()-50?i={from:s.from,to:s.to,insert:r.toText(e.inputState.insertingText)}:iD.chrome&&i&&i.from==i.to&&i.from==s.head&&"\n "==i.insert.toString()&&e.lineWrapping&&(n&&(n=tP.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:tn.of([" "])}),i)return rV(e,i,n,o);if(!n||rD(n,s))return!1;{let t=!1,i="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),"select.pointer"==(i=e.inputState.lastSelectionOrigin)&&(n=rR(r.facet(n3).map(t=>t(e)),n))),e.dispatch({selection:n,scrollIntoView:t,userEvent:i}),!0}}function rV(e,t,i,n=-1){let r;if(iD.ios&&e.inputState.flushIOSKey(t))return!0;let s=e.state.selection.main;if(iD.android&&(t.to==s.to&&(t.from==s.from||t.from==s.from-1&&" "==e.state.sliceDoc(t.from,s.from))&&1==t.insert.length&&2==t.insert.lines&&nd(e.contentDOM,"Enter",13)||(t.from==s.from-1&&t.to==s.to&&0==t.insert.length||8==n&&t.insert.length<t.to-t.from&&t.to>s.head)&&nd(e.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&0==t.insert.length&&nd(e.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>r||(r=function(e,t,i){let n,r=e.state,s=r.selection.main,o=-1;if(t.from==t.to&&t.from<s.from||t.from>s.to){let i=t.from<s.from?-1:1,n=i<0?s.from:s.to,a=rZ(r.facet(n3).map(t=>t(e)),n,i);t.from==a&&(o=a)}if(o>-1)n={changes:t,selection:tP.cursor(t.from+t.insert.length,-1)};else if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let i=s.from<t.from?r.sliceDoc(s.from,t.from):"",o=s.to>t.to?r.sliceDoc(t.to,s.to):"";n=r.replaceSelection(e.state.toText(i+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=r.changes(t),a=i&&i.main.to<=o.newLength?i.main:void 0;if(r.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=s.to+10&&t.to>=s.to-10){let l=e.state.sliceDoc(t.from,t.to),h,c=i&&rP(e,i.main.head);if(c){let e=t.insert.length-(t.to-t.from);h={from:c.from,to:c.to-e}}else h=e.state.doc.lineAt(s.head);let u=s.to-t.to;n=r.changeByRange(i=>{if(i.from==s.from&&i.to==s.to)return{changes:o,range:a||i.map(o)};let n=i.to-u,c=n-l.length;if(e.state.sliceDoc(c,n)!=l||n>=h.from&&c<=h.to)return{range:i};let f=r.changes({from:c,to:n,insert:t.insert}),d=i.to-s.to;return{changes:f,range:a?tP.range(Math.max(0,a.anchor+d),Math.max(0,a.head+d)):i.map(f)}})}else n={changes:o,selection:a&&r.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),r.update(n,{userEvent:a,scrollIntoView:!0})}(e,t,i));return e.state.facet(nj).some(i=>i(e,t.from,t.to,o,a))||e.dispatch(a()),!0}function rW(e,t,i,n){let r=Math.min(e.length,t.length),s=0;for(;s<r&&e.charCodeAt(s)==t.charCodeAt(s);)s++;if(s==r&&e.length==t.length)return null;let o=e.length,a=t.length;for(;o>0&&a>0&&e.charCodeAt(o-1)==t.charCodeAt(a-1);)o--,a--;if("end"==n){let e=Math.max(0,s-Math.min(o,a));i-=o+e-s}if(o<s&&e.length<t.length){let e=i<=s&&i>=o?s-i:0;s-=e,a=s+(a-o),o=s}else if(a<s){let e=i<=s&&i>=a?s-i:0;s-=e,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function rD(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class rq{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,iD.safari&&e.contentDOM.addEventListener("input",()=>null),iD.gecko&&(t=e.contentDOM.ownerDocument,ss.has(t)||(ss.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let i=t.target,n;i!=e.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(n=rn.get(i))&&n.isWidget()&&!n.isHidden&&n.widget.ignoreEvent(t))return!1;return!0}(this.view,e)||this.ignoreDuringComposition(e)||"keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let e of i.observers)e(this.view,t);for(let e of i.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function i(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,n=e&&e.plugin.domEventHandlers,r=e&&e.plugin.domEventObservers;if(n)for(let e in n){let r=n[e];r&&i(e).handlers.push(rN(t.value,r))}if(r)for(let e in r){let n=r[e];n&&i(e).observers.push(rN(t.value,n))}}for(let e in rJ)i(e).handlers.push(rJ[e]);for(let e in r0)i(e).observers.push(r0[e]);return t}(e),i=this.handlers,n=this.view.contentDOM;for(let e in t)if("scroll"!=e){let r=!t[e].handlers.length,s=i[e];s&&!s.handlers.length!=r&&(n.removeEventListener(e,this.handleEvent),s=null),s||n.addEventListener(e,this.handleEvent,{passive:r})}for(let e in i)"scroll"==e||t[e]||n.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&0>rF.indexOf(e.keyCode)&&(this.tabFocusMode=-1),iD.android&&iD.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(iD.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(rU.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||rG.indexOf(e.key)>-1&&e.ctrlKey)){var t;let i={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return i.shiftKey&&iD.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&(t=this.view.win).visualViewport&&t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85&&(i.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:i},setTimeout(()=>this.flushIOSKey(),50),!0}return 229!=e.keyCode&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||this.view.observer.pendingRecords().length||"Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,nd(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&!e.synthetic&&(this.composing>0||!!(iD.safari&&!iD.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function rN(e,t){return(i,n)=>{try{return t.call(e,n,i)}catch(e){nN(i.state,e)}}}let rU=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],rG="dthko",rF=[16,17,18,20,91,92,224,225];function rK(e){return .7*Math.max(0,e)+8}class rH{constructor(e,t,i,n){var r,s;let o;this.view=e,this.startEvent=t,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=no(e.contentDOM),this.atoms=e.state.facet(n3).map(t=>t(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(t9.allowMultipleSelections)&&(r=e,s=t,(o=r.state.facet(nM)).length?o[0](s):iD.mac?s.metaKey:s.ctrlKey),this.dragging=!!function(e,t){let{main:i}=e.state.selection;if(i.empty)return!1;let n=i6(e.root);if(!n||0==n.rangeCount)return!0;let r=n.getRangeAt(0).getClientRects();for(let e=0;e<r.length;e++){let i=r[e];if(i.left<=t.clientX&&i.right>=t.clientX&&i.top<=t.clientY&&i.bottom>=t.clientY)return!0}return!1}(e,t)&&1==r9(t)&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>(t=this.startEvent,Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))return;this.select(this.lastEvent=e);let i=0,n=0,r=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=n7(this.view);e.clientX-l.left<=r+6?i=-rK(r-e.clientX):e.clientX+l.right>=o-6&&(i=rK(e.clientX-o)),e.clientY-l.top<=s+6?n=-rK(s-e.clientY):e.clientY+l.bottom>=a-6&&(n=rK(e.clientY-a)),this.setScrollSpeed(i,n)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,i=rR(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,!1===this.dragging))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}let rJ=Object.create(null),r0=Object.create(null),r1=iD.ie&&iD.ie_version<15||iD.ios&&iD.webkit_version<604;function r2(e,t,i){for(let n of e.facet(t))i=n(i,e);return i}function r5(e,t){t=r2(e.state,nL,t);let{state:i}=e,n,r=1,s=i.toText(t),o=s.lines==i.selection.ranges.length;if(null!=st&&i.selection.ranges.every(e=>e.empty)&&st==s.toString()){let e=-1;n=i.changeByRange(n=>{let a=i.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=i.toText((o?s.line(r++).text:t)+i.lineBreak);return{changes:{from:a.from,insert:l},range:tP.cursor(n.from+l.length)}})}else n=o?i.changeByRange(e=>{let t=s.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:tP.cursor(e.from+t.length)}}):i.replaceSelection(s);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function r3(e,t,i,n){if(1==n)return tP.cursor(t,i);{if(2==n)return function(e,t,i=1){let n=e.charCategorizer(t),r=e.doc.lineAt(t),s=t-r.from;if(0==r.length)return tP.cursor(t);0==s?i=1:s==r.length&&(i=-1);let o=s,a=s;i<0?o=tf(r.text,s,!1):a=tf(r.text,s);let l=n(r.text.slice(o,a));for(;o>0;){let e=tf(r.text,o,!1);if(n(r.text.slice(e,o))!=l)break;o=e}for(;a<r.length;){let e=tf(r.text,a);if(n(r.text.slice(a,e))!=l)break;a=e}return tP.undirectionalRange(o+r.from,a+r.from)}(e.state,t,i);let r=e.docView.lineAt(t,i),s=e.state.doc.lineAt(r?r.posAtEnd:t),o=r?r.posAtStart:s.from,a=r?r.posAtEnd:s.to;return a<e.state.doc.length&&a==s.to&&a++,tP.undirectionalRange(o,a)}}r0.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,iD.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},r0.wheel=r0.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},rJ.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),r0.touchstart=(e,t)=>{let i=e.inputState,n=t.targetTouches[0];i.touchActive=!0,i.lastTouchTime=Date.now(),n&&(i.lastTouchX=n.clientX,i.lastTouchY=n.clientY),i.setSelectionOrigin("select.pointer")},r0.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},r0.touchend=(e,t)=>{e.inputState.touchActive=!1},rJ.mousedown=(e,t)=>{var i,n;let r,s,o;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let a=null;for(let i of e.state.facet(nR))if(a=i(e,t))break;if(a||0!=t.button||(i=e,n=t,r=i.posAndSideAtCoords({x:n.clientX,y:n.clientY},!1),s=r9(n),o=i.state.selection,a={update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),o=o.map(e.changes))},get(e,t,n){let a=i.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),l,h=r3(i,a.pos,a.assoc,s);if(r.pos!=a.pos&&!t){let e=r3(i,r.pos,r.assoc,s),t=Math.min(e.from,h.from),n=Math.max(e.to,h.to);h=t<h.from?tP.range(t,n,h.assoc):tP.range(n,t,h.assoc)}return t?o.replaceRange(o.main.extend(h.from,h.to,h.assoc)):n&&1==s&&o.ranges.length>1&&(l=function(e,t){for(let i=0;i<e.ranges.length;i++){let{from:n,to:r}=e.ranges[i];if(n<=t&&r>=t)return tP.create(e.ranges.slice(0,i).concat(e.ranges.slice(i+1)),e.mainIndex==i?0:e.mainIndex-(e.mainIndex>i))}return null}(o,a.pos))?l:n?o.addRange(h):tP.create([h])}}),a){let i=!e.hasFocus;e.inputState.startMouseSelection(new rH(e,t,a,i)),i&&e.observer.ignore(()=>{nu(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let n=e.inputState.mouseSelection;if(n)return n.start(t),!1===n.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let r6=iD.ie&&iD.ie_version<=11,r4=null,r8=0,r7=0;function r9(e){if(!r6)return e.detail;let t=r4,i=r7;return r4=e,r7=Date.now(),r8=!t||i>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(r8+1)%3:1}function se(e,t,i,n){let r;if(!(i=r2(e.state,nL,i)))return;let s=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,a=n&&o&&((r=e.state.facet(nZ)).length?r[0](t):iD.mac?!t.altKey:!t.ctrlKey)?{from:o.from,to:o.to}:null,l={from:s,insert:i},h=e.state.changes(a?[a,l]:l);e.focus(),e.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}rJ.dragstart=(e,t)=>{let{selection:{main:i}}=e.state;if(t.target.draggable){let n=e.docView.tile.nearest(t.target);if(n&&n.isWidget()){let e=n.posAtStart,t=e+n.length;(e>=i.to||t<=i.from)&&(i=tP.undirectionalRange(e,t))}}let{inputState:n}=e;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=i,t.dataTransfer&&(t.dataTransfer.setData("Text",r2(e.state,nI,e.state.sliceDoc(i.from,i.to))),t.dataTransfer.effectAllowed="copyMove"),!1},rJ.dragend=e=>(e.inputState.draggedContent=null,!1),rJ.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let i=t.dataTransfer.files;if(i&&i.length){let n=Array(i.length),r=0,s=()=>{++r==i.length&&se(e,t,n.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<i.length;e++){let t=new FileReader;t.onerror=s,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(n[e]=t.result),s()},t.readAsText(i[e])}return!0}{let i=t.dataTransfer.getData("Text");if(i)return se(e,t,i,!0),!0}return!1},rJ.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let i=r1?null:t.clipboardData;return i?(r5(e,i.getData("text/plain")||i.getData("text/uri-list")),!0):(!function(e){let t=e.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{e.focus(),i.remove(),r5(e,i.value)},50)}(e),!1)};let st=null;rJ.copy=rJ.cut=(e,t)=>{if(!i8(e.contentDOM,e.observer.selectionRange))return!1;let{text:i,ranges:n,linewise:r}=function(e){let t=[],i=[],n=!1;for(let n of e.selection.ranges)n.empty||(t.push(e.sliceDoc(n.from,n.to)),i.push(n));if(!t.length){let r=-1;for(let{from:n}of e.selection.ranges){let s=e.doc.lineAt(n);s.number>r&&(t.push(s.text),i.push({from:s.from,to:Math.min(e.doc.length,s.to+1)})),r=s.number}n=!0}return{text:r2(e,nI,t.join(e.lineBreak)),ranges:i,linewise:n}}(e.state);if(!i&&!r)return!1;st=r?i:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=r1?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",i),!0):(!function(e,t){let i=e.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=t,n.focus(),n.selectionEnd=t.length,n.selectionStart=0,setTimeout(()=>{n.remove(),e.focus()},50)}(e,i),!1)};let si=tH.define();function sn(e,t){let i=[];for(let n of e.facet(nB)){let r=n(e,t);r&&i.push(r)}return i.length?e.update({effects:i,annotations:si.of(!0)}):null}function sr(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let i=sn(e.state,t);i?e.dispatch(i):e.update([])}},10)}r0.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),sr(e)},r0.blur=e=>{e.observer.clearSelectionRange(),sr(e)},r0.compositionstart=r0.compositionupdate=e=>{!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},r0.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,iD.chrome&&iD.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},r0.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},rJ.beforeinput=(e,t)=>{var i,n;let r;if(("insertText"==t.inputType||"insertCompositionText"==t.inputType)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let n=null==(i=t.dataTransfer)?void 0:i.getData("text/plain"),r=t.getTargetRanges();if(n&&r.length){let t=r[0],i=e.posAtDOM(t.startContainer,t.startOffset),s=e.posAtDOM(t.endContainer,t.endOffset);return rV(e,{from:i,to:s,insert:e.state.toText(n)},null),!0}}if(iD.chrome&&iD.android&&(r=rU.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null==(n=window.visualViewport)?void 0:n.height)||0;setTimeout(()=>{var i;((null==(i=window.visualViewport)?void 0:i.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return iD.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),iD.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>r0.compositionend(e,t),20),!1};let ss=new Set,so=["pre-wrap","normal","pre-line","break-spaces"],sa=!1;class sl{constructor(e){this.lineWrapping=e,this.doc=tn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return so.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let n=e[i];n<0?i++:this.heightSamples[Math.floor(10*n)]||(t=!0,this.heightSamples[Math.floor(10*n)]=!0)}return t}refresh(e,t,i,n,r,s){let o=so.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=r,a){this.heightSamples={};for(let e=0;e<s.length;e++){let t=s[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class sh{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class sc{constructor(e,t,i,n,r){this.from=e,this.length=t,this.top=i,this.height=n,this._content=r}get type(){return"number"==typeof this._content?iK.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof i1?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new sc(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var su=((c=su||(su={}))[c.ByPos=0]="ByPos",c[c.ByHeight=1]="ByHeight",c[c.ByPosNoHeight=2]="ByPosNoHeight",c);class sf{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=2*!!e|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>.001&&(sa=!0),this.height=e)}replace(e,t,i){return sf.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let r=this,s=i.doc;for(let o=n.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:h,toB:c}=n[o],u=r.lineAt(a,su.ByPosNoHeight,i.setDoc(t),0,0),f=u.to>=l?u:r.lineAt(l,su.ByPosNoHeight,i,0,0);for(c+=f.to-l,l=f.to;o>0&&u.from<=n[o-1].toA;)a=n[o-1].fromA,h=n[o-1].fromB,o--,a<u.from&&(u=r.lineAt(a,su.ByPosNoHeight,i,0,0));h+=u.from-a,a=u.from;let d=sw.build(i.setDoc(s),e,h,c);r=sd(r,r.replace(a,l,d))}return r.updateHeight(i,0)}static empty(){return new sg(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,i=e.length,n=0,r=0;for(;;)if(t==i)if(n>2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),i+=1+r.break,n-=r.size}else if(r>2*n){let t=e[i];t.break?e.splice(i,1,t.left,null,t.right):e.splice(i,1,t.left,t.right),i+=2+t.break,r-=t.size}else break;else if(n<r){let i=e[t++];i&&(n+=i.size)}else{let t=e[--i];t&&(r+=t.size)}let s=0;return null==e[t-1]?(s=1,t--):null==e[t]&&(s=1,i++),new sv(sf.of(e.slice(0,t)),s,sf.of(e.slice(i)))}}function sd(e,t){return e==t?e:(e.constructor!=t.constructor&&(sa=!0),t)}sf.prototype.size=1;let sp=iH.replace({});class sO extends sf{constructor(e,t,i){super(e,t),this.deco=i,this.spaceAbove=0}mainBlock(e,t){return new sc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,i,n){return this.spaceAbove&&e<i+this.spaceAbove?new sc(n,0,i,this.spaceAbove,sp):this.mainBlock(i,n)}lineAt(e,t,i,n,r){let s=this.mainBlock(n,r);return this.spaceAbove?this.blockAt(0,i,n,r).join(s):s}forEachLine(e,t,i,n,r,s){e<=r+this.length&&t>=r&&s(this.lineAt(0,su.ByPos,i,n,r))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setMeasuredHeight(n),this.outdated=!1,this}toString(){return`block(${this.length})`}}class sg extends sO{constructor(e,t,i){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,t){return new sc(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,i){let n=i[0];return 1==i.length&&(n instanceof sg||n instanceof sm&&4&n.flags)&&10>Math.abs(this.length-n.length)?(n instanceof sm?n=new sg(n.length,this.height,this.spaceAbove):n.height=this.height,this.outdated||(n.outdated=!1),n):sf.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setMeasuredHeight(n):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class sm extends sf{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,r=n-i+1,s,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*r);s=t/r,this.length>r+1&&(o=(this.height-t)/(this.length-r-1))}else s=this.height/r;return{firstLine:i,lastLine:n,perLine:s,perChar:o}}blockAt(e,t,i,n){let{firstLine:r,lastLine:s,perLine:o,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let r=n+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),s=t.doc.lineAt(r),l=o+s.length*a,h=Math.max(i,e-l/2);return new sc(s.from,s.length,h,l,0)}{let n=Math.max(0,Math.min(s-r,Math.floor((e-i)/o))),{from:a,length:l}=t.doc.line(r+n);return new sc(a,l,i+o*n,o,0)}}lineAt(e,t,i,n,r){if(t==su.ByHeight)return this.blockAt(e,i,n,r);if(t==su.ByPosNoHeight){let{from:t,to:n}=i.doc.lineAt(e);return new sc(t,n-t,0,0,0)}let{firstLine:s,perLine:o,perChar:a}=this.heightMetrics(i,r),l=i.doc.lineAt(e),h=o+l.length*a,c=l.number-s,u=n+o*c+a*(l.from-r-c);return new sc(l.from,l.length,Math.max(n,Math.min(u,n+this.height-h)),h,0)}forEachLine(e,t,i,n,r,s){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(i,r);for(let h=e,c=n;h<=t;){let t=i.doc.lineAt(h);if(h==e){let i=t.number-o;c+=a*i+l*(e-r-i)}let n=a+l*t.length;s(new sc(t.from,t.length,c,n,0)),c+=n,h=t.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let e=i[i.length-1];e instanceof sm?i[i.length-1]=new sm(e.length+n):i.push(null,new sm(n-1))}if(e>0){let t=i[0];t instanceof sm?i[0]=new sm(e+t.length):i.unshift(new sm(e-1),null)}return sf.of(i)}decomposeLeft(e,t){t.push(new sm(e-1),null)}decomposeRight(e,t){t.push(null,new sm(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let r=t+this.length;if(n&&n.from<=t+this.length&&n.more){let i=[],s=Math.max(t,n.from),o=-1;for(n.from>t&&i.push(new sm(n.from-t-1).updateHeight(e,t));s<=r&&n.more;){let t=e.doc.lineAt(s).length;i.length&&i.push(null);let r=n.heights[n.index++],a=0;r<0&&(a=-r,r=n.heights[n.index++]),-1==o?o=r:Math.abs(r-o)>=.001&&(o=-2);let l=new sg(t,r,a);l.outdated=!1,i.push(l),s+=t+1}s<=r&&i.push(null,new sm(r-s).updateHeight(e,s));let a=sf.of(i);return(o<0||Math.abs(a.height-this.height)>=.001||Math.abs(o-this.heightMetrics(e,t).perLine)>=.001)&&(sa=!0),sd(this,a)}return(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class sv extends sf{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return 1&this.flags}blockAt(e,t,i,n){let r=i+this.left.height;return e<r?this.left.blockAt(e,t,i,n):this.right.blockAt(e,t,r,n+this.left.length+this.break)}lineAt(e,t,i,n,r){let s=n+this.left.height,o=r+this.left.length+this.break,a=t==su.ByHeight?e<s:e<o,l=a?this.left.lineAt(e,t,i,n,r):this.right.lineAt(e,t,i,s,o);if(this.break||(a?l.to<o:l.from>o))return l;let h=t==su.ByPosNoHeight?su.ByPosNoHeight:su.ByPos;return a?l.join(this.right.lineAt(o,h,i,s,o)):this.left.lineAt(o,h,i,n,r).join(l)}forEachLine(e,t,i,n,r,s){let o=n+this.left.height,a=r+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,n,r,s),t>=a&&this.right.forEachLine(e,t,i,o,a,s);else{let l=this.lineAt(a,su.ByPos,i,n,r);e<l.from&&this.left.forEachLine(e,l.from-1,i,n,r,s),l.to>=e&&l.from<=t&&s(l),t>l.to&&this.right.forEachLine(l.to+1,t,i,o,a,s)}}replace(e,t,i){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let r=[];e>0&&this.decomposeLeft(e,r);let s=r.length;for(let e of i)r.push(e);if(e>0&&sy(r,s-1),t<this.length){let e=r.length;this.decomposeRight(t,r),sy(r,e)}return sf.of(r)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++i&&t.push(null),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?sf.of(this.break?[e,null,t]:[e,t]):(this.left=sd(this.left,e),this.right=sd(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:r,right:s}=this,o=t+r.length+this.break,a=null;return(n&&n.from<=t+r.length&&n.more?a=r=r.updateHeight(e,t,i,n):r.updateHeight(e,t,i),n&&n.from<=o+s.length&&n.more?a=s=s.updateHeight(e,o,i,n):s.updateHeight(e,o,i),a)?this.balanced(r,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function sy(e,t){let i,n;null==e[t]&&(i=e[t-1])instanceof sm&&(n=e[t+1])instanceof sm&&e.splice(t-1,3,new sm(i.length+1+n.length))}class sw{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof sg?i.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new sg(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let n=i.widget?i.widget.estimatedHeight:0,r=i.widget?i.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let s=t-e;i.block?this.addBlock(new sO(s,n,i)):(s||r||n>=5)&&this.addLineDeco(n,r,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new sg(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let i=new sm(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof sg)return e;let t=new sg(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof sg||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new sg(0,-1,0));let i=e;for(let e of this.nodes)e instanceof sg&&e.updateHeight(this.oracle,i),i+=e?e.length:1;return this.nodes}static build(e,t,i,n){let r=new sw(i,e);return ia.spans(t,i,n,r,0),r.finish(i)}}class sb{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,n){(e<t||i&&i.heightRelevant||n&&n.heightRelevant)&&i5(e,t,this.changes,5)}}class sx{constructor(e,t,i,n){this.from=e,this.to=t,this.size=i,this.displaySize=n}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],r=t[i];if(n.from!=r.from||n.to!=r.to||n.size!=r.size)return!1}return!0}draw(e,t){return iH.replace({widget:new sS(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class sS extends iF{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class sk{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sA,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=nv.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let i=t.facet(n0).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new sl(i),this.stateDeco=sC(t),this.heightMap=sf.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle.setDoc(t.doc),[new re(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=iH.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some(({from:e,to:t})=>n>=e&&n<=t)){let{from:t,to:i}=this.lineBlockAt(n);e.push(new sQ(t,i))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?sA:new s_(this.heightOracle,this.heightMap,this.viewports),2*!e.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(sT(e,this.scaler))})}update(e,t=null){var i,n;let r;this.state=e.state;let s=this.stateDeco;this.stateDeco=sC(this.state);let o=e.changedRanges,a=re.extendWithRanges(o,(i=this.stateDeco,n=e?e.changes:ty.empty(this.state.doc.length),r=new sb,ia.compare(s,i,n,r,0),r.changes)),l=this.heightMap.height,h=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);sa=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=l||sa)&&(e.flags|=2),h?(this.scrollAnchorPos=e.changes.mapPos(h.from,-1),this.scrollAnchorHeight=h.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=l);let c=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let u=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(u||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(nY)&&(this.mustEnforceCursorAssoc=!0)}measure(){var e;let t,i,{view:n}=this,r=n.contentDOM,s=window.getComputedStyle(r),o=this.heightOracle,a=s.whiteSpace;this.defaultTextDirection="rtl"==s.direction?nv.RTL:nv.LTR;let l=this.heightOracle.mustRefreshForWrapping(a)||"refresh"===this.mustMeasureContent,h=r.getBoundingClientRect(),c=l||this.mustMeasureContent||this.contentDOMHeight!=h.height;this.contentDOMHeight=h.height,this.mustMeasureContent=!1;let u=0,f=0;if(h.width&&h.height){let{scaleX:e,scaleY:t}=ns(r,h);(e>.005&&Math.abs(this.scaleX-e)>.005||t>.005&&Math.abs(this.scaleY-t)>.005)&&(this.scaleX=e,this.scaleY=t,u|=16,l=c=!0)}let d=(parseInt(s.paddingTop)||0)*this.scaleY,p=(parseInt(s.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=p)&&(this.paddingTop=d,this.paddingBottom=p,u|=18),this.editorWidth!=n.scrollDOM.clientWidth&&(o.lineWrapping&&(c=!0),this.editorWidth=n.scrollDOM.clientWidth,u|=16);let O=no(this.view.contentDOM,!1).y;O!=this.scrollParent&&(this.scrollParent=O,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=np(this.scrollParent||n.win);let m=(this.printing?function(e,t){let i=e.getBoundingClientRect();return{left:0,right:i.right-i.left,top:t,bottom:i.bottom-(i.top+t)}}:function(e,t){let i=e.getBoundingClientRect(),n=e.ownerDocument,r=n.defaultView||window,s=Math.max(0,i.left),o=Math.min(r.innerWidth,i.right),a=Math.max(0,i.top),l=Math.min(r.innerHeight,i.bottom);for(let t=e.parentNode;t&&t!=n.body;)if(1==t.nodeType){let i=t,n=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();s=Math.max(s,n.left),o=Math.min(o,n.right),a=Math.max(a,n.top),l=Math.min(t==e.parentNode?r.innerHeight:l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else if(11==t.nodeType)t=t.host;else break;return{left:s-i.left,right:Math.max(s,o)-i.left,top:a-(i.top+t),bottom:Math.max(a,l)-(i.top+t)}})(r,this.paddingTop),v=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(c=!0)),!this.inView&&!this.scrollTarget&&(t=(e=n.dom).getBoundingClientRect(),i=e.ownerDocument.defaultView||window,!(t.left<i.innerWidth)||!(t.right>0)||!(t.top<i.innerHeight)||!(t.bottom>0)))return 0;let b=h.width;if((this.contentDOMWidth!=b||this.editorHeight!=n.scrollDOM.clientHeight)&&(this.contentDOMWidth=h.width,this.editorHeight=n.scrollDOM.clientHeight,u|=16),c){let e=n.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(e)&&(l=!0),l||o.lineWrapping&&Math.abs(b-this.contentDOMWidth)>o.charWidth){let{lineHeight:t,charWidth:i,textHeight:r}=n.docView.measureTextSize();(l=t>0&&o.refresh(a,t,i,r,Math.max(5,b/i),e))&&(n.docView.minWidth=0,u|=16)}for(let t of(v>0&&y>0?f=Math.max(v,y):v<0&&y<0&&(f=Math.min(v,y)),sa=!1,this.viewports)){let i=t.from==this.viewport.from?e:n.docView.measureVisibleLineHeights(t);this.heightMap=(l?sf.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle,[new re(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(o,0,l,new sh(t.from,i))}sa&&(u|=2)}let x=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(2&u&&(u|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),u|=this.updateForViewport()),(2&u||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,n)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,r=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,a=new sQ(n.lineAt(s-1e3*i,su.ByHeight,r,0,0).from,n.lineAt(o+(1-i)*1e3,su.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=n.lineAt(e,su.ByPos,r,0,0),o;o="center"==t.y?(s.top+s.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-i,a=new sQ(n.lineAt(o-500,su.ByHeight,r,0,0).from,n.lineAt(o+i+500,su.ByHeight,r,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new sQ(this.heightMap.lineAt(i,su.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,su.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,su.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,su.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:o}=this;return(0==e||n<=s-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||r>=o+Math.max(10,Math.min(i,250)))&&n>s-2e3&&r<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let n of e)t.touchesRange(n.from,n.to)||i.push(new sx(t.mapPos(n.from),t.mapPos(n.to),n.size,n.displaySize));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,n=i?1e4:2e3,r=n>>1,s=n<<1;if(this.defaultTextDirection!=nv.LTR&&!i)return[];let o=[],a=(n,s,l,h)=>{if(s-n<r)return;let c=this.state.selection.main,u=[c.from];for(let e of(c.empty||u.push(c.to),u))if(e>n&&e<s){a(n,e-10,l,h),a(e+10,s,l,h);return}let f=function(e,t){for(let i of e)if(t(i))return i}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-n)<r&&Math.abs(e.to-s)<r&&!u.some(t=>e.from<t&&e.to>t));if(!f){if(s<l.to&&t&&i&&t.visibleRanges.some(e=>e.from<=s&&e.to>=s)){let e=t.moveToLineBoundary(tP.cursor(s),!1,!0).head;e>n&&(s=e)}let e=this.gapSize(l,n,s,h),r=i||e<2e6?e:2e6;f=new sx(n,s,e,r)}o.push(f)},l=t=>{var r,o,l;let h,c,u,f,d;if(t.length<s||t.type!=iK.Text)return;let p=(r=t.from,o=t.to,l=this.stateDeco,u=[],f=r,d=0,ia.spans(l,r,o,{span(){},point(e,t){e>f&&(u.push({from:f,to:e}),d+=e-f),f=t}},20),f<o&&(u.push({from:f,to:o}),d+=o-f),{total:d,ranges:u});if(p.total<s)return;let O=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let e,i,r=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=O){let n=sP(p,O),s=((this.visibleBottom-this.visibleTop)/2+r)/t.height;e=n-s,i=n+s}else e=(this.visibleTop-t.top-r)/t.height,i=(this.visibleBottom-t.top+r)/t.height;h=s$(p,e),c=s$(p,i)}else{let i,r,s=p.total*this.heightOracle.charWidth,o=n*this.heightOracle.charWidth,a=0;if(s>2e6)for(let i of e)i.from>=t.from&&i.from<t.to&&i.size!=i.displaySize&&i.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=i.size-i.displaySize);let l=this.pixelViewport.left+a,u=this.pixelViewport.right+a;if(null!=O){let e=sP(p,O),t=((u-l)/2+o)/s;i=e-t,r=e+t}else i=(l-o)/s,r=(u+o)/s;h=s$(p,i),c=s$(p,r)}h>t.from&&a(t.from,h,t,p),c<t.to&&a(c,t.to,t,p)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return o}gapSize(e,t,i,n){let r=sP(n,i)-sP(n,t);return this.heightOracle.lineWrapping?e.height*r:n.total*this.heightOracle.charWidth*r}updateLineGaps(e){sx.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=iH.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let i=[];ia.spans(t,this.viewport.from,this.viewport.to,{span(e,t){i.push({from:e,to:t})},point(){}},20);let n=0;if(i.length!=this.visibleRanges.length)n=12;else for(let t=0;t<i.length&&!(8&n);t++){let r=this.visibleRanges[t],s=i[t];(r.from!=s.from||r.to!=s.to)&&(n|=4,e&&e.mapPos(r.from,-1)==s.from&&e.mapPos(r.to,1)==s.to||(n|=8))}return this.visibleRanges=i,n}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||sT(this.heightMap.lineAt(e,su.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||sT(this.heightMap.lineAt(this.scaler.fromDOM(e),su.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return sT(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class sQ{constructor(e,t){this.from=e,this.to=t}}function s$({total:e,ranges:t},i){if(i<=0)return t[0].from;if(i>=1)return t[t.length-1].to;let n=Math.floor(e*i);for(let e=0;;e++){let{from:i,to:r}=t[e],s=r-i;if(n<=s)return i+n;n-=s}}function sP(e,t){let i=0;for(let{from:n,to:r}of e.ranges){if(t<=r){i+=t-n;break}i+=r-n}return i/e.total}let sA={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function sC(e){let t=e.facet(n1).filter(e=>"function"!=typeof e),i=e.facet(n5).filter(e=>"function"!=typeof e);return i.length&&t.push(ia.join(i)),t}class s_{constructor(e,t,i){let n=0,r=0,s=0;for(let o of(this.viewports=i.map(({from:i,to:r})=>{let s=t.lineAt(i,su.ByPos,e,0,0).top,o=t.lineAt(r,su.ByPos,e,0,0).bottom;return n+=o-s,{from:i,to:r,top:s,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n),this.viewports))o.domTop=s+(o.top-r)*this.scale,s=o.domBottom=o.domTop+(o.bottom-o.top),r=o.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return n+(e-i)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);i=r.bottom,n=r.domBottom}}fromDOM(e){for(let t=0,i=0,n=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return i+(e-n)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);i=r.bottom,n=r.domBottom}}eq(e){return e instanceof s_&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to)}}function sT(e,t){if(1==t.scale)return e;let i=t.toDOM(e.top),n=t.toDOM(e.bottom);return new sc(e.from,e.length,i,n-i,Array.isArray(e._content)?e._content.map(e=>sT(e,t)):e._content)}let sM=t_.define({combine:e=>e.join(" ")}),sZ=t_.define({combine:e=>e.indexOf(!0)>-1}),sR=iQ.newName(),sX=iQ.newName(),sE=iQ.newName(),sj={"&light":"."+sX,"&dark":"."+sE};function sB(e,t,i){return new iQ(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!i||!i[t])throw RangeError(`Unsupported selector: ${t}`);return i[t]}):e+" "+t})}let sL=sB("."+sR,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},sj),sI={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sz=iD.ie&&iD.ie_version<=11;class sY{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new na,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(iD.ie&&iD.ie_version<=11||iD.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&iD.android&&!1!==e.constructor.EDIT_CONTEXT&&!(iD.chrome&&iD.chrome_version<126)&&(this.editContext=new sD(e),e.state.facet(nU)&&(e.contentDOM.editContext=this.editContext.editContext)),sz&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null==(e=this.view.docView)?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){for(let t of(this.gapIntersection.disconnect(),e))this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(nU)?i.root.activeElement!=this.dom:!i8(this.dom,n))return;let r=n.anchorNode&&i.docView.tile.nearest(n.anchorNode);if(r&&r.isWidget()&&r.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(iD.ie&&iD.ie_version<=11||iD.android&&iD.chrome)&&!i.state.selection.main.empty&&n.focusNode&&i9(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=i6(e.root);if(!t)return!1;let i=iD.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return sW(e,i)}let i=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),i=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),i?sW(e,i):null}(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let n=i8(this.dom,i);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let i=t.focusNode,n=t.focusOffset;if(!i||t.anchorNode!=i||t.anchorOffset!=n)return!1;for(n=Math.min(n,nn(i));;)if(n){if(1!=i.nodeType)return!1;let e=i.childNodes[n-1];"false"==e.contentEditable?n--:n=nn(i=e)}else{if(i==e)return!0;n=ne(i),i=i.parentNode}}(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(1==i.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(11==i.nodeType)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sI),sz&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),sz&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&nd(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null==(i=this.delayedAndroidKey)?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(n=!0),-1==t?{from:t,to:i}=e:(t=Math.min(e.from,t),i=Math.max(e.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&i8(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new rz(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,n=rY(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!rD(this.view.state.selection,t.newSel.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let i=sV(t,e.previousSibling||e.target.previousSibling,-1),n=sV(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(nU)!=e.state.facet(nU)&&(e.view.contentDOM.editContext=e.state.facet(nU)?this.editContext.editContext:null))}destroy(){var e,t,i;for(let n of(this.stop(),null==(e=this.intersection)||e.disconnect(),null==(t=this.gapIntersection)||t.disconnect(),null==(i=this.resizeScroll)||i.disconnect(),this.scrollTargets))n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function sV(e,t,i){for(;t;){let n=rn.get(t);if(n&&n.parent==e)return n;let r=t.parentNode;t=r!=e.dom?r:i>0?t.nextSibling:t.previousSibling}return null}function sW(e,t){let i=t.startContainer,n=t.startOffset,r=t.endContainer,s=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return i9(o.node,o.offset,r,s)&&([i,n,r,s]=[r,s,i,n]),{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:s}}class sD{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});for(let i in this.handlers.textupdate=i=>{let n=e.state.selection.main,{anchor:r,head:s}=n,o=this.toEditorPos(i.updateRangeStart),a=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:o,drifted:!1});let l=a-o>i.text.length;o==this.from&&r<this.from?o=r:a==this.to&&r>this.to&&(a=r);let h=rW(e.state.sliceDoc(o,a),i.text,(l?n.from:n.to)-o,l?"end":null);if(!h){let t=tP.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));rD(t,n)||e.dispatch({selection:t,userEvent:"select"});return}let c={from:h.from+o,to:h.toA+o,insert:tn.of(i.text.slice(h.from,h.toB).split("\n"))};if((iD.mac||iD.android)&&c.from==s-1&&/^\. ?$/.test(i.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(c={from:o,to:a,insert:tn.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let t=this.to-this.from+(c.to-c.from+c.insert.length);rV(e,c,tP.single(this.toEditorPos(i.selectionStart,t),this.toEditorPos(i.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from<c.to&&!c.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let n=[],r=null;for(let t=this.toEditorPos(i.rangeStart),s=this.toEditorPos(i.rangeEnd);t<s;t++){let i=e.coordsForChar(t);r=i&&new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top)||r||new DOMRect,n.push(r)}t.updateCharacterBounds(i.rangeStart,n)},this.handlers.textformatupdate=t=>{let i=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,n=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(n)){let r=this.toEditorPos(e.rangeStart),s=this.toEditorPos(e.rangeEnd);if(r<s){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(n)?1:2}px`;i.push(iH.mark({attributes:{style:e}}).range(r,s))}}}e.dispatch({effects:nq.of(iH.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}},this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:e=>{let t=i6(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,n=this.pendingContextChange;return e.changes.iterChanges((r,s,o,a,l)=>{if(i)return;let h=l.length-(s-r);if(n&&s>=n.to)if(n.from==r&&n.to==s&&n.insert.eq(l)){n=this.pendingContextChange=null,t+=h,this.to+=h;return}else n=null,this.revertPending(e.state);if(r+=t,(s+=t)<=this.from)this.from+=h,this.to+=h;else if(r<this.to){if(r<this.from||s>this.to||this.to-this.from+l.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(s),l.toString()),this.to+=h}t+=h}),n&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(i,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class sq{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;for(let t of(this.dispatchTransactions=e.dispatchTransactions||i&&(e=>e.forEach(e=>i(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new sk(this,e.state||t9.create(e)),e.scrollTo&&e.scrollTo.is(nD)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(nF).map(e=>new nH(e)),this.plugins))t.update(this);this.observer=new sY(this),this.inputState=new rq(this),this.inputState.ensureHandlers(this.plugins),this.docView=new rQ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null==(t=document.fonts)?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof t2?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,n,r=this.state;for(let t of e){if(t.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed){this.viewState.state=r;return}let s=this.hasFocus,o=0,a=null;e.some(e=>e.annotation(si))?(this.inputState.notifiedFocused=s,o=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,(a=sn(r,s))||(o=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),((h=this.observer.readChange())&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(h=null)):this.observer.clear(),r.facet(t9.phrases)!=this.state.facet(t9.phrases))return this.setState(r);n=rt.create(this,r,e),n.flags|=o;let c=this.viewState.scrollTarget;try{for(let t of(this.updateState=2,e)){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection,{x:i,y:n}=this.state.facet(sq.cursorScrollMargin);c=new nW(e.empty?e:tP.cursor(e.head,e.head>e.anchor?-1:1),"nearest","nearest",n,i)}for(let e of t.effects)e.is(nD)&&(c=e.value.clip(this.state))}this.viewState.update(n,c),this.bidiCache=sG.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(n9)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(sM)!=n.state.facet(sM)&&(this.viewState.mustMeasureContent=!0),(t||i||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let e of this.state.facet(nE))try{e(n)}catch(e){nN(this.state,e,"update listener")}(a||h)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!rY(this,h)&&l.force&&nd(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);for(let t of(this.viewState=new sk(this,e),this.plugins=e.facet(nF).map(e=>new nH(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new rQ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(nF),i=e.state.facet(nF);if(t!=i){let n=[];for(let r of i){let i=t.indexOf(r);if(i<0)n.push(new nH(r));else{let t=this.plugins[i];t.mustUpdate=e,n.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){nN(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.viewState.scrollParent,n=this.viewState.getScrollOffset(),{scrollAnchorPos:r,scrollAnchorHeight:s,scaleY:o}=this.viewState;Math.abs(n-this.viewState.scrollOffset)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(s<0){if(np(i||this.win))r=-1,s=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(n);r=e.from,s=e.top}o=this.viewState.scaleY}this.updateState=1;let a=this.viewState.measure();if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let h=l.map(e=>{try{return e.read(this)}catch(e){return nN(this.state,e),sU}}),c=rt.create(this,this.state,[]),u=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,!c.empty&&(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),(u=this.docView.update(c))&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(h[e]!=sU)try{let t=l[e];t.write&&t.write(h[e],this)}catch(e){nN(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let e=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)/this.viewState.scaleY-s/o;if((e>1||e<-1)&&!(iD.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){n+=e,i?r<0?i.scrollTop=i.scrollHeight:i.scrollTop+=e:this.win.scrollBy(0,e),s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(nE))e(t)}get themeClasses(){return sR+" "+(this.state.facet(sZ)?sE:sX)+" "+this.state.facet(sM)}updateAttrs(){let e=sF(this,nJ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(nU)?"true":"false",class:"cm-content",style:`${iD.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),sF(this,n0,t);let i=this.observer.ignore(()=>{let i=iG(this.contentDOM,this.contentAttrs,t),n=iG(this.dom,this.editorAttrs,e);return i||n});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let e of i.effects)e.is(sq.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(n9);let e=this.state.facet(sq.cspNonce);iQ.mount(this.root,this.styleModules.concat(sL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if((this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e)&&!(this.measureRequests.indexOf(e)>-1)){if(null!=e.key){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return rX(this,e,rM(this,e,t,i))}moveByGroup(e,t){return rX(this,e,rM(this,e,t,t=>{var i;let n,r;return i=e.head,r=(n=this.state.charCategorizer(i))(t),e=>{let t=n(e);return r==t8.Space&&(r=t),r==t}}))}visualLineSide(e,t){let i=this.bidiSpans(e),n=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return tP.cursor(r.side(t,n)+e.from,r.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,i=!0){return function(e,t,i,n){let r=rT(e,t.head,t.assoc||-1),s=n&&r.type==iK.Text&&(e.lineWrapping||r.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(s){let t=e.dom.getBoundingClientRect(),n=e.textDirectionAt(r.from),o=e.posAtCoords({x:i==(n==nv.LTR)?t.right-1:t.left+1,y:(s.top+s.bottom)/2});if(null!=o)return tP.cursor(o,i?-1:1)}return tP.cursor(i?r.to:r.from,i?-1:1)}(this,e,t,i)}moveVertically(e,t,i){return rX(this,e,function(e,t,i,n){let r=t.head,s=i?1:-1;if(r==(i?e.state.doc.length:0))return tP.cursor(r,t.assoc);let o=t.goalColumn,a,l=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(r,t.assoc||((t.empty?i:t.head==t.from)?1:-1)),c=e.documentTop;if(h)null==o&&(o=h.left-l.left),a=s<0?h.top:h.bottom;else{let t=e.viewState.lineBlockAt(r);null==o&&(o=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),a=(s<0?t.top:t.bottom)+c}let u=l.left+o,f=e.viewState.heightOracle.textHeight>>1,d=null!=n?n:f;for(let t=0;;t+=f){let n=a+(d+t)*s,r=rj(e,{x:u,y:n},!1,s);if(i?n>l.bottom:n<l.top)return tP.cursor(r.pos,r.assoc);let h=e.coordsAtPos(r.pos,r.assoc),c=h?(h.top+h.bottom)/2:0;if(!h||(i?c>a:c<a))return tP.cursor(r.pos,r.assoc,void 0,o)}}(this,e,t,i))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let i=rj(this,e,t);return i&&i.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),rj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.state.doc.lineAt(e),n=this.bidiSpans(i),r=n[nA.find(n,e-i.from,-1,t)];return this.docView.coordsAt(e,t,r.dir==nv.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nz)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>sN)return n_(e.length);let t=this.textDirectionAt(e.from),i;for(let n of this.bidiCache)if(n.from==e.from&&n.dir==t&&(n.fresh||function e(t,i){if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],s=i[n];if(r.from!=s.from||r.to!=s.to||r.direction!=s.direction||!e(r.inner,s.inner))return!1}return!0}(n.isolates,i=n4(this,e))))return n.order;i||(i=n4(this,e));let n=function(e,t,i){if(!e)return[new nA(0,0,+(t==nw))];if(t==ny&&!i.length&&!nP.test(e))return n_(e.length);if(i.length)for(;e.length>nC.length;)nC[nC.length]=256;let n=[],r=+(t!=ny);return function e(t,i,n,r,s,o,a){let l=i%2?2:1;!function(e,t,i,n,r){for(let s=0;s<=n.length;s++){let o=s?n[s-1].to:t,a=s<n.length?n[s].from:i,l=s?256:r;for(let t=o,i=l,n=l;t<a;t++){let r=n$(e.charCodeAt(t));512==r?r=i:8==r&&4==n&&(r=16),nC[t]=4==r?2:r,7&r&&(n=r),i=r}for(let e=o,t=l,n=l;e<a;e++){let r=nC[e];if(128==r)e<a-1&&t==nC[e+1]&&24&t?r=nC[e]=t:nC[e]=256;else if(64==r){let r=e+1;for(;r<a&&64==nC[r];)r++;let s=e&&8==t||r<i&&8==nC[r]?1==n?1:8:256;for(let t=e;t<r;t++)nC[t]=s;e=r-1}else 8==r&&1==n&&(nC[e]=1);t=r,7&r&&(n=r)}}}(t,s,o,r,l),function(e,t,i,n,r){let s=1==r?2:1;for(let o=0,a=0,l=0;o<=n.length;o++){let h=o?n[o-1].to:t,c=o<n.length?n[o].from:i;for(let t=h,i,n,o;t<c;t++)if(n=nk[i=e.charCodeAt(t)])if(n<0){for(let e=a-3;e>=0;e-=3)if(nQ[e+1]==-n){let i=nQ[e+2],n=2&i?r:4&i?1&i?s:r:0;n&&(nC[t]=nC[nQ[e]]=n),a=e;break}}else if(189==nQ.length)break;else nQ[a++]=t,nQ[a++]=i,nQ[a++]=l;else if(2==(o=nC[t])||1==o){let e=o==r;l=+!e;for(let t=a-3;t>=0;t-=3){let i=nQ[t+2];if(2&i)break;if(e)nQ[t+2]|=2;else{if(4&i)break;nQ[t+2]|=4}}}}}(t,s,o,r,l),function(e,t,i,n){for(let r=0,s=n;r<=i.length;r++){let o=r?i[r-1].to:e,a=r<i.length?i[r].from:t;for(let l=o;l<a;){let o=nC[l];if(256==o){let o=l+1;for(;;)if(o==a){if(r==i.length)break;o=i[r++].to,a=r<i.length?i[r].from:t}else if(256==nC[o])o++;else break;let h=1==s,c=h==((o<t?nC[o]:n)==1)?h?1:2:n;for(let t=o,n=r,s=n?i[n-1].to:e;t>l;)t==s&&(t=i[--n].from,s=n?i[n-1].to:e),nC[--t]=c;l=o}else s=o,l++}}}(s,o,r,l),function t(i,n,r,s,o,a,l){let h=s%2?2:1;if(s%2==o%2)for(let c=n,u=0;c<r;){let n=!0,f=!1;if(u==a.length||c<a[u].from){let e=nC[c];e!=h&&(n=!1,f=16==e)}let d=n||1!=h?null:[],p=n?s:s+1,O=c;s:for(;;)if(u<a.length&&O==a[u].from){if(f)break;let t=a[u];if(!n)for(let e=t.to,i=u+1;;){if(e==r)break s;if(i<a.length&&a[i].from==e)e=a[i++].to;else if(nC[e]==h)break s;else break}u++,d?d.push(t):(t.from>c&&l.push(new nA(c,t.from,p)),e(i,t.direction==ny!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,l),c=t.to),O=t.to}else if(O==r||(n?nC[O]!=h:nC[O]==h))break;else O++;d?t(i,c,O,s+1,o,d,l):c<O&&l.push(new nA(c,O,p)),c=O}else for(let c=r,u=a.length;c>n;){let r=!0,f=!1;if(!u||c>a[u-1].to){let e=nC[c-1];e!=h&&(r=!1,f=16==e)}let d=r||1!=h?null:[],p=r?s:s+1,O=c;s:for(;;)if(u&&O==a[u-1].to){if(f)break;let t=a[--u];if(!r)for(let e=t.from,i=u;;){if(e==n)break s;if(i&&a[i-1].to==e)e=a[--i].from;else if(nC[e-1]==h)break s;else break}d?d.push(t):(t.to<c&&l.push(new nA(t.to,c,p)),e(i,t.direction==ny!=!(p%2)?s+1:s,o,t.inner,t.from,t.to,l),c=t.from),O=t.from}else if(O==n||(r?nC[O-1]!=h:nC[O-1]==h))break;else O--;d?t(i,O,c,s+1,o,d,l):O<c&&l.push(new nA(O,c,p)),c=O}}(t,s,o,i,n,r,a)}(e,r,r,i,0,e.length,n),n}(e.text,t,i);return this.bidiCache.push(new sG(e.from,e.to,t,i,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||iD.safari&&(null==(e=this.inputState)?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{nu(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var i,n,r,s;return nD.of(new nW("number"==typeof e?tP.cursor(e):e,null!=(i=t.y)?i:"nearest",null!=(n=t.x)?n:"nearest",null!=(r=t.yMargin)?r:5,null!=(s=t.xMargin)?s:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return nD.of(new nW(tP.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return nK.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return nK.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=iQ.newName(),n=[sM.of(i),n9.of(sB(`.${i}`,e))];return t&&t.dark&&n.push(sZ.of(!0)),n}static baseTheme(e){return tB.lowest(n9.of(sB("."+sR,e,sj)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&rn.get(i)||rn.get(e);return(null==(t=null==n?void 0:n.root)?void 0:t.view)||null}}sq.styleModule=n9,sq.inputHandler=nj,sq.clipboardInputFilter=nL,sq.clipboardOutputFilter=nI,sq.scrollHandler=nV,sq.focusChangeEffect=nB,sq.perLineTextDirection=nz,sq.exceptionSink=nX,sq.updateListener=nE,sq.editable=nU,sq.mouseSelectionStyle=nR,sq.dragMovesSelection=nZ,sq.clickAddsSelectionRange=nM,sq.decorations=n1,sq.blockWrappers=n2,sq.outerDecorations=n5,sq.atomicRanges=n3,sq.bidiIsolatedRanges=n6,sq.cursorScrollMargin=t_.define({combine:e=>{let t=5,i=5;for(let n of e)"number"==typeof n?t=i=n:{x:t,y:i}=n;return{x:t,y:i}}}),sq.scrollMargins=n8,sq.darkTheme=sZ,sq.cspNonce=t_.define({combine:e=>e.length?e[0]:""}),sq.contentAttributes=n0,sq.editorAttributes=nJ,sq.lineWrapping=sq.contentAttributes.of({class:"cm-lineWrapping"}),sq.announce=t1.define();let sN=4096,sU={};class sG{constructor(e,t,i,n,r,s){this.from=e,this.to=t,this.dir=i,this.isolates=n,this.fresh=r,this.order=s}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let i=[],n=e.length?e[e.length-1].dir:nv.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let s=e[r];s.dir!=n||t.touchesRange(s.from,s.to)||i.push(new sG(t.mapPos(s.from,1),t.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return i}}function sF(e,t,i){for(let n=e.state.facet(t),r=n.length-1;r>=0;r--){let t=n[r],s="function"==typeof t?t(e):t;s&&iq(s,i)}return i}let sK=iD.mac?"mac":iD.windows?"win":iD.linux?"linux":"key";function sH(e,t,i){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==i&&t.shiftKey&&(e="Shift-"+e),e}let sJ=tB.default(sq.domEventHandlers({keydown:(e,t)=>s4(s2(t.state),e,t,"editor")})),s0=t_.define({enables:sJ}),s1=new WeakMap;function s2(e){let t=e.facet(s0),i=s1.get(t);return i||s1.set(t,i=function(e,t=sK){let i=Object.create(null),n=Object.create(null),r=(e,t)=>{let i=n[e];if(null==i)n[e]=t;else if(i!=t)throw Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},s=(e,n,s,o,a)=>{var l,h;let c=i[e]||(i[e]=Object.create(null)),u=n.split(/ (?!$)/).map(e=>(function(e,t){let i,n,r,s,o=e.split(/-(?!$)/),a=o[o.length-1];"Space"==a&&(a=" ");for(let e=0;e<o.length-1;++e){let a=o[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))i=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))r=!0;else if(/^mod$/i.test(a))"mac"==t?s=!0:n=!0;else throw Error("Unrecognized modifier name: "+a)}return i&&(a="Alt-"+a),n&&(a="Ctrl-"+a),s&&(a="Meta-"+a),r&&(a="Shift-"+a),a})(e,t));for(let t=1;t<u.length;t++){let i=u.slice(0,t).join(" ");r(i,!0),c[i]||(c[i]={preventDefault:!0,stopPropagation:!1,run:[t=>{let n=s3={view:t,prefix:i,scope:e};return setTimeout(()=>{s3==n&&(s3=null)},4e3),!0}]})}let f=u.join(" ");r(f,!1);let d=c[f]||(c[f]={preventDefault:!1,stopPropagation:!1,run:(null==(h=null==(l=c._any)?void 0:l.run)?void 0:h.slice())||[]});s&&d.run.push(s),o&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let n of e){let e=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let t of e){let e=i[t]||(i[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:r}=n;for(let t in e)e[t].run.push(e=>r(e,s6))}let r=n[t]||n.key;if(r)for(let t of e)s(t,r,n.run,n.preventDefault,n.stopPropagation),n.shift&&s(t,"Shift-"+r,n.shift,n.preventDefault,n.stopPropagation)}return i}(t.reduce((e,t)=>e.concat(t),[]))),i}function s5(e,t,i){return s4(s2(e.state),t,e,i)}let s3=null,s6=null;function s4(e,t,i,n){var r;s6=t;let s=("Esc"==(r=!(i_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iT&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?iC:iA)[t.keyCode]||t.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),o=tO(td(s,0))==s.length&&" "!=s,a="",l=!1,h=!1,c=!1;s3&&s3.view==i&&s3.scope==n&&(a=s3.prefix+" ",0>rF.indexOf(t.keyCode)&&(h=!0,s3=null));let u=new Set,f=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(i)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),h=!0)}return!1},d=e[n],p,O;return d&&(f(d[a+sH(s,t,!o)])?l=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(iD.windows&&t.ctrlKey&&t.altKey)&&!(iD.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=iA[t.keyCode])&&p!=s?f(d[a+sH(p,t,!0)])?l=!0:t.shiftKey&&(O=iC[t.keyCode])!=s&&O!=p&&f(d[a+sH(O,t,!1)])&&(l=!0):o&&t.shiftKey&&f(d[a+sH(s,t,!0)])&&(l=!0),!l&&f(d._any)&&(l=!0)),h&&(l=!0),l&&c&&t.stopPropagation(),s6=null,l}class s8{constructor(e,t,i,n,r){this.className=e,this.left=t,this.top=i,this.width=n,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(!i.empty)return function(e,t,i){if(i.to<=e.viewport.from||i.from>=e.viewport.to)return[];let n=Math.max(i.from,e.viewport.from),r=Math.min(i.to,e.viewport.to),s=e.textDirection==nv.LTR,o=e.contentDOM,a=o.getBoundingClientRect(),l=s7(e),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),u=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=a.right-(c?parseInt(c.paddingRight):0),d=rT(e,n,1),p=rT(e,r,-1),O=d.type==iK.Text?d:null,g=p.type==iK.Text?p:null;if(O&&(e.lineWrapping||d.widgetLineBreaks)&&(O=s9(e,n,1,O)),g&&(e.lineWrapping||p.widgetLineBreaks)&&(g=s9(e,r,-1,g)),O&&g&&O.from==g.from&&O.to==g.to)return v(y(i.from,i.to,O));{let t=O?y(i.from,null,O):w(d,!1),n=g?y(null,i.to,g):w(p,!0),r=[];return(O||d).to<(g||p).from-(O&&g?1:0)||d.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<n.top?r.push(m(u,t.bottom,f,n.top)):t.bottom<n.top&&e.elementAtHeight((t.bottom+n.top)/2).type==iK.Text&&(t.bottom=n.top=(t.bottom+n.top)/2),v(t).concat(r).concat(v(n))}function m(e,i,n,r){return new s8(t,e-l.left,i-l.top,Math.max(0,n-e),r-i)}function v({top:e,bottom:t,horizontal:i}){let n=[];for(let r=0;r<i.length;r+=2)n.push(m(i[r],e,i[r+1],t));return n}function y(t,i,n){let r=1e9,o=-1e9,a=[];function l(t,i,l,h,c){let d=e.coordsAtPos(t,t==n.to?-2:2),p=e.coordsAtPos(l,l==n.from?2:-2);d&&p&&(r=Math.min(d.top,p.top,r),o=Math.max(d.bottom,p.bottom,o),c==nv.LTR?a.push(s&&i?u:d.left,s&&h?f:p.right):a.push(!s&&h?u:p.left,!s&&i?f:d.right))}let h=null!=t?t:n.from,c=null!=i?i:n.to;for(let n of e.visibleRanges)if(n.to>h&&n.from<c)for(let r=Math.max(n.from,h),s=Math.min(n.to,c);;){let n=e.state.doc.lineAt(r);for(let o of e.bidiSpans(n)){let e=o.from+n.from,a=o.to+n.from;if(e>=s)break;a>r&&l(Math.max(e,r),null==t&&e<=h,Math.min(a,s),null==i&&a>=c,o.dir)}if((r=n.to+1)>=s)break}return 0==a.length&&l(h,null==t,c,null==i,e.textDirection),{top:r,bottom:o,horizontal:a}}function w(e,t){let i=a.top+(t?e.top:e.bottom);return{top:i,bottom:i,horizontal:[]}}}(e,t,i);{let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let r=s7(e);return[new s8(t,n.left-r.left,n.top-r.top,null,n.bottom-n.top)]}}}function s7(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==nv.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function s9(e,t,i,n){let r=e.coordsAtPos(t,2*i);if(!r)return n;let s=e.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,a=e.posAtCoords({x:s.left+1,y:o}),l=e.posAtCoords({x:s.right-1,y:o});return null==a||null==l?n:{from:Math.max(n.from,Math.min(a,l)),to:Math.min(n.to,Math.max(a,l))}}class oe{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ot)!=e.state.facet(ot)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(ot);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{var i;return i=this.drawn[t],!(e.constructor==i.constructor&&e.eq(i))})){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,iD.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let ot=t_.define();function oi(e){return[nK.define(t=>new oe(t,e)),ot.of(e)]}let on=t_.define({combine:e=>ie(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function or(e){return e.startState.facet(on)!=e.state.facet(on)}let os=oi({above:!0,markers(e){let{state:t}=e,i=t.facet(on),n=[];for(let r of t.selection.ranges){let s=r==t.selection.main;if(r.empty||i.drawRangeCursor&&!(s&&iD.ios&&i.iosSelectionHandles)){let t=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=r.empty?r:tP.cursor(r.head,r.assoc);for(let r of s8.forRange(e,t,i))n.push(r)}}return n},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let i=or(e);return i&&oo(e.state,t),e.docChanged||e.selectionSet||i},mount(e,t){oo(t.state,e)},class:"cm-cursorLayer"});function oo(e,t){t.style.animationDuration=e.facet(on).cursorBlinkRate+"ms"}let oa=oi({above:!1,markers(e){let t=[],{main:i,ranges:n}=e.state.selection;for(let i of n)if(!i.empty)for(let n of s8.forRange(e,"cm-selectionBackground",i))t.push(n);if(iD.ios&&!i.empty&&e.state.facet(on).iosSelectionHandles){for(let n of s8.forRange(e,"cm-selectionHandle cm-selectionHandle-start",tP.cursor(i.from,1)))t.push(n);for(let n of s8.forRange(e,"cm-selectionHandle cm-selectionHandle-end",tP.cursor(i.to,1)))t.push(n)}return t},update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||or(e),class:"cm-selectionLayer"}),ol=iD.gecko&&153==iD.gecko_version?"#ffffff01":"transparent",oh=tB.highest(sq.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${ol} !important`},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));/x/.unicode;let oc="-10000px";class ou{constructor(e,t,i,n){this.facet=t,this.createTooltipView=i,this.removeTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let r=null;this.tooltipViews=this.tooltips.map(e=>r=i(e,r))}update(e,t){var i;let n=e.state.facet(this.facet),r=n.filter(e=>e);if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let s=[],o=t?[]:null;for(let i=0;i<r.length;i++){let n=r[i],a=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(a=e)}if(a<0)s[i]=this.createTooltipView(n,i?s[i-1]:null),o&&(o[i]=!!n.above);else{let n=s[i]=this.tooltipViews[a];o&&(o[i]=t[a]),n.update&&n.update(e)}}}for(let e of this.tooltipViews)0>s.indexOf(e)&&(this.removeTooltipView(e),null==(i=e.destroy)||i.call(e));return t&&(o.forEach((e,i)=>t[i]=e),t.length=o.length),this.input=n,this.tooltips=r,this.tooltipViews=s,!0}}function of(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}let od=t_.define({combine:e=>{var t,i,n;return{position:iD.ios?"absolute":(null==(t=e.find(e=>e.position))?void 0:t.position)||"fixed",parent:(null==(i=e.find(e=>e.parent))?void 0:i.parent)||null,tooltipSpace:(null==(n=e.find(e=>e.tooltipSpace))?void 0:n.tooltipSpace)||of}}}),op=new WeakMap,oO=nK.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(od);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new ou(e,oy,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let e of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(e.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let i=t||e.geometryChanged,n=e.state.facet(od);if(n.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=n.position,this.manager.tooltipViews))e.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(e.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(e,t){let i=e.create(this.view),n=t?t.dom:null;if(i.dom.classList.add("cm-tooltip"),e.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",i.dom.appendChild(e)}return i.dom.style.position=this.position,i.dom.style.top=oc,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var e,t,i;for(let t of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))t.dom.remove(),null==(e=t.destroy)||e.call(t);this.parent&&this.container.remove(),null==(t=this.resizeObserver)||t.disconnect(),null==(i=this.intersectionObserver)||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(iD.safari){let t=e.getBoundingClientRect();i=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else i=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(i||"absolute"==this.position)if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),r=n7(this.view);return{visible:{left:n.left+r.left,top:n.top+r.top,right:n.right-r.right,bottom:n.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(od).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(e){var t;if(e.makeAbsolute)for(let e of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))e.dom.style.position="absolute";let{visible:i,space:n,scaleX:r,scaleY:s}=e,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:c}=h,u=e.pos[a],f=e.size[a];if(!u||!1!==l.clip&&(u.bottom<=Math.max(i.top,n.top)||u.top>=Math.min(i.bottom,n.bottom)||u.right<Math.max(i.left,n.left)-.1||u.left>Math.min(i.right,n.right)+.1)){c.style.top=oc;continue}let d=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=7*!!d,O=f.right-f.left,g=null!=(t=op.get(h))?t:f.bottom-f.top,m=h.offset||ov,v=this.view.textDirection==nv.LTR,y=f.width>n.right-n.left?v?n.left:n.right-f.width:v?Math.max(n.left,Math.min(u.left-14*!!d+m.x,n.right-O)):Math.min(Math.max(n.left,u.left-O+14*!!d-m.x),n.right-O),w=this.above[a];!l.strictSide&&(w?u.top-g-p-m.y<n.top:u.bottom+g+p+m.y>n.bottom)&&w==n.bottom-u.bottom>u.top-n.top&&(w=this.above[a]=!w);let b=(w?u.top-n.top:n.bottom-u.bottom)-p;if(b<g&&!1!==h.resize){if(b<this.view.defaultLineHeight){c.style.top=oc;continue}op.set(h,g),c.style.height=(g=b)/s+"px"}else c.style.height&&(c.style.height="");let x=w?u.top-g-p-m.y:u.bottom+p+m.y,S=y+O;if(!0!==h.overlap)for(let e of o)e.left<S&&e.right>y&&e.top<x+g&&e.bottom>x&&(x=w?e.top-g-2-p:e.bottom+p+2);if("absolute"==this.position?(c.style.top=(x-e.parent.top)/s+"px",og(c,(y-e.parent.left)/r)):(c.style.top=x/s+"px",og(c,y/r)),d){let e=u.left+(v?m.x:-m.x)-(y+14-7);d.style.left=e/r+"px"}!0!==h.overlap&&o.push({left:y,top:x,right:S,bottom:x+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView)&&(this.inView=this.view.inView,!this.inView))for(let e of this.manager.tooltipViews)e.dom.style.top=oc}},{eventObservers:{scroll(){this.maybeMeasure()}}});function og(e,t){let i=parseInt(e.style.left,10);(isNaN(i)||Math.abs(t-i)>1)&&(e.style.left=t+"px")}let om=sq.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ov={x:0,y:0},oy=t_.define({enables:[oO,om]}),ow=t_.define({combine(e){let t,i;for(let n of e)t=t||n.topContainer,i=i||n.bottomContainer;return{topContainer:t,bottomContainer:i}}}),ob=nK.fromClass(class{constructor(e){this.input=e.state.facet(ok),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(ow);for(let i of(this.top=new ox(e,!0,t.topContainer),this.bottom=new ox(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top)),this.panels))i.dom.classList.add("cm-panel"),i.mount&&i.mount()}update(e){let t=e.state.facet(ow);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new ox(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new ox(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=e.state.facet(ok);if(i!=this.input){let t=i.filter(e=>e),n=[],r=[],s=[],o=[];for(let i of t){let t=this.specs.indexOf(i),a;t<0?(a=i(e.view),o.push(a)):(a=this.panels[t]).update&&a.update(e),n.push(a),(a.top?r:s).push(a)}for(let e of(this.specs=t,this.panels=n,this.top.sync(r),this.bottom.sync(s),o))e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>sq.scrollMargins.of(t=>{let i=t.plugin(e);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}})});class ox{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&0>e.indexOf(t)&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=oS(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=oS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function oS(e){let t=e.nextSibling;return e.remove(),t}let ok=t_.define({enables:ob});class oQ extends it{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}oQ.prototype.elementClass="",oQ.prototype.toDOM=void 0,oQ.prototype.mapMode=tm.TrackBefore,oQ.prototype.startSide=oQ.prototype.endSide=-1,oQ.prototype.point=!0;let o$=t_.define(),oP=t_.define(),oA={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>ia.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},oC=t_.define(),o_=t_.define({combine:e=>e.some(e=>e)});function oT(e){let t=[oM];return e&&!1===e.fixed&&t.push(o_.of(!0)),t}let oM=nK.fromClass(class{constructor(e){for(let t of(this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(oC).map(t=>new oE(e,t)),this.fixed=!e.state.facet(o_),this.gutters))"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,i=e.view.viewport,n=Math.min(t.to,i.to)-Math.max(t.from,i.from);this.syncGutters(n<(i.to-i.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(o_)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let i=ia.iter(this.view.state.facet(o$),this.view.viewport.from),n=[],r=this.gutters.map(e=>new oX(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(e.type)){let t=!0;for(let s of e.type)if(s.type==iK.Text&&t){for(let e of(oR(i,n,s.from),r))e.line(this.view,s,n);t=!1}else if(s.widget)for(let e of r)e.widget(this.view,s)}else if(e.type==iK.Text)for(let t of(oR(i,n,e.from),r))t.line(this.view,e,n);else if(e.widget)for(let t of r)t.widget(this.view,e);for(let e of r)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(oC),i=e.state.facet(oC),n=e.docChanged||e.heightChanged||e.viewportChanged||!ia.eq(e.startState.facet(o$),e.state.facet(o$),e.view.viewport.from,e.view.viewport.to);if(t==i)for(let t of this.gutters)t.update(e)&&(n=!0);else{n=!0;let r=[];for(let n of i){let i=t.indexOf(n);i<0?r.push(new oE(this.view,n)):(this.gutters[i].update(e),r.push(this.gutters[i]))}for(let e of this.gutters)e.dom.remove(),0>r.indexOf(e)&&e.destroy();for(let e of r)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=r}return n}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>sq.scrollMargins.of(t=>{let i=t.plugin(e);if(!i||0==i.gutters.length||!i.fixed)return null;let n=i.dom.offsetWidth*t.scaleX,r=i.domAfter?i.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==nv.LTR?{left:n,right:r}:{right:n,left:r}})});function oZ(e){return Array.isArray(e)?e:[e]}function oR(e,t,i){for(;e.value&&e.from<=i;)e.from==i&&t.push(e.value),e.next()}class oX{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=ia.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:n}=this,r=(t.top-this.height)/e.scaleY,s=t.height/e.scaleY;if(this.i==n.elements.length){let t=new oj(e,s,r,i);n.elements.push(t),n.dom.appendChild(t.dom)}else n.elements[this.i].update(e,s,r,i);this.height=t.bottom,this.i++}line(e,t,i){let n=[];oR(this.cursor,n,t.from),i.length&&(n=n.concat(i));let r=this.gutter.config.lineMarker(e,t,n);r&&n.unshift(r);let s=this.gutter;(0!=n.length||s.config.renderEmptyElements)&&this.addElement(e,t,n)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),n=i?[i]:null;for(let i of e.state.facet(oP)){let r=i(e,t.widget,t);r&&(n||(n=[])).push(r)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class oE{constructor(e,t){for(let i in this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),t.domEventHandlers)this.dom.addEventListener(i,n=>{let r=n.target,s;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let e=r.getBoundingClientRect();s=(e.top+e.bottom)/2}else s=n.clientY;let o=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[i](e,o,n)&&n.preventDefault()});this.markers=oZ(t.markers(e)),t.initialSpacer&&(this.spacer=new oj(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=oZ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let i=e.view.viewport;return!ia.eq(this.markers,t,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class oj{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),!function(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].compare(t[i]))return!1;return!0}(this.markers,n)&&this.setMarkers(e,n)}setMarkers(e,t){let i="cm-gutterElement",n=this.dom.firstChild;for(let r=0,s=0;;){let o=s,a=r<t.length?t[r++]:null,l=!1;if(a){let e=a.elementClass;e&&(i+=" "+e);for(let e=s;e<this.markers.length;e++)if(this.markers[e].compare(a)){o=e,l=!0;break}}else o=this.markers.length;for(;s<o;){let e=this.markers[s++];if(e.toDOM){e.destroy(n);let t=n.nextSibling;n.remove(),n=t}}if(!a)break;a.toDOM&&(l?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),l&&s++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}}let oB=t_.define(),oL=t_.define(),oI=t_.define({combine:e=>ie(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let e in t){let n=i[e],r=t[e];i[e]=n?(e,t,i)=>n(e,t,i)||r(e,t,i):r}return i}})});class oz extends oQ{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function oY(e,t){return e.state.facet(oI).formatNumber(t,e.state)}let oV=oC.compute([oI],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(oB),lineMarker:(e,t,i)=>i.some(e=>e.toDOM)?null:new oz(oY(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,i)=>{for(let n of e.state.facet(oL)){let r=n(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(oI)!=e.state.facet(oI),initialSpacer:e=>new oz(oY(e,oW(e.state.doc.lines))),updateSpacer(e,t){let i=oY(t.view,oW(t.view.state.doc.lines));return i==e.number?e:new oz(i)},domEventHandlers:e.facet(oI).domEventHandlers,side:"before"}));function oW(e){let t=9;for(;t<e;)t=10*t+9;return t}let oD=0;class oq{constructor(e,t){this.from=e,this.to=t}}class oN{constructor(e={}){this.id=oD++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=oF.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}oN.closedBy=new oN({deserialize:e=>e.split(" ")}),oN.openedBy=new oN({deserialize:e=>e.split(" ")}),oN.group=new oN({deserialize:e=>e.split(" ")}),oN.isolate=new oN({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),oN.contextHash=new oN({perNode:!0}),oN.lookAhead=new oN({perNode:!0}),oN.mounted=new oN({perNode:!0});class oU{constructor(e,t,i,n=!1){this.tree=e,this.overlay=t,this.parser=i,this.bracketed=n}static get(e){return e&&e.props&&e.props[oN.mounted.id]}}let oG=Object.create(null);class oF{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):oG,i=!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),n=new oF(e.name||"",t,e.id,i);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(oN.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(oN.group),n=-1;n<(i?i.length:0);n++){let r=t[n<0?e.name:i[n]];if(r)return r}}}}oF.none=new oF("",Object.create(null),0,8);class oK{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let n=null;for(let t of e){let e=t(i);if(e){n||(n=Object.assign({},i.props));let t=e[1],r=e[0];r.combine&&r.id in n&&(t=r.combine(n[r.id],t)),n[r.id]=t}}t.push(n?new oF(i.name,n,i.id,i.flags):i)}return new oK(t)}}let oH=new WeakMap,oJ=new WeakMap;(u=Q||(Q={}))[u.ExcludeBuffers=1]="ExcludeBuffers",u[u.IncludeAnonymous=2]="IncludeAnonymous",u[u.IgnoreMounts=4]="IgnoreMounts",u[u.IgnoreOverlays=8]="IgnoreOverlays",u[u.EnterBracketed=16]="EnterBracketed";class o0{constructor(e,t,i,n,r){if(this.type=e,this.children=t,this.positions=i,this.length=n,this.props=null,r&&r.length)for(let[e,t]of(this.props=Object.create(null),r))this.props["number"==typeof e?e:e.id]=t}toString(){let e=oU.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let i=e.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new an(this.topNode,e)}cursorAt(e,t=0,i=0){let n=new an(oH.get(this)||this.topNode);return n.moveTo(e,t),oH.set(this,n._tree),n}get topNode(){return new o4(this,0,0,null)}resolve(e,t=0){let i=o3(oH.get(this)||this.topNode,e,t,!1);return oH.set(this,i),i}resolveInner(e,t=0){let i=o3(oJ.get(this)||this.topNode,e,t,!0);return oJ.set(this,i),i}resolveStack(e,t=0){return function(e,t,i){let n=e.resolveInner(t,i),r=null;for(let e=n instanceof o4?n:n.context.parent;e;e=e.parent)if(e.index<0){let s=e.parent;(r||(r=[n])).push(s.resolve(t,i)),e=s}else{let s=oU.get(e.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let o=new o4(s.tree,s.overlay[0].from+e.from,-1,e);(r||(r=[n])).push(o3(o,t,i,!1))}}return r?at(r):n}(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:r=this.length}=e,s=e.mode||0,o=(s&Q.IncludeAnonymous)>0;for(let e=this.cursor(s|Q.IncludeAnonymous);;){let s=!1;if(e.from<=r&&e.to>=n&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;s=!0}for(;s&&i&&(o||!e.type.isAnonymous)&&i(e),!e.nextSibling();){if(!e.parent())return;s=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:aa(oF.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,i)=>new o0(this.type,e,t,i,this.propValues),e.makeTree||((e,t,i)=>new o0(oF.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:n,maxBufferLength:r=1024,reused:s=[],minRepeatType:o=n.types.length}=e,a=Array.isArray(i)?new o1(i,i.length):i,l=n.types,h=0,c=0;function u(e,t,i,r,s,o,a,l,h){let c=[],u=[];for(;e.length>r;)c.push(e.pop()),u.push(t.pop()+i-s);e.push(f(n.types[a],c,u,o-s,l-o,h)),t.push(s-i)}function f(e,t,i,n,r,s,o){if(s){let e=[oN.contextHash,s];o=o?[e].concat(o):[e]}if(r>25){let e=[oN.lookAhead,r];o=o?[e].concat(o):[e]}return new o0(e,t,i,n,o)}let d=[],p=[];for(;a.pos>0;)!function e(t,i,d,p,O,g){let{id:m,start:v,end:y,size:w}=a,b=c,x=h;if(w<0){if(a.next(),-1==w){let e=s[m];d.push(e),p.push(v-t);return}if(-3==w){h=m;return}if(-4==w){c=m;return}else throw RangeError(`Unrecognized record size: ${w}`)}let S=l[m],k,Q,$=v-t;if(y-v<=r&&(Q=function(e,t){let i=a.fork(),n=0,s=0,l=0,h=i.end-r,c={size:0,start:0,skip:0};o:for(let r=i.pos-e;i.pos>r;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=s,c.skip=l,l+=4,n+=4,i.next();continue}let a=i.pos-e;if(e<0||a<r||i.start<h)break;let u=4*(i.id>=o),f=i.start;for(i.next();i.pos>a;){if(i.size<0)if(-3==i.size||-4==i.size)u+=4;else break o;else i.id>=o&&(u+=4);i.next()}s=f,n+=e,l+=u}return(t<0||n==e)&&(c.size=n,c.start=s,c.skip=l),c.size>4?c:void 0}(a.pos-i,O))){let e=new Uint16Array(Q.size-Q.skip),i=a.pos-Q.size,r=e.length;for(;a.pos>i;)r=function e(t,i,n){let{id:r,start:s,end:l,size:u}=a;if(a.next(),u>=0&&r<o){let o=n;if(u>4){let r=a.pos-(u-4);for(;a.pos>r;)n=e(t,i,n)}i[--n]=o,i[--n]=l-t,i[--n]=s-t,i[--n]=r}else -3==u?h=r:-4==u&&(c=r);return n}(Q.start,e,r);k=new o2(e,y-Q.start,n),$=Q.start-t}else{let t=a.pos-w;a.next();let i=[],s=[],l=m>=o?m:-1,h=0,c=y;for(;a.pos>t;)l>=0&&a.id==l&&a.size>=0?(a.end<=c-r&&(u(i,s,v,h,a.end,c,l,b,x),h=i.length,c=a.end),a.next()):g>2500?function(e,t,i,s){let o=[],l=0,h=-1;for(;a.pos>t;){let{id:e,start:t,end:i,size:n}=a;if(n>4)a.next();else if(h>-1&&t<h)break;else h<0&&(h=i-r),o.push(e,t,i),l++,a.next()}if(l){let t=new Uint16Array(4*l),r=o[o.length-2];for(let e=o.length-3,i=0;e>=0;e-=3)t[i++]=o[e],t[i++]=o[e+1]-r,t[i++]=o[e+2]-r,t[i++]=i;i.push(new o2(t,o[2]-r,n)),s.push(r-e)}}(v,t,i,s):e(v,t,i,s,l,g+1);if(l>=0&&h>0&&h<i.length&&u(i,s,v,h,v,c,l,b,x),i.reverse(),s.reverse(),l>-1&&h>0){let e=function(e,t){return(i,n,r)=>{let s=0,o=i.length-1,a,l;if(o>=0&&(a=i[o])instanceof o0){if(!o&&a.type==e&&a.length==r)return a;(l=a.prop(oN.lookAhead))&&(s=n[o]+a.length+l)}return f(e,i,n,r,s,t)}}(S,x);k=aa(S,i,s,0,i.length,0,y-v,e,e)}else k=f(S,i,s,y-v,b-y,x)}d.push(k),p.push($)}(e.start||0,e.bufferStart||0,d,p,-1,0);let O=null!=(t=e.length)?t:d.length?p[0]+d[0].length:0;return new o0(l[e.topID],d.reverse(),p.reverse(),O)}(e)}}o0.empty=new o0(oF.none,[],[],0);class o1{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new o1(this.buffer,this.index)}}class o2{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return oF.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],n=this.set.types[t],r=n.name;if(/\W/.test(r)&&!n.isError&&(r=JSON.stringify(r)),i==(e+=4))return r;let s=[];for(;e<i;)s.push(this.childString(e)),e=this.buffer[e+3];return r+"("+s.join(",")+")"}findChild(e,t,i,n,r){let{buffer:s}=this,o=-1;for(let a=e;a!=t&&(!o5(r,n,s[a+1],s[a+2])||(o=a,!(i>0)));a=s[a+3]);return o}slice(e,t,i){let n=this.buffer,r=new Uint16Array(t-e),s=0;for(let o=e,a=0;o<t;){r[a++]=n[o++],r[a++]=n[o++]-i;let t=r[a++]=n[o++]-i;r[a++]=n[o++]-e,s=Math.max(s,t)}return new o2(r,s,this.set)}}function o5(e,t,i,n){switch(e){case -2:return i<t;case -1:return n>=t&&i<t;case 0:return i<t&&n>t;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function o3(e,t,i,n){for(var r;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to<t);){let t=!n&&e instanceof o4&&e.index<0?null:e.parent;if(!t)return e;e=t}let s=n?0:Q.IgnoreOverlays;if(n)for(let n=e,o=n.parent;o;o=(n=o).parent)n instanceof o4&&n.index<0&&(null==(r=o.enter(t,i,s))?void 0:r.from)!=n.from&&(e=o);for(;;){let n=e.enter(t,i,s);if(!n)return e;e=n}}class o6{cursor(e=0){return new an(this,e)}getChild(e,t=null,i=null){let n=o8(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return o8(this,e,t,i)}resolve(e,t=0){return o3(this,e,t,!1)}resolveInner(e,t=0){return o3(this,e,t,!0)}matchContext(e){return o7(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(i=t,t=e.prevSibling):t=e}return i}get node(){return this}get next(){return this.parent}}class o4 extends o6{constructor(e,t,i,n){super(),this._tree=e,this.from=t,this.index=i,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,n,r=0){for(let s=this;;){for(let{children:o,positions:a}=s._tree,l=t>0?o.length:-1;e!=l;e+=t){let l=o[e],h=a[e]+s.from,c;if(r&Q.EnterBracketed&&l instanceof o0&&(c=oU.get(l))&&!c.overlay&&c.bracketed&&i>=h&&i<=h+l.length||o5(n,i,h,h+l.length)){if(l instanceof o2){if(r&Q.ExcludeBuffers)continue;let o=l.findChild(0,l.buffer.length,t,i-h,n);if(o>-1)return new ae(new o9(s,l,e,h),null,o)}else if(r&Q.IncludeAnonymous||!l.type.isAnonymous||ar(l)){let o;if(!(r&Q.IgnoreMounts)&&(o=oU.get(l))&&!o.overlay)return new o4(o.tree,h,e,s);let a=new o4(l,h,e,s);return r&Q.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,i,n,r)}}}if(r&Q.IncludeAnonymous||!s.type.isAnonymous||(e=s.index>=0?s.index+t:t<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,i=0){let n;if(!(i&Q.IgnoreOverlays)&&(n=oU.get(this._tree))&&n.overlay){let r=e-this.from,s=i&Q.EnterBracketed&&n.bracketed;for(let{from:e,to:i}of n.overlay)if((t>0||s?e<=r:e<r)&&(t<0||s?i>=r:i>r))return new o4(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function o8(e,t,i,n){let r=e.cursor(),s=[];if(!r.firstChild())return s;if(null!=i){for(let e=!1;!e;)if(e=r.type.is(i),!r.nextSibling())return s}for(;;){if(null!=n&&r.type.is(n))return s;if(r.type.is(t)&&s.push(r.node),!r.nextSibling())return null==n?s:[]}}function o7(e,t,i=t.length-1){for(let n=e;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class o9{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class ae extends o6{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new ae(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,i=0){if(i&Q.ExcludeBuffers)return null;let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new ae(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ae(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ae(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,r=i.buffer[this.index+3];if(r>n){let s=i.buffer[this.index+1];e.push(i.slice(n,r,s)),t.push(0)}return new o0(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function at(e){if(!e.length)return null;let t=0,i=e[0];for(let n=1;n<e.length;n++){let r=e[n];(r.from>i.from||r.to<i.to)&&(i=r,t=n)}let n=i instanceof o4&&i.index<0?null:i.parent,r=e.slice();return n?r[t]=n:r.splice(t,1),new ai(r,i)}class ai{constructor(e,t){this.heads=e,this.node=t}get next(){return at(this.heads)}}class an{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Q.EnterBracketed,e instanceof o4)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return!!e&&(e instanceof o4?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?!(i&Q.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Q.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Q.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let e=i<0?0:this.stack[i]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(e)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(n.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:i}=n)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let n=t+e,r=e<0?-1:i._tree.children.length;n!=r;n+=e){let e=i._tree.children[n];if(this.mode&Q.IncludeAnonymous||e instanceof o2||!e.type.isAnonymous||ar(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)o:for(let n=this.index,r=this.stack.length;r>=0;){for(let s=e;s;s=s._parent)if(s.index==n){if(n==this.index)return s;t=s,i=r+1;break o}n=this.stack[--r]}for(let e=i;e<this.stack.length;e++)t=new ae(this.buffer,t,this.stack[e]);return this.bufferNode=new ae(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let n=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(n=!0)}for(;;){if(n&&t&&t(this),n=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,n=!0}}}matchContext(e){if(!this.buffer)return o7(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let n=e.length-1,r=this.stack.length-1;n>=0;r--){if(r<0)return o7(this._tree,e,n);let s=i[t.buffer[this.stack[r]]];if(!s.isAnonymous){if(e[n]&&e[n]!=s.name)return!1;n--}}return!0}}function ar(e){return e.children.some(e=>e instanceof o2||!e.type.isAnonymous||ar(e))}let as=new WeakMap;function ao(e,t){if(!e.isAnonymous||t instanceof o2||t.type!=e)return 1;let i=as.get(t);if(null==i){for(let n of(i=1,t.children)){if(n.type!=e||!(n instanceof o0)){i=1;break}i+=ao(e,n)}as.set(t,i)}return i}function aa(e,t,i,n,r,s,o,a,l){let h=0;for(let i=n;i<r;i++)h+=ao(e,t[i]);let c=Math.ceil(1.5*h/8),u=[],f=[];return!function t(i,n,r,o,a){for(let h=r;h<o;){let r=h,d=n[h],p=ao(e,i[h]);for(h++;h<o;h++){let t=ao(e,i[h]);if(p+t>=c)break;p+=t}if(h==r+1){if(p>c){let e=i[r];t(e.children,e.positions,0,e.children.length,n[r]+a);continue}u.push(i[r])}else{let t=n[h-1]+i[h-1].length-d;u.push(aa(e,i,n,r,h,d,t,null,l))}f.push(d+a-s)}}(t,i,n,r,0),(a||l)(u,f,o)}class al{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let n=this.map.get(e);n||this.map.set(e,n=new Map),n.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ae?this.setBuffer(e.context.buffer,e.index,t):e instanceof o4&&this.map.set(e.tree,t)}get(e){return e instanceof ae?this.getBuffer(e.context.buffer,e.index):e instanceof o4?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ah{constructor(e,t,i,n,r=!1,s=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=!!r|2*!!s}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],i=!1){let n=[new ah(0,e.length,e,0,!1,i)];for(let i of t)i.to>e.length&&n.push(i);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],r=1,s=e.length?e[0]:null;for(let o=0,a=0,l=0;;o++){let h=o<t.length?t[o]:null,c=h?h.fromA:1e9;if(c-a>=i)for(;s&&s.from<c;){let t=s;if(a>=t.from||c<=t.to||l){let e=Math.max(t.from,a)-l,i=Math.min(t.to,c)-l;t=e>=i?null:new ah(e,i,t.tree,t.offset+l,o>0,!!h)}if(t&&n.push(t),s.to>c)break;s=r<e.length?e[r++]:null}if(!h)break;a=h.toA,l=h.toA-h.toB}return n}}class ac{startParse(e,t,i){return"string"==typeof e&&(e=new au(e)),i=i?i.length?i.map(e=>new oq(e.from,e.to)):[new oq(0,0)]:[new oq(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class au{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}class af{constructor(e,t,i,n,r,s){this.parser=e,this.parse=t,this.overlay=i,this.bracketed=n,this.target=r,this.from=s}}function ad(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class ap{constructor(e,t,i,n,r,s,o,a){this.parser=e,this.predicate=t,this.mounts=i,this.index=n,this.start=r,this.bracketed=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}let aO=new oN({perNode:!0});class ag{constructor(e,t,i,n,r){this.nest=t,this.input=i,this.fragments=n,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new o0(e.type,e.children,e.positions,e.length,e.propValues.concat([[aO,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[oN.mounted.id]=new oU(t,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new ay(this.fragments),t=null,i=null,n=new an(new o4(this.baseTree,this.ranges[0].from,0,null),Q.IncludeAnonymous|Q.IgnoreMounts);o:for(let r,s;;){let o=!0,a;if(null!=this.stoppedAt&&n.from>=this.stoppedAt)o=!1;else if(e.hasNode(n)){if(t){let e=t.mounts.find(e=>e.frag.from<=n.from&&e.frag.to>=n.to&&e.mount.overlay);if(e)for(let i of e.mount.overlay){let r=i.from+e.pos,s=i.to+e.pos;r>=n.from&&s<=n.to&&!t.ranges.some(e=>e.from<s&&e.to>r)&&t.ranges.push({from:r,to:s})}}o=!1}else if(i&&(s=function(e,t,i){for(let n of e){if(n.from>=i)break;if(n.to>t)return n.from<=t&&n.to>=i?2:1}return 0}(i.ranges,n.from,n.to)))o=2!=s;else if(!n.type.isAnonymous&&(r=this.nest(n,this.input))&&(n.from<n.to||!r.overlay)){!n.tree&&(function(e){let{node:t}=e,i=[],n=t.context.buffer;do i.push(e.index),e.parent();while(!e.tree)let r=e.tree,s=r.children.indexOf(n),o=r.children[s],a=o.buffer,l=[s];for(let n of(r.children[s]=function e(n,r,s,h,c,u){let f=i[u],d=[],p=[];am(o,n,f,d,p,h);let O=a[f+1],g=a[f+2];l.push(d.length);let m=u?e(f+4,a[f+3],o.set.types[a[f]],O,g-O,u-1):t.toTree();return d.push(m),p.push(O-h),am(o,a[f+3],r,d,p,h),new o0(s,d,p,c)}(0,a.length,oF.none,0,o.length,i.length-1),l)){let t=e.tree.children[n],i=e.tree.positions[n];e.yield(new o4(t,i+e.from,n,e._tree))}}(n),t&&t.depth++,i&&i.depth++);let s=e.findMounts(n.from,r.parser);if("function"==typeof r.overlay)t=new ap(r.parser,r.overlay,s,this.inner.length,n.from,!!r.bracketed,n.tree,t);else{let e=aw(this.ranges,r.overlay||(n.from<n.to?[new oq(n.from,n.to)]:[]));e.length&&ad(e),(e.length||!r.overlay)&&this.inner.push(new af(r.parser,e.length?r.parser.startParse(this.input,ab(s,e),e):r.parser.startParse(""),r.overlay?r.overlay.map(e=>new oq(e.from-n.from,e.to-n.from)):null,!!r.bracketed,n.tree,e.length?e[0].from:n.from)),r.overlay?e.length&&(i={ranges:e,depth:0,prev:i}):o=!1}}else if(t&&(a=t.predicate(n))&&(!0===a&&(a=new oq(n.from,n.to)),a.from<a.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==a.from?t.ranges[e]={from:t.ranges[e].from,to:a.to}:t.ranges.push(a)}if(o&&n.firstChild())t&&t.depth++,i&&i.depth++;else for(;!n.nextSibling();){if(!n.parent())break o;if(t&&!--t.depth){let e=aw(this.ranges,t.ranges);e.length&&(ad(e),this.inner.splice(t.index,0,new af(t.parser,t.parser.startParse(this.input,ab(t.mounts,e),e),t.ranges.map(e=>new oq(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}!i||--i.depth||(i=i.prev)}}}}function am(e,t,i,n,r,s){if(t<i){let o=e.buffer[t+1];n.push(e.slice(t,i,o)),r.push(o-s)}}class av{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Q.IncludeAnonymous|Q.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)if(t.to>=e&&t.enter(i,1,Q.IgnoreOverlays|Q.ExcludeBuffers));else if(t.to<=e)t.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&0==t.positions[0]&&t.children[0]instanceof o0)t=t.children[0];else break}return!1}}class ay{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=null!=(t=i.tree.prop(aO))?t:i.to,this.inner=new av(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!=(e=t.tree.prop(aO))?e:t.to,this.inner=new av(t.tree,-t.offset)}}findMounts(e,t){var i;let n=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let r=null==(i=e.tree)?void 0:i.prop(oN.mounted);if(r&&r.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let i=this.fragments[t];if(i.from>=e.to)break;i.tree==this.curFrag.tree&&n.push({frag:i,pos:e.from-i.offset,mount:r})}}}return n}}function aw(e,t){let i=null,n=t;for(let r=1,s=0;r<e.length;r++){let o=e[r-1].to,a=e[r].from;for(;s<n.length;s++){let e=n[s];if(e.from>=a)break;!(e.to<=o)&&(i||(n=i=t.slice()),e.from<o?(i[s]=new oq(e.from,o),e.to>a&&i.splice(s+1,0,new oq(a,e.to))):e.to>a?i[s--]=new oq(a,e.to):i.splice(s--,1))}}return n}function ab(e,t){let i=[];for(let{pos:n,mount:r,frag:s}of e){let e=n+(r.overlay?r.overlay[0].from:0),o=e+r.tree.length,a=Math.max(s.from,e),l=Math.min(s.to,o);if(r.overlay){let o=function(e,t,i,n){let r=0,s=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=r==e.length?1e9:o?e[r].to:e[r].from,u=s==t.length?1e9:a?t[s].to:t[s].from;if(o!=a){let e=Math.max(l,i),t=Math.min(c,u,n);e<t&&h.push(new oq(e,t))}if(1e9==(l=Math.min(c,u)))break;c==l&&(o?(o=!1,r++):o=!0),u==l&&(a?(a=!1,s++):a=!0)}return h}(t,r.overlay.map(e=>new oq(e.from+n,e.to+n)),a,l);for(let t=0,n=a;;t++){let a=t==o.length,h=a?l:o[t].from;if(h>n&&i.push(new ah(n,h,r.tree,-e,s.from>=n||s.openStart,s.to<=h||s.openEnd)),a)break;n=o[t].to}}else i.push(new ah(a,l,r.tree,-e,s.from>=e||s.openStart,s.to<=o||s.openEnd))}return i}let ax=0;class aS{constructor(e,t,i,n){this.name=e,this.set=t,this.base=i,this.modified=n,this.id=ax++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof aS&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let i=new aS("string"==typeof e?e:"?",[],null,[]);if(i.set.push(i),t)for(let e of t.set)i.set.push(e);return i}static defineModifier(e){let t=new aQ(e);return e=>e.modified.indexOf(t)>-1?e:aQ.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let ak=0;class aQ{constructor(e){this.name=e,this.instances=[],this.id=ak++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(i=>{var n,r;return i.base==e&&(n=t,r=i.modified,n.length==r.length&&n.every((e,t)=>e==r[t]))});if(i)return i;let n=[],r=new aS(e.name,n,e,t);for(let e of t)e.instances.push(r);let s=function(e){let t=[[]];for(let i=0;i<e.length;i++)for(let n=0,r=t.length;n<r;n++)t.push(t[n].concat(e[i]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of s)n.push(aQ.get(t,e));return r}}function a$(e){let t=Object.create(null);for(let i in e){let n=e[i];for(let e of(Array.isArray(n)||(n=[n]),i.split(" ")))if(e){let i=[],r=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){r=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!n)throw RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),(t+=n[0].length)==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){r=0;break}if("/"!=o)throw RangeError("Invalid path: "+e);s=e.slice(t)}let o=i.length-1,a=i[o];if(!a)throw RangeError("Invalid path: "+e);let l=new aA(n,r,o>0?i.slice(0,o):null);t[a]=l.sort(t[a])}}return aP.add(t)}let aP=new oN({combine(e,t){let i,n,r;for(;e||t;){if(!e||t&&e.depth>=t.depth?(r=t,t=t.next):(r=e,e=e.next),i&&i.mode==r.mode&&!r.context&&!i.context)continue;let s=new aA(r.tags,r.mode,r.context);i?i.next=s:n=s,i=s}return n}});class aA{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function aC(e,t){let i=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)i[e.id]=t.class;else i[t.tag.id]=t.class;let{scope:n,all:r=null}=t||{};return{style:e=>{let t=r;for(let n of e)for(let e of n.set){let n=i[e.id];if(n){t=t?t+" "+n:n;break}}return t},scope:n}}aA.empty=new aA([],2,null);class a_{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,r){let{type:s,from:o,to:a}=e;if(o>=i||a<=t)return;s.isTop&&(r=this.highlighters.filter(e=>!e.scope||e.scope(s)));let l=n,h=function(e){let t=e.type.prop(aP);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||aA.empty,c=function(e,t){let i=null;for(let n of e){let e=n.style(t);e&&(i=i?i+" "+e:e)}return i}(r,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(n+=(n?" ":"")+c)),this.startSpan(Math.max(t,o),l),h.opaque)return;let u=e.tree&&e.tree.prop(oN.mounted);if(u&&u.overlay){let s=e.node.enter(u.overlay[0].from+o,1),h=this.highlighters.filter(e=>!e.scope||e.scope(u.tree.type)),c=e.firstChild();for(let f=0,d=o;;f++){let p=f<u.overlay.length?u.overlay[f]:null,O=p?p.from+o:a,g=Math.max(t,d),m=Math.min(i,O);if(g<m&&c)for(;e.from<m&&(this.highlightRange(e,g,m,n,r),this.startSpan(Math.min(m,e.to),l),!(e.to>=O)&&e.nextSibling()););if(!p||O>i)break;(d=p.to+o)>t&&(this.highlightRange(s.cursor(),Math.max(t,p.from+o),Math.min(i,d),"",h),this.startSpan(Math.min(i,d),l))}c&&e.parent()}else if(e.firstChild()){u&&(n="");do{if(e.to<=t)continue;if(e.from>=i)break;this.highlightRange(e,t,i,n,r),this.startSpan(Math.min(i,e.to),l)}while(e.nextSibling())e.parent()}}}let aT=aS.define,aM=aT(),aZ=aT(),aR=aT(aZ),aX=aT(aZ),aE=aT(),aj=aT(aE),aB=aT(aE),aL=aT(),aI=aT(aL),az=aT(),aY=aT(),aV=aT(),aW=aT(aV),aD=aT(),aq={comment:aM,lineComment:aT(aM),blockComment:aT(aM),docComment:aT(aM),name:aZ,variableName:aT(aZ),typeName:aR,tagName:aT(aR),propertyName:aX,attributeName:aT(aX),className:aT(aZ),labelName:aT(aZ),namespace:aT(aZ),macroName:aT(aZ),literal:aE,string:aj,docString:aT(aj),character:aT(aj),attributeValue:aT(aj),number:aB,integer:aT(aB),float:aT(aB),bool:aT(aE),regexp:aT(aE),escape:aT(aE),color:aT(aE),url:aT(aE),keyword:az,self:aT(az),null:aT(az),atom:aT(az),unit:aT(az),modifier:aT(az),operatorKeyword:aT(az),controlKeyword:aT(az),definitionKeyword:aT(az),moduleKeyword:aT(az),operator:aY,derefOperator:aT(aY),arithmeticOperator:aT(aY),logicOperator:aT(aY),bitwiseOperator:aT(aY),compareOperator:aT(aY),updateOperator:aT(aY),definitionOperator:aT(aY),typeOperator:aT(aY),controlOperator:aT(aY),punctuation:aV,separator:aT(aV),bracket:aW,angleBracket:aT(aW),squareBracket:aT(aW),paren:aT(aW),brace:aT(aW),content:aL,heading:aI,heading1:aT(aI),heading2:aT(aI),heading3:aT(aI),heading4:aT(aI),heading5:aT(aI),heading6:aT(aI),contentSeparator:aT(aL),list:aT(aL),quote:aT(aL),emphasis:aT(aL),strong:aT(aL),link:aT(aL),monospace:aT(aL),strikethrough:aT(aL),inserted:aT(),deleted:aT(),changed:aT(),invalid:aT(),meta:aD,documentMeta:aT(aD),annotation:aT(aD),processingInstruction:aT(aD),definition:aS.defineModifier("definition"),constant:aS.defineModifier("constant"),function:aS.defineModifier("function"),standard:aS.defineModifier("standard"),local:aS.defineModifier("local"),special:aS.defineModifier("special")};for(let e in aq){let t=aq[e];t instanceof aS&&(t.name=e)}aC([{tag:aq.link,class:"tok-link"},{tag:aq.heading,class:"tok-heading"},{tag:aq.emphasis,class:"tok-emphasis"},{tag:aq.strong,class:"tok-strong"},{tag:aq.keyword,class:"tok-keyword"},{tag:aq.atom,class:"tok-atom"},{tag:aq.bool,class:"tok-bool"},{tag:aq.url,class:"tok-url"},{tag:aq.labelName,class:"tok-labelName"},{tag:aq.inserted,class:"tok-inserted"},{tag:aq.deleted,class:"tok-deleted"},{tag:aq.literal,class:"tok-literal"},{tag:aq.string,class:"tok-string"},{tag:aq.number,class:"tok-number"},{tag:[aq.regexp,aq.escape,aq.special(aq.string)],class:"tok-string2"},{tag:aq.variableName,class:"tok-variableName"},{tag:aq.local(aq.variableName),class:"tok-variableName tok-local"},{tag:aq.definition(aq.variableName),class:"tok-variableName tok-definition"},{tag:aq.special(aq.variableName),class:"tok-variableName2"},{tag:aq.definition(aq.propertyName),class:"tok-propertyName tok-definition"},{tag:aq.typeName,class:"tok-typeName"},{tag:aq.namespace,class:"tok-namespace"},{tag:aq.className,class:"tok-className"},{tag:aq.macroName,class:"tok-macroName"},{tag:aq.propertyName,class:"tok-propertyName"},{tag:aq.operator,class:"tok-operator"},{tag:aq.comment,class:"tok-comment"},{tag:aq.meta,class:"tok-meta"},{tag:aq.invalid,class:"tok-invalid"},{tag:aq.punctuation,class:"tok-punctuation"}]);let aN=new oN;function aU(e){return t_.define({combine:e?t=>t.concat(e):void 0})}let aG=new oN;class aF{constructor(e,t,i=[],n=""){this.data=e,this.name=n,t9.prototype.hasOwnProperty("tree")||Object.defineProperty(t9.prototype,"tree",{get(){return aJ(this)}}),this.parser=t,this.extension=[a9.of(this),t9.languageData.of((e,t,i)=>{let n=aK(e,t,i),r=n.type.prop(aN);if(!r)return[];let s=e.facet(r),o=n.type.prop(aG);if(o){let r=n.resolve(t-n.from,i);for(let t of o)if(t.test(r,e)){let i=e.facet(t.facet);return"replace"==t.type?i:i.concat(s)}}return s})].concat(i)}isActiveAt(e,t,i=-1){return aK(e,t,i).type.prop(aN)==this.data}findRegions(e){let t=e.facet(a9);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=(e,t)=>{if(e.prop(aN)==this.data)return void i.push({from:t,to:t+e.length});let r=e.prop(oN.mounted);if(r){if(r.tree.prop(aN)==this.data){if(r.overlay)for(let e of r.overlay)i.push({from:e.from+t,to:e.to+t});else i.push({from:t,to:t+e.length});return}else if(r.overlay){let e=i.length;if(n(r.tree,r.overlay[0].from+t),i.length>e)return}}for(let i=0;i<e.children.length;i++){let r=e.children[i];r instanceof o0&&n(r,e.positions[i]+t)}};return n(aJ(e),0),i}get allowsNesting(){return!0}}function aK(e,t,i){let n=e.facet(a9),r=aJ(e).topNode;if(!n||n.allowsNesting)for(let e=r;e;e=e.enter(t,i,Q.ExcludeBuffers|Q.EnterBracketed))e.type.isTop&&(r=e);return r}aF.setState=t1.define();class aH extends aF{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=aU(e.languageData);return new aH(t,e.parser.configure({props:[aN.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new aH(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function aJ(e){let t=e.field(aF.state,!1);return t?t.tree:o0.empty}function a0(e,t,i=50){var n;let r=null==(n=e.field(aF.state,!1))?void 0:n.context;if(!r)return null;let s=r.viewport;r.updateViewport({from:0,to:t});let o=r.isDone(t)||r.work(i,t)?r.tree:null;return r.updateViewport(s),o}class a1{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let a2=null;class a5{constructor(e,t,i=[],n,r,s,o,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=r,this.viewport=s,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new a5(e,t,[],o0.empty,0,i,[],null)}startParse(){return this.parser.startParse(new a1(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=o0.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var i;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(ah.addTree(n,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!=(i=this.parse.stoppedAt)?i:this.state.doc.length,this.tree=n,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ah.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=a2;a2=this;try{return e()}finally{a2=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=a3(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:r,viewport:s,skipped:o}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,i,n,r)=>t.push({fromA:e,toA:i,fromB:n,toB:r})),i=ah.applyChanges(i,t),n=o0.empty,r=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length)for(let t of(o=[],this.skipped)){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);i<n&&o.push({from:i,to:n})}}return new a5(this.parser,t,i,n,r,s,o,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:i,to:n}=this.skipped[t];i<e.to&&n>e.from&&(this.fragments=a3(this.fragments,i,n),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends ac{createParse(t,i,n){let r=n[0].from,s=n[n.length-1].to;return{parsedPos:r,advance(){let t=a2;if(t){for(let e of n)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=s,new o0(oF.none,[],[],s-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return a2}}function a3(e,t,i){return ah.applyChanges(e,[{fromA:t,toA:i,fromB:t,toB:i}])}class a6{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new a6(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=a5.create(e.facet(a9).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new a6(i)}}aF.state=tE.define({create:a6.init,update(e,t){for(let e of t.effects)if(e.is(aF.setState))return e.value;return t.startState.facet(a9)!=t.state.facet(a9)?a6.init(t.state):e.apply(t)}});let a4=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"u">typeof requestIdleCallback&&(a4=e=>{let t=-1,i=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(i):cancelIdleCallback(t)});let a8="u">typeof navigator&&(null==($=navigator.scheduling)?void 0:$.isInputPending)?()=>navigator.scheduling.isInputPending():null,a7=nK.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(aF.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(aF.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=a4(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:n}}=this.view,r=i.field(aF.state);if(r.tree==r.context.tree&&r.context.isDone(n+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!a8?Math.max(25,e.timeRemaining()-5):1e9),o=r.context.treeLen<n&&i.doc.length>n+1e3,a=r.context.work(()=>a8&&a8()||Date.now()>s,n+1e5*!o);this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:aF.setState.of(new a6(r.context))})),this.chunkBudget>0&&!(a&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>nN(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),a9=t_.define({combine:e=>e.length?e[0]:null,enables:e=>[aF.state,a7,sq.contentAttributes.compute([e],t=>{let i=t.facet(e);return i&&i.name?{"data-language":i.name}:{}})]});class le{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let lt=t_.define(),li=t_.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function ln(e){let t=e.facet(li);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function lr(e,t){let i="",n=e.tabSize,r=e.facet(li)[0];if(" "==r){for(;t>=n;)i+=" ",t-=n;r=" "}for(let e=0;e<t;e++)i+=r;return i}function ls(e,t){for(let i of(e instanceof t9&&(e=new lo(e)),e.state.facet(lt))){let n=i(e,t);if(void 0!==n)return n}let i=aJ(e.state);return i.length>=t?function(e,t,i){let n=t.resolveStack(i),r=t.resolveInner(i,-1).resolve(i,0).enterUnfinishedNodesBefore(i);if(r!=n.node){let e=[];for(let t=r;t&&!(t.from<n.node.from||t.to>n.node.to||t.from==n.node.from&&t.type==n.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)n={node:e[t],next:n}}return ll(n,e,i)}(e,i,t):null}class lo{constructor(e,t={}){this.state=e,this.options=t,this.unit=ln(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:n,simulateDoubleBreak:r}=this.options;if(null!=n&&n>=i.from&&n<=i.to)if(r&&n==e)return{text:"",from:e};else if(t<0?n<e:n<=e)return{text:i.text.slice(n-i.from),from:n};else return{text:i.text.slice(0,n-i.from),from:i.from};return i}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:n}=this.lineAt(e,t);return i.slice(e-n,Math.min(i.length,e+100-n))}column(e,t=1){let{text:i,from:n}=this.lineAt(e,t),r=this.countColumn(i,e-n),s=this.options.overrideIndentation?this.options.overrideIndentation(n):-1;return s>-1&&(r+=s-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return ib(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:n}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(n);if(e>-1)return e}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let la=new oN;function ll(e,t,i){for(let n=e;n;n=n.next){let e=function(e){let t=e.type.prop(la);if(t)return t;let i=e.firstChild,n;if(i&&(n=i.type.prop(oN.closedBy))){let t=e.lastChild,i=t&&n.indexOf(t.name)>-1;return e=>lu(e,!0,1,void 0,i&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?lh:null}(n.node);if(e)return e(lc.create(t,i,n))}return 0}function lh(){return 0}class lc extends lo{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new lc(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(function(e,t){for(let i=t;i;i=i.parent)if(e==i)return!0;return!1}(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return ll(this.context.next,this.base,this.pos)}}function lu(e,t,i,n,r){let s=e.textAfter,o=s.match(/^\s*/)[0].length,a=n&&s.slice(o,o+n.length)==n||r==e.pos+o,l=t?function(e){let t=e.node,i=t.childAfter(t.from),n=t.lastChild;if(!i)return null;let r=e.options.simulateBreak,s=e.state.doc.lineAt(i.from),o=null==r||r<=s.from?s.to:Math.min(s.to,r);for(let e=i.to;;){let r=t.childAfter(e);if(!r||r==n)return null;if(!r.type.isSkipped){if(r.from>=o)return null;let e=/^ */.exec(s.text.slice(i.to-s.from))[0].length;return{from:i.from,to:i.to+e}}e=r.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*i)}function lf({except:e,units:t=1}={}){return i=>{let n=e&&e.test(i.textAfter);return i.baseIndent+(n?0:t*i.unit)}}let ld=t_.define(),lp=new oN;function lO(e){let t=e.firstChild,i=e.lastChild;return t&&t.to<i.from?{from:t.to,to:i.type.isError?e.to:i.from}:null}function lg(e,t,i){for(let n of e.facet(ld)){let r=n(e,t,i);if(r)return r}return function(e,t,i){let n=aJ(e);if(n.length<i)return null;let r=n.resolveStack(i,1),s=null;for(let o=r;o;o=o.next){let r=o.node;if(r.to<=i||r.from>i)continue;if(s&&r.from<t)break;let a=r.type.prop(lp);if(a&&(r.to<n.length-50||n.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(r))){let n=a(r,e);n&&n.from<=i&&n.from>=t&&n.to>i&&(s=n)}}return s}(e,t,i)}function lm(e,t){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);return i>=n?void 0:{from:i,to:n}}let lv=t1.define({map:lm}),ly=t1.define({map:lm}),lw=tE.define({create:()=>iH.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,i)=>e=lb(e,t,i)),e=e.map(t.changes);let i=[];for(let n of t.effects)n.is(lv)&&!function(e,t,i){let n=!1;return e.between(t,t,(e,r)=>{e==t&&r==i&&(n=!0)}),n}(e,n.value.from,n.value.to)?i.push(n.value):n.is(ly)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(i.length){let{preparePlaceholder:n}=t.state.facet(lk),r=i.map(e=>(n?iH.replace({widget:new lA(n(t.state,e))}):lP).range(e.from,e.to));e=e.update({add:r})}return t.selection&&(e=lb(e,t.selection.main.head)),e},provide:e=>sq.decorations.from(e),toJSON(e,t){let i=[];return e.between(0,t.doc.length,(e,t)=>{i.push(e,t)}),i},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let i=0;i<e.length;){let n=e[i++],r=e[i++];if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid JSON for fold state");t.push(lP.range(n,r))}return iH.set(t,!0)}});function lb(e,t,i=t){let n=!1;return e.between(t,i,(e,r)=>{e<i&&r>t&&(n=!0)}),n?e.update({filterFrom:t,filterTo:i,filter:(e,n)=>e>=i||n<=t}):e}function lx(e,t,i){var n;let r=null;return null==(n=e.field(lw,!1))||n.between(t,i,(e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})}),r}let lS={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},lk=t_.define({combine:e=>ie(e,lS)});function lQ(e){let t=[lw,lT];return e&&t.push(lk.of(e)),t}function l$(e,t){let{state:i}=e,n=i.facet(lk),r=t=>{let i=e.lineBlockAt(e.posAtDOM(t.target)),n=lx(e.state,i.from,i.to);n&&e.dispatch({effects:ly.of(n)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r,t);let s=document.createElement("span");return s.textContent=n.placeholderText,s.setAttribute("aria-label",i.phrase("folded code")),s.title=i.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}let lP=iH.replace({widget:new class extends iF{toDOM(e){return l$(e,null)}}});class lA extends iF{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return l$(e,this.value)}}let lC={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class l_ extends oQ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}let lT=sq.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class lM{constructor(e,t){let i;function n(e){let t=iQ.newName();return(i||(i=Object.create(null)))["."+t]=e,t}this.specs=e;let r="string"==typeof t.all?t.all:t.all?n(t.all):void 0,s=t.scope;this.scope=s instanceof aF?e=>e.prop(aN)==s.data:s?e=>e==s:void 0,this.style=aC(e.map(e=>({tag:e.tag,class:e.class||n(Object.assign({},e,{tag:null}))})),{all:r}).style,this.module=i?new iQ(i):null,this.themeType=t.themeType}static define(e,t){return new lM(e,t||{})}}let lZ=t_.define(),lR=t_.define({combine:e=>e.length?[e[0]]:null});function lX(e){let t=e.facet(lZ);return t.length?t:e.facet(lR)}function lE(e,t){let i=[lj],n;return e instanceof lM&&(e.module&&i.push(sq.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?i.push(lR.of(e)):n?i.push(lZ.computeN([sq.darkTheme],t=>t.facet(sq.darkTheme)==("dark"==n)?[e]:[])):i.push(lZ.of(e)),i}let lj=tB.high(nK.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=aJ(e.state),this.decorations=this.buildDeco(e,lX(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=aJ(e.state),i=lX(e.state),n=i!=lX(e.startState),{viewport:r}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!n&&t.type==this.tree.type&&s>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return iH.none;let i=new ih;for(let{from:n,to:r}of e.visibleRanges)!function(e,t,i,n=0,r=e.length){let s=new a_(n,Array.isArray(t)?t:[t],i);s.highlightRange(e.cursor(),n,r,"",s.highlighters),s.flush(r)}(this.tree,t,(e,t,n)=>{i.add(e,t,this.markCache[n]||(this.markCache[n]=iH.mark({class:n})))},n,r);return i.finish()}},{decorations:e=>e.decorations}));aq.meta,aq.link,aq.heading,aq.emphasis,aq.strong,aq.strikethrough,aq.keyword,aq.atom,aq.bool,aq.url,aq.contentSeparator,aq.labelName,aq.literal,aq.inserted,aq.string,aq.deleted,aq.regexp,aq.escape,aq.string,aq.variableName,aq.variableName,aq.typeName,aq.namespace,aq.className,aq.variableName,aq.macroName,aq.propertyName,aq.comment,aq.invalid;let lB=sq.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),lL="()[]{}",lI=t_.define({combine:e=>ie(e,{afterCursor:!0,brackets:lL,maxScanDistance:1e4,renderMatch:lV})}),lz=iH.mark({class:"cm-matchingBracket"}),lY=iH.mark({class:"cm-nonmatchingBracket"});function lV(e){let t=[],i=e.matched?lz:lY;return t.push(i.range(e.start.from,e.start.to)),e.end&&t.push(i.range(e.end.from,e.end.to)),t}function lW(e){let t=[],i=e.facet(lI);for(let n of e.selection.ranges){if(!n.empty)continue;let r=lG(e,n.head,-1,i)||n.head>0&&lG(e,n.head-1,1,i)||i.afterCursor&&(lG(e,n.head,1,i)||n.head<e.doc.length&&lG(e,n.head+1,-1,i));r&&(t=t.concat(i.renderMatch(r,e)))}return iH.set(t,!0)}let lD=[nK.fromClass(class{constructor(e){this.paused=!1,this.decorations=lW(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=lW(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),lB],lq=new oN;function lN(e,t,i){let n=e.prop(t<0?oN.openedBy:oN.closedBy);if(n)return n;if(1==e.name.length){let n=i.indexOf(e.name);if(n>-1&&n%2==+(t<0))return[i[n+t]]}return null}function lU(e){let t=e.type.prop(lq);return t?t(e.node):e}function lG(e,t,i,n={}){let r=n.maxScanDistance||1e4,s=n.brackets||lL,o=aJ(e),a=o.resolveInner(t,i);for(let e=a;e;e=e.parent){let n=lN(e.type,i,s);if(n&&e.from<e.to){let r=lU(e);if(r&&(i>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return function(e,t,i,n,r){let s=t.parent,o={from:i.from,to:i.to},a=0,l=null==s?void 0:s.cursor();if(l&&(e<0?l.childBefore(t.from):l.childAfter(t.to)))do if(e<0?l.to<=t.from:l.from>=t.to){if(0==a&&n.indexOf(l.type.name)>-1&&l.from<l.to){let e=lU(l);return{start:o,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(lN(l.type,e,r))a++;else if(lN(l.type,-e,r)){if(0==a){let e=lU(l);return{start:o,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}a--}}while(e<0?l.prevSibling():l.nextSibling())return{start:o,matched:!1}}(i,e,r,n,s)}}return function(e,t,i,n,r,s,o){if(i<0?!t:t==e.doc.length)return null;let a=i<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=o.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?t-1:t,to:i>0?t+1:t},c=e.doc.iterRange(t,i>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=s;){let s=c.value;i<0&&(e+=s.length);let a=t+e*i;for(let e=i>0?0:s.length-1,t=i>0?s.length:-1;e!=t;e+=i){let t=o.indexOf(s[e]);if(!(t<0)&&n.resolveInner(a+e,1).type==r)if(t%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}i>0&&(e+=s.length)}return c.done?{start:h,matched:!1}:null}(e,t,i,o,a.type,r,s)}function lF(e,t,i,n=0,r=0){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);let s=r;for(let r=n;r<t;r++)9==e.charCodeAt(r)?s+=i-s%i:s++;return s}let lK=Object.create(null),lH=[oF.none],lJ=[],l0=Object.create(null),l1=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])l1[e]=function(e,t){let i=[];for(let n of t.split(" ")){let t=[];for(let i of n.split(".")){let n=e[i]||aq[i];n?"function"==typeof n?t.length?t=t.map(n):l2(i,`Modifier ${i} used at start of tag`):t.length?l2(i,`Tag ${i} used as modifier`):t=Array.isArray(n)?n:[n]:l2(i,`Unknown highlighting tag ${i}`)}for(let e of t)i.push(e)}if(!i.length)return 0;let n=t.replace(/ /g,"_"),r=n+" "+i.map(e=>e.id),s=l0[r];if(s)return s.id;let o=l0[r]=oF.define({id:lH.length,name:n,props:[a$({[n]:i})]});return lH.push(o),o.id}(lK,t);function l2(e,t){lJ.indexOf(e)>-1||(lJ.push(e),console.warn(t))}function l5(e,t){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let r=e(t,i);return!!r&&(n(i.update(r)),!0)}}nv.RTL,nv.LTR;let l3=l5(function(e,t,i=t.selection.ranges){let n=[],r=-1;a:for(let{from:e,to:s}of i){let i=n.length,o=1e9,a;for(let i=e;i<=s;){let l=t.doc.lineAt(i);if(void 0==a&&!(a=l8(t,l.from).line))continue a;if(l.from>r&&(e==s||s>l.from)){r=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,i=l.text.slice(e,e+a.length)==a?e:-1;e<l.text.length&&e<o&&(o=e),n.push({line:l,comment:i,token:a,indent:e,empty:t,single:!1})}i=l.to+1}if(o<1e9)for(let e=i;e<n.length;e++)n[e].indent<n[e].line.text.length&&(n[e].indent=o);n.length==i+1&&(n[i].single=!0)}if(2!=e&&n.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:i,indent:r,empty:s,single:o}of n)(o||!s)&&e.push({from:t.from+r,insert:i+" "});let i=t.changes(e);return{changes:i,selection:t.selection.map(i,1)}}if(1!=e&&n.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:i,token:r}of n)if(i>=0){let n=t.from+i,s=n+r.length;" "==t.text[s-t.from]&&s++,e.push({from:n,to:s})}return{changes:e}}return null},0),l6=l5(l7,0),l4=l5((e,t)=>l7(e,t,function(e){let t=[];for(let i of e.selection.ranges){let n=e.doc.lineAt(i.from),r=i.to<=n.to?n:e.doc.lineAt(i.to);r.from>n.from&&r.from==i.to&&(r=i.to==n.to+1?n:e.doc.lineAt(i.to-1));let s=t.length-1;s>=0&&t[s].to>n.from?t[s].to=r.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:r.to})}return t}(t)),0);function l8(e,t){let i=e.languageDataAt("commentTokens",t,1);return i.length?i[0]:{}}function l7(e,t,i=t.selection.ranges){let n=i.map(e=>l8(t,e.from).block);if(!n.every(e=>e))return null;let r=i.map((e,i)=>(function(e,{open:t,close:i},n,r){let s,o,a=e.sliceDoc(n-50,n),l=e.sliceDoc(r,r+50),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-t.length,u)==t&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:r+c,margin:c&&1}};r-n<=100?s=o=e.sliceDoc(n,r):(s=e.sliceDoc(n,n+50),o=e.sliceDoc(r-50,r));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-i.length;return s.slice(f,f+t.length)==t&&o.slice(p,p+i.length)==i?{open:{pos:n+f+t.length,margin:+!!/\s/.test(s.charAt(f+t.length))},close:{pos:r-d-i.length,margin:+!!/\s/.test(o.charAt(p-1))}}:null})(t,n[i],e.from,e.to));if(2!=e&&!r.every(e=>e))return{changes:t.changes(i.map((e,t)=>r[t]?[]:[{from:e.from,insert:n[t].open+" "},{from:e.to,insert:" "+n[t].close}]))};if(1!=e&&r.some(e=>e)){let e=[];for(let t=0,i;t<r.length;t++)if(i=r[t]){let r=n[t],{open:s,close:o}=i;e.push({from:s.pos-r.open.length,to:s.pos+s.margin},{from:o.pos-o.margin,to:o.pos+r.close.length})}return{changes:e}}return null}let l9=tH.define(),he=tH.define(),ht=t_.define(),hi=t_.define({combine:e=>ie(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,n)=>e(i,n)||t(i,n)})}),hn=tE.define({create:()=>hm.empty,update(e,t){let i=t.state.facet(hi),n=t.annotation(l9);if(n){let r=hc.fromTransaction(t,n.selection),s=n.side,o=0==s?e.undone:e.done;return o=r?hu(o,o.length,i.minDepth,r):hp(o,t.startState.selection),new hm(0==s?n.rest:o,0==s?o:n.rest)}let r=t.annotation(he);if(("full"==r||"before"==r)&&(e=e.isolate()),!1===t.annotation(t2.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let s=hc.fromTransaction(t),o=t.annotation(t2.time),a=t.annotation(t2.userEvent);return s?e=e.addChanges(s,o,a,i,t):t.selection&&(e=e.addSelection(t.startState.selection,o,a,i.newGroupDelay)),("full"==r||"after"==r)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new hm(e.done.map(hc.fromJSON),e.undone.map(hc.fromJSON))});function hr(e={}){return[hn,hi.of(e),sq.domEventHandlers({beforeinput(e,t){let i="historyUndo"==e.inputType?ho:"historyRedo"==e.inputType?ha:null;return!!i&&(e.preventDefault(),i(t))}})]}function hs(e,t){return function({state:i,dispatch:n}){if(!t&&i.readOnly)return!1;let r=i.field(hn,!1);if(!r)return!1;let s=r.pop(e,i,t);return!!s&&(n(s),!0)}}let ho=hs(0,!1),ha=hs(1,!1),hl=hs(0,!0),hh=hs(1,!0);class hc{constructor(e,t,i,n,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=r}setSelAfter(e){return new hc(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:null==(e=this.changes)?void 0:e.toJSON(),mapped:null==(t=this.mapped)?void 0:t.toJSON(),startSelection:null==(i=this.startSelection)?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new hc(e.changes&&ty.fromJSON(e.changes),[],e.mapped&&tv.fromJSON(e.mapped),e.startSelection&&tP.fromJSON(e.startSelection),e.selectionsAfter.map(tP.fromJSON))}static fromTransaction(e,t){let i=hd;for(let t of e.startState.facet(ht)){let n=t(e);n.length&&(i=i.concat(n))}return!i.length&&e.changes.empty?null:new hc(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,hd)}static selection(e){return new hc(void 0,hd,void 0,void 0,e)}}function hu(e,t,i,n){let r=e.slice(t+1>i+20?t-i-1:0,t);return r.push(n),r}function hf(e,t){return e.length?t.length?e.concat(t):e:t}let hd=[];function hp(e,t){if(!e.length)return[hc.selection([t])];{let i=e[e.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),hu(e,e.length-1,1e9,i.setSelAfter(n)))}}function hO(e,t){if(!e.length)return e;let i=e.length,n=hd;for(;i;){let r=function(e,t,i){let n=hf(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):hd,i);if(!e.changes)return hc.selection(n);let r=e.changes.map(t),s=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(s):s;return new hc(r,t1.mapEffects(e.effects,t),o,e.startSelection.map(s),n)}(e[i-1],t,n);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,i);return t[i-1]=r,t}t=r.mapped,i--,n=r.selectionsAfter}return n.length?[hc.selection(n)]:hd}let hg=/^(input\.type|delete)($|\.)/;class hm{constructor(e,t,i=0,n){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new hm(this.done,this.undone):this}addChanges(e,t,i,n,r){var s,o;let a,l,h=this.done,c=h[h.length-1];return new hm(h=c&&c.changes&&!c.changes.empty&&e.changes&&(!i||hg.test(i))&&(!c.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(r,(s=c.changes,o=e.changes,a=[],l=!1,s.iterChangedRanges((e,t)=>a.push(e,t)),o.iterChangedRanges((e,t,i,n)=>{for(let e=0;e<a.length;){let t=a[e++],r=a[e++];n>=t&&i<=r&&(l=!0)}}),l))||"input.type.compose"==i)?hu(h,h.length-1,n.minDepth,new hc(e.changes.compose(c.changes),hf(t1.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,hd)):hu(h,h.length,n.minDepth,e),hd,t,i)}addSelection(e,t,i,n){var r;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:hd;return s.length>0&&t-this.prevTime<n&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&(r=s[s.length-1],r.ranges.length==e.ranges.length&&0===r.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length)?this:new hm(hp(this.done,e),this.undone,t,i)}addMapping(e){return new hm(hO(this.done,e),hO(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=0==e?this.done:this.undone;if(0==n.length)return null;let r=n[n.length-1],s=r.selectionsAfter[0]||(r.startSelection?r.startSelection.map(r.changes.invertedDesc,1):t.selection);if(i&&r.selectionsAfter.length){let i,o;return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:l9.of({side:e,rest:(i=n[n.length-1],(o=n.slice())[n.length-1]=i.setSelAfter(i.selectionsAfter.slice(0,i.selectionsAfter.length-1)),o),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}{if(!r.changes)return null;let i=1==n.length?hd:n.slice(0,n.length-1);return r.mapped&&(i=hO(i,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:l9.of({side:e,rest:i,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}hm.empty=new hm(hd,hd);let hv=[{key:"Mod-z",run:ho,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:ha,preventDefault:!0},{linux:"Ctrl-Shift-z",run:ha,preventDefault:!0},{key:"Mod-u",run:hl,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:hh,preventDefault:!0}];function hy(e,t){return tP.create(e.ranges.map(t),e.mainIndex)}function hw(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function hb({state:e,dispatch:t},i){let n=hy(e.selection,i);return!n.eq(e.selection,!0)&&(t(hw(e,n)),!0)}function hx(e,t){return tP.cursor(t?e.to:e.from)}function hS(e,t){return hb(e,i=>i.empty?e.moveByChar(i,t):hx(i,t))}function hk(e){return e.textDirectionAt(e.state.selection.main.head)==nv.LTR}let hQ=e=>hS(e,!hk(e)),h$=e=>hS(e,hk(e));function hP(e,t){return hb(e,i=>i.empty?e.moveByGroup(i,t):hx(i,t))}function hA(e,t,i){let n,r,s=aJ(e).resolveInner(t.head),o=i?oN.closedBy:oN.openedBy;for(let n=t.head;;){let t=i?s.childAfter(n):s.childBefore(n);if(!t)break;!function(e,t,i){if(t.type.prop(i))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,o)?n=i?t.to:t.from:s=t}return r=s.type.prop(o)&&(n=i?lG(e,s.from,1):lG(e,s.to,-1))&&n.matched?i?n.end.to:n.end.from:i?s.to:s.from,tP.cursor(r,i?-1:1)}function hC(e,t){return hb(e,i=>{if(!i.empty)return hx(i,t);let n=e.moveVertically(i,t);return n.head!=i.head?n:e.moveToLineBoundary(i,t)})}"u">typeof Intl&&Intl.Segmenter;let h_=e=>hC(e,!1),hT=e=>hC(e,!0);function hM(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,i=0,n=0,r;if(t){for(let t of e.state.facet(sq.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(i=Math.max(null==r?void 0:r.top,i)),(null==r?void 0:r.bottom)&&(n=Math.max(null==r?void 0:r.bottom,n))}r=e.scrollDOM.clientHeight-i-n}else r=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:i,marginBottom:n,selfScroll:t,height:Math.max(e.defaultLineHeight,r-5)}}function hZ(e,t){let i,n=hM(e),{state:r}=e,s=hy(r.selection,i=>i.empty?e.moveVertically(i,t,n.height):hx(i,t));if(s.eq(r.selection))return!1;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),a=o.top+n.marginTop,l=o.bottom-n.marginBottom;t&&t.top>a&&t.bottom<l&&(i=sq.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(hw(r,s),{effects:i}),!0}let hR=e=>hZ(e,!1),hX=e=>hZ(e,!0);function hE(e,t,i){let n=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,i);if(r.head==t.head&&r.head!=(i?n.to:n.from)&&(r=e.moveToLineBoundary(t,i,!1)),!i&&r.head==n.from&&n.length){let i=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&t.head!=n.from+i&&(r=tP.cursor(n.from+i))}return r}let hj=e=>hb(e,t=>hE(e,t,!0)),hB=e=>hb(e,t=>hE(e,t,!1));function hL(e,t,i){let n=hy(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=tP.range(e.head,e.anchor));let n=i(e);return tP.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return!n.eq(e.state.selection)&&(e.dispatch(hw(e.state,n)),!0)}function hI(e,t){return hL(e,t,i=>e.moveByChar(i,t))}let hz=e=>hI(e,!hk(e)),hY=e=>hI(e,hk(e));function hV(e,t){return hL(e,t,i=>e.moveByGroup(i,t))}function hW(e,t){return hL(e,t,i=>e.moveVertically(i,t))}let hD=e=>hW(e,!1),hq=e=>hW(e,!0);function hN(e,t){return hL(e,t,i=>e.moveVertically(i,t,hM(e).height))}let hU=e=>hN(e,!1),hG=e=>hN(e,!0),hF=({state:e,dispatch:t})=>(t(hw(e,{anchor:0})),!0),hK=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.doc.length})),!0),hH=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.selection.main.anchor,head:0})),!0),hJ=({state:e,dispatch:t})=>(t(hw(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function h0(e,t){let{state:i}=e,n=i.selection,r=i.selection.ranges.slice();for(let n of i.selection.ranges){let s=i.doc.lineAt(n.head);if(t?s.to<e.state.doc.length:s.from>0)for(let i=n;;){let n=e.moveVertically(i,t);if(n.head<s.from||n.head>s.to){r.some(e=>e.head==n.head)||r.push(n);break}if(n.head==i.head)break;i=n}}return r.length!=n.ranges.length&&(e.dispatch(hw(i,tP.create(r,r.length-1))),!0)}function h1(e,t){if(e.state.readOnly)return!1;let i="delete.selection",{state:n}=e,r=n.changeByRange(n=>{let{from:r,to:s}=n;if(r==s){let o=t(n);o<r?(i="delete.backward",o=h2(e,o,!1)):o>r&&(i="delete.forward",o=h2(e,o,!0)),r=Math.min(r,o),s=Math.max(s,o)}else r=h2(e,r,!1),s=h2(e,s,!0);return r==s?{range:n}:{changes:{from:r,to:s},range:tP.cursor(r,r<n.head?-1:1)}});return!r.changes.empty&&(e.dispatch(n.update(r,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?sq.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function h2(e,t,i){if(e instanceof sq)for(let n of e.state.facet(sq.atomicRanges).map(t=>t(e)))n.between(t,t,(e,n)=>{e<t&&n>t&&(t=i?n:e)});return t}let h5=(e,t,i)=>h1(e,n=>{let r=n.from,{state:s}=e,o=s.doc.lineAt(r),a,l;if(i&&!t&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,r-o.from))){if(" "==a[a.length-1])return r-1;let e=ib(a,s.tabSize)%ln(s)||ln(s);for(let t=0;t<e&&" "==a[a.length-1-t];t++)r--;l=r}else(l=tf(o.text,r-o.from,t,t)+o.from)==r&&o.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,r-o.from))&&(l=tf(o.text,l-o.from,!1,!1)+o.from);return l}),h3=e=>h5(e,!1,!0),h6=e=>h5(e,!0,!1),h4=(e,t)=>h1(e,i=>{let n=i.head,{state:r}=e,s=r.doc.lineAt(n),o=r.charCategorizer(n);for(let e=null;;){if(n==(t?s.to:s.from)){n==i.head&&s.number!=(t?r.doc.lines:1)&&(n+=t?1:-1);break}let a=tf(s.text,n-s.from,t)+s.from,l=s.text.slice(Math.min(n,a)-s.from,Math.max(n,a)-s.from),h=o(l);if(null!=e&&h!=e)break;(" "!=l||n!=i.head)&&(e=h),n=a}return n}),h8=e=>h4(e,!1);function h7(e){let t=[],i=-1;for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),s=e.doc.lineAt(n.to);if(n.empty||n.to!=s.from||(s=e.doc.lineAt(n.to-1)),i>=r.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(n)}else t.push({from:r.from,to:s.to,ranges:[n]});i=s.number+1}return t}function h9(e,t,i){if(e.readOnly)return!1;let n=[],r=[];for(let t of h7(e)){if(i?t.to==e.doc.length:0==t.from)continue;let s=e.doc.lineAt(i?t.to+1:t.from-1),o=s.length+1;if(i)for(let i of(n.push({from:t.to,to:s.to},{from:t.from,insert:s.text+e.lineBreak}),t.ranges))r.push(tP.range(Math.min(e.doc.length,i.anchor+o),Math.min(e.doc.length,i.head+o)));else for(let i of(n.push({from:s.from,to:t.from},{from:t.to,insert:e.lineBreak+s.text}),t.ranges))r.push(tP.range(i.anchor-o,i.head-o))}return!!n.length&&(t(e.update({changes:n,scrollIntoView:!0,selection:tP.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function ce(e,t,i){if(e.readOnly)return!1;let n=[];for(let t of h7(e))i?n.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):n.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let r=e.changes(n);return t(e.update({changes:r,selection:e.selection.map(r,i?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}let ct=cn(!1),ci=cn(!0);function cn(e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{let{from:n,to:r}=i,s=t.doc.lineAt(n),o=!e&&n==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let i=aJ(e).resolveInner(t),n=i.childBefore(t),r=i.childAfter(t),s;return n&&r&&n.to<=t&&r.from>=t&&(s=n.type.prop(oN.closedBy))&&s.indexOf(r.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(n.to,r.from))?{from:n.to,to:r.from}:null}(t,n);e&&(n=r=(r<=s.to?s:t.doc.lineAt(r)).to);let a=new lo(t,{simulateBreak:n,simulateDoubleBreak:!!o}),l=ls(a,n);for(null==l&&(l=ib(/^\s*/.exec(t.doc.lineAt(n).text)[0],t.tabSize));r<s.to&&/\s/.test(s.text[r-s.from]);)r++;o?{from:n,to:r}=o:n>s.from&&n<s.from+100&&!/\S/.test(s.text.slice(0,n))&&(n=s.from);let h=["",lr(t,l)];return o&&h.push(lr(t,a.lineIndent(s.from,-1))),{changes:{from:n,to:r,insert:tn.of(h)},range:tP.cursor(n+1+h[1].length)}});return i(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function cr(e,t){let i=-1;return e.changeByRange(n=>{let r=[];for(let s=n.from;s<=n.to;){let o=e.doc.lineAt(s);o.number>i&&(n.empty||n.to>o.from)&&(t(o,r,n),i=o.number),s=o.to+1}let s=e.changes(r);return{changes:r,range:tP.range(s.mapPos(n.anchor,1),s.mapPos(n.head,1))}})}let cs=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=Object.create(null),n=new lo(e,{overrideIndentation:e=>{let t=i[e];return null==t?-1:t}}),r=cr(e,(t,r,s)=>{let o=ls(n,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],l=lr(e,o);(a!=l||s.from<t.from+a.length)&&(i[t.from]=o,r.push({from:t.from,to:t.from+a.length,insert:l}))});return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0},co=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cr(e,(t,i)=>{i.push({from:t.from,insert:e.facet(li)})}),{userEvent:"input.indent"})),!0),ca=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(cr(e,(t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let r=ib(n,e.tabSize),s=0,o=lr(e,Math.max(0,r-ln(e)));for(;s<n.length&&s<o.length&&n.charCodeAt(s)==o.charCodeAt(s);)s++;i.push({from:t.from+s,to:t.from+n.length,insert:o.slice(s)})}),{userEvent:"delete.dedent"})),!0),cl=[{key:"Ctrl-b",run:hQ,shift:hz,preventDefault:!0},{key:"Ctrl-f",run:h$,shift:hY},{key:"Ctrl-p",run:h_,shift:hD},{key:"Ctrl-n",run:hT,shift:hq},{key:"Ctrl-a",run:e=>hb(e,t=>tP.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>hL(e,!1,t=>tP.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>hb(e,t=>tP.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>hL(e,!0,t=>tP.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:h6},{key:"Ctrl-h",run:h3},{key:"Ctrl-k",run:e=>h1(e,t=>{let i=e.lineBlockAt(t.head).to;return t.head<i?i:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:h8},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:tn.of(["",""])},range:tP.cursor(e.from)}));return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let i=t.from,n=e.doc.lineAt(i),r=i==n.from?i-1:tf(n.text,i-n.from,!1)+n.from,s=i==n.to?i+1:tf(n.text,i-n.from,!0)+n.from;return{changes:{from:r,to:s,insert:e.doc.slice(i,s).append(e.doc.slice(r,i))},range:tP.cursor(s)}});return!i.changes.empty&&(t(e.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:hX}],ch=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>hb(e,t=>hA(e.state,t,!hk(e))),shift:e=>{let t=!hk(e);return hL(e,t,i=>hA(e.state,i,t))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>hb(e,t=>hA(e.state,t,hk(e))),shift:e=>{let t=hk(e);return hL(e,t,i=>hA(e.state,i,t))}},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>h9(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>ce(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>h9(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>ce(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>h0(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>h0(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let i=e.selection,n=null;return i.ranges.length>1?n=tP.create([i.main]):i.main.empty||(n=tP.create([tP.cursor(i.main.head)])),!!n&&(t(hw(e,n)),!0)}},{key:"Mod-Enter",run:ci},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let i=h7(e).map(({from:t,to:i})=>tP.undirectionalRange(t,Math.min(i+1,e.doc.length)));return t(e.update({selection:tP.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let i=hy(e.selection,t=>{let i=aJ(e),n=i.resolveStack(t.from,1);if(t.empty){let e=i.resolveStack(t.from,-1);e.node.from>=n.node.from&&e.node.to<=n.node.to&&(n=e)}for(let e=n;e;e=e.next){let{node:i}=e;if((i.from<t.from&&i.to>=t.to||i.to>t.to&&i.from<=t.from)&&e.next)return tP.undirectionalRange(i.from,i.to)}return t});return!i.eq(e.selection)&&(t(hw(e,i)),!0)},preventDefault:!0},{key:"Mod-[",run:ca},{key:"Mod-]",run:co},{key:"Mod-Alt-\\",run:cs},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,i=t.changes(h7(t).map(({from:e,to:i})=>(e>0?e--:i<t.doc.length&&i++,{from:e,to:i}))),n=hy(t.selection,t=>{let i;if(e.lineWrapping){let n=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(i=n.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,i)}).map(i);return e.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let i,n;return i=!1,n=hy(e.selection,t=>{let n=lG(e,t.head,-1)||lG(e,t.head,1)||t.head>0&&lG(e,t.head-1,1)||t.head<e.doc.length&&lG(e,t.head+1,-1);if(!n||!n.end)return t;i=!0;let r=n.start.from==t.head?n.end.to:n.end.from;return tP.cursor(r)}),!!i&&(t(hw(e,n)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,i=t.doc.lineAt(t.selection.main.from),n=l8(e.state,i.from);return n.line?l3(e):!!n.block&&l4(e)}},{key:"Alt-A",mac:"Ctrl-A",run:l6},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:hQ,shift:hz,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>hP(e,!hk(e)),shift:e=>hV(e,!hk(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>hb(e,t=>hE(e,t,!hk(e))),shift:e=>{let t=!hk(e);return hL(e,t,i=>hE(e,i,t))},preventDefault:!0},{key:"ArrowRight",run:h$,shift:hY,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>hP(e,hk(e)),shift:e=>hV(e,hk(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>hb(e,t=>hE(e,t,hk(e))),shift:e=>{let t=hk(e);return hL(e,t,i=>hE(e,i,t))},preventDefault:!0},{key:"ArrowUp",run:h_,shift:hD,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hF,shift:hH},{mac:"Ctrl-ArrowUp",run:hR,shift:hU},{key:"ArrowDown",run:hT,shift:hq,preventDefault:!0},{mac:"Cmd-ArrowDown",run:hK,shift:hJ},{mac:"Ctrl-ArrowDown",run:hX,shift:hG},{key:"PageUp",run:hR,shift:hU},{key:"PageDown",run:hX,shift:hG},{key:"Home",run:hB,shift:e=>hL(e,!1,t=>hE(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:hF,shift:hH},{key:"End",run:hj,shift:e=>hL(e,!0,t=>hE(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:hK,shift:hJ},{key:"Enter",run:ct,shift:ct},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:h3,shift:h3,preventDefault:!0},{key:"Delete",run:h6,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:h8,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>h4(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>h1(e,t=>{let i=e.moveToLineBoundary(t,!1).head;return t.head>i?i:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>h1(e,t=>{let i=e.moveToLineBoundary(t,!0).head;return t.head<i?i:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(cl.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),cc={key:"Tab",run:co,shift:ca},cu=lM.define([{tag:aq.keyword,class:"hl-keyword"},{tag:aq.definitionKeyword,class:"hl-keyword"},{tag:aq.controlKeyword,class:"hl-keyword"},{tag:aq.moduleKeyword,class:"hl-module-keyword"},{tag:aq.operatorKeyword,class:"hl-operator"},{tag:aq.string,class:"hl-string"},{tag:aq.number,class:"hl-number"},{tag:aq.integer,class:"hl-number"},{tag:aq.float,class:"hl-number"},{tag:aq.bool,class:"hl-constant"},{tag:aq.null,class:"hl-constant"},{tag:aq.comment,class:"hl-comment"},{tag:aq.lineComment,class:"hl-comment"},{tag:aq.blockComment,class:"hl-comment"},{tag:aq.variableName,class:"hl-name"},{tag:aq.function(aq.variableName),class:"hl-function"},{tag:aq.definition(aq.variableName),class:"hl-name"},{tag:aq.propertyName,class:"hl-name"},{tag:aq.className,class:"hl-class"},{tag:aq.typeName,class:"hl-type"},{tag:aq.operator,class:"hl-operator"},{tag:aq.punctuation,class:"hl-punctuation"},{tag:aq.regexp,class:"hl-regexp"},{tag:aq.escape,class:"hl-escape"},{tag:aq.tagName,class:"hl-tag"},{tag:aq.attributeName,class:"hl-attr"}]);class cf{constructor(e,t,i,n,r,s,o,a,l,h=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=r,this.score=s,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new cf(e,[],t,i,i,0,[],0,n?new cd(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=65535&e,{parser:r}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=r.dynamicPrecedence(n);if(o&&(this.score+=o),0==i){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(n,this.reducePos);return}let a=this.stack.length-(i-1)*3-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let h=this.reducePos-l;h>=2e3&&!(null==(t=this.p.parser.nodeSet.types[n])?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=h));let c=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-c;if(n<r.minRepeatTerm||131072&e){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,l,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(n,l)}storeNode(e,t,i,n=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&0==this.buffer[e-4]&&this.buffer[e-1]>-1){if(t==i)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=i;return}}}if(r&&this.pos!=i){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let e=!1;for(let t=r;t>0&&this.buffer[t-2]>i;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,n>4&&(n-=4)}this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=i,this.buffer[r+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i,n){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:r}=this.p;this.pos=n;let s=r.stateFlag(e,1);!s&&(n>i||t<=r.maxNode)&&(this.reducePos=n),this.pushState(e,s?i:Math.min(i,this.reducePos)),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,n,4)}else this.pos=n,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,n,4)}apply(e,t,i,n){65536&e?this.reduce(e):this.shift(e,t,i,n)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&0==e.buffer[t-4]&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new cf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new cp(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==i)return!1;if((65536&i)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n=0,r;n<t.length;n+=2)(r=t[n+1])!=this.state&&this.p.parser.hasAction(r,e)&&i.push(t[n],r);if(this.stack.length<120)for(let e=0;i.length<8&&e<t.length;e+=2){let n=t[e+1];i.some((e,t)=>1&t&&e==n)||i.push(t[e],n)}t=i}let i=[];for(let e=0;e<t.length&&i.length<4;e+=2){let n=t[e+1];if(n==this.state)continue;let r=this.split();r.pushState(n,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[e],this.pos),r.reducePos=this.pos,r.score-=200,i.push(r)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let i=t>>19,n=65535&t,r=this.stack.length-3*i;if(r<0||0>e.getGoto(this.stack[r],n,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(n,r)=>{if(!t.includes(n))return t.push(n),e.allActions(n,t=>{if(393216&t);else if(65536&t){let i=(t>>19)-r;if(i>1){let n=65535&t,r=this.stack.length-3*i;if(r>=0&&e.getGoto(this.stack[r],n,!1)>=0)return i<<19|65536|n}}else{let e=i(t,r+1);if(null!=e)return e}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new cd(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class cd{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class cp{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=i}}class cO{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new cO(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new cO(this.stack,this.pos,this.index)}}function cg(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,r=0;n<e.length;){let s=0;for(;;){let t=e.charCodeAt(n++),i=!1;if(126==t){s=65535;break}t>=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,i=!0),s+=r,i)break;s*=46}i?i[r++]=s:i=new t(s)}return i}class cm{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let cv=new cm;class cy{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=cv,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,r=this.pos+e;for(;r<i.from;){if(!n)return null;let e=this.ranges[--n];r-=i.from-e.to,i=e}for(;t<0?r>i.to:r>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];r+=e.from-i.to,i=e}return r}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,n;if(t>=0&&t<this.chunk.length)i=this.pos+e,n=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((i=t)>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=i;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-i)),n=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),n}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=cv,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class cw{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;cS(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}cw.prototype.contextual=cw.prototype.fallback=cw.prototype.extend=!1;class cb{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data="string"==typeof e?cg(e):e}token(e,t){let i=e.pos,n=0;for(;;){let i=e.next<0,r=e.resolveOffset(1,1);if(cS(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!i&&n++,null==r)break;e.reset(r,e.token)}n&&(e.reset(i,e.token),e.acceptToken(this.elseToken,n))}}cb.prototype.contextual=cw.prototype.fallback=cw.prototype.extend=!1;class cx{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function cS(e,t,i,n,r,s){let o=0,a=1<<n,{dialect:l}=i.p.parser;o:for(;(a&e[o])!=0;){let i=e[o+1];for(let n=o+3;n<i;n+=2)if((e[n+1]&a)>0){let i=e[n];if(l.allows(i)&&(-1==t.token.value||t.token.value==i||function(e,t,i,n){let r=ck(i,n,t);return r<0||ck(i,n,e)<r}(i,t.token.value,r,s))){t.acceptToken(i);break}}let n=t.next,h=0,c=e[o+2];if(t.next<0&&c>h&&65535==e[i+3*c-3]){o=e[i+3*c-1];continue}for(;h<c;){let r=h+c>>1,s=i+r+(r<<1),a=e[s],l=e[s+1]||65536;if(n<a)c=r;else if(n>=l)h=r+1;else{o=e[s+2],t.advance();continue o}}break}}function ck(e,t,i){for(let n=t,r;65535!=(r=e[n]);n++)if(r==i)return n-t;return -1}let cQ="u">typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),c$=null;function cP(e,t,i){let n=e.cursor(Q.IncludeAnonymous);for(n.moveTo(t);;)if(!(i<0?n.childBefore(t):n.childAfter(t)))for(;;){if((i<0?n.to<t:n.from>t)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,t-25)):Math.min(e.length,Math.max(n.from+1,t+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:e.length}}class cA{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?cP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?cP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],n=this.index[t];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=i.children[n],s=this.start[t]+i.positions[n];if(s>e)return this.nextStart=s,null;if(r instanceof o0){if(s==e){if(s<this.safeFrom)return null;let e=s+r.length;if(e<=this.safeTo){let t=r.prop(oN.lookAhead);if(!t||e+t<this.fragment.to)return r}}this.index[t]++,s+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class cC{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new cm)}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:r}=n,s=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let n=0;n<r.length;n++){if((1<<n&s)==0)continue;let l=r[n],h=this.tokens[n];if((!i||l.fallback)&&((l.contextual||h.start!=e.pos||h.mask!=s||h.context!=o)&&(this.updateCachedToken(h,l,e),h.mask=s,h.context=o),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!l.extend&&(i=h,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||((i=new cm).value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new cm,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n<t.specialized.length;n++)if(t.specialized[n]==e.value){let r=t.specializers[n](this.stream.read(e.start,e.end),i);if(r>=0&&i.p.parser.dialect.allows(r>>1)){(1&r)==0?e.value=r>>1:e.extended=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t<n;t+=3)if(this.actions[t]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=i,n}addActions(e,t,i,n){let{state:r}=e,{parser:s}=e.p,{data:o}=s;for(let e=0;e<2;e++)for(let a=s.stateSlot(r,e?2:1);;a+=3){if(65535==o[a])if(1==o[a+1])a=cE(o,a+2);else{0==n&&2==o[a+1]&&(n=this.putAction(cE(o,a+2),t,i,n));break}o[a]==t&&(n=this.putAction(cE(o,a+1),t,i,n))}return n}}class c_{constructor(e,t,i,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new cy(t,n),this.tokens=new cC(e,this.stream),this.topTerm=e.top[1];let{from:r}=n[0];this.stacks=[cf.start(this,e.top[0],r)],this.fragments=i.length&&this.stream.end-r>4*e.bufferLength?new cA(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[e]=i;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<i.length;s++){let o=i[s];for(;;){if(this.tokens.mainToken=null,o.pos>n)r.push(o);else{if(this.advanceStack(o,r,i))continue;e||(e=[],t=[]),e.push(o);let n=this.tokens.getMainToken(o);t.push(n.value,n.end)}break}}if(!r.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.score<i.score)&&(t=i)}return t}(e);if(t)return cQ&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw cQ&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&e){let i=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,r);if(i)return cQ&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort((e,t)=>t.score-e.score);r.length>e;)r.pop();r.some(e=>e.reducePos>n)&&this.recovering--}else if(r.length>1){l:for(let e=0;e<r.length-1;e++){let t=r[e];for(let i=e+1;i<r.length;i++){let n=r[i];if(t.sameState(n)||t.buffer.length>500&&n.buffer.length>500)if((t.score-n.score||t.buffer.length-n.buffer.length)>0)r.splice(i--,1);else{r.splice(e--,1);continue l}}}r.length>12&&(r.sort((e,t)=>t.score-e.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let e=1;e<r.length;e++)r[e].pos<this.minStackPos&&(this.minStackPos=r[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let n=e.pos,{parser:r}=this,s=cQ?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(n);o;){let n=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(e.state,o.type.id):-1;if(n>-1&&o.length&&(!t||(o.prop(oN.contextHash)||0)==i))return e.useNode(o,n),cQ&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof o0)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(a instanceof o0&&0==o.positions[0])o=a;else break}}let o=r.stateSlot(e.state,4);if(o>0)return e.reduce(o),cQ&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(65535&o)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let o=0;o<a.length;){let l=a[o++],h=a[o++],c=a[o++],u=o==a.length||!i,f=u?e:e.split(),d=this.tokens.mainToken;if(f.apply(l,h,d?d.start:f.pos,c),cQ&&console.log(s+this.stackID(f)+` (via ${(65536&l)==0?"shift":`reduce of ${r.getName(65535&l)}`} for ${r.getName(h)} @ ${n}${f==e?"":", split"})`),u)return!0;f.pos>n?t.push(f):i.push(f)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return cT(e,t),!0}}runRecovery(e,t,i){let n=null,r=!1;for(let s=0;s<e.length;s++){let o=e[s],a=t[s<<1],l=t[(s<<1)+1],h=cQ?this.stackID(o)+" -> ":"";if(o.deadEnd&&(r||(r=!0,o.restart(),cQ&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let c=o.split(),u=h;for(let e=0;e<10&&c.forceReduce()&&(cQ&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));e++)cQ&&(u=this.stackID(c)+" -> ");for(let e of o.recoverByInsert(a))cQ&&console.log(h+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),cQ&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),cT(o,i)):(!n||n.score<c.score)&&(n=c)}return n}stackToTree(e){return e.close(),o0.build({buffer:cO.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(c$||(c$=new WeakMap)).get(e);return t||c$.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function cT(e,t){for(let i=0;i<t.length;i++){let n=t[i];if(n.pos==e.pos&&n.sameState(e)){t[i].score<e.score&&(t[i]=e);return}}t.push(e)}class cM{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||0==this.disabled[e]}}let cZ=e=>e;class cR{constructor(e){this.start=e.start,this.shift=e.shift||cZ,this.reduce=e.reduce||cZ,this.reuse=e.reuse||cZ,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class cX extends ac{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let i=0;i<e.repeatNodeCount;i++)t.push("");let i=Object.keys(e.topRules).map(t=>e.topRules[t][1]),n=[];for(let e=0;e<t.length;e++)n.push([]);function r(e,t,i){n[e].push([t,t.deserialize(String(i))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=oN[e]);for(let i=1;i<t.length;){let n=t[i++];if(n>=0)r(n,e,t[i++]);else{let s=t[i+-n];for(let o=-n;o>0;o--)r(t[i++],e,s);i++}}}this.nodeSet=new oK(t.map((t,r)=>oF.define({name:r>=this.minRepeatTerm?void 0:t,id:r,props:n[r],top:i.indexOf(r)>-1,error:0==r,skipped:e.skippedNodes&&e.skippedNodes.indexOf(r)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let s=cg(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(cj),this.states=cg(e.states,Uint32Array),this.data=cg(e.stateData),this.goto=cg(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new cw(s,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new c_(this,e,t,i);for(let r of this.wrappers)n=r(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return -1;for(let r=n[t+1];;){let t=n[r++],s=1&t,o=n[r++];if(s&&i)return o;for(let i=r+(t>>1);r<i;r++)if(n[r]==e)return o;if(s)return -1}}hasAction(e,t){let i=this.data;for(let n=0;n<2;n++)for(let r=this.stateSlot(e,n?2:1),s;;r+=3){if(65535==(s=i[r]))if(1==i[r+1])s=i[r=cE(i,r+2)];else if(2==i[r+1])return cE(i,r+2);else break;if(s==t||0==s)return cE(i,r+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let i=this.stateSlot(e,1);null==n;i+=3){if(65535==this.data[i])if(1==this.data[i+1])i=cE(this.data,i+2);else break;n=t(cE(this.data,i+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i])if(1==this.data[i+1])i=cE(this.data,i+2);else break;if((1&this.data[i+2])==0){let e=this.data[i+1];t.some((t,i)=>1&i&&t==e)||t.push(this.data[i],e)}}return t}configure(e){let t=Object.assign(Object.create(cX.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(e=>e.from==t);return i?i.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,n)=>{let r=e.specializers.find(e=>e.from==i.external);if(!r)return i;let s=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[n]=cj(s),s})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;e<t.length;e++)if(!i[e])for(let i=this.dialects[t[e]],r;65535!=(r=this.data[i++]);)(n||(n=new Uint8Array(this.maxTerm+1)))[r]=1;return new cM(e,i,n)}static deserialize(e){return new cX(e)}}function cE(e,t){return e[t]|e[t+1]<<16}function cj(e){if(e.external){let t=+!!e.extend;return(i,n)=>e.external(i,n)<<1|t}return e.get}let cB=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],cL=new cR({start:!1,shift:(e,t)=>5==t||6==t||320==t?e:321==t,strict:!1}),cI=new cx((e,t)=>{let{next:i}=e;(125==i||-1==i||t.context)&&e.acceptToken(318)},{contextual:!0,fallback:!0}),cz=new cx((e,t)=>{let{next:i}=e,n;cB.indexOf(i)>-1||(47!=i||47!=(n=e.peek(1))&&42!=n)&&(125==i||59==i||-1==i||t.context||e.acceptToken(316))},{contextual:!0}),cY=new cx((e,t)=>{91!=e.next||t.context||e.acceptToken(317)},{contextual:!0}),cV=new cx((e,t)=>{let{next:i}=e;if(43==i||45==i){if(e.advance(),i==e.next){e.advance();let i=!t.context&&t.canShift(1);e.acceptToken(i?1:2)}}else 63==i&&46==e.peek(1)&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(3))},{contextual:!0});function cW(e,t){return e>=65&&e<=90||e>=97&&e<=122||95==e||e>=192||!t&&e>=48&&e<=57}let cD=new cx((e,t)=>{if(60!=e.next||!t.dialectEnabled(0)||(e.advance(),47==e.next))return;let i=0;for(;cB.indexOf(e.next)>-1;)e.advance(),i++;if(cW(e.next,!0)){for(e.advance(),i++;cW(e.next,!1);)e.advance(),i++;for(;cB.indexOf(e.next)>-1;)e.advance(),i++;if(44==e.next)return;for(let t=0;;t++){if(7==t){if(!cW(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),i++}}e.acceptToken(4,-i)}),cq=a$({"get set async static":aq.modifier,"for while do if else switch try catch finally return throw break continue default case defer":aq.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":aq.operatorKeyword,"let var const using function class extends":aq.definitionKeyword,"import export from":aq.moduleKeyword,"with debugger new":aq.keyword,TemplateString:aq.special(aq.string),super:aq.atom,BooleanLiteral:aq.bool,this:aq.self,null:aq.null,Star:aq.modifier,VariableName:aq.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":aq.function(aq.variableName),VariableDefinition:aq.definition(aq.variableName),Label:aq.labelName,PropertyName:aq.propertyName,PrivatePropertyName:aq.special(aq.propertyName),"CallExpression/MemberExpression/PropertyName":aq.function(aq.propertyName),"FunctionDeclaration/VariableDefinition":aq.function(aq.definition(aq.variableName)),"ClassDeclaration/VariableDefinition":aq.definition(aq.className),"NewExpression/VariableName":aq.className,PropertyDefinition:aq.definition(aq.propertyName),PrivatePropertyDefinition:aq.definition(aq.special(aq.propertyName)),UpdateOp:aq.updateOperator,"LineComment Hashbang":aq.lineComment,BlockComment:aq.blockComment,Number:aq.number,String:aq.string,Escape:aq.escape,ArithOp:aq.arithmeticOperator,LogicOp:aq.logicOperator,BitOp:aq.bitwiseOperator,CompareOp:aq.compareOperator,RegExp:aq.regexp,Equals:aq.definitionOperator,Arrow:aq.function(aq.punctuation),": Spread":aq.punctuation,"( )":aq.paren,"[ ]":aq.squareBracket,"{ }":aq.brace,"InterpolationStart InterpolationEnd":aq.special(aq.brace),".":aq.derefOperator,", ;":aq.separator,"@":aq.meta,TypeName:aq.typeName,TypeDefinition:aq.definition(aq.typeName),"type enum interface implements namespace module declare":aq.definitionKeyword,"abstract global Privacy readonly override":aq.modifier,"is keyof unique infer asserts":aq.operatorKeyword,JSXAttributeValue:aq.attributeValue,JSXText:aq.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":aq.angleBracket,"JSXIdentifier JSXNameSpacedName":aq.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":aq.attributeName,"JSXBuiltin/JSXIdentifier":aq.standard(aq.tagName)}),cN={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},cU={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},cG={__proto__:null,"<":193},cF=cX.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQO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^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:cL,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[cq],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$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#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[cz,cY,cV,cD,2,3,4,5,6,7,8,9,10,11,12,13,14,cI,new cb("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new cb("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>cN[e]||-1},{term:343,get:e=>cU[e]||-1},{term:95,get:e=>cG[e]||-1}],tokenPrec:15201});class cK{constructor(e,t,i,n){this.state=e,this.pos=t,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=aJ(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),n=t.text.slice(i-t.from,this.pos-t.from),r=n.search(c2(e,!1));return r<0?null:{from:i+r,to:this.pos,text:n.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,i){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function cH(e){let t=Object.keys(e).join(""),i=/\w/.test(t);return i&&(t=t.replace(/\w/g,"")),`[${i?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function cJ(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[i,n]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),i=Object.create(null);for(let{label:n}of e){t[n[0]]=!0;for(let e=1;e<n.length;e++)i[n[e]]=!0}let n=cH(t)+cH(i)+"*$";return[RegExp("^"+n),new RegExp(n)]}(t);return e=>{let r=e.matchBefore(n);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:i}:null}}class c0{constructor(e,t,i,n){this.completion=e,this.source=t,this.match=i,this.score=n}}function c1(e){return e.selection.main.from}function c2(e,t){var i;let{source:n}=e,r=t&&"^"!=n[0],s="$"!=n[n.length-1];return r||s?RegExp(`${r?"^":""}(?:${n})${s?"$":""}`,null!=(i=e.flags)?i:e.ignoreCase?"i":""):e}let c5=tH.define(),c3=new WeakMap;function c6(e){if(!Array.isArray(e))return e;let t=c3.get(e);return t||c3.set(e,t=cJ(e)),t}let c4=t1.define(),c8=t1.define();class c7{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let i=td(e,t),n=tO(i);this.chars.push(i);let r=e.slice(t,t+n),s=r.toUpperCase();this.folded.push(td(s==r?r.toLowerCase():s,0)),t+=n}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:i,any:n,precise:r,byWord:s}=this;if(1==t.length){let n=td(e,0),r=tO(n),s=r==e.length?0:-100;if(n==t[0]);else{if(n!=i[0])return null;s+=-200}return this.ret(s,[0,r])}let o=e.indexOf(this.pattern);if(0==o)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(o<0){for(let r=0,s=Math.min(e.length,200);r<s&&l<a;){let s=td(e,r);(s==t[l]||s==i[l])&&(n[l++]=r),r+=tO(s)}if(l<a)return null}let h=0,c=0,u=!1,f=0,d=-1,p=-1,O=/[a-z]/.test(e),g=!0;for(let n=0,l=Math.min(e.length,200),m=0;n<l&&c<a;){let l=td(e,n);o<0&&(h<a&&l==t[h]&&(r[h++]=n),f<a&&(l==t[f]||l==i[f]?(0==f&&(d=n),p=n+1,f++):f=0));let v,y=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(v=tp(l))!=v.toLowerCase()?1:2*(v!=v.toUpperCase());(!n||1==y&&O||0==m&&0!=y)&&(t[c]==l||i[c]==l&&(u=!0)?s[c++]=n:s.length&&(g=!1)),m=y,n+=tO(l)}return c==a&&0==s[0]&&g?this.result(-100+(u?-200:0),s,e):f==a&&0==d?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==a?this.ret(-900-e.length,[d,p]):c==a?this.result(-100+(u?-200:0)+-700+(g?0:-1100),s,e):2==t.length?null:this.result((n[0]?-700:0)+-200+-1100,n,e)}result(e,t,i){let n=[],r=0;for(let e of t){let t=e+(this.astral?tO(td(i,e)):1);r&&n[r-1]==e?n[r-1]=t:(n[r++]=e,n[r++]=t)}return this.ret(e-i.length,n)}}class c9{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),i=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==i?null:(this.matched=[0,t.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}let ue=t_.define({combine:e=>ie(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:ui,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>ut(e(i),t(i)),optionClass:(e,t)=>i=>ut(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function ut(e,t){return e?t?e+" "+t:e:t}function ui(e,t,i,n,r,s){let o=e.textDirection==nv.RTL,a=o,l=!1,h="top",c,u,f=t.left-r.left,d=r.right-t.right,p=n.right-n.left,O=n.bottom-n.top;if(a&&f<Math.min(p,d)?a=!1:!a&&d<Math.min(p,f)&&(a=!0),p<=(a?f:d))c=Math.max(r.top,Math.min(i.top,r.bottom-O))-t.top,u=Math.min(400,a?f:d);else{l=!0,u=Math.min(400,(o?t.right:r.right-t.left)-30);let e=r.bottom-t.bottom;e>=O||e>t.top?c=i.bottom-t.top:(h="bottom",c=t.bottom-i.top)}let g=(t.bottom-t.top)/s.offsetHeight,m=(t.right-t.left)/s.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${u/m}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}let un=t1.define();function ur(e,t,i){if(e<=i)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/i);return{from:e*i,to:(e+1)*i}}let n=Math.ceil((e-t)/i);return{from:e-n*i,to:e-(n-1)*i}}class us{constructor(e,t,i){let n;this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:s,selected:o}=r.open,a=e.state.facet(ue);this.optionContent=(n=a.addToOptions.slice(),a.icons&&n.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),n.push({render(e,t,i,n){let r=document.createElement("span");r.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;e<n.length;){let t=n[e++],i=n[e++];t>o&&r.appendChild(document.createTextNode(s.slice(o,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(t,i))),a.className="cm-completionMatchedText",o=i}return o<s.length&&r.appendChild(document.createTextNode(s.slice(o))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),n.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=ur(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",i=>{let{options:n}=e.state.field(t).open;for(let t=i.target,r;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(r=/-(\d+)$/.exec(t.id))&&+r[1]<n.length){this.applyCompletion(e,n[+r[1]]),i.preventDefault();return}if(i.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&i.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&i.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:un.of(t)}),i.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let i=e.state.field(this.stateField,!1);i&&i.tooltip&&e.state.facet(ue).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:c8.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=n){let{options:r,selected:s,disabled:o}=i.open;n.open&&n.open.options==r||(this.range=ur(r.length,s,e.state.facet(ue).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),o!=(null==(t=n.open)?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=ur(t.options.length,t.selected,this.view.state.facet(ue).maxRenderedOptions),this.showOptions(t.options,e.id));let i=this.updateSelectedOption(t.selected);if(i){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let s="string"==typeof r?document.createTextNode(r):r(n);if(!s)return;"then"in s?s.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>nN(this.view.state,e,"completion info")):(this.addInfoPane(s,n),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)i.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:n}=e;i.appendChild(t),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,i;let n,r,s,o=null;for(let t=this.list.firstChild,i=this.range.from;t;t=t.nextSibling,i++)"LI"==t.nodeName&&t.id?i==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),o=t):t.hasAttribute("aria-selected")&&(t.removeAttribute("aria-selected"),t.removeAttribute("aria-describedby")):i--;return o&&(t=this.list,i=o,n=t.getBoundingClientRect(),r=i.getBoundingClientRect(),s=n.height/t.offsetHeight,r.top<n.top?t.scrollTop-=(n.top-r.top)/s:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/s)),o}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return n.top>Math.min(r.bottom,t.bottom)-10||n.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(ue).positionInfo(this.view,t,n,i,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,i){let n=document.createElement("ul");n.id=t,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions")),n.addEventListener("mousedown",e=>{e.target==n&&e.preventDefault()});let r=null;for(let s=i.from;s<i.to;s++){let{completion:o,match:a}=e[s],{section:l}=o;if(l){let e="string"==typeof l?l:l.name;e!=r&&(s>i.from||0==i.from)&&(r=e,"string"!=typeof l&&l.header?n.appendChild(l.header(l)):n.appendChild(document.createElement("completion-section")).textContent=e)}let h=n.appendChild(document.createElement("li"));h.id=t+"-"+s,h.setAttribute("role","option");let c=this.optionClass(o);for(let e of(c&&(h.className=c),this.optionContent)){let t=e(o,this.view.state,this.view,a);t&&h.appendChild(t)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&n.classList.add("cm-completionListIncompleteBottom"),n}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function uo(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class ua{constructor(e,t,i,n,r,s){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=n,this.selected=r,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new ua(this.options,uu(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,n,r,s){if(n&&!s&&e.some(e=>e.isPending))return n.setDisabled();let o=function(e,t){let i=[],n=null,r=null,s=e=>{i.push(e);let{section:t}=e.completion;if(t){n||(n=[]);let e="string"==typeof t?t:t.name;n.some(t=>t.name==e)||n.push("string"==typeof t?{name:e}:t)}},o=t.facet(ue);for(let n of e)if(n.hasResult()){let e=n.result.getMatch;if(!1===n.result.filter)for(let t of n.result.options)s(new c0(t,n.source,e?e(t):[],1e9-i.length));else{let i=t.sliceDoc(n.from,n.to),a,l=o.filterStrict?new c9(i):new c7(i);for(let t of n.result.options)if(a=l.match(t.label)){let i=t.displayLabel?e?e(t,a.matched):[]:a.matched,o=a.score+(t.boost||0);if(s(new c0(t,n.source,i,o)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;r||(r=Object.create(null)),r[e]=Math.max(o,r[e]||-1e9)}}}}if(n){let e=Object.create(null),t=0;for(let i of n.sort((e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?r[t.name]-r[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1)))t-=1e5,e[i.name]=t;for(let t of i){let{section:i}=t.completion;i&&(t.score+=e["string"==typeof i?i:i.name])}}let a=[],l=null,h=o.compareCompletions;for(let e of i.sort((e,t)=>t.score-e.score||h(e.completion,t.completion))){let t=e.completion;l&&l.label==t.label&&l.detail==t.detail&&(null==l.type||null==t.type||l.type==t.type)&&l.apply==t.apply&&l.boost==t.boost?uo(e.completion)>uo(l)&&(a[a.length-1]=e):a.push(e),l=e.completion}return a}(e,t);if(!o.length)return n&&e.some(e=>e.isPending)?n.setDisabled():null;let a=t.facet(ue).selectOnOpen?0:-1;if(n&&n.selected!=a&&-1!=n.selected){let e=n.options[n.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){a=t;break}}return new ua(o,uu(i,a),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:um,above:r.aboveCursor},n?n.timestamp:Date.now(),a,!1)}map(e){return new ua(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ua(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class ul{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new ul(uf,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,i=t.facet(ue),n=(i.override||t.languageDataAt("autocomplete",c1(t)).map(c6)).map(t=>(this.active.find(e=>e.source==t)||new ud(t,+!!this.active.some(e=>0!=e.state))).update(e,i));n.length==this.active.length&&n.every((e,t)=>e==this.active[t])&&(n=this.active);let r=this.open,s=e.effects.some(e=>e.is(uO));for(let o of(r&&e.docChanged&&(r=r.map(e.changes)),e.selection||n.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let i=0,n=0;;){for(;i<e.length&&!e[i].hasResult();)i++;for(;n<t.length&&!t[n].hasResult();)n++;let r=i==e.length,s=n==t.length;if(r||s)return r==s;if(e[i++].result!=t[n++].result)return!1}}(n,this.active)||s?r=ua.build(n,t,this.id,r,i,s):r&&r.disabled&&!n.some(e=>e.isPending)&&(r=null),!r&&n.every(e=>!e.isPending)&&n.some(e=>e.hasResult())&&(n=n.map(e=>e.hasResult()?new ud(e.source,0):e)),e.effects))o.is(un)&&(r=r&&r.setSelected(o.value,this.id));return n==this.active&&r==this.open?this:new ul(n,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?uh:uc}}let uh={"aria-autocomplete":"list"},uc={};function uu(e,t){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(i["aria-activedescendant"]=e+"-"+t),i}let uf=[];class ud{constructor(e,t,i=!1){this.source=e,this.state=t,this.explicit=i}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let i=function(e,t){if(e.isUserEvent("input.complete")){let i=e.annotation(c5);if(i&&t.activateOnCompletion(i))return 12}let i=e.isUserEvent("input.type");return i&&t.activateOnTyping?5:i?1:e.isUserEvent("delete.backward")?2:e.selection?8:16*!!e.docChanged}(e,t),n=this;for(let t of((8&i||16&i&&this.touches(e))&&(n=new ud(n.source,0)),4&i&&0==n.state&&(n=new ud(this.source,1)),n=n.updateFor(e,i),e.effects))if(t.is(c4))n=new ud(n.source,1,t.value);else if(t.is(c8))n=new ud(n.source,0);else if(t.is(uO))for(let e of t.value)e.source==n.source&&(n=e);return n}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(c1(e.state))}}class up extends ud{constructor(e,t,i,n,r,s){super(e,3,t),this.limit=i,this.result=n,this.from=r,this.to=s}hasResult(){return!0}updateFor(e,t){var i;if(!(3&t))return this.map(e.changes);let n=this.result;n.map&&!e.changes.empty&&(n=n.map(n,e.changes));let r=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),o=c1(e.state);if(o>s||!n||2&t&&(c1(e.startState)==this.from||o<this.limit))return new ud(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,i,n){if(!e)return!1;let r=t.sliceDoc(i,n);return"function"==typeof e?e(r,i,n,t):c2(e,!0).test(r)}(n.validFor,e.state,r,s)?n.update&&(n=n.update(n,r,s,new cK(e.state,o,!1)))?new up(this.source,this.explicit,a,n,n.from,null!=(i=n.to)?i:c1(e.state)):new ud(this.source,1,this.explicit):new up(this.source,this.explicit,a,n,r,s)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new up(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new ud(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let uO=t1.define({map:(e,t)=>e.map(e=>e.map(t))}),ug=tE.define({create:()=>ul.start(),update:(e,t)=>e.update(t),provide:e=>[oy.from(e,e=>e.tooltip),sq.contentAttributes.from(e,e=>e.attrs)]}),um=(f=function(e,t){let i=t.completion.apply||t.completion.label,n=e.state.field(ug).active.find(e=>e.source==t.source);return n instanceof up&&("string"==typeof i?e.dispatch({...function(e,t,i,n){let{main:r}=e.selection,s=i-r.from,o=n-r.from;return{...e.changeByRange(a=>{if(a!=r&&i!=n&&e.sliceDoc(a.from+s,a.from+o)!=e.sliceDoc(i,n))return{range:a};let l=e.toText(t);return{changes:{from:a.from+s,to:n==r.from?a.to:a.from+o,insert:l},range:tP.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(e.state,i,n.from,n.to),annotations:c5.of(t.completion)}):i(e,t.completion,n.from,n.to),!0)},e=>new us(e,ug,f));"object"==typeof navigator&&navigator.platform;let uv=sq.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class uy{constructor(e,t,i,n){this.field=e,this.line=t,this.from=i,this.to=n}}class uw{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,tm.TrackDel),i=e.mapPos(this.to,1,tm.TrackDel);return null==t||null==i?null:new uw(this.field,t,i)}}class ub{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],n=[t],r=e.doc.lineAt(t),s=/^\s*/.exec(r.text)[0];for(let r of this.lines){if(i.length){let i=s,o=/^\t*/.exec(r)[0].length;for(let t=0;t<o;t++)i+=e.facet(li);n.push(t+i.length-o),r=i+r.slice(o)}i.push(r),t+=r.length+1}return{text:i,ranges:this.fieldPositions.map(e=>new uw(e.field,n[e.line]+e.from,n[e.line]+e.to))}}static parse(e){let t=[],i=[],n=[],r;for(let s of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let e=r[1]?+r[1]:null,o=r[2]||r[3]||"",a=-1;0===e&&(e=1e9);let l=o.replace(/\\[{}]/g,e=>e[1]);for(let i=0;i<t.length;i++)(null!=e?t[i].seq==e:l&&t[i].name==l)&&(a=i);if(a<0){let i=0;for(;i<t.length&&(null==e||null!=t[i].seq&&t[i].seq<e);)i++;for(let r of(t.splice(i,0,{seq:e,name:l}),a=i,n))r.field>=a&&r.field++}for(let e of n)if(e.line==i.length&&e.from>r.index){let t=r[2]?3+(r[1]||"").length:2;e.from-=t,e.to-=t}n.push(new uy(a,i.length,r.index,r.index+l.length)),s=s.slice(0,r.index)+o+s.slice(r.index+r[0].length)}s=s.replace(/\\([{}])/g,(e,t,r)=>{for(let e of n)e.line==i.length&&e.from>r&&(e.from--,e.to--);return t}),i.push(s)}return new ub(i,n)}}let ux=iH.widget({widget:new class extends iF{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),uS=iH.mark({class:"cm-snippetField"});class uk{constructor(e,t){this.ranges=e,this.active=t,this.deco=iH.set(e.map(e=>(e.from==e.to?ux:uS).range(e.from,e.to)),!0)}map(e){let t=[];for(let i of this.ranges){let n=i.map(e);if(!n)return null;t.push(n)}return new uk(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}let uQ=t1.define({map:(e,t)=>e&&e.map(t)}),u$=t1.define(),uP=tE.define({create:()=>null,update(e,t){for(let i of t.effects){if(i.is(uQ))return i.value;if(i.is(u$)&&e)return new uk(e.ranges,i.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>sq.decorations.from(e,e=>e?e.deco:iH.none)});function uA(e,t){return tP.create(e.filter(e=>e.field==t).map(e=>tP.range(e.from,e.to)))}function uC(e){return({state:t,dispatch:i})=>{let n=t.field(uP,!1);if(!n||e<0&&0==n.active)return!1;let r=n.active+e,s=e>0&&!n.ranges.some(t=>t.field==r+e);return i(t.update({selection:uA(n.ranges,r),effects:uQ.of(s?null:new uk(n.ranges,r)),scrollIntoView:!0})),!0}}let u_=[{key:"Tab",run:uC(1),shift:uC(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(uP,!1)&&(t(e.update({effects:uQ.of(null)})),!0)}],uT=t_.define({combine:e=>e.length?e[0]:u_}),uM=tB.highest(s0.compute([uT],e=>e.facet(uT)));function uZ(e,t){let i;return{...t,apply:(i=ub.parse(e),(e,t,n,r)=>{let{text:s,ranges:o}=i.instantiate(e.state,n),{main:a}=e.state.selection,l={changes:{from:n,to:r==a.from?a.to:r,insert:tn.of(s)},scrollIntoView:!0,annotations:t?[c5.of(t),t2.userEvent.of("input.complete")]:void 0};if(o.length&&(l.selection=uA(o,0)),o.some(e=>e.field>0)){let t=new uk(o,0),i=l.effects=[uQ.of(t)];void 0===e.state.field(uP,!1)&&i.push(t1.appendConfig.of([uP,uM,uR,uv]))}e.dispatch(e.state.update(l))})}}let uR=sq.domEventHandlers({mousedown(e,t){let i=t.state.field(uP,!1),n;if(!i||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let r=i.ranges.find(e=>e.from<=n&&e.to>=n);return!!r&&r.field!=i.active&&(t.dispatch({selection:uA(i.ranges,r.field),effects:uQ.of(i.ranges.some(e=>e.field>r.field)?new uk(i.ranges,r.field):null),scrollIntoView:!0}),!0)}}),uX=new class extends it{};uX.startSide=1,uX.endSide=-1,"object"==typeof navigator&&navigator.userAgent;let uE=[uZ("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),uZ("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),uZ("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),uZ("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),uZ("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),uZ("try {\n ${}\n} catch (${error}) {\n ${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),uZ("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),uZ("if (${}) {\n ${}\n} else {\n ${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),uZ("class ${name} {\n constructor(${params}) {\n ${}\n }\n}",{label:"class",detail:"definition",type:"keyword"}),uZ('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),uZ('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],uj=uE.concat([uZ("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),uZ("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),uZ("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),uB=new al,uL=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function uI(e){return(t,i)=>{let n=t.node.getChild("VariableDefinition");return n&&i(n,e),!0}}let uz=["FunctionDeclaration"],uY={FunctionDeclaration:uI("function"),ClassDeclaration:uI("class"),ClassExpression:()=>!0,EnumDeclaration:uI("constant"),TypeAliasDeclaration:uI("type"),NamespaceDeclaration:uI("namespace"),VariableDefinition(e,t){e.matchContext(uz)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null},uV=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,uW=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function uD(e){let t=aJ(e.state).resolveInner(e.pos,-1);if(uW.indexOf(t.name)>-1)return null;let i="VariableName"==t.name||t.to-t.from<20&&uV.test(e.state.sliceDoc(t.from,t.to));if(!i&&!e.explicit)return null;let n=[];for(let i=t;i;i=i.parent)uL.has(i.name)&&(n=n.concat(function e(t,i){let n=uB.get(i);if(n)return n;let r=[],s=!0;function o(e,i){let n=t.sliceString(e.from,e.to);r.push({label:n,type:i})}return i.cursor(Q.IncludeAnonymous).iterate(i=>{if(s)s=!1;else if(i.name){let e=uY[i.name];if(e&&e(i,o)||uL.has(i.name))return!1}else if(i.to-i.from>8192){for(let n of e(t,i.node))r.push(n);return!1}}),uB.set(i,r),r}(e.state.doc,i)));return{options:n,from:i?t.from:e.pos,validFor:uV}}let uq=aH.define({name:"javascript",parser:cF.configure({props:[la.add({IfStatement:lf({except:/^\s*({|else\b)/}),TryStatement:lf({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:e=>e.baseIndent,SwitchBody:e=>{let t=e.textAfter,i=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(i?0:n?1:2)*e.unit},Block:function({closing:e,align:t=!0,units:i=1}){return n=>lu(n,t,i,e)}({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":lf({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),lp.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":lO,BlockComment:e=>({from:e.from+2,to:e.to-2}),JSXElement(e){let t=e.firstChild;if(!t||"JSXSelfClosingTag"==t.name)return null;let i=e.lastChild;return{from:t.to,to:i.type.isError?e.to:i.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let i=null==(t=e.firstChild)?void 0:t.nextSibling,n=e.lastChild;return!i||i.type.isError?null:{from:i.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),uN={test:e=>/^JSX/.test(e.name),facet:aU({commentTokens:{block:{open:"{/*",close:"*/}"}}})},uU=uq.configure({dialect:"ts"},"typescript"),uG=uq.configure({dialect:"jsx",props:[aG.add(e=>e.isTop?[uN]:void 0)]}),uF=uq.configure({dialect:"jsx ts",props:[aG.add(e=>e.isTop?[uN]:void 0)]},"typescript"),uK=e=>({label:e,type:"keyword"}),uH=("break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ")).map(uK),uJ=uH.concat(["declare","implements","private","protected","public"].map(uK));function u0(e={}){var t;let i=e.jsx?e.typescript?uF:uG:e.typescript?uU:uq,n=e.typescript?uj.concat(uJ):uE.concat(uH);return new le(i,[uq.data.of({autocomplete:(t=cJ(n),e=>{for(let t=aJ(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(uW.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(e)})}),uq.data.of({autocomplete:uD}),e.jsx?u5:[]])}function u1(e,t,i=e.length){for(let n=null==t?void 0:t.firstChild;n;n=n.nextSibling)if("JSXIdentifier"==n.name||"JSXBuiltin"==n.name||"JSXNamespacedName"==n.name||"JSXMemberExpression"==n.name)return e.sliceString(n.from,Math.min(n.to,i));return""}let u2="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),u5=sq.inputHandler.of((e,t,i,n,r)=>{if((u2?e.composing:e.compositionStarted)||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!uq.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(e=>{var t;let{head:i}=e,r=aJ(o).resolveInner(i-1,-1),s;if("JSXStartTag"==r.name&&(r=r.parent),o.doc.sliceString(i-1,i)!=n||"JSXAttributeValue"==r.name&&r.to>i);else if(">"==n&&"JSXFragmentTag"==r.name)return{range:e,changes:{from:i,insert:"</>"}};else if("/"==n&&"JSXStartCloseTag"==r.name){let e=r.parent,n=e.parent;if(n&&e.from==i-2&&((s=u1(o.doc,n.firstChild,i))||(null==(t=n.firstChild)?void 0:t.name)=="JSXFragmentTag")){let e=`${s}>`;return{range:tP.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==n){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(r);if(t&&"JSXOpenTag"==t.name&&!/^\/?>|^<\//.test(o.doc.sliceString(i,i+2))&&(s=u1(o.doc,t,i)))return{range:e,changes:{from:i,insert:`</${s}>`}}}return{range:e}});return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),u3=a$({String:aq.string,Number:aq.number,"True False":aq.bool,PropertyName:aq.propertyName,Null:aq.null,", :":aq.separator,"[ ]":aq.squareBracket,"{ }":aq.brace}),u6=cX.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[u3],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),u4=aH.define({name:"json",parser:u6.configure({props:[la.add({Object:lf({except:/^\s*\}/}),Array:lf({except:/^\s*\]/})}),lp.add({"Object Array":lO})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}}),u8={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},u7={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},u9={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}},fe=null,ft=null,fi=0;function fn(e,t){var i;let n=e.pos+t;if(fi==n&&ft==e)return fe;let r=e.peek(t),s="";for(;45==(i=r)||46==i||58==i||i>=65&&i<=90||95==i||i>=97&&i<=122||i>=161;)s+=String.fromCharCode(r),r=e.peek(++t);return ft=e,fi=n,fe=s?s.toLowerCase():r==fr||r==fs?void 0:null}let fr=63,fs=33;function fo(e,t){this.name=e,this.parent=t}let fa=[6,10,7,8,9],fl=new cR({start:null,shift:(e,t,i,n)=>fa.indexOf(t)>-1?new fo(fn(n,1)||"",e):e,reduce:(e,t)=>21==t&&e?e.parent:e,reuse(e,t,i,n){let r=t.type.id;return 6==r||37==r?new fo(fn(n,1)||"",e):e},strict:!1}),fh=new cx((e,t)=>{if(60!=e.next){e.next<0&&t.context&&e.acceptToken(58);return}e.advance();let i=47==e.next;i&&e.advance();let n=fn(e,0);if(void 0===n)return;if(!n)return e.acceptToken(i?15:14);let r=t.context?t.context.name:null;if(i){if(n==r)return e.acceptToken(11);if(r&&u7[r])return e.acceptToken(58,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==n)return;e.acceptToken(13)}else{if("script"==n)return e.acceptToken(7);if("style"==n)return e.acceptToken(8);if("textarea"==n)return e.acceptToken(9);if(u8.hasOwnProperty(n))return e.acceptToken(10);r&&u9[r]&&u9[r][n]?e.acceptToken(58,-1):e.acceptToken(6)}},{contextual:!0}),fc=new cx(e=>{for(let t=0,i=0;;i++){if(e.next<0){i&&e.acceptToken(59);break}if(45==e.next)t++;else if(62==e.next&&t>=2){i>=3&&e.acceptToken(59,-2);break}else t=0;e.advance()}}),fu=new cx((e,t)=>{if(47==e.next&&62==e.peek(1)){let i=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(i?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function ff(e,t,i){let n=2+e.length;return new cx(r=>{for(let s=0,o=0,a=0;;a++){if(r.next<0){a&&r.acceptToken(t);break}if(0==s&&60==r.next||1==s&&47==r.next||s>=2&&s<n&&r.next==e.charCodeAt(s-2))s++,o++;else if(s==n&&62==r.next){a>o?r.acceptToken(t,-o):r.acceptToken(i,-(o-2));break}else if((10==r.next||13==r.next)&&a){r.acceptToken(t,1);break}else s=o=0;r.advance()}})}let fd=ff("script",55,1),fp=ff("style",56,2),fO=ff("textarea",57,3),fg=a$({"Text RawText IncompleteTag IncompleteCloseTag":aq.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":aq.angleBracket,TagName:aq.tagName,"MismatchedCloseTag/TagName":[aq.tagName,aq.invalid],AttributeName:aq.attributeName,"AttributeValue UnquotedAttributeValue":aq.attributeValue,Is:aq.definitionOperator,"EntityReference CharacterReference":aq.character,Comment:aq.blockComment,ProcessingInst:aq.processingInstruction,DoctypeDecl:aq.documentMeta}),fm=cX.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&r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O~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:fl,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[fg],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&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]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[fd,fp,fO,fu,fh,fc,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function fv(e,t){let i=Object.create(null);for(let n of e.getChildren(24)){let e=n.getChild(25),r=n.getChild(27)||n.getChild(28);e&&(i[t.read(e.from,e.to)]=r?27==r.type.id?t.read(r.from+1,r.to-1):t.read(r.from,r.to):"")}return i}function fy(e,t){let i=e.getChild(23);return i?t.read(i.from,i.to):" "}function fw(e,t,i){let n;for(let r of i)if(!r.attrs||r.attrs(n||(n=fv(e.node.parent.firstChild,t))))return{parser:r.parser,bracketed:!0};return null}function fb(e=[],t=[]){var i;let n=[],r=[],s=[],o=[];for(let t of e)("script"==t.tag?n:"style"==t.tag?r:"textarea"==t.tag?s:o).push(t);let a=t.length?Object.create(null):null;for(let e of t)(a[e.name]||(a[e.name]=[])).push(e);return i=(e,t)=>{let i=e.type.id;if(29==i)return fw(e,t,n);if(32==i)return fw(e,t,r);if(35==i)return fw(e,t,s);if(21==i&&o.length){let i=e.node,n=i.firstChild,r=n&&fy(n,t),s;if(r){for(let e of o)if(e.tag==r&&(!e.attrs||e.attrs(s||(s=fv(n,t))))){let t=i.lastChild,r=38==t.type.id?t.from:i.to;if(r>n.to)return{parser:e.parser,overlay:[{from:n.to,to:r}]}}}}if(a&&24==i){let i=e.node,n;if(n=i.firstChild){let e=a[t.read(n.from,n.to)];if(e)for(let n of e){if(n.tagName&&n.tagName!=fy(i.parent,t))continue;let e=i.lastChild;if(27==e.type.id){let t=e.from+1,i=e.lastChild,r=e.to-(i&&i.isError?0:1);if(r>t)return{parser:n.parser,overlay:[{from:t,to:r}],bracketed:!0}}else if(28==e.type.id)return{parser:n.parser,overlay:[{from:e.from,to:e.to}]}}}}return null},(e,t,n,r)=>new ag(e,i,t,n,r)}let fx=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function fS(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function fk(e){return e>=48&&e<=57}function fQ(e){return fk(e)||e>=97&&e<=102||e>=65&&e<=70}let f$=(e,t,i)=>(n,r)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=n;if(fS(l)||45==l||95==l||s&&fk(l))!s&&(45!=l||a>0)&&(s=!0),o===a&&45==l&&o++,n.advance();else if(92==l&&10!=n.peek(1)){if(n.advance(),fQ(n.next)){do n.advance();while(fQ(n.next))32==n.next&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(2==o&&r.canShift(2)?t:40==l?i:e);break}}},fP=new cx(f$(149,2,150),{contextual:!0}),fA=new cx(f$(151,3,4),{contextual:!0}),fC=new cx(e=>{if(fx.includes(e.peek(-1))){let{next:t}=e;(fS(t)||95==t||35==t||46==t||42==t||91==t||58==t&&fS(e.peek(1))||45==t||38==t)&&e.acceptToken(148)}}),f_=new cx(e=>{if(!fx.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),fS(t)){do e.advance();while(fS(e.next)||fk(e.next))e.acceptToken(1)}}}),fT=a$({"AtKeyword import charset namespace keyframes media supports font-feature-values":aq.definitionKeyword,"from to selector scope MatchFlag":aq.keyword,NamespaceName:aq.namespace,KeyframeName:aq.labelName,KeyframeRangeName:aq.operatorKeyword,TagName:aq.tagName,ClassName:aq.className,PseudoClassName:aq.constant(aq.className),IdName:aq.labelName,"FeatureName PropertyName":aq.propertyName,AttributeName:aq.attributeName,NumberLiteral:aq.number,KeywordQuery:aq.keyword,UnaryQueryOp:aq.operatorKeyword,"CallTag ValueName FontName":aq.atom,VariableName:aq.variableName,Callee:aq.operatorKeyword,Unit:aq.unit,"UniversalSelector NestingSelector":aq.definitionOperator,"MatchOp CompareOp":aq.compareOperator,"ChildOp SiblingOp, LogicOp":aq.logicOperator,BinOp:aq.arithmeticOperator,Important:aq.modifier,Comment:aq.blockComment,ColorLiteral:aq.color,"ParenthesizedContent StringLiteral":aq.string,":":aq.punctuation,"PseudoOp #":aq.derefOperator,"; , |":aq.separator,"( )":aq.paren,"[ ]":aq.squareBracket,"{ }":aq.brace}),fM={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:158,"url-prefix":158,domain:158,regexp:158},fZ={__proto__:null,or:104,and:104,not:112,only:112,layer:212},fR={__proto__:null,selector:118,style:124,layer:208},fX={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},fE={__proto__:null,to:249},fj=cX.deserialize({version:14,states:"MrQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FqO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#ERO'dQdO'#ETO'oQdO'#E[O'oQdO'#E_OOQP'#Fq'#FqO)RQhO'#FQOOQS'#Fp'#FpOOQS'#FT'#FTQYQdOOO)YQdO'#EeO*iQhO'#EkO)YQdO'#EmO*pQdO'#EoO*{QdO'#ErO)}QhO'#ExO+TQdO'#EzO+`QdO'#E}O+eQaO'#CfO+lQ`O'#EbO+qQ`O'#F}O+|QdO'#F}QOQ`OOP,WO&jO'#CaPOOO)CA`)CA`OOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROO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X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w'O'i'r'x(V(bQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!cW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:174,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[fT],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$_~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$_~!r`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$J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yleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:150,get:e=>fM[e]||-1},{term:151,get:e=>fZ[e]||-1},{term:4,get:e=>fR[e]||-1},{term:28,get:e=>fX[e]||-1},{term:149,get:e=>fE[e]||-1}],tokenPrec:2444}),fB=null;function fL(){if(!fB&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],i=new Set;for(let n in e)"cssText"!=n&&"cssFloat"!=n&&"string"==typeof e[n]&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),i.has(n)||(t.push(n),i.add(n)));fB=t.sort().map(e=>({type:"property",label:e,apply:e+": "}))}return fB||[]}let fI=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),fz=(["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","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","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","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","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","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","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","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","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","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","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","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","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","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","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"].map(e=>({type:"keyword",label:e}))).concat(["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","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","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","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","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","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),fY=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),fV=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),fW=/^(\w[\w-]*|-\w[\w-]*|)$/,fD=/^-(-[\w-]*)?$/,fq=new al,fN=["Declaration"],fU=(s=e=>"VariableName"==e.name,e=>{let{state:t,pos:i}=e,n=aJ(t).resolveInner(i,-1),r=n.type.isError&&n.from==n.to-1&&"-"==t.doc.sliceString(n.from,n.to);if("PropertyName"==n.name||(r||"TagName"==n.name)&&/^(Block|Styles)$/.test(n.resolve(n.to).name))return{from:n.from,options:fL(),validFor:fW};if("ValueName"==n.name)return{from:n.from,options:fz,validFor:fW};if("PseudoClassName"==n.name)return{from:n.from,options:fI,validFor:fW};if(s(n)||(e.explicit||r)&&function(e,t){var i;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let n=null==(i=e.parent)?void 0:i.firstChild;return(null==n?void 0:n.name)=="Callee"&&"var"==t.sliceString(n.from,n.to)}(n,t.doc))return{from:s(n)||r?n.from:i,options:function e(t,i,n){if(i.to-i.from>4096){let r=fq.get(i);if(r)return r;let s=[],o=new Set,a=i.cursor(Q.IncludeAnonymous);if(a.firstChild())do for(let i of e(t,a.node,n))o.has(i.label)||(o.add(i.label),s.push(i));while(a.nextSibling())return fq.set(i,s),s}{let e=[],r=new Set;return i.cursor().iterate(i=>{var s;if(n(i)&&i.matchContext(fN)&&(null==(s=i.node.nextSibling)?void 0:s.name)==":"){let n=t.sliceString(i.from,i.to);r.has(n)||(r.add(n),e.push({label:n,type:"variable"}))}}),e}}(t.doc,function(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}(n),s),validFor:fD};if("TagName"==n.name){for(let{parent:e}=n;e;e=e.parent)if("Block"==e.name)return{from:n.from,options:fL(),validFor:fW};return{from:n.from,options:fY,validFor:fW}}if("AtKeyword"==n.name)return{from:n.from,options:fV,validFor:fW};if(!e.explicit)return null;let o=n.resolve(i),a=o.childBefore(i);return a&&":"==a.name&&"PseudoClassSelector"==o.name?{from:i,options:fI,validFor:fW}:a&&":"==a.name&&"Declaration"==o.name||"ArgList"==o.name?{from:i,options:fz,validFor:fW}:"Block"==o.name||"Styles"==o.name?{from:i,options:fL(),validFor:fW}:null}),fG=aH.define({name:"css",parser:fj.configure({props:[la.add({Declaration:lf()}),lp.add({"Block KeyframeList":lO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),fF=["_blank","_self","_top","_parent"],fK=["ascii","utf-8","utf-16","latin1","latin1"],fH=["get","post","put","delete"],fJ=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],f0=["true","false"],f1={},f2={a:{attrs:{href:null,ping:null,type:null,media:null,target:fF,hreflang:null}},abbr:f1,address:f1,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:f1,aside:f1,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:f1,base:{attrs:{href:null,target:fF}},bdi:f1,bdo:f1,blockquote:{attrs:{cite:null}},body:f1,br:f1,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:fJ,formmethod:fH,formnovalidate:["novalidate"],formtarget:fF,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:f1,center:f1,cite:f1,code:f1,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:f1,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:f1,div:f1,dl:f1,dt:f1,em:f1,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:f1,figure:f1,footer:f1,form:{attrs:{action:null,name:null,"accept-charset":fK,autocomplete:["on","off"],enctype:fJ,method:fH,novalidate:["novalidate"],target:fF}},h1:f1,h2:f1,h3:f1,h4:f1,h5:f1,h6:f1,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:f1,hgroup:f1,hr:f1,html:{attrs:{manifest:null}},i:f1,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:fJ,formmethod:fH,formnovalidate:["novalidate"],formtarget:fF,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:f1,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:f1,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:f1,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:fK,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:f1,noscript:f1,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:f1,param:{attrs:{name:null,value:null}},pre:f1,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:f1,rt:f1,ruby:f1,samp:f1,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:fK}},section:f1,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:f1,source:{attrs:{src:null,type:null,media:null}},span:f1,strong:f1,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:f1,summary:f1,sup:f1,table:f1,tbody:f1,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:f1,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:f1,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:f1,time:{attrs:{datetime:null}},title:f1,tr:f1,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:f1,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:f1},f5={accesskey:null,class:null,contenteditable:f0,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:f0,autocorrect:f0,autocapitalize:f0,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":f0,"aria-autocomplete":["inline","list","both","none"],"aria-busy":f0,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":f0,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":f0,"aria-hidden":f0,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":f0,"aria-multiselectable":f0,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":f0,"aria-relevant":null,"aria-required":f0,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},f3="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of f3)f5[e]=null;class f6{constructor(e,t){this.tags={...f2,...e},this.globalAttrs={...f5,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function f4(e,t,i=e.length){if(!t)return"";let n=t.firstChild,r=n&&n.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,i)):""}function f8(e,t=!1){for(;e;e=e.parent)if("Element"==e.name)if(!t)return e;else t=!1;return null}function f7(e,t,i){let n=i.tags[f4(e,f8(t))];return(null==n?void 0:n.children)||i.allTags}function f9(e,t){let i=[];for(let n=f8(t);n&&!n.type.isTop;n=f8(n.parent)){let r=f4(e,n);if(r&&"CloseTag"==n.lastChild.name)break;r&&0>i.indexOf(r)&&("EndTag"==t.name||t.from>=n.firstChild.to)&&i.push(r)}return i}f6.default=new f6;let de=/^[:\-\.\w\u00b7-\uffff]*$/;function dt(e,t,i,n,r){let s=/\s*>/.test(e.sliceDoc(r,r+5))?"":">",o=f8(i,"StartTag"==i.name||"TagName"==i.name);return{from:n,to:r,options:f7(e.doc,o,t).map(e=>({label:e,type:"type"})).concat(f9(e.doc,i).map((e,t)=>({label:"/"+e,apply:"/"+e+s,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function di(e,t,i,n){let r=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:f9(e.doc,t).map((e,t)=>({label:e,apply:e+r,type:"type",boost:99-t})),validFor:de}}let dn=uq.parser.configure({top:"SingleExpression"}),dr=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:uU.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:uG.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:uF.parser},{tag:"script",attrs:e=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type),parser:dn},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:uq.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:fG.parser}],ds=[{name:"style",parser:fG.parser.configure({top:"Styles"})}].concat(f3.map(e=>({name:e,parser:uq.parser}))),da=aH.define({name:"html",parser:fm.configure({props:[la.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,i;for(let i=e.node;;){let e=i.lastChild;if(!e||"Element"!=e.name||e.to!=i.to)break;t=i=e}return t&&!((i=t.lastChild)&&("CloseTag"==i.name||"SelfClosingTag"==i.name))?e.lineIndent(t.from)+e.unit:null}}),lp.add({Element(e){let t=e.firstChild,i=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==i.name?i.from:e.to}:null}}),lq.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),dl=da.configure({wrap:fb(dr,ds)}),dh=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),dc=sq.inputHandler.of((e,t,i,n,r)=>{if(e.composing||e.state.readOnly||t!=i||">"!=n&&"/"!=n||!dl.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:o}=s,a=o.changeByRange(e=>{var t;let i=o.doc.sliceString(e.from-1,e.to)==n,{head:r}=e,s=aJ(o).resolveInner(r,-1),a;if(i&&">"==n&&"EndTag"==s.name){let t=s.parent;if((a=f4(o.doc,t.parent,r))&&!dh.has(a)&&!function(e,t,i){for(var n;;){if((null==(n=t.lastChild)?void 0:n.name)!="CloseTag")return!1;let r=t.parent;if(!r||f4(e,r)!=i)return!0;t=r}}(o.doc,t.parent,a)){let t=r+ +(">"===o.doc.sliceString(r,r+1));return{range:e,changes:{from:r,to:t,insert:`</${a}>`}}}}else if(i&&"/"==n&&"IncompleteCloseTag"==s.name){let e=s.parent;if(s.from==r-2&&(null==(t=e.lastChild)?void 0:t.name)!="CloseTag"&&(a=f4(o.doc,e,r))&&!dh.has(a)){let e=r+ +(">"===o.doc.sliceString(r,r+1)),t=`${a}>`;return{range:tP.cursor(r+t.length,-1),changes:{from:r,to:e,insert:t}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),du="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class df{constructor(e,t,i=0,n=e.length,r,s){this.test=s,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,n),this.bufferStart=i,this.normalize=r?e=>r(du(e)):du,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return td(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=tp(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=tO(e);let n=this.normalize(t);if(n.length)for(let e=0,r=i,s=!0;;e++){let i=n.charCodeAt(e),o=this.match(i,r,s,this.bufferPos+this.bufferStart,e==n.length-1);if(o)return this.value=o,this;if(e==n.length-1)break;s&&e<t.length&&t.charCodeAt(e)==i?r++:s=!1}}}match(e,t,i,n,r){let s=null;for(let t=0;t<this.matches.length;){let i=this.matches[t],o=!1;this.query.charCodeAt(i.index)==e&&(i.index==this.query.length-1?s={from:i.from,to:n,precise:r&&i.precise}:(i.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(1==this.query.length?s={from:t,to:n,precise:i&&r}:this.matches.push({from:t,index:1,precise:i})),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}"u">typeof Symbol&&(df.prototype[Symbol.iterator]=function(){return this});let dd={from:-1,to:-1,match:/.*/.exec(""),precise:!0},dp="gm"+(null==/x/.unicode?"":"u");class dO{constructor(e,t,i,n=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=dd,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new dv(e,t,i,n,r);this.re=new RegExp(t,dp+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=e.iter();let s=e.lineAt(n);this.curLineStart=s.from,this.matchPos=dy(e,n),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,n=i+t[0].length;if(this.matchPos=dy(this.text,n+ +(i==n)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<n||i>this.value.to)&&(!this.test||this.test(i,n,t)))return this.value={from:i,to:n,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let dg=new WeakMap;class dm{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,i){let n=dg.get(e);if(!n||n.from>=i||n.to<=t){let n=new dm(t,e.sliceString(t,i));return dg.set(e,n),n}if(n.from==t&&n.to==i)return n;let{text:r,from:s}=n;return s>t&&(r=e.sliceString(t,s)+r,s=t),n.to<i&&(r+=e.sliceString(n.to,i)),dg.set(e,new dm(s,r)),new dm(t,r.slice(t-s,i-s))}}class dv{constructor(e,t,i,n,r){this.text=e,this.to=r,this.done=!1,this.value=dd,this.matchPos=dy(e,n),this.re=new RegExp(t,dp+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=dm.get(e,n,this.chunkEnd(n+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,i=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,i,t)))return this.value={from:e,to:i,precise:!0,match:t},this.matchPos=dy(this.text,i+ +(e==i)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=dm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function dy(e,t){if(t>=e.length)return t;let i=e.lineAt(t),n;for(;t<i.to&&(n=i.text.charCodeAt(t-i.from))>=56320&&n<57344;)t++;return t}"u">typeof Symbol&&(dO.prototype[Symbol.iterator]=dv.prototype[Symbol.iterator]=function(){return this});class dw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,dp),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new dP(this):new dS(this)}getCursor(e,t=0,i){let n=e.doc?e:t9.create({doc:e});return null==i&&(i=n.doc.length),this.regexp?dk(this,n,t,i):dx(this,n,t,i)}}class db{constructor(e){this.spec=e}}function dx(e,t,i,n){var r,s,o,a;let l;return e.wholeWord&&(o=t.doc,a=t.charCategorizer(t.selection.main.head),l=(e,t,i,n)=>((n>e||n+i.length<t)&&(n=Math.max(0,e-2),i=o.sliceString(n,Math.min(o.length,t+2))),(a(dQ(i,e-n))!=t8.Word||a(d$(i,e-n))!=t8.Word)&&(a(d$(i,t-n))!=t8.Word||a(dQ(i,t-n))!=t8.Word))),e.test&&(r=e.test,s=l,l=(e,i,n,o)=>(!s||!!s(e,i,n,o))&&r(e>=o&&i<=o+n.length?n.slice(e-o,i-o):t.doc.sliceString(e,i),t,e,i)),new df(t.doc,e.unquoted,i,n,e.caseSensitive?void 0:e=>e.toLowerCase(),l)}class dS extends db{constructor(e){super(e)}nextMatch(e,t,i){let n=dx(this.spec,e,i,e.doc.length).nextOverlapping();if(n.done){let i=Math.min(e.doc.length,t+this.spec.unquoted.length);n=dx(this.spec,e,0,i).nextOverlapping()}return n.done||n.value.from==t&&n.value.to==i?null:n.value}prevMatchInRange(e,t,i){for(let n=i;;){let i=Math.max(t,n-1e4-this.spec.unquoted.length),r=dx(this.spec,e,i,n),s=null;for(;!r.nextOverlapping().done;)s=r.value;if(s)return s;if(i==t)return null;n-=1e4}}prevMatch(e,t,i){let n=this.prevMatchInRange(e,0,t);return n||(n=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),n&&(n.from!=t||n.to!=i)?n:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=dx(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=dx(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}function dk(e,t,i,n){var r,s,o;let a;return e.wholeWord&&(o=t.charCategorizer(t.selection.main.head),a=(e,t,i)=>!i[0].length||(o(dQ(i.input,i.index))!=t8.Word||o(d$(i.input,i.index))!=t8.Word)&&(o(d$(i.input,i.index+i[0].length))!=t8.Word||o(dQ(i.input,i.index+i[0].length))!=t8.Word)),e.test&&(r=e.test,s=a,a=(e,i,n)=>(!s||s(e,i,n))&&r(n[0],t,e,i)),new dO(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:a},i,n)}function dQ(e,t){return e.slice(tf(e,t,!1),t)}function d$(e,t){return e.slice(t,tf(e,t))}class dP extends db{nextMatch(e,t,i){let n=dk(this.spec,e,i,e.doc.length).next();return n.done&&(n=dk(this.spec,e,0,t).next()),n.done?null:n.value}prevMatchInRange(e,t,i){for(let n=1;;n++){let r=Math.max(t,i-1e4*n),s=dk(this.spec,e,r,i),o=null;for(;!s.next().done;)o=s.value;if(o&&(r==t||o.from>r+10))return o;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if("&"==i)return e.match[0];if("$"==i)return"$";for(let t=i.length;t>0;t--){let n=+i.slice(0,t);if(n>0&&n<e.match.length)return e.match[n]+i.slice(t)}return t})}matchAll(e,t){let i=dk(this.spec,e,0,e.doc.length),n=[];for(;!i.next().done;){if(n.length>=t)return null;n.push(i.value)}return n}highlight(e,t,i,n){let r=dk(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)n(r.value.from,r.value.to)}}let dA=t1.define();function dC(e,t){var i=t.ch,n=t.line+1;n<1&&(n=1,i=0),n>e.lines&&(n=e.lines,i=Number.MAX_VALUE);var r=e.line(n);return Math.min(r.from+Math.max(0,i),r.to)}function d_(e,t){let i=e.lineAt(t);return{line:i.number-1,ch:t-i.from}}class dT{constructor(e,t){this.line=e,this.ch=t}}function dM(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||[]).concat(i)}}function dZ(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else{var n=e._handlers,r=n&&n[t];if(r){var s=r.indexOf(i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function dR(e,t,...i){var n,r=null==(n=e._handlers)?void 0:n[t];if(r)for(var s=0;s<r.length;++s)r[s](...i)}function dX(e,...t){if(e)for(var i=0;i<e.length;++i)e[i](...t)}try{r=RegExp("[\\w\\p{Alphabetic}\\p{Number}_]","u")}catch(e){r=/[\w]/}function dE(e,t){var i=e.cm6;if(!i.state.readOnly){var n="input.type.compose";if(e.curOp&&!e.curOp.lastChange&&(n="input.type.compose.start"),t.annotations)try{t.annotations.some(function(e){"input"==e.value&&(e.value=n)})}catch(e){console.error(e)}else t.userEvent=n;return i.dispatch(t)}}function dj(e,t){var i;e.curOp&&(e.curOp.$changeStart=void 0),(t?ho:ha)(e.cm6);let n=null==(i=e.curOp)?void 0:i.$changeStart;null!=n&&e.cm6.dispatch({selection:{anchor:n}})}class dB{openDialog(e,t,i){return function(e,t,i,n){n||(n={}),dI(e,void 0);var r=dL(e,t,n.bottom),s=!1;function o(t){if("string"==typeof t)a.value=t;else{if(s)return;s=!0,dY(e,r),e.state.dialog||e.focus(),n.onClose&&n.onClose(r)}}dz(e,r);var a=r.getElementsByTagName("input")[0];return a&&(n.value&&(a.value=n.value,!1!==n.selectValueOnOpen&&a.select()),n.onInput&&dB.on(a,"input",function(e){n.onInput(e,a.value,o)}),n.onKeyUp&&dB.on(a,"keyup",function(e){n.onKeyUp(e,a.value,o)}),dB.on(a,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,a.value,o)||(13==e.keyCode&&i&&i(a.value),(27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(a.blur(),dB.e_stop(e),o()))}),!1!==n.closeOnBlur&&dB.on(a,"blur",function(){setTimeout(function(){document.activeElement!==a&&o()})}),a.focus()),o}(this,e,t,i)}openNotification(e,t){return function(e,t,i){dI(e,a);var n,r=dL(e,t,i&&i.bottom),s=!1,o=i&&void 0!==i.duration?i.duration:5e3;function a(){s||(s=!0,clearTimeout(n),r.remove(),dY(e,r))}return r.onclick=function(e){e.preventDefault(),a()},dz(e,r),o&&(n=setTimeout(a,o)),a}(this,e,t)}constructor(e){this.state={},this.marks=Object.create(null),this.$mid=0,this.options={},this._handlers={},this.$lastChangeEndOffset=0,this.virtualSelection=null,this.cm6=e,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this)}on(e,t){dM(this,e,t)}off(e,t){dZ(this,e,t)}signal(e,t,i){dR(this,e,t,i)}indexFromPos(e){return dC(this.cm6.state.doc,e)}posFromIndex(e){return d_(this.cm6.state.doc,e)}foldCode(e){let t=this.cm6,i=t.state.selection.ranges,n=dC(this.cm6.state.doc,e),r=tP.create([tP.range(n,n)],0).ranges;t.state.selection.ranges=r,(e=>{for(let n of function(e){let t=[];for(let{head:i}of e.state.selection.ranges)t.some(e=>e.from<=i&&e.to>=i)||t.push(e.lineBlockAt(i));return t}(e)){let r=lg(e.state,n.from,n.to);if(r){var t,i;return e.dispatch({effects:(t=e.state,i=[lv.of(r),function(e,t,i=!0){let n=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return sq.announce.of(`${e.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${e.state.phrase("to")} ${r}.`)}(e,r)],t.field(lw,!1)?i:i.concat(t1.appendConfig.of(lQ())))}),!0}}})(t),t.state.selection.ranges=i}firstLine(){return 0}lastLine(){return this.cm6.state.doc.lines-1}lineCount(){return this.cm6.state.doc.lines}setCursor(e,t){"object"==typeof e&&(t=e.ch,e=e.line);var i=dC(this.cm6.state.doc,{line:e,ch:t||0});this.cm6.dispatch({selection:{anchor:i}},{scrollIntoView:!this.curOp}),this.curOp&&!this.curOp.isVimOp&&this.onBeforeEndOperation()}getCursor(e){var t=this.cm6.state.selection.main,i="head"!=e&&e?"anchor"==e?t.anchor:"start"==e?t.from:"end"==e?t.to:null:t.head;if(null==i)throw Error("Invalid cursor type");return this.posFromIndex(i)}listSelections(){var e=this.cm6.state.doc;return this.cm6.state.selection.ranges.map(t=>({anchor:d_(e,t.anchor),head:d_(e,t.head)}))}setSelections(e,t){var i=this.cm6.state.doc,n=e.map(e=>{var t=dC(i,e.head),n=dC(i,e.anchor);return t==n?tP.cursor(t,1):tP.range(n,t)});this.cm6.dispatch({selection:tP.create(n,t)})}setSelection(e,t,i){this.setSelections([{anchor:e,head:t}],0),i&&"*mouse"==i.origin&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?"":this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{row:e,index:this.indexFromPos(new dT(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var i=e.index,n=0;n<t.length;n++)if(null==(i=t[n].changes.mapPos(i,1,tm.TrackAfter)))return null;var r=this.posFromIndex(i);return 0==r.ch?r.line:null}releaseLineHandles(){this.$lineHandleChanges=void 0}getRange(e,t){var i=this.cm6.state.doc;return this.cm6.state.sliceDoc(dC(i,e),dC(i,t))}replaceRange(e,t,i,n){i||(i=t);var r=this.cm6.state.doc;dE(this,{changes:{from:dC(r,t),to:dC(r,i),insert:e}})}replaceSelection(e){dE(this,this.cm6.state.replaceSelection(e))}replaceSelections(e){dE(this,{changes:this.cm6.state.selection.ranges.map((t,i)=>({from:t.from,to:t.to,insert:e[i]||""}))})}getSelection(){return this.getSelections().join("\n")}getSelections(){var e=this.cm6;return e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(e=>!e.empty)}getInputField(){return this.cm6.contentDOM}clipPos(e){var t=this.cm6.state.doc,i=e.ch,n=e.line+1;n<1&&(n=1,i=0),n>t.lines&&(n=t.lines,i=Number.MAX_VALUE);var r=t.line(n);return new dT(n-1,i=Math.min(Math.max(0,i),r.to-r.from))}getValue(){return this.cm6.state.doc.toString()}setValue(e){var t=this.cm6;return t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e},selection:tP.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(e,t){var i=this.cm6.state,n=dC(i.doc,e),r=lG(i,n+1,-1);return r&&r.end||(r=lG(i,n,1))&&r.end?{to:d_(i.doc,r.end.from)}:{to:void 0}}scanForBracket(e,t,i,n){return function(e,t,i,n){for(var r=n&&n.maxScanLineLength||1e4,s=n&&n.maxScanLines||1e3,o=[],a=n&&n.bracketRegex||/[(){}[\]]/,l=i>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),h=t.line;h!=l;h+=i){var c=e.getLine(h);if(c){var u=i>0?0:c.length-1,f=i>0?c.length:-1;if(!(c.length>r))for(h==t.line&&(u=t.ch-(i<0));u!=f;u+=i){var d=c.charAt(u);if(a.test(d)){var p=dV[d];if(p&&">"==p.charAt(1)==i>0)o.push(d);else{if(!o.length)return{pos:new dT(h,u),ch:d};o.pop()}}}}}return h-i!=(i>0?e.lastLine():e.firstLine())&&null}(this,e,t,n)}indentLine(e,t){t?this.indentMore():this.indentLess()}indentMore(){co(this.cm6)}indentLess(){ca(this.cm6)}execCommand(e){if(dB.commands.hasOwnProperty(e))dB.commands[e](this);else if("goLineLeft"==e)hB(this.cm6);else if("goLineRight"==e){hj(this.cm6);let e=this.cm6.state,t=e.selection.main.head;t<e.doc.length&&"\n"!==e.sliceDoc(t,t+1)&&hS(this.cm6,!1)}else console.log(e+" is not implemented")}setBookmark(e,t){var i=(null==t?void 0:t.insertLeft)?1:-1;return new dD(this,this.indexFromPos(e),i)}addOverlay({query:e}){let t=new dw({regexp:!0,search:e.source,caseSensitive:!/i/.test(e.flags)});if(t.valid){t.forVim=!0,this.cm6Query=t;let e=dA.of(t);return this.cm6.dispatch({effects:e}),t}}removeOverlay(e){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let t=dA.of(this.cm6Query);this.cm6.dispatch({effects:t})}getSearchCursor(e,t){var i=this,n=null,r=null,s=!1;void 0==t.ch&&(t.ch=Number.MAX_VALUE);var o=dC(i.cm6.state.doc,t),a=e.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(e,t){return t||"\\"+e});function l(t,i=0,n=t.length){return new dO(t,a,{ignoreCase:e.ignoreCase},i,n)}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var t=i.cm6.state.doc;return r=(n=e?function(e){var t=i.cm6.state.doc;for(let i=1;;i++){let n=Math.max(0,e-1e4*i),r=l(t,n,e),s=null;for(;!r.next().done;)s=r.value;if(s&&(0==n||s.from>n+10))return s;if(0==n)return null}}(n?s?n.to-1:n.from:o):function(e){var t=i.cm6.state.doc;if(e>t.length)return null;let n=l(t,e).next();return n.done?null:n.value}(n?s?n.to+1:n.to:o))&&{from:d_(t,n.from),to:d_(t,n.to),match:n.match},s=!!n&&n.from==n.to,n&&n.match},from:function(){return null==r?void 0:r.from},to:function(){return null==r?void 0:r.to},replace:function(e){n&&(dE(i,{changes:{from:n.from,to:n.to,insert:e}}),n.to=n.from+e.length,r&&(r.to=d_(i.cm6.state.doc,n.to)))},get match(){return r&&r.match}}}findPosV(e,t,i,n){let{cm6:r}=this,s=r.state.doc,o="page"==i?r.dom.clientHeight:0,a=dC(s,e),l=tP.cursor(a,1,void 0,n),h=Math.round(Math.abs(t));for(let e=0;e<h;e++)"page"==i?l=r.moveVertically(l,t>0,o):"line"==i&&(l=r.moveVertically(l,t>0));let c=d_(s,l.head);return(t<0&&0==l.head&&0!=n&&0==e.line&&0!=e.ch||t>0&&l.head==s.length&&c.ch!=n&&e.line==c.line)&&(c.hitSide=!0),c}charCoords(e,t){var i=this.cm6.contentDOM.getBoundingClientRect(),n=dC(this.cm6.state.doc,e),r=this.cm6.coordsAtPos(n),s=-i.top;return{left:((null==r?void 0:r.left)||0)-i.left,top:((null==r?void 0:r.top)||0)+s,bottom:((null==r?void 0:r.bottom)||0)+s}}coordsChar(e,t){var i=this.cm6.contentDOM.getBoundingClientRect(),n=this.cm6.posAtCoords({x:e.left+i.left,y:e.top+i.top})||0;return d_(this.cm6.state.doc,n)}getScrollInfo(){var e=this.cm6.scrollDOM;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight,width:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth}}scrollTo(e,t){null!=e&&(this.cm6.scrollDOM.scrollLeft=e),null!=t&&(this.cm6.scrollDOM.scrollTop=t)}scrollIntoView(e,t){if(e){var i=this.indexFromPos(e);this.cm6.dispatch({effects:sq.scrollIntoView(i)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:"scroll"})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption("mode")}}setSize(e,t){this.cm6.dom.style.width=e+4+"px",this.cm6.dom.style.height=t+"px",this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(e){for(let t in this.$lineHandleChanges&&this.$lineHandleChanges.push(e),this.marks)this.marks[t].update(e.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(t=>t.map(e.changes)));var t=this.curOp=this.curOp||{};e.changes.iterChanges((e,i,n,r,s)=>{(null==t.$changeStart||t.$changeStart>n)&&(t.$changeStart=n),this.$lastChangeEndOffset=r;var o={text:s.toJSON()};t.lastChange?t.lastChange.next=t.lastChange=o:t.lastChange=t.change=o},!0),t.changeHandlers||(t.changeHandlers=this._handlers.change&&this._handlers.change.slice())}onSelectionChange(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice()),this.curOp.cursorActivity=!0}operation(e,t){this.curOp||(this.curOp={$d:0}),this.curOp.$d++;try{var i=e()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return i}onBeforeEndOperation(){var e=this.curOp,t=!1;e&&(e.change&&dX(e.changeHandlers,this,e.change),e&&e.cursorActivity&&(dX(e.cursorActivityHandlers,this,null),e.isVimOp&&(t=!0)),this.curOp=null),t&&this.scrollIntoView()}moveH(e,t){if("char"==t){var i=this.getCursor();this.setCursor(i.line,i.ch+e)}}setOption(e,t){switch(e){case"keyMap":this.state.keyMap=t;break;case"textwidth":this.state.textwidth=t}}getOption(e){switch(e){case"firstLineNumber":return 1;case"tabSize":return this.cm6.state.tabSize||4;case"readOnly":return this.cm6.state.readOnly;case"indentWithTabs":return" "==this.cm6.state.facet(li);case"indentUnit":return this.cm6.state.facet(li).length||2;case"textwidth":return this.state.textwidth;case"keyMap":return this.state.keyMap||"vim"}}toggleOverwrite(e){this.state.overwrite=e}getTokenTypeAt(e){var t,i=this.indexFromPos(e),n=a0(this.cm6.state,i),r=null==n?void 0:n.resolve(i),s=(null==(t=null==r?void 0:r.type)?void 0:t.name)||"";return/comment/i.test(s)?"comment":/string/i.test(s)?"string":""}overWriteSelection(e){var t=this.cm6.state.doc,i=this.cm6.state.selection,n=i.ranges.map(e=>{if(e.empty){var i=e.to<t.length?t.sliceString(e.from,e.to+1):"";if(i&&!/\n/.test(i))return tP.range(e.from,e.to+1)}return e});this.cm6.dispatch({selection:tP.create(n,i.mainIndex)}),this.replaceSelection(e)}isInMultiSelectMode(){return this.cm6.state.selection.ranges.length>1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(e){var t=this.cm6.state.selection;this.virtualSelection=tP.create(t.ranges,t.mainIndex);for(var i=0;i<this.virtualSelection.ranges.length;i++){var n=this.virtualSelection.ranges[i];n&&(this.cm6.dispatch({selection:tP.create([n])}),e(),this.virtualSelection.ranges[i]=this.cm6.state.selection.ranges[0])}this.cm6.dispatch({selection:this.virtualSelection}),this.virtualSelection=null}hardWrap(e){return function(e,t){for(var i,n=t.column||e.getOption("textwidth")||80,r=!1!=t.allowMerge,s=Math.min(t.from,t.to),o=Math.max(t.from,t.to);s<=o;){var a=e.getLine(s);if(a.length>n){var l=p(a,n,5);if(l){var h=null==(i=/^\s*/.exec(a))?void 0:i[0];e.replaceRange("\n"+h,new dT(s,l.start),new dT(s,l.end))}o++}else if(r&&/\S/.test(a)&&s!=o){var c=e.getLine(s+1);if(c&&/\S/.test(c)){var u=a.replace(/\s+$/,""),f=c.replace(/^\s+/,""),d=u+" "+f,l=p(d,n,5);l&&l.start>u.length||d.length<n?(e.replaceRange(" ",new dT(s,u.length),new dT(s+1,c.length-f.length)),s--,o--):u.length<a.length&&e.replaceRange("",new dT(s,u.length),new dT(s,a.length))}}s++}return s;function p(e,t,i){if(!(e.length<t)){var n=e.slice(0,t),r=e.slice(t),s=/^(?:(\s+)|(\S+)(\s+))/.exec(r),o=/(?:(\s+)|(\s+)(\S+))$/.exec(n),a=0,l=0;if(o&&!o[2]&&(a=t-o[1].length,l=t),s&&!s[2]&&(a||(a=t),l=t+s[1].length),a)return{start:a,end:l};if(o&&o[2]&&o.index>i)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return{start:a=t+s[2].length,end:a+s[3].length}}}}(this,e)}}function dL(e,t,i){var n=document.createElement("div");return n.appendChild(t),n}function dI(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}function dz(e,t){var i=e.state.dialog;e.state.dialog=t,t.style.flex="1",t&&i!==t&&(i&&i.contains(document.activeElement)&&e.focus(),i&&i.parentElement?i.parentElement.replaceChild(t,i):i&&i.remove(),dB.signal(e,"dialog"))}function dY(e,t){e.state.dialog==t&&(e.state.dialog=null,dB.signal(e,"dialog"))}dB.isMac="u">typeof navigator&&/Mac/.test(navigator.platform),dB.Pos=dT,dB.StringStream=class{constructor(e,t,i,n){this.string=e,this.tabSize=t,this.indentUnit=i,this.overrideIndent=n,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e instanceof RegExp?e.test(t):e(t)))return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lF(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return null!=(e=this.overrideIndent)?e:lF(this.string,null,this.tabSize)}match(e,t,i){if("string"==typeof e){let n=e=>i?e.toLowerCase():e;return n(this.string.substr(this.pos,e.length))==n(e)?(!1!==t&&(this.pos+=e.length),!0):null}{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}},dB.commands={toggleLineComment:function(e){l3(e.cm6)},cursorCharLeft:function(e){hQ(e.cm6)},redo:function(e){dj(e,!1)},undo:function(e){dj(e,!0)},newlineAndIndent:function(e){ct({state:e.cm6.state,dispatch:t=>dE(e,t)})},indentAuto:function(e){cs(e.cm6)},newlineAndIndentContinueComment:void 0,save:void 0},dB.isWordChar=function(e){return r.test(e)},dB.keys={Left:e=>s5(e.cm6,{key:"Left"},"editor"),Right:e=>s5(e.cm6,{key:"Right"},"editor"),Up:e=>s5(e.cm6,{key:"Up"},"editor"),Down:e=>s5(e.cm6,{key:"Down"},"editor"),Backspace:e=>s5(e.cm6,{key:"Backspace"},"editor"),Delete:e=>s5(e.cm6,{key:"Delete"},"editor")},dB.addClass=function(e,t){},dB.rmClass=function(e,t){},dB.e_preventDefault=function(e){e.preventDefault()},dB.e_stop=function(e){var t,i;null==(t=null==e?void 0:e.stopPropagation)||t.call(e),null==(i=null==e?void 0:e.preventDefault)||i.call(e)},dB.lookupKey=function(e,t,i){var n=dB.keys[e];!n&&/^Arrow/.test(e)&&(n=dB.keys[e.slice(5)]),n&&i(n)},dB.on=dM,dB.off=dZ,dB.signal=dR,dB.findMatchingTag=function(e,t){return null},dB.findEnclosingTag=function(e,t){var i,n,r=e.cm6.state,s=e.indexFromPos(t);s<r.doc.length&&"<"==r.sliceDoc(s,s+1)&&s++;for(var o=a0(r,s),a=(null==o?void 0:o.resolve(s))||null;a;){if((null==(i=a.firstChild)?void 0:i.type.name)=="OpenTag"&&(null==(n=a.lastChild)?void 0:n.type.name)=="CloseTag")return{open:dW(r.doc,a.firstChild),close:dW(r.doc,a.lastChild)};a=a.parent}},dB.keyName=void 0;var dV={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function dW(e,t){return{from:d_(e,t.from),to:d_(e,t.to)}}class dD{constructor(e,t,i){this.cm=e,this.id=e.$mid++,this.offset=t,this.assoc=i,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return null==this.offset?null:this.cm.posFromIndex(this.offset)}update(e){null!=this.offset&&(this.offset=e.mapPos(this.offset,this.assoc,tm.TrackDel))}}let dq=function(e){return e.facet(on)};class dN{constructor(e,t,i,n,r,s,o,a,l,h){this.left=e,this.top=t,this.height=i,this.fontFamily=n,this.fontSize=r,this.fontWeight=s,this.color=o,this.className=a,this.letter=l,this.partial=h}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",e.style.height=this.height+"px",e.style.lineHeight=this.height+"px",e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?"transparent":this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}}class dU{constructor(e,t){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=t,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer cm-vimCursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){let e=dq(this.cm.cm6.state).cursorBlinkRate;this.cursorLayer.style.animationDuration=e+"ms"}update(e){var t;(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),dq((t=e).startState)!=dq(t.state)&&this.setBlinkRate()}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,t=[];for(let i of e.selection.ranges){let n=i==e.selection.main,r=function(e,t,i,n){var r,s,o;let a=i.head,l=!1,h=1,c=e.state.vim;if(c&&(!c.insertMode||e.state.overwrite)){if(l=!0,c.visualBlock&&!n)return null;i.anchor<i.head&&"\n"!=(a<t.state.doc.length&&t.state.sliceDoc(a,a+1))&&a--,e.state.overwrite?h=.2:c.status&&(h=.5)}if(!l)return null;{let e,i=a<t.state.doc.length&&t.state.sliceDoc(a,a+1);i&&/[\uDC00-\uDFFF]/.test(i)&&a>1&&(a--,i=t.state.sliceDoc(a,a+1));let l=t.coordsAtPos(a,1);if(!l)return null;let c=(e=t.scrollDOM.getBoundingClientRect(),{left:(t.textDirection==nv.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}),f=t.domAtPos(a),d=f?f.node:t.contentDOM;for(d instanceof Text&&f.offset>=d.data.length&&(null==(r=d.parentElement)?void 0:r.nextSibling)&&(f={node:d=null==(s=d.parentElement)?void 0:s.nextSibling,offset:0});f&&f.node instanceof HTMLElement;)d=f.node,f={node:f.node.childNodes[f.offset],offset:0};if(!(d instanceof HTMLElement)){if(!d.parentNode)return null;d=d.parentNode}let p=getComputedStyle(d),O=l.left,g=null==(o=t.coordsForChar)?void 0:o.call(t,a);if(g&&(O=g.left),i&&"\n"!=i&&"\r"!=i)if(" "==i){i=" ";var u=t.coordsAtPos(a+1,-1);u&&(O=u.left-(u.left-l.left)/parseInt(p.tabSize))}else/[\uD800-\uDBFF]/.test(i)&&a<t.state.doc.length-1&&(i+=t.state.sliceDoc(a+1,a+2));else i=" ";let m=l.bottom-l.top;return new dN((O-c.left)/t.scaleX,(l.top-c.top+m*(1-h))/t.scaleY,m*h/t.scaleY,p.fontFamily,p.fontSize,p.fontWeight,p.color,n?"cm-fat-cursor cm-cursor-primary":"cm-fat-cursor cm-cursor-secondary",i,1!=h)}}(this.cm,this.view,i,n);r&&t.push(r)}return{cursors:t}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((e,t)=>!e.eq(this.cursors[t]))){let t=this.cursorLayer.children;if(t.length!==e.length)for(let t of(this.cursorLayer.textContent="",e))this.cursorLayer.appendChild(t.draw());else e.forEach((e,i)=>e.adjust(t[i]));this.cursors=e}}destroy(){this.cursorLayer.remove()}}let dG=tB.highest(sq.theme({".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-fat-cursor":{position:"absolute",background:"#ff9696",border:"none",whiteSpace:"pre"},"&:not(.cm-focused) .cm-fat-cursor":{background:"none",outline:"solid 1px #ff9696",color:"transparent !important"}}));var dF="u">typeof navigator&&/linux/i.test(navigator.platform)&&/ Gecko\/\d+/.exec(navigator.userAgent);let dK=function(e){var t,i,n,r=e.Pos;function s(e,t,i){if(t.line===i.line&&t.ch>=i.ch-1){var n=e.getLine(t.line).charCodeAt(t.ch);55296<=n&&n<=55551&&(i.ch+=1)}return{start:t,end:i}}var o=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"gc",type:"operator",operator:"toggleComment",isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"g?",type:"operator",operator:"rot13"},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],a=Object.create(null),l=o.length,h=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"put",shortName:"pu"},{name:"delmarks",shortName:"delm"},{name:"marks",excludeFromCommandHistory:!0},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],c=V("");function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(en(e.getCursor(),0,1)),ee.enterInsertMode(e,{},t))}),t.onPasteFn}var f=/[\d]/,d=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],p=[function(e){return/\S/.test(e)}],O=["<",">"],g=["-",'"',".",":","_","/","+"],m=/^\w$/,v=/^[A-Z]$/;try{v=RegExp("^[\\p{Lu}]$","u")}catch(e){}function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function w(e){return/^[a-z]$/.test(e)}function b(e){return/^\s*$/.test(e)}function x(e){return -1!=".?!".indexOf(e)}function S(e,t){for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1}var k={};function Q(e,t,i,n,r){if(void 0===t&&!r)throw Error("defaultValue is required unless callback is provided");if(i||(i="string"),k[e]={type:i,defaultValue:t,callback:r},n)for(var s=0;s<n.length;s++)k[n[s]]=k[e];t&&$(e,t)}function $(e,t,i,n){var r=k[e],s=(n=n||{}).scope;if(!r)return Error("Unknown option: "+e);if("boolean"==r.type)if(t&&!0!==t)return Error("Invalid argument: "+e+"="+t);else!1!==t&&(t=!0);r.callback?("local"!==s&&r.callback(t,void 0),"global"!==s&&i&&r.callback(t,i)):("local"!==s&&(r.value="boolean"==r.type?!!t:t),"global"!==s&&i&&(i.state.vim.options[e]={value:t}))}function P(e,t,i){var n=k[e],r=(i=i||{}).scope;if(!n)return Error("Unknown option: "+e);if(!n.callback)return("global"!==r&&t&&t.state.vim.options[e]||"local"!==r&&n||{}).value;{let e=t&&n.callback(void 0,t);return"global"!==r&&void 0!==e?e:"local"!==r?n.callback():void 0}}Q("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t)if(void 0===e){let e=t.getOption("mode");return"null"==e?"":e}else t.setOption("mode",""==e?"null":e)}),Q("textwidth",80,"number",["tw"],function(e,t){if(void 0!==t)if(void 0===e)return t.getOption("textwidth");else{var i=Math.round(e);i>1&&t.setOption("textwidth",i)}});var A=function(){var e=-1,t=0,i=0,n=Array(100);function r(r,s){(e+=s)>t?e=t:e<i&&(e=i);var o=n[(100+e)%100];if(o&&!o.find()){var a,l=s>0?1:-1,h=r.getCursor();do if(e+=l,(o=n[(100+e)%100])&&(a=o.find())&&!eo(h,a))break;while(e<t&&e>i)}return o}return{cachedCursor:void 0,add:function(r,s,o){var a=n[e%100];function l(t){var i=++e%100,s=n[i];s&&s.clear(),n[i]=r.setBookmark(t)}if(a){var h=a.find();h&&!eo(h,s)&&l(s)}else l(s);l(o),t=e,(i=e-100+1)<0&&(i=0)},find:function(t,i){var n=e,s=r(t,i);return e=n,s&&s.find()},move:r}},C=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};class _{constructor(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=C()}exitMacroRecordMode(){var e=t.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1}enterMacroRecordMode(e,i){var n=t.registerController.getRegister(i);if(n){if(n.clear(),this.latestRegister=i,e.openDialog){var r=eL("span",{class:"cm-vim-message"},"recording @"+i);this.onRecordingDone=e.openDialog(r,function(){},{bottom:!0})}this.isRecording=!0}}}function T(e){return e.state.vim||(e.state.vim={inputState:new W,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:void 0,sel:{anchor:new r(0,0),head:new r(0,0)},options:{},expectLiteralNext:!1,status:""}),e.state.vim}function M(){for(var e in t={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:A(),macroModeState:new _,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new U({}),searchHistoryController:new G,exCommandHistoryController:new G},k){var i=k[e];i.value=i.defaultValue}}class Z{constructor(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}}var R={enterVimMode:function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",e1),T(t),e.on(t.getInputField(),"paste",u(t))},leaveVimMode:function(t){t.setOption("disableInput",!1),t.off("cursorActivity",e1),e.off(t.getInputField(),"paste",u(t)),t.state.vim=null,eV&&clearTimeout(eV)},buildKeyMap:function(){},getRegisterController:function(){return t.registerController},resetVimGlobalState_:M,getVimGlobalState_:function(){return t},maybeInitVimState_:T,suppressErrorLogging:!1,InsertModeKey:Z,map:function(e,t,i){eK.map(e,t,i)},unmap:function(e,t){return eK.unmap(e,t)},noremap:function(e,t,i){eK.map(e,t,i,!0)},mapclear:function(e){var t=o.length,i=o.slice(0,t-l);if(o=o.slice(t-l),e)for(var n=i.length-1;n>=0;n--){var r=i[n];if(e!==r.context)if(r.context)this._mapCommand(r);else{var s=["normal","insert","visual"];for(var a in s)if(s[a]!==e){var h=Object.assign({},r);h.context=s[a],this._mapCommand(h)}}}},langmap:Y,vimKeyFromEvent:z,setOption:$,getOption:P,defineOption:Q,defineEx:function(e,t,i){if(t){if(0!==e.indexOf(t))throw Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;eF[e]=i,eK.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,i){var n=this.findKey(e,t,i);if("function"==typeof n)return n()},multiSelectHandleKey:function(e,t,i){var n=T(e),r=!1,n=R.maybeInitVimState_(e),s=n.visualBlock||n.wasInVisualBlock;if(e.state.closeVimNotification){var o=e.state.closeVimNotification;if(e.state.closeVimNotification=null,o(),"<CR>"==t)return D(e),!0}var a=e.isInMultiSelectMode();if(n.wasInVisualBlock&&!a?n.wasInVisualBlock=!1:a&&n.visualBlock&&(n.wasInVisualBlock=!0),"<Esc>"!=t||n.insertMode||n.visualMode||!a||"<Esc>"!=n.status)if(s||!a||e.inVirtualSelectionMode)r=R.handleKey(e,t,i);else{var l=e8(n),h=n.inputState.changeQueueList||[];e.operation(function(){e.curOp&&(e.curOp.isVimOp=!0);var s=0;e.forEachSelection(function(){e.state.vim.inputState.changeQueue=h[s];var n=e.getCursor("head"),o=e.getCursor("anchor"),a=ea(n,o)?0:-1,c=ea(n,o)?-1:0;n=en(n,0,a),o=en(o,0,c),e.state.vim.sel.head=n,e.state.vim.sel.anchor=o,r=R.handleKey(e,t,i),e.virtualSelection&&(h[s]=e.state.vim.inputState.changeQueue,e.state.vim=e8(l)),s++}),e.curOp?.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),e.state.vim=n,n.inputState.changeQueueList=h,n.inputState.changeQueue=null},!0)}else D(e);return!r||n.visualMode||n.insertMode||n.visualMode==e.somethingSelected()||e2(e,n),r},findKey:function(n,r,s){var a=T(n);function l(){if("<Esc>"==r){if(a.visualMode)ev(n);else{if(!a.insertMode)return;eH(n)}return D(n),!0}}var h=a.insertMode?function(){if(l())return!0;a.inputState.keyBuffer.push(r);var e=a.inputState.keyBuffer.join(""),s=1==r.length,h=F.matchCommand(e,o,a.inputState,"insert"),c=a.inputState.changeQueue;if("none"==h.type)return D(n),!1;if("partial"==h.type){if(h.expectLiteralNext&&(a.expectLiteralNext=!0),i&&window.clearTimeout(i),i=s&&window.setTimeout(function(){a.insertMode&&a.inputState.keyBuffer.length&&D(n)},P("insertModeEscKeysTimeout")),s){var u=n.listSelections();c&&c.removed.length==u.length||(c=a.inputState.changeQueue=new q),c.inserted+=r;for(var f=0;f<u.length;f++){var d=el(u[f].anchor,u[f].head),p=eh(u[f].anchor,u[f].head),O=n.getRange(d,n.state.overwrite?en(p,0,1):p);c.removed[f]=(c.removed[f]||"")+O}}return!s}if("full"==h.type&&(a.inputState.keyBuffer.length=0),a.expectLiteralNext=!1,i&&window.clearTimeout(i),h.command&&c){for(var u=n.listSelections(),f=0;f<u.length;f++){var g=u[f].head;n.replaceRange(c.removed[f]||"",en(g,0,-c.inserted.length),g,"+input")}t.macroModeState.lastInsertModeChanges.changes.pop()}return h.command||D(n),h.command}():function(){if(function(){var e=t.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),D(n),!0;"mapping"!=s&&function(e,i){if(!e.isPlaying){var n=e.latestRegister,r=t.registerController.getRegister(n);r&&r.pushText(i)}}(e,r)}}()||l())return!0;a.inputState.keyBuffer.push(r);var e=a.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(e))return!0;var i=/^(\d*)(.*)$/.exec(e);if(!i)return D(n),!1;var h=a.visualMode?"visual":"normal",c=i[2]||i[1];a.inputState.operatorShortcut&&a.inputState.operatorShortcut.slice(-1)==c&&(c=a.inputState.operatorShortcut);var u=F.matchCommand(c,o,a.inputState,h);return"none"==u.type?(D(n),!1):"partial"==u.type?(u.expectLiteralNext&&(a.expectLiteralNext=!0),!0):"clear"==u.type?(D(n),!0):(a.expectLiteralNext=!1,a.inputState.keyBuffer.length=0,(i=/^(\d*)(.*)$/.exec(e))&&i[1]&&"0"!=i[1]&&a.inputState.pushRepeatDigit(i[1]),u.command)}();return!1===h?!a.insertMode&&(1===r.length||e.isMac&&/<A-.>/.test(r))?function(){return!0}:void 0:!0===h?function(){return!0}:h?function(){return n.operation(function(){n.curOp.isVimOp=!0;try{if("object"!=typeof h)return;"keyToKey"==h.type?j(n,h.toKeys,h):F.processCommand(n,a,h)}catch(e){throw n.state.vim=void 0,T(n),R.suppressErrorLogging||console.log(e),e}return!0})}:void 0},handleEx:function(e,t){eK.processCommand(e,t)},defineMotion:function(e,t){K[e]=t},defineAction:function(e,t){ee[e]=t},defineOperator:function(e,t){J[e]=t},mapCommand:function(e,t,i,n,r){var s={keys:e,type:t};for(var o in s[t]=i,s[t+"Args"]=n,r)s[o]=r[o];eJ(s)},_mapCommand:eJ,defineRegister:function(e,i){var n=t.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(n[e])throw Error("Register already defined "+e);n[e]=i,g.push(e)},exitVisualMode:ev,exitInsertMode:eH},X=[],E=!1;function j(e,t,i){var r=E;if(i){if(-1!=X.indexOf(i))return;X.push(i),E=!1!=i.noremap}try{for(var s,o=T(e),a=/<(?:[CSMA]-)*\w+>|./gi;s=a.exec(t);){var l=s[0],h=o.insertMode;if(n){!function(e){if(!n)throw Error("No prompt to send key to");if("<"==e[0]){var t=e.toLowerCase().slice(1,-1);if("lt"==(t=t.split("-").pop()||""))e="<";else if("space"==t)e=" ";else if("cr"==t)e="\n";else if(I[t]){var i=n.value||"",r={key:I[t],target:{value:i,selectionEnd:i.length,selectionStart:i.length}};n.onKeyDown&&n.onKeyDown(r,n.value,o),n&&n.onKeyUp&&n.onKeyUp(r,n.value,o);return}}if("\n"==e){var s=n;n=null,s.onClose&&s.onClose(s.value)}else n.value=(n.value||"")+e;function o(e){n&&("string"==typeof e?n.value=e:n=null)}}(l);continue}if(!R.handleKey(e,l,"mapping")&&h&&o.insertMode){if("<"==l[0]){var c=l.toLowerCase().slice(1,-1);if(c=c.split("-").pop()||"","lt"==c)l="<";else if("space"==c)l=" ";else if("cr"==c)l="\n";else if(I.hasOwnProperty(c)){l=I[c],e6(e,l);continue}else l=l[0],a.lastIndex=s.index+1}e.replaceSelection(l)}}}finally{if(X.pop(),E=!!X.length&&r,!X.length&&n){var u=n;n=null,ez(e,u)}}}var B={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},L={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},I={};function z(t,i){var n=t.key;if(!L[n]){n.length>1&&"n"==n[0]&&(n=n.replace("Numpad","")),n=B[n]||n;var r="";if(t.ctrlKey&&(r+="C-"),t.altKey&&(r+="A-"),t.metaKey&&(r+="M-"),e.isMac&&"A-"==r&&1==n.length&&(r=r.slice(2)),(r||n.length>1)&&t.shiftKey&&(r+="S-"),i&&!i.expectLiteralNext&&1==n.length){if(c.keymap&&n in c.keymap)!1==c.remapCtrl&&r||(n=c.keymap[n]);else if(n.charCodeAt(0)>128&&!a[n]){var s=t.code?.slice(-1)||"";t.shiftKey||(s=s.toLowerCase()),s&&(n=s,!r&&t.altKey&&(r="A-"))}}return(r+=n).length>1&&(r="<"+r+">"),r}}function Y(e,t){c.string!==e&&(c=V(e)),c.remapCtrl=t}function V(e){let t={};if(!e)return{keymap:t,string:""};function i(e){return e.split(/\\?(.)/).filter(Boolean)}return e.split(/((?:[^\\,]|\\.)+),/).map(e=>{if(!e)return;let n=e.split(/((?:[^\\;]|\\.)+);/);if(3==n.length){let e=i(n[1]),r=i(n[2]);if(e.length!==r.length)return;for(let i=0;i<e.length;++i)t[e[i]]=r[i]}else if(1==n.length){let n=i(e);if(n.length%2!=0)return;for(let e=0;e<n.length;e+=2)t[n[e]]=n[e+1]}}),{keymap:t,string:e}}"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(B)).forEach(function(e){I[(B[e]||"").toLowerCase()]=I[e.toLowerCase()]=e}),Q("langmap",void 0,"string",["lmap"],function(e,t){if(void 0===e)return c.string;Y(e)});class W{constructor(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=void 0,this.changeQueue=null}pushRepeatDigit(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)}getRepeat(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e}}function D(t,i){t.state.vim.inputState=new W,t.state.vim.expectLiteralNext=!1,e.signal(t,"vim-command-done",i)}function q(){this.removed=[],this.inserted=""}class N{constructor(e,t,i){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!i}setText(e,t,i){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!i}pushText(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)}pushInsertModeChanges(e){this.insertModeChanges.push(C(e))}pushSearchQuery(e){this.searchQueries.push(e)}clear(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1}toString(){return this.keyBuffer.join("")}}class U{constructor(e){this.registers=e,this.unnamedRegister=e['"']=new N,e["."]=new N,e[":"]=new N,e["/"]=new N,e["+"]=new N}pushText(e,t,i,n,r){if("_"!==e){n&&"\n"!==i.charAt(i.length-1)&&(i+="\n");var s=this.isValidRegister(e)?this.getRegister(e):null;if(!s||!e){switch(t){case"yank":this.registers["0"]=new N(i,n,r);break;case"delete":case"change":-1==i.indexOf("\n")?this.registers["-"]=new N(i,n):(this.shiftNumericRegisters_(),this.registers["1"]=new N(i,n))}this.unnamedRegister.setText(i,n,r);return}v.test(e)?s.pushText(i,n):s.setText(i,n,r),"+"===e&&navigator.clipboard.writeText(i),this.unnamedRegister.setText(s.toString(),n)}}getRegister(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new N),this.registers[e]):this.unnamedRegister}isValidRegister(e){return e&&(S(e,g)||m.test(e))}shiftNumericRegisters_(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}}class G{constructor(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}nextMatch(e,t){var i=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var r=this.iterator+n;t?r>=0:r<i.length;r+=n)for(var s=i[r],o=0;o<=s.length;o++)if(this.initialPrefix==s.substring(0,o))return this.iterator=r,s;return r>=i.length?(this.iterator=i.length,this.initialPrefix):r<0?e:void 0}pushInput(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)}reset(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}}var F={matchCommand:function(e,t,i,n){var r=function(e,t,i,n){n.operator&&(i="operatorPending");for(var r,s=[],o=[],a=E?t.length-l:0,h=a;h<t.length;h++){var c=t[h];("insert"!=i||"insert"==c.context)&&(!c.context||c.context==i)&&(!n.operator||"action"!=c.type)&&(r=function(e,t){let i="<character>"==t.slice(-11),n="<register>"==t.slice(-10);if(!i&&!n)return e==t?"full":0==t.indexOf(e)&&"partial";var r=t.length-(i?11:10),s=e.slice(0,r),o=t.slice(0,r);return s==o&&e.length>r?"full":0==o.indexOf(s)&&"partial"}(e,c.keys))&&("partial"==r&&s.push(c),"full"==r&&o.push(c))}return{partial:s,full:o}}(e,t,n,i),s=r.full[0];if(!s)return r.partial.length?{type:"partial",expectLiteralNext:1==r.partial.length&&"<character>"==r.partial[0].keys.slice(-11)}:{type:"none"};if("<character>"==s.keys.slice(-11)||"<register>"==s.keys.slice(-10)){var o=function(e){var t=/^.*(<[^>]+>)$/.exec(e),i=t?t[1]:e.slice(-1);if(i.length>1)switch(i){case"<CR>":case"<S-CR>":i="\n";break;case"<Space>":case"<S-Space>":i=" ";break;default:i=""}return i}(e);if(!o||o.length>1)return{type:"clear"};i.selectedCharacter=o}return{type:"full",command:s}},processCommand:function(e,t,i){switch(t.inputState.repeatOverride=i.repeatOverride,i.type){case"motion":this.processMotion(e,t,i);break;case"operator":this.processOperator(e,t,i);break;case"operatorMotion":this.processOperatorMotion(e,t,i);break;case"action":this.processAction(e,t,i);break;case"search":this.processSearch(e,t,i);break;case"ex":case"keyToEx":this.processEx(e,t,i)}},processMotion:function(e,t,i){t.inputState.motion=i.motion,t.inputState.motionArgs=ei(i.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,i){var n=t.inputState;if(n.operator)if(n.operator==i.operator){n.motion="expandToLine",n.motionArgs={linewise:!0,repeat:1},this.evalInput(e,t);return}else D(e);n.operator=i.operator,n.operatorArgs=ei(i.operatorArgs),i.keys.length>1&&(n.operatorShortcut=i.keys),i.exitVisualBlock&&(t.visualBlock=!1,eg(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,i){var n=t.visualMode,r=ei(i.operatorMotionArgs);r&&n&&r.visualLine&&(t.visualLine=!0),this.processOperator(e,t,i),n||this.processMotion(e,t,i)},processAction:function(e,t,i){var n=t.inputState,r=n.getRepeat(),s=!!r,o=ei(i.actionArgs)||{repeat:1};n.selectedCharacter&&(o.selectedCharacter=n.selectedCharacter),i.operator&&this.processOperator(e,t,i),i.motion&&this.processMotion(e,t,i),(i.motion||i.operator)&&this.evalInput(e,t),o.repeat=r||1,o.repeatIsExplicit=s,o.registerName=n.registerName,D(e),t.lastMotion=null,i.isEdit&&this.recordLastEdit(t,n,i),ee[i.action](e,o,t)},processSearch:function(i,n,r){if(i.getSearchCursor){var s=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;eZ(i).setReversed(!s);var a=s?"/":"?",l=eZ(i).getQuery(),h=i.getScrollInfo(),c="";switch(r.searchArgs.querySrc){case"prompt":var u=t.macroModeState;u.isPlaying?p(u.replaySearchQueries.shift()||"",!0,!1):ez(i,{onClose:function(e){i.scrollTo(h.left,h.top),p(e,!0,!0);var n=t.macroModeState;n.isRecording&&function(e,i){if(!e.isPlaying){var n=e.latestRegister,r=t.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(i)}}(n,e)},prefix:a,desc:eL("span",{$cursor:"pointer",onmousedown:function(e){e.preventDefault(),$("pcre",!P("pcre")),this.textContent=O(),g()}},O()),onKeyUp:function(e,i,n){var r,s=z(e);"<Up>"==s||"<Down>"==s?(r=e.target?e.target.selectionEnd:0,n(i=t.searchHistoryController.nextMatch(i,"<Up>"==s)||""),r&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(r,e.target.value.length))):s&&"<Left>"!=s&&"<Right>"!=s&&t.searchHistoryController.reset(),c=i,g()},onKeyDown:function(n,r,s){var o=z(n);"<Esc>"==o||"<C-c>"==o||"<C-[>"==o||"<BS>"==o&&""==r?(t.searchHistoryController.pushInput(r),t.searchHistoryController.reset(),eY(i,l?.source||""),eq(i),i.scrollTo(h.left,h.top),e.e_stop(n),D(i),s(),i.focus()):"<Up>"==o||"<Down>"==o?e.e_stop(n):"<C-u>"==o&&(e.e_stop(n),s(""))}});break;case"wordUnderCursor":var f=ew(i,{noSymbol:!0}),d=!0;if(f||(f=ew(i,{noSymbol:!1}),d=!1),!f){eI(i,"No word under cursor"),D(i);return}let n=i.getLine(f.start.line).substring(f.start.ch,f.end.ch);n=d&&o?"\\b"+n+"\\b":n.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),t.jumpList.cachedCursor=i.getCursor(),i.setCursor(f.start),p(n,!0,!1)}}function p(e,s,o){t.searchHistoryController.pushInput(e),t.searchHistoryController.reset();try{eY(i,e,s,o)}catch(t){eI(i,"Invalid regex: "+e),D(i);return}F.processMotion(i,n,{keys:"",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function O(){return P("pcre")?"(JavaScript regexp: set pcre)":"(Vim regexp: set nopcre)"}function g(){var e;try{e=eY(i,c,!0,!0)}catch(e){}e?i.scrollIntoView(eD(i,!s,e),30):(eq(i),i.scrollTo(h.left,h.top))}},processEx:function(i,n,r){if("keyToEx"==r.type)eK.processCommand(i,r.exArgs.input);else{var s={onClose:function(e){t.exCommandHistoryController.pushInput(e),t.exCommandHistoryController.reset(),eK.processCommand(i,e),i.state.vim&&D(i),eq(i)},onKeyDown:function(n,r,s){var o,a=z(n);(("<Esc>"==a||"<C-c>"==a||"<C-[>"==a||"<BS>"==a&&""==r)&&(t.exCommandHistoryController.pushInput(r),t.exCommandHistoryController.reset(),e.e_stop(n),D(i),eq(i),s(),i.focus()),"<Up>"==a||"<Down>"==a)?(e.e_stop(n),o=n.target?n.target.selectionEnd:0,s(r=t.exCommandHistoryController.nextMatch(r,"<Up>"==a)||""),o&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(o,n.target.value.length))):"<C-u>"==a?(e.e_stop(n),s("")):a&&"<Left>"!=a&&"<Right>"!=a&&t.exCommandHistoryController.reset()},onKeyUp:function(t,n){var r=new e.StringStream(n),s={};try{if(eK.parseInput_(i,r,s),"s"!=s.commandName)return void eq(i);var o=eK.matchCommand_(s.commandName);if(!o||(eK.parseCommandArgs_(r,s,o),!s.argString))return;var a=eB(s.argString.slice(1),!0,!0);a&&eW(i,a)}catch(e){}},prefix:":"};if(n.visualMode)s.value="'<,'>",s.selectValueOnOpen=!1;else{var o=n.inputState.getRepeat();o>1&&(s.value=".,.+"+(o-1),s.selectValueOnOpen=!1)}ez(i,s)}},evalInput:function(e,i){var n=i.inputState,o=n.motion,a=n.motionArgs||{repeat:1},l=n.operator,h=n.operatorArgs||{},c=n.registerName,u=i.sel,f=es(i.visualMode?et(e,u.head):e.getCursor("head")),d=es(i.visualMode?et(e,u.anchor):e.getCursor("anchor")),p=es(f),O=es(d);if(l&&this.recordLastEdit(i,n),(w=void 0!==n.repeatOverride?n.repeatOverride:n.getRepeat())>0&&a.explicitRepeat?a.repeatIsExplicit=!0:(a.noRepeat||!a.explicitRepeat&&0===w)&&(w=1,a.repeatIsExplicit=!1),n.selectedCharacter&&(a.selectedCharacter=h.selectedCharacter=n.selectedCharacter),a.repeat=w,D(e),o){var g=K[o](e,f,a,i,n);if(i.lastMotion=K[o],!g)return;if(a.toJumplist){var m=t.jumpList,v=m.cachedCursor;v?(eb(e,v,g),delete m.cachedCursor):eb(e,f,g)}g instanceof Array?(P=g[0],y=g[1]):y=g,y||(y=es(f)),i.visualMode?(i.visualBlock&&1/0===y.ch||(y=et(e,y,p)),P&&(P=et(e,P)),P=P||O,u.anchor=P,u.head=y,eg(e),eA(e,i,"<",ea(P,y)?P:y),eA(e,i,">",ea(P,y)?y:P)):l||(y=et(e,y,p),e.setCursor(y.line,y.ch))}if(l){if(h.lastSel){var y,w,x,S,k,Q,$,P=O,A=h.lastSel,C=Math.abs(A.head.line-A.anchor.line),_=Math.abs(A.head.ch-A.anchor.ch);y=A.visualLine?new r(O.line+C,O.ch):A.visualBlock?new r(O.line+C,O.ch+_):A.head.line==A.anchor.line?new r(O.line,O.ch+_):new r(O.line+C,O.ch),i.visualMode=!0,i.visualLine=A.visualLine,i.visualBlock=A.visualBlock,u=i.sel={anchor:P,head:y},eg(e)}else i.visualMode&&(h.lastSel={anchor:es(u.anchor),head:es(u.head),visualBlock:i.visualBlock,visualLine:i.visualLine});if(i.visualMode){x=el(u.head,u.anchor),S=eh(u.head,u.anchor),k=i.visualLine||h.linewise,Q=i.visualBlock?"block":k?"line":"char";var T=s(e,x,S);if($=em(e,{anchor:T.start,head:T.end},Q),k){var M=$.ranges;if("block"==Q)for(var Z=0;Z<M.length;Z++)M[Z].head.ch=eu(e,M[Z].head.line);else"line"==Q&&(M[0].head=new r(M[0].head.line+1,0))}}else{if(x=es(P||O),ea(S=es(y||p),x)){var R,X,E=x;x=S,S=E}(k=a.linewise||h.linewise)?(R=x,X=S,R.ch=0,X.ch=0,X.line++):a.forward&&function(e,t,i){var n=e.getRange(t,i);if(/\n\s*$/.test(n)){var r=n.split("\n");r.pop();for(var s=r.pop();r.length>0&&s&&b(s);s=r.pop())i.line--,i.ch=0;s?(i.line--,i.ch=eu(e,i.line)):i.ch=0}}(e,x,S),Q="char";var j=!a.inclusive||k,T=s(e,x,S);$=em(e,{anchor:T.start,head:T.end},Q,j)}e.setSelections($.ranges,$.primary),i.lastMotion=null,h.repeat=w,h.registerName=c,h.linewise=k;var B=J[l](e,h,$.ranges,O,y);i.visualMode&&ev(e,null!=B),B&&e.setCursor(B)}},recordLastEdit:function(e,i,n){var r=t.macroModeState;r.isPlaying||(e.lastEditInputState=i,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},K={moveToTopLine:function(e,t,i){var n=eN(e).top+i.repeat-1;return new r(n,ey(e.getLine(n)))},moveToMiddleLine:function(e){var t=eN(e),i=Math.floor((t.top+t.bottom)*.5);return new r(i,ey(e.getLine(i)))},moveToBottomLine:function(e,t,i){var n=eN(e).bottom-i.repeat+1;return new r(n,ey(e.getLine(n)))},expandToLine:function(e,t,i){return new r(t.line+i.repeat-1,1/0)},findNext:function(e,t,i){var n=eZ(e),r=n.getQuery();if(r){var s=!i.forward;s=n.isReversed()?!s:s,eW(e,r);var o=eD(e,s,r,i.repeat);return o||eI(e,"No match found "+r+(P("pcre")?" (set nopcre to use Vim regexps)":"")),o}},findAndSelectNextInclusive:function(t,i,n,s,o){var a=eZ(t),l=a.getQuery();if(l){var h,c,u,f,d,p=!n.forward,O=(h=t,c=p=a.isReversed()?!p:p,u=l,f=n.repeat,d=s,h.operation(function(){void 0===f&&(f=1);var e=h.getCursor(),t=h.getSearchCursor(u,e),i=t.find(!c);!d.visualMode&&i&&eo(t.from(),e)&&t.find(!c);for(var n=0;n<f;n++)if(!(i=t.find(c))&&!(t=h.getSearchCursor(u,c?new r(h.lastLine()):new r(h.firstLine(),0))).find(c))return;var s=t.from(),o=t.to();return s&&o&&[s,o]}));if(O){if(o.operator)return O;var g=O[0],m=new r(O[1].line,O[1].ch-1);if(s.visualMode){(s.visualLine||s.visualBlock)&&(s.visualLine=!1,s.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""}));var v=s.sel.anchor;if(v)if(a.isReversed())return n.forward?[v,g]:[v,m];else return n.forward?[v,m]:[v,g]}else s.visualMode=!0,s.visualLine=!1,s.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""});return p?[m,g]:[g,m]}}},goToMark:function(e,t,i,n){var r=eU(e,n,i.selectedCharacter||"");return r?i.linewise?{line:r.line,ch:ey(e.getLine(r.line))}:r:null},moveToOtherHighlightedEnd:function(e,t,i,n){var s=n.sel;return n.visualBlock&&i.sameLine?[et(e,new r(s.anchor.line,s.head.ch)),et(e,new r(s.head.line,s.anchor.ch))]:[s.head,s.anchor]},jumpToMark:function(e,t,i,n){for(var s=t,o=0;o<i.repeat;o++){var a=s;for(var l in n.marks){if(w(l)){var h=n.marks[l].find();if((i.forward?!ea(h,a):!ea(a,h))&&(!i.linewise||h.line!=a.line)){var c=eo(a,s),u=i.forward?ec(a,h,s):ec(s,h,a);(c||u)&&(s=h)}}}}return i.linewise&&(s=new r(s.line,ey(e.getLine(s.line)))),s},moveByCharacters:function(e,t,i){var n=i.repeat,s=i.forward?t.ch+n:t.ch-n;return new r(t.line,s)},moveByLines:function(e,t,i,n){var s=t.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:s=n.lastHPos;break;default:n.lastHPos=s}var o=i.repeat+(i.repeatOffset||0),a=i.forward?t.line+o:t.line-o,l=e.firstLine(),h=e.lastLine(),c=e.findPosV(t,i.forward?o:-o,"line",n.lastHSPos);return((i.forward?c.line>a:c.line<a)&&(a=c.line,s=c.ch),a<l&&t.line==l)?this.moveToStartOfLine(e,t,i,n):a>h&&t.line==h?e$(e,t,i,n,!0):(i.toFirstChar&&(n.lastHPos=s=ey(e.getLine(a))),n.lastHSPos=e.charCoords(new r(a,s),"div").left,new r(a,s))},moveByDisplayLines:function(e,t,i,n){var r=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(r,"div").left}for(var s=Math.round(i.repeat),o=0;o<s;o++){var a=e.findPosV(r,i.forward?1:-1,"line",n.lastHSPos);if(a.hitSide)break;r=a}return r!=t&&(n.lastHPos=r.ch),r},moveByPage:function(e,t,i){var n=i.repeat;return e.findPosV(t,i.forward?n:-n,"page")},moveByParagraph:function(e,t,i){var n=i.forward?1:-1;return eC(e,t,i.repeat,n).start},moveBySentence:function(e,t,i){var n=i.forward?1:-1,s=e,o=t,a=i.repeat,l=n;function h(e,t){if(null!==t.line)if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!y(e,t.ln)){t.line=null;return}t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}for(var c={ln:o.line,pos:o.ch};a>0;)c=l<0?function(e,t,i,n){var r=e.getLine(t),s={line:r,ln:t,pos:i,dir:n},o=s.ln,a=null,l=""===s.line;for(h(e,s);null!==s.line;){if(""!==s.line||l)if(x(s.line[s.pos])&&null!==a&&(s.ln!==o||s.pos+1!==a))return{ln:o,pos:a};else""===s.line||b(s.line[s.pos])||(l=!1,o=s.ln,a=s.pos);else if(null!==a)return{ln:o,pos:a};else return{ln:s.ln,pos:s.pos};h(e,s)}var r=e.getLine(o);a=0;for(var c=0;c<r.length;++c)if(!b(r[c])){a=c;break}return{ln:o,pos:a}}(s,c.ln,c.pos,l):function(e,t,i,n){var r=e.getLine(t),s=""===r,o={line:r,ln:t,pos:i,dir:n},a={ln:o.ln,pos:o.pos},l=""===o.line;for(h(e,o);null!==o.line;){if(a.ln=o.ln,a.pos=o.pos,""===o.line&&!l||s&&""!==o.line&&!b(o.line[o.pos]))return{ln:o.ln,pos:o.pos};x(o.line[o.pos])&&!s&&(o.pos===o.line.length-1||b(o.line[o.pos+1]))&&(s=!0),h(e,o)}var r=e.getLine(a.ln);a.pos=0;for(var c=r.length-1;c>=0;--c)if(!b(r[c])){a.pos=c;break}return a}(s,c.ln,c.pos,l),a--;return new r(c.ln,c.pos)},moveByScroll:function(e,t,i,n){var r=e.getScrollInfo(),s=null,o=i.repeat;o||(o=r.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(i.repeat=o,!(s=K.moveByDisplayLines(e,t,i,n)))return null;var l=e.charCoords(s,"local");return e.scrollTo(null,r.top+l.top-a.top),s},moveByWords:function(e,t,i){return function(e,t,i,n,s,o){var a=es(t),l=[];(n&&!s||!n&&s)&&i++;for(var h=!(n&&s),c=0;c<i;c++){var u=eQ(e,t,n,o,h);if(!u){var f=eu(e,e.lastLine());l.push(n?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}l.push(u),t=new r(u.line,n?u.to-1:u.from)}var d=l.length!=i,p=l[0],O=l.pop();return n&&!s?(d||p.from==a.ch&&p.line==a.line||(O=l.pop()),O&&new r(O.line,O.from)):n&&s?O&&new r(O.line,O.to-1):!n&&s?(d||p.to==a.ch&&p.line==a.line||(O=l.pop()),O&&new r(O.line,O.to)):O&&new r(O.line,O.from)}(e,t,i.repeat,!!i.forward,!!i.wordEnd,!!i.bigWord)},moveTillCharacter:function(e,t,i){var n=eP(e,i.repeat,i.forward,i.selectedCharacter,t),r=i.forward?-1:1;return(ex(r,i),n)?(n.ch+=r,n):null},moveToCharacter:function(e,t,i){var n=i.repeat;return ex(0,i),eP(e,n,i.forward,i.selectedCharacter,t)||t},moveToSymbol:function(e,t,i){var n=i.repeat;return i.selectedCharacter&&function(e,t,i,n){var s=es(e.getCursor()),o=i?1:-1,a=i?e.lineCount():-1,l=s.ch,h=s.line,c=e.getLine(h),u={lineText:c,nextCh:c.charAt(l),lastCh:null,index:l,symb:n,reverseSymb:(i?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:i,depth:0,curMoveThrough:!1},f=eS[n];if(!f)return s;var d=ek[f].init,p=ek[f].isComplete;for(d&&d(u);h!==a&&t;){if(u.index+=o,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(h+=o,u.lineText=e.getLine(h)||"",o>0)u.index=0;else{var O=u.lineText.length;u.index=O>0?O-1:0}u.nextCh=u.lineText.charAt(u.index)}p(u)&&(s.line=h,s.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?new r(h,u.index):s}(e,n,i.forward,i.selectedCharacter)||t},moveToColumn:function(e,t,i,n){var s,o,a,l=i.repeat;return n.lastHPos=l-1,n.lastHSPos=e.charCoords(t,"div").left,s=e,o=l,a=s.getCursor().line,et(s,new r(a,o-1))},moveToEol:function(e,t,i,n){return e$(e,t,i,n,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){return new r(t.line,ey(e.getLine(t.line)))},moveToMatchedSymbol:function(e,t){for(var i,n,s=t.line,o=t.ch,a=e.getLine(s);o<a.length;o++)if((i=a.charAt(o))&&(n=i,-1!="()[]{}".indexOf(n))){var l=e.getTokenTypeAt(new r(s,o+1));if("string"!==l&&"comment"!==l)break}if(!(o<a.length))return t;var h="<"===i||">"===i?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new r(s,o),{bracketRegex:h}).to},moveToStartOfLine:function(e,t){return new r(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,i){var n=i.forward?e.lastLine():e.firstLine();return i.repeatIsExplicit&&(n=i.repeat-e.getOption("firstLineNumber")),new r(n,ey(e.getLine(n)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(t,i,n,s){var o,a,l,h,c,u,f,d,p,O,g=n.selectedCharacter||"";"b"==g?g="(":"B"==g&&(g="{");var m=!n.textObjectInner;if(({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"})[g]){if(O=!0,!(p=eT(t,i,g,m))){var v=t.getSearchCursor(RegExp("\\"+g,"g"),i);v.find()&&(p=eT(t,v.from(),g,m))}}else if(({"'":!0,'"':!0,"`":!0})[g])O=!0,p=function(e,t,i,n){var s,o,a,l,h=es(t),c=e.getLine(h.line).split(""),u=c.indexOf(i);if(h.ch<u)h.ch=u;else if(u<h.ch&&c[h.ch]==i){var f=/string/.test(e.getTokenTypeAt(en(t,0,1))),d=/string/.test(e.getTokenTypeAt(t));!(f&&!d)&&(o=h.ch,--h.ch)}if(c[h.ch]!=i||o)for(a=h.ch;a>-1&&!s;a--)c[a]==i&&(s=a+1);else s=h.ch+1;if(s&&!o)for(a=s,l=c.length;a<l&&!o;a++)c[a]==i&&(o=a);return s&&o?(n&&(--s,++o),{start:new r(h.line,s),end:new r(h.line,o)}):{start:h,end:h}}(t,i,g,m);else if("W"===g||"w"===g)for(var y=n.repeat||1;y-- >0;){var w=ew(t,{inclusive:m,innerWord:!m,bigWord:"W"===g,noSymbol:"W"===g,multiline:!0},p&&p.end);w&&(p||(p=w),p.end=w.end)}else if("p"===g)if(p=eC(t,i,n.repeat,0,m),n.linewise=!0,s.visualMode)s.visualLine||(s.visualLine=!0);else{var S=s.inputState.operatorArgs;S&&(S.linewise=!0),p.end.line--}else if("t"===g)p=function(t,i,n){if(!e.findMatchingTag||!e.findEnclosingTag)return{start:i,end:i};var r=e.findMatchingTag(t,i)||e.findEnclosingTag(t,i);return r&&r.open&&r.close?n?{start:r.open.from,end:r.close.to}:{start:r.open.to,end:r.close.from}:{start:i,end:i}}(t,i,m);else if("s"===g){var k=t.getLine(i.line);i.ch>0&&x(k[i.ch])&&(i.ch-=1);var Q=e_(t,i,n.repeat,1,m),$=e_(t,i,n.repeat,-1,m);b(t.getLine($.line)[$.ch])&&b(t.getLine(Q.line)[Q.ch-1])&&($={line:$.line,ch:$.ch+1}),p={start:$,end:Q}}return p?t.state.vim.visualMode?(o=t,a=p.start,l=p.end,h=O,u=o.state.vim.sel,f=h?a:u.head,d=h?a:u.anchor,ea(l,a)&&(c=l,l=a,a=c),ea(f,d)?(f=el(a,f),d=eh(d,l)):(d=el(a,d),-1==(f=en(f=eh(f,l),0,-1)).ch&&f.line!=o.firstLine()&&(f=new r(f.line-1,eu(o,f.line-1)))),[d,f]):[p.start,p.end]:null},repeatLastCharacterSearch:function(e,i,n){var r=t.lastCharacterSearch,s=n.repeat,o=n.forward===r.forward,a=!!r.increment*(o?-1:1);n.inclusive=!!o;var l=eP(e,s,o,r.selectedCharacter,en(i,0,-a));return l?(l.ch+=a,l):i}};function H(e,t){for(var i=[],n=0;n<t;n++)i.push(e);return i}var J={change:function(e,i,n){var s,o,a=e.state.vim,l=n[0].anchor,h=n[0].head;if(a.visualMode)if(i.fullLine)h.ch=Number.MAX_VALUE,h.line--,e.setSelection(l,h),o=e.getSelection(),e.replaceSelection(""),s=l;else{o=e.getSelection();var c=H("",n.length);e.replaceSelections(c),s=el(n[0].head,n[0].anchor)}else{o=e.getRange(l,h);var u=a.lastEditInputState;if(u?.motion=="moveByWords"&&!b(o)){var f=/\s+$/.exec(o);f&&u.motionArgs&&u.motionArgs.forward&&(h=en(h,0,-f[0].length),o=o.slice(0,-f[0].length))}i.linewise&&(l=new r(l.line,ey(e.getLine(l.line))),h.line>l.line&&(h=new r(h.line-1,Number.MAX_VALUE))),e.replaceRange("",l,h),s=l}t.registerController.pushText(i.registerName,"change",o,i.linewise,n.length>1),ee.enterInsertMode(e,{head:s},e.state.vim)},delete:function(e,i,n){var s,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var l=H("",n.length);e.replaceSelections(l),s=el(n[0].head,n[0].anchor)}else{var h=n[0].anchor,c=n[0].head;i.linewise&&c.line!=e.firstLine()&&h.line==e.lastLine()&&h.line==c.line-1&&(h.line==e.firstLine()?h.ch=0:h=new r(h.line-1,eu(e,h.line-1))),o=e.getRange(h,c),e.replaceRange("",h,c),s=h,i.linewise&&(s=K.moveToFirstNonWhiteSpaceCharacter(e,h))}return t.registerController.pushText(i.registerName,"delete",o,i.linewise,a.visualBlock),et(e,s)},indent:function(e,t,i){var n=e.state.vim,r=n.visualMode&&t.repeat||1;if(n.visualBlock){for(var s,o=e.getOption("tabSize"),a=e.getOption("indentWithTabs")?" ":" ".repeat(o),l=i.length-1;l>=0;l--)if(s=el(i[l].anchor,i[l].head),t.indentRight)e.replaceRange(a.repeat(r),s,s);else{for(var h=e.getLine(s.line),c=0,u=0;u<r;u++){var f=h[s.ch+c];if(" "==f)c++;else if(" "==f){c++;for(var d=1;d<a.length&&" "===(f=h[s.ch+c]);d++)c++}else break}e.replaceRange("",s,en(s,0,c))}return s}if(e.indentMore)for(var u=0;u<r;u++)t.indentRight?e.indentMore():e.indentLess();else{var p=i[0].anchor.line,O=n.visualBlock?i[i.length-1].anchor.line:i[0].head.line;t.linewise&&O--;for(var l=p;l<=O;l++)for(var u=0;u<r;u++)e.indentLine(l,t.indentRight)}return K.moveToFirstNonWhiteSpaceCharacter(e,i[0].anchor)},indentAuto:function(e,t,i){return e.execCommand("indentAuto"),K.moveToFirstNonWhiteSpaceCharacter(e,i[0].anchor)},hardWrap:function(e,t,i,n){if(e.hardWrap){var s=i[0].anchor.line,o=i[0].head.line;t.linewise&&o--;var a=e.hardWrap({from:s,to:o});return a>s&&t.linewise&&a--,t.keepCursor?n:new r(a,0)}},toggleComment:function(e,t,i,n,r){return e.execCommand("toggleLineComment"),r},changeCase:function(e,t,i,n,r){for(var s=e.getSelections(),o=[],a=t.toLower,l=0;l<s.length;l++){var h=s[l],c="";if(!0===a)c=h.toLowerCase();else if(!1===a)c=h.toUpperCase();else for(var u=0;u<h.length;u++){var f=h.charAt(u);c+=v.test(f)?f.toLowerCase():f.toUpperCase()}o.push(c)}return(e.replaceSelections(o),t.shouldMoveCursor)?r:!e.state.vim.visualMode&&t.linewise&&i[0].anchor.line+1==i[0].head.line?K.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:el(i[0].anchor,i[0].head)},yank:function(e,i,n,r){var s=e.state.vim,o=e.getSelection(),a=s.visualMode?el(s.sel.anchor,s.sel.head,n[0].head,n[0].anchor):r;t.registerController.pushText(i.registerName,"yank",o,i.linewise,s.visualBlock);var l=Math.abs(e.getCursor("end").line-e.getCursor("start").line)||1;return eI(e,l+" lines yanked"+(i.registerName?' into "'+i.registerName:""),!1,1500),a},rot13:function(e,t,i,n,r){for(var s=e.getSelections(),o=[],a=0;a<s.length;a++){let e=s[a].split("").map(e=>{let t=e.charCodeAt(0);return t>=65&&t<=90?String.fromCharCode(65+(t-65+13)%26):t>=97&&t<=122?String.fromCharCode(97+(t-97+13)%26):e}).join("");o.push(e)}return(e.replaceSelections(o),t.shouldMoveCursor)?r:!e.state.vim.visualMode&&t.linewise&&i[0].anchor.line+1==i[0].head.line?K.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:el(i[0].anchor,i[0].head)}},ee={jumpListWalk:function(e,i,n){if(!n.visualMode){var r=i.repeat||1,s=i.forward,o=t.jumpList.move(e,s?r:-r),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,i){if(!i.visualMode){var n=t.repeat||1,r=e.defaultTextHeight(),s=e.getScrollInfo().top,o=r*n,a=t.forward?s+o:s-o,l=es(e.getCursor()),h=e.charCoords(l,"local");if(t.forward)a>h.top?(l.line+=(a-h.top)/r,l.line=Math.ceil(l.line),e.setCursor(l),h=e.charCoords(l,"local"),e.scrollTo(null,h.top)):e.scrollTo(null,a);else{var c=a+e.getScrollInfo().clientHeight;c<h.bottom?(l.line-=(h.bottom-c)/r,l.line=Math.floor(l.line),e.setCursor(l),h=e.charCoords(l,"local"),e.scrollTo(null,h.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,a)}}},scrollToCursor:function(e,t){var i=e.getCursor().line,n=e.charCoords(new r(i,0),"local"),s=e.getScrollInfo().clientHeight,o=n.top;switch(t.position){case"center":o=n.bottom-s/2;break;case"bottom":var a=new r(i,e.getLine(i).length-1),l=e.charCoords(a,"local").bottom-o;o=o-s+l}e.scrollTo(null,o)},replayMacro:function(e,i,n){var r=i.selectedCharacter||"",s=i.repeat||1,o=t.macroModeState;for("@"==r?r=o.latestRegister||"":o.latestRegister=r;s--;)!function(e,i,n,r){var s=t.registerController.getRegister(r);if(":"==r){s.keyBuffer[0]&&eK.processCommand(e,s.keyBuffer[0]),n.isPlaying=!1;return}var o=s.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=s.searchQueries.slice(0);for(var l=0;l<o.length;l++)for(var h,c,u=o[l],f=/<(?:[CSMA]-)*\w+>|./gi;h=f.exec(u);)if(c=h[0],R.handleKey(e,c,"macro"),i.insertMode){var d=s.insertModeChanges[a++].changes;t.macroModeState.lastInsertModeChanges.changes=d,e4(e,d,1),eH(e)}n.isPlaying=!1}(e,n,o,r)},enterMacroRecordMode:function(e,i){var n=t.macroModeState,r=i.selectedCharacter;t.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(i,n,o){if(!i.getOption("readOnly")){o.insertMode=!0,o.insertModeRepeat=n&&n.repeat||1;var a=n?n.insertAt:null,l=o.sel,h=n.head||i.getCursor("head"),c=i.listSelections().length;if("eol"==a)h=new r(h.line,eu(i,h.line));else if("bol"==a)h=new r(h.line,0);else if("charAfter"==a){var u=s(i,h,en(h,0,1));h=u.end}else if("firstNonBlank"==a){var u=s(i,h,K.moveToFirstNonWhiteSpaceCharacter(i,h));h=u.end}else if("startOfSelectedArea"==a){if(!o.visualMode)return;o.visualBlock?(h=new r(Math.min(l.head.line,l.anchor.line),Math.min(l.head.ch,l.anchor.ch)),c=Math.abs(l.head.line-l.anchor.line)+1):h=l.head.line<l.anchor.line?l.head:new r(l.anchor.line,0)}else if("endOfSelectedArea"==a){if(!o.visualMode)return;o.visualBlock?(h=new r(Math.min(l.head.line,l.anchor.line),Math.max(l.head.ch,l.anchor.ch)+1),c=Math.abs(l.head.line-l.anchor.line)+1):h=l.head.line>=l.anchor.line?en(l.head,0,1):new r(l.anchor.line,0)}else if("inplace"==a){if(o.visualMode)return}else"lastEdit"==a&&(h=eG(i)||h);i.setOption("disableInput",!1),n&&n.replace?(i.toggleOverwrite(!0),i.setOption("keyMap","vim-replace"),e.signal(i,"vim-mode-change",{mode:"replace"})):(i.toggleOverwrite(!1),i.setOption("keyMap","vim-insert"),e.signal(i,"vim-mode-change",{mode:"insert"})),t.macroModeState.isPlaying||(i.on("change",e0),o.insertEnd&&o.insertEnd.clear(),o.insertEnd=i.setBookmark(h,{insertLeft:!0}),e.on(i.getInputField(),"keydown",e5)),o.visualMode&&ev(i),ep(i,h,c)}},toggleVisualMode:function(t,i,n){var o,a=i.repeat,l=t.getCursor();if(n.visualMode)!!i.linewise!=n.visualLine||!!i.blockwise!=n.visualBlock?(n.visualLine=!!i.linewise,n.visualBlock=!!i.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),eg(t)):ev(t);else{n.visualMode=!0,n.visualLine=!!i.linewise,n.visualBlock=!!i.blockwise,o=et(t,new r(l.line,l.ch+a-1));var h=s(t,l,o);n.sel={anchor:h.start,head:h.end},e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),eg(t),eA(t,n,"<",el(l,o)),eA(t,n,">",eh(l,o))}},reselectLastSelection:function(t,i,n){var r=n.lastSelection;if(n.visualMode&&eO(t,n),r){var s=r.anchorMark.find(),o=r.headMark.find();if(!s||!o)return;n.sel={anchor:s,head:o},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,eg(t),eA(t,n,"<",el(s,o)),eA(t,n,">",eh(s,o)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,i){if(i.visualMode){if(n=e.getCursor("anchor"),ea(s=e.getCursor("head"),n)){var n,s,o=s;s=n,n=o}s.ch=eu(e,s.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),s=et(e,new r(n.line+a-1,1/0))}for(var l=0,h=n.line;h<s.line;h++){l=eu(e,n.line);var c="",u=0;if(!t.keepSpaces){var f=e.getLine(n.line+1);-1==(u=f.search(/\S/))?u=f.length:c=" "}e.replaceRange(c,new r(n.line,l),new r(n.line+1,u))}var d=et(e,new r(n.line,l));i.visualMode&&ev(e,!1),e.setCursor(d)},newLineAndEnterInsertMode:function(t,i,n){n.insertMode=!0;var s=es(t.getCursor());s.line!==t.firstLine()||i.after?(s.line=i.after?s.line:s.line-1,s.ch=eu(t,s.line),t.setCursor(s),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t)):(t.replaceRange("\n",new r(t.firstLine(),0)),t.setCursor(t.firstLine(),0)),this.enterInsertMode(t,{repeat:i.repeat},n)},paste:function(e,i,n){var r=t.registerController.getRegister(i.registerName);if("+"===i.registerName)navigator.clipboard.readText().then(t=>{this.continuePaste(e,i,n,t,r)});else{var s=r.toString();this.continuePaste(e,i,n,s,r)}},continuePaste:function(e,i,n,s,o){var a=es(e.getCursor());if(s){if(i.matchIndent){var l=e.getOption("tabSize"),h=function(e){return(e.split(" ").length-1)*l+ +(e.split(" ").length-1)},c=h(e.getLine(e.getCursor().line).match(/^\s*/)[0]),u=s.replace(/\n$/,""),f=s!==u,d=h(s.match(/^\s*/)[0]),s=u.replace(/^\s*/gm,function(t){var i=c+(h(t)-d);return i<0?"":e.getOption("indentWithTabs")?Array(Math.floor(i/l)+1).join(" "):Array(i+1).join(" ")});s+=f?"\n":""}i.repeat>1&&(s=Array(i.repeat+1).join(s));var p=void 0==i.linewise?o.linewise:i.linewise,O=o.blockwise,g=O?s.split("\n"):void 0;if(g){p&&g.pop();for(var m=0;m<g.length;m++)g[m]=""==g[m]?" ":g[m];a.ch+=+!!i.after,a.ch=Math.min(eu(e,a.line),a.ch)}else p?n.visualMode?s=n.visualLine?s.slice(0,-1):"\n"+s.slice(0,s.length-1)+"\n":i.after?(s="\n"+s.slice(0,s.length-1),a.ch=eu(e,a.line)):a.ch=0:a.ch+=+!!i.after;if(n.visualMode){n.lastPastedText=s;var v,y,w,b,x,S=(y=(v=e.listSelections())[0],w=v[v.length-1],[ea(y.anchor,y.head)?y.anchor:y.head,ea(w.anchor,w.head)?w.head:w.anchor]),k=S[0],Q=S[1],$=e.getSelection(),P=Array(e.listSelections().length).join("1").split("1");n.lastSelection&&(x=n.lastSelection.headMark.find()),t.registerController.unnamedRegister.setText($),O?(e.replaceSelections(P),Q=new r(k.line+s.length-1,k.ch),e.setCursor(k),ed(e,Q),e.replaceSelections(s),b=k):n.visualBlock?(e.replaceSelections(P),e.setCursor(k),e.replaceRange(s,k,k),b=k):(e.replaceRange(s,k,Q),b=e.posFromIndex(e.indexFromPos(k)+s.length-1)),x&&(n.lastSelection.headMark=e.setBookmark(x)),p&&(b.ch=0)}else if(O&&g){e.setCursor(a);for(var m=0;m<g.length;m++){var A=a.line+m;A>e.lastLine()&&e.replaceRange("\n",new r(A,0)),eu(e,A)<a.ch&&function(e,t,i){var n=eu(e,t),s=Array(i-n+1).join(" ");e.setCursor(new r(t,n)),e.replaceRange(s,e.getCursor())}(e,A,a.ch)}e.setCursor(a),ed(e,new r(a.line+g.length-1,a.ch)),e.replaceSelections(g),b=a}else if(e.replaceRange(s,a),p){var A=i.after?a.line+1:a.line;b=new r(A,ey(e.getLine(A)))}else b=es(a),/\n/.test(s)||(b.ch+=s.length-!!i.after);n.visualMode&&ev(e,!1),e.setCursor(b)}},undo:function(t,i){t.operation(function(){er(t,e.commands.undo,i.repeat)(),t.setCursor(et(t,t.getCursor("start")))})},redo:function(t,i){er(t,e.commands.redo,i.repeat)()},setRegister:function(e,t,i){i.inputState.registerName=t.selectedCharacter},insertRegister:function(e,i,n){var r=i.selectedCharacter,s=t.registerController.getRegister(r),o=s&&s.toString();o&&e.replaceSelection(o)},oneNormalCommand:function(t,i,n){eH(t,!0),n.insertModeReturn=!0,e.on(t,"vim-command-done",function i(){n.visualMode||(n.insertModeReturn&&(n.insertModeReturn=!1,n.insertMode||ee.enterInsertMode(t,{},n)),e.off(t,"vim-command-done",i))})},setMark:function(e,t,i){var n=t.selectedCharacter;n&&eA(e,i,n,e.getCursor())},replace:function(t,i,n){var o,a,l=i.selectedCharacter||"",h=t.getCursor(),c=t.listSelections();if(n.visualMode)h=t.getCursor("start"),a=t.getCursor("end");else{var u=t.getLine(h.line);(o=h.ch+i.repeat)>u.length&&(o=u.length),a=new r(h.line,o)}var f=s(t,h,a);if(h=f.start,a=f.end,"\n"==l)n.visualMode||t.replaceRange("",h,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var d=t.getRange(h,a);if(d=(d=d.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l)).replace(/[^\n]/g,l),n.visualBlock){var p=Array(t.getOption("tabSize")+1).join(" "),O=(d=(d=t.getSelection()).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l)).replace(/\t/g,p).replace(/[^\n]/g,l).split("\n");t.replaceSelections(O)}else t.replaceRange(d,h,a);n.visualMode?(h=ea(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(h),ev(t,!1)):t.setCursor(en(a,0,-1))}},incrementNumberToken:function(e,t){for(var i,n,s,o,a=e.getCursor(),l=e.getLine(a.line),h=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(i=h.exec(l))&&(s=(n=i.index)+i[0].length,!(a.ch<s)););if(t.backtrack||!(s<=a.ch)){if(!i)return;var c=i[2]||i[4],u=i[3]||i[5],f=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[c.toLowerCase()];o=(parseInt(i[1]+u,d)+f*t.repeat).toString(d);var p=c?Array(u.length-o.length+1+i[1].length).join("0"):"";o="-"===o.charAt(0)?"-"+c+p+o.substr(1):c+p+o;var O=new r(a.line,n),g=new r(a.line,s);e.replaceRange(o,O,g),e.setCursor(new r(a.line,n+o.length-1))}},repeatLastEdit:function(e,t,i){var n=i.lastEditInputState;if(n){var r=t.repeat;r&&t.repeatIsExplicit?n.repeatOverride=r:r=n.repeatOverride||r,e3(e,i,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:function(e,t){eH(e)}};function et(e,t,i){var n=e.state.vim,s=n.insertMode||n.visualMode,o=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),a=e.getLine(o),l=a.length-1+Number(!!s),h=Math.min(Math.max(0,t.ch),l),c=a.charCodeAt(h);if(56320<=c&&c<=57343){var u=1;i&&i.line==o&&i.ch>h&&(u=-1),(h+=u)>l&&(h-=2)}return new r(o,h)}function ei(e){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function en(e,t,i){return"object"==typeof t&&(i=t.ch,t=t.line),new r(e.line+t,e.ch+i)}function er(e,t,i){return function(){for(var n=0;n<i;n++)t(e)}}function es(e){return new r(e.line,e.ch)}function eo(e,t){return e.ch==t.ch&&e.line==t.line}function ea(e,t){return!!(e.line<t.line)||e.line==t.line&&!!(e.ch<t.ch)}function el(e,t){return arguments.length>2&&(t=el.apply(void 0,Array.prototype.slice.call(arguments,1))),ea(e,t)?e:t}function eh(e,t){return arguments.length>2&&(t=eh.apply(void 0,Array.prototype.slice.call(arguments,1))),ea(e,t)?t:e}function ec(e,t,i){var n=ea(e,t),r=ea(t,i);return n&&r}function eu(e,t){return e.getLine(t).length}function ef(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ed(e,t){var i=[],n=e.listSelections(),s=es(e.clipPos(t)),o=!eo(t,s),a=function(e,t){for(var i=0;i<e.length;i++){var n=eo(e[i].anchor,t),r=eo(e[i].head,t);if(n||r)return i}return -1}(n,e.getCursor("head")),l=eo(n[a].head,n[a].anchor),h=n.length-1,c=h-a>a?h:0,u=n[c].anchor,f=Math.min(u.line,s.line),d=Math.max(u.line,s.line),p=u.ch,O=s.ch,g=n[c].head.ch-p,m=O-p;g>0&&m<=0?(p++,!o&&O--):g<0&&m>=0?(p--,!l&&O++):g<0&&-1==m&&(p--,O++);for(var v=f;v<=d;v++){var y={anchor:new r(v,p),head:new r(v,O)};i.push(y)}return e.setSelections(i),t.ch=O,u.ch=p,u}function ep(e,t,i){for(var n=[],r=0;r<i;r++){var s=en(t,r,0);n.push({anchor:s,head:s})}e.setSelections(n,0)}function eO(e,t){var i=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(i)+t.lastPastedText.length),t.lastPastedText=void 0),t.lastSelection={anchorMark:e.setBookmark(i),headMark:e.setBookmark(n),anchor:es(i),head:es(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function eg(e,t,i){var n=e.state.vim;t=t||n.sel,i||(i=n.visualLine?"line":n.visualBlock?"block":"char");var r=em(e,t,i);e.setSelections(r.ranges,r.primary)}function em(e,t,i,n){var s=es(t.head),o=es(t.anchor);if("char"==i){var a=+!(n||ea(t.head,t.anchor)),l=+!!ea(t.head,t.anchor);return s=en(t.head,0,a),{ranges:[{anchor:o=en(t.anchor,0,l),head:s}],primary:0}}if("line"==i){if(ea(t.head,t.anchor))s.ch=0,o.ch=eu(e,o.line);else{o.ch=0;var h=e.lastLine();s.line>h&&(s.line=h),s.ch=eu(e,s.line)}return{ranges:[{anchor:o,head:s}],primary:0}}if("block"==i){var c=Math.min(o.line,s.line),u=o.ch,f=Math.max(o.line,s.line),d=s.ch;u<d?d+=1:u+=1;for(var p=f-c+1,O=s.line==c?0:p-1,g=[],m=0;m<p;m++)g.push({anchor:new r(c+m,u),head:new r(c+m,d)});return{ranges:g,primary:O}}throw"never happens"}function ev(t,i){var n=t.state.vim;!1!==i&&t.setCursor(et(t,n.sel.head)),eO(t,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,n.insertMode||e.signal(t,"vim-mode-change",{mode:"normal"})}function ey(e){if(!e)return 0;var t=e.search(/\S/);return -1==t?e.length:t}function ew(e,{inclusive:t,innerWord:i,bigWord:n,noSymbol:s,multiline:o},a){var l,h,c=a||(l=e.getCursor("head"),1==e.getSelection().length&&(l=el(l,e.getCursor("anchor"))),l),u=e.getLine(c.line),f=u,O=c.line,g=O,m=c.ch,v=s?d[0]:p[0];if(i&&/\s/.test(u.charAt(m)))v=function(e){return/\s/.test(e)};else{for(;!v(u.charAt(m));)if(++m>=u.length){if(!o)return null;m--,h=eQ(e,c,!0,n,!0);break}n?v=p[0]:(v=d[0])(u.charAt(m))||(v=d[1])}for(var y=m,w=m;v(u.charAt(w))&&w>=0;)w--;if(w++,h)y=h.to,g=h.line,!(f=e.getLine(g))&&0==y&&y++;else for(;v(u.charAt(y))&&y<u.length;)y++;if(t){var b=y,x=c.ch<=w&&/\s/.test(u.charAt(c.ch));if(!x)for(;/\s/.test(f.charAt(y))&&y<f.length;)y++;if(b==y||x){for(var S=w;/\s/.test(u.charAt(w-1))&&w>0;)w--;w||x||(w=S)}}return{start:new r(O,w),end:new r(g,y)}}function eb(e,i,n){eo(i,n)||t.jumpList.add(e,i,n)}function ex(e,i){t.lastCharacterSearch.increment=e,t.lastCharacterSearch.forward=i.forward,t.lastCharacterSearch.selectedCharacter=i.selectedCharacter}var eS={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ek={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)?.[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function eQ(e,t,i,n,r){var s=t.line,o=t.ch,a=e.getLine(s),l=i?1:-1,h=n?p:d;if(r&&""==a){if(s+=l,a=e.getLine(s),!y(e,s))return null;o=i?0:a.length}for(;;){if(r&&""==a)return{from:0,to:0,line:s};for(var c=l>0?a.length:-1,u=c,f=c;o!=c;){for(var O=!1,g=0;g<h.length&&!O;++g)if(h[g](a.charAt(o))){for(u=o;o!=c&&h[g](a.charAt(o));)o+=l;if(O=u!=(f=o),u==t.ch&&s==t.line&&f==u+l)continue;return{from:Math.min(u,f+1),to:Math.max(u,f),line:s}}O||(o+=l)}if(!y(e,s+=l))return null;a=e.getLine(s),o=l>0?0:a.length}}function e$(e,t,i,n,s){var o=new r(t.line+i.repeat-1,1/0),a=e.clipPos(o);return a.ch--,s||(n.lastHPos=1/0,n.lastHSPos=e.charCoords(a,"div").left),o}function eP(e,t,i,n,s){if(n){for(var o,a=s||e.getCursor(),l=a.ch,h=0;h<t;h++){if(-1==(o=function(e,t,i,n,r){var s;return n?-1==(s=t.indexOf(i,e+1))||r||(s-=1):-1==(s=t.lastIndexOf(i,e-1))||r||(s+=1),s}(l,e.getLine(a.line),n,i,!0)))return;l=o}if(void 0!=o)return new r(e.getCursor().line,o)}}function eA(e,t,i,n){(S(i,O)||m.test(i))&&(t.marks[i]&&t.marks[i].clear(),t.marks[i]=e.setBookmark(n))}function eC(e,t,i,n,s){var o,a=t.line,l=e.firstLine(),h=e.lastLine(),c=a;function u(t){return!e.getLine(t)}function f(e,t,i){return i?u(e)!=u(e+t):!u(e)&&u(e+t)}if(n){for(;l<=c&&c<=h&&i>0;)f(c,n)&&i--,c+=n;return{start:new r(c,0),end:t}}var d=e.state.vim;if(d.visualLine&&f(a,1,!0)){var p=d.sel.anchor;f(p.line,-1,!0)&&(!s||p.line!=a)&&(a+=1)}var O=u(a);for(c=a;c<=h&&i;c++)f(c,1,!0)&&(!s||u(c)!=O)&&i--;for(o=new r(c,0),c>h&&!O?O=!0:s=!1,c=a;c>l&&!((!s||u(c)==O||c==a)&&f(c,-1,!0));c--);return{start:new r(c,0),end:o}}function e_(e,t,i,n,s){function o(e){null!==e.line&&(e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir)}for(var a={ln:t.line,pos:t.ch};i>0;)a=n<0?function(e,t,i,n){var r=e.getLine(t),a={line:r,ln:t,pos:i,dir:n};if(""===a.line)return{ln:a.ln,pos:a.pos};var l=a.pos;for(o(a);null!==a.line;){if(b(a.line[a.pos])||x(a.line[a.pos])){if(x(a.line[a.pos]))if(!s)return{ln:a.ln,pos:l};else if(b(a.line[a.pos+1]))return{ln:a.ln,pos:a.pos+1};else return{ln:a.ln,pos:l}}else l=a.pos;o(a)}return(a.line=r,s&&b(a.line[a.pos]))?{ln:a.ln,pos:a.pos}:{ln:a.ln,pos:l}}(e,a.ln,a.pos,n):function(e,t,i,n){var r={line:e.getLine(t),ln:t,pos:i,dir:n};if(""===r.line)return{ln:r.ln,pos:r.pos};var a=r.pos;for(o(r);null!==r.line;){if(a=r.pos,x(r.line[r.pos]))if(!s)return{ln:r.ln,pos:r.pos+1};else{for(o(r);null!==r.line;)if(b(r.line[r.pos]))a=r.pos,o(r);else break;break}o(r)}return{ln:r.ln,pos:a+1}}(e,a.ln,a.pos,n),i--;return new r(a.ln,a.pos)}function eT(e,t,i,n){var s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[i],o=+(e.getLine(t.line).charAt(t.ch)===({"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"})[i]),a=e.scanForBracket(new r(t.line,t.ch+o),-1,void 0,{bracketRegex:s}),l=e.scanForBracket(new r(t.line,t.ch+o),1,void 0,{bracketRegex:s});if(!a||!l)return null;var h=a.pos,c=l.pos;if(h.line==c.line&&h.ch>c.ch||h.line>c.line){var u=h;h=c,c=u}return n?c.ch+=1:h.ch+=1,{start:h,end:c}}Q("pcre",!0,"boolean");class eM{constructor(){this.highlightTimeout}getQuery(){return t.query}setQuery(e){t.query=e}getOverlay(){return this.searchOverlay}setOverlay(e){this.searchOverlay=e}isReversed(){return t.isReversed}setReversed(e){t.isReversed=e}getScrollbarAnnotate(){return this.annotate}setScrollbarAnnotate(e){this.annotate=e}}function eZ(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new eM)}function eR(e,t){var i=eX(e,t)||[];if(!i.length)return[];var n=[];if(0===i[0]){for(var r=0;r<i.length;r++)"number"==typeof i[r]&&n.push(e.substring(i[r]+1,i[r+1]));return n}}function eX(e,t){t||(t="/");for(var i=!1,n=[],r=0;r<e.length;r++){var s=e.charAt(r);i||s!=t||n.push(r),i=!i&&"\\"==s}return n}var eE={"\\n":"\n","\\r":"\r","\\t":" "},ej={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":" ","\\&":"&"};function eB(e,i,n){t.registerController.getRegister("/").setText(e);var r,s,o,a,l,h,c,u,f=eX(e,"/");return(f.length?(r=e.substring(0,f[0]),s=-1!=e.substring(f[0]).indexOf("i")):r=e,r)?(P("pcre")||(o=r,l={">":"(?<=[\\w])(?=[^\\w]|$)","<":"(?<=[^\\w]|^)(?=[\\w])"},h=(a={V:"|(){+?*.[$^",M:"|(){+?*.[",m:"|(){+?",v:"<>"}).m,-1!=(u=(c=o.replace(/\\.|[\[|(){+*?.$^<>]/g,function(e){if("\\"===e[0]){var t=e[1];return"}"===t||-1!=h.indexOf(t)?t:t in a?(h=a[t],""):t in l?l[t]:e}return -1!=h.indexOf(e)?l[e]||"\\"+e:e})).indexOf("\\zs"))&&(c="(?<="+c.slice(0,u)+")"+c.slice(u+3)),-1!=(u=c.indexOf("\\ze"))&&(c=c.slice(0,u)+"(?="+c.slice(u+3)+")"),r=c),n&&(i=/^[^A-Z]*$/.test(r)),new RegExp(r,i||s?"im":"m")):null}function eL(e){"string"==typeof e&&(e=document.createElement(e));for(var t=1;t<arguments.length;t++){var i=arguments[t];if(i)if("object"!=typeof i&&(i=document.createTextNode(i)),i.nodeType)e.appendChild(i);else for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&("$"===n[0]?e.style[n.slice(1)]=i[n]:"function"==typeof i[n]?e[n]=i[n]:e.setAttribute(n,i[n]))}return e}function eI(e,t,i,n){var r=eL("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},t);e.openNotification?i?(r=eL("div",{},r,eL("div",{},"Press ENTER or type command to continue")),e.state.closeVimNotification&&e.state.closeVimNotification(),e.state.closeVimNotification=e.openNotification(r,{bottom:!0,duration:0})):e.openNotification(r,{bottom:!0,duration:n||15e3}):n||alert(r.innerText)}function ez(e,t){if(X.length){t.value||(t.value=""),n=t;return}var i,r,s=(i=t.prefix,r=t.desc,eL("div",{$display:"flex",$flex:1},eL("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1,$display:"flex"},i,eL("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$flex:1})),r&&eL("span",{$color:"#888"},r)));if(e.openDialog)e.openDialog(s,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value});else{var o="";"string"!=typeof t.prefix&&t.prefix&&(o+=t.prefix.textContent),t.desc&&(o+=" "+t.desc),t.onClose?.(prompt(o,""))}}function eY(e,t,i,n){if(t){var r,s=eZ(e),o=eB(t,!!i,!!n);if(o)return eW(e,o),r=s.getQuery(),o instanceof RegExp&&r instanceof RegExp&&o.flags==r.flags&&o.source==r.source||s.setQuery(o),o}}var eV=0;function eW(e,t){clearTimeout(eV),eZ(e).highlightTimeout=eV,eV=setTimeout(function(){if(e.state.vim){var i=eZ(e);i.highlightTimeout=void 0;var n=i.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(i){if(t&&!i.sol())return void i.skipToEnd();var n=i.match(e,!1);if(n)return 0==n[0].length?(i.next(),"searching"):i.sol()||(i.backUp(1),e.exec(i.next()+n[0]))?(i.match(e),"searching"):(i.next(),null);for(;!i.eol()&&(i.next(),!i.match(e,!1)););},query:e}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(i.getScrollbarAnnotate()&&i.getScrollbarAnnotate().clear(),i.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),i.setOverlay(n))}},50)}function eD(e,t,i,n){return e.operation(function(){void 0===n&&(n=1);for(var s=e.getCursor(),o=e.getSearchCursor(i,s),a=0;a<n;a++){var l=o.find(t);if(0==a&&l&&eo(o.from(),s)){var h=t?o.from():o.to();(l=o.find(t))&&!l[0]&&eo(o.from(),h)&&e.getLine(h.line).length==h.ch&&(l=o.find(t))}if(!l&&!(o=e.getSearchCursor(i,t?new r(e.lastLine()):new r(e.firstLine(),0))).find(t))return}return o.from()})}function eq(e){var t=eZ(e);t.highlightTimeout&&(clearTimeout(t.highlightTimeout),t.highlightTimeout=void 0),e.removeOverlay(eZ(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function eN(e){var t=e.getScrollInfo(),i=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,r=e.coordsChar({left:0,top:n},"local");return{top:i.line,bottom:r.line}}function eU(e,i,n){if("'"==n||"`"==n)return t.jumpList.find(e,-1)||new r(0,0);if("."==n)return eG(e);var s=i.marks[n];return s&&s.find()}function eG(e){if(e.getLastEditEnd)return e.getLastEditEnd();for(var t=e.doc.history.done,i=t.length;i--;)if(t[i].changes)return es(t[i].changes[0].to)}var eF={colorscheme:function(e,t){!t.args||t.args.length<1?eI(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,i,n){var r=t.args;if(!r||r.length<2){e&&eI(e,"Invalid mapping: "+t.input);return}eK.map(r[0],r[1],i,n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},omap:function(e,t){this.map(e,t,"operatorPending")},noremap:function(e,t){this.map(e,t,void 0,!0)},inoremap:function(e,t){this.map(e,t,"insert",!0)},nnoremap:function(e,t){this.map(e,t,"normal",!0)},vnoremap:function(e,t){this.map(e,t,"visual",!0)},onoremap:function(e,t){this.map(e,t,"operatorPending",!0)},unmap:function(e,t,i){var n=t.args;(!n||n.length<1||!eK.unmap(n[0],i))&&e&&eI(e,"No such mapping: "+t.input)},mapclear:function(e,t){R.mapclear()},imapclear:function(e,t){R.mapclear("insert")},nmapclear:function(e,t){R.mapclear("normal")},vmapclear:function(e,t){R.mapclear("visual")},omapclear:function(e,t){R.mapclear("operatorPending")},move:function(e,t){F.processCommand(e,e.state.vim,{keys:"",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var i=t.args,n=t.setCfg||{};if(!i||i.length<1){e&&eI(e,"Invalid mapping: "+t.input);return}var r=i[0].split("="),s=r.shift()||"",o=r.length>0?r.join("="):void 0,a=!1,l=!1;if("?"==s.charAt(s.length-1)){if(o)throw Error("Trailing characters: "+t.argString);s=s.substring(0,s.length-1),a=!0}else"!"==s.charAt(s.length-1)&&(s=s.substring(0,s.length-1),l=!0);void 0===o&&"no"==s.substring(0,2)&&(s=s.substring(2),o=!1);var h=k[s]&&"boolean"==k[s].type;if(h&&(l?o=!P(s,e,n):void 0==o&&(o=!0)),!h&&void 0===o||a){var c=P(s,e,n);c instanceof Error?eI(e,c.message):!0===c||!1===c?eI(e," "+(c?"":"no")+s):eI(e," "+s+"="+c)}else{var u=$(s,o,e,n);u instanceof Error&&eI(e,u.message)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,i){var n=i.args,r=t.registerController.registers,s="----------Registers----------\n\n";if(n)for(var o=n.join(""),a=0;a<o.length;a++){var l=o.charAt(a);if(t.registerController.isValidRegister(l)){var h=r[l]||new N;s+='"'+l+" "+h.toString()+"\n"}}else for(var l in r){var c=r[l].toString();c.length&&(s+='"'+l+" "+c+"\n")}eI(e,s,!0)},marks:function(e,t){var i=t.args,n=e.state.vim.marks,r="-----------Marks-----------\nmark line col\n\n";if(i)for(var s=i.join(""),o=0;o<s.length;o++){var a=s.charAt(o),l=n[a]&&n[a].find();l&&(r+=a+" "+l.line+" "+l.ch+"\n")}else for(var a in n){var l=n[a]&&n[a].find();l&&(r+=a+" "+l.line+" "+l.ch+"\n")}eI(e,r,!0)},sort:function(t,i){var n=function(){if(i.argString){var t=new e.StringStream(i.argString);if(t.eat("!")&&(g=!0),!t.eol()){if(!t.eatSpace())return"Invalid arguments";var n=t.match(/([dinuoxr]+)?\s*(\/.+\/)?\s*/);if(!n||!t.eol())return"Invalid arguments";if(n[1]){b=-1!=n[1].indexOf("r"),m=-1!=n[1].indexOf("i"),v=-1!=n[1].indexOf("u");var r=-1!=n[1].indexOf("d")||-1!=n[1].indexOf("n"),s=-1!=n[1].indexOf("x"),o=-1!=n[1].indexOf("o");if(Number(r)+Number(s)+Number(o)>1)return"Invalid arguments";y=r&&"decimal"||s&&"hex"||o&&"octal"}n[2]&&(w=new RegExp(n[2].substr(1,n[2].length-2),m?"i":""))}}}();if(n)return void eI(t,n+": "+i.argString);var s=i.line||t.firstLine(),o=i.lineEnd||i.line||t.lastLine();if(s!=o){var a=new r(s,0),l=new r(o,eu(t,o)),h=t.getRange(a,l).split("\n"),c="decimal"==y?/(-?)([\d]+)/:"hex"==y?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==y?/([0-7]+)/:null,u="decimal"==y?10:"hex"==y?16:"octal"==y?8:void 0,f=[],d=[];if(y||w)for(var p=0;p<h.length;p++){var O=w?h[p].match(w):null;O&&null!=O.index&&!b&&(O[0]=h[p].slice(O.index+O[0].length)),O&&""!=O[0]?f.push(O):c&&c.exec(h[p])?f.push(h[p]):d.push(h[p])}else d=h;if(f.sort(w?function(e,t){if(g){var i;i=e,e=t,t=i}return m&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:k),w)for(var p=0;p<f.length;p++)f[p]=f[p].input;else y||d.sort(k);if(h=g?f.concat(d):d.concat(f),v){var g,m,v,y,w,b,x,S=h;h=[];for(var p=0;p<S.length;p++)S[p]!=x&&h.push(S[p]),x=S[p]}t.replaceRange(h.join("\n"),a,l)}function k(e,t){if(g){var i;i=e,e=t,t=i}m&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&c.exec(e),r=c&&c.exec(t);return n&&r?parseInt((n[1]+n[2]).toLowerCase(),u)-parseInt((r[1]+r[2]).toLowerCase(),u):e<t?-1:1}},vglobal:function(e,t){this.global(e,t)},normal:function(e,t){var i=!1,n=t.argString;if(n&&"!"==n[0]&&(n=n.slice(1),i=!0),!(n=n.trimStart()))return void eI(e,"Argument is required.");var r=t.line;if("number"==typeof r)for(var s=isNaN(t.lineEnd)?r:t.lineEnd,o=r;o<=s;o++)e.setCursor(o,0),j(e,t.argString.trimStart(),{noremap:i}),e.state.vim.insertMode&&eH(e,!0);else j(e,t.argString.trimStart(),{noremap:i}),e.state.vim.insertMode&&eH(e,!0)},global:function(e,t){var i=t.argString;if(!i)return void eI(e,"Regular Expression missing from global");var n="v"===t.commandName[0];"!"===i[0]&&"g"===t.commandName[0]&&(n=!0,i=i.slice(1));var r=void 0!==t.line?t.line:e.firstLine(),s=t.lineEnd||t.line||e.lastLine(),o=eR(i,"/"),a=i,l="";if(o&&o.length&&(a=o[0],l=o.slice(1,o.length).join("/")),a)try{eY(e,a,!0,!0)}catch(t){eI(e,"Invalid regex: "+a);return}for(var h=eZ(e).getQuery(),c=[],u=r;u<=s;u++){var f=e.getLine(u);h.test(f)!==n&&c.push(l?e.getLineHandle(u):f)}if(!l)return void eI(e,c.join("\n"));var d=0,p=function(){if(d<c.length){var t=c[d++],i=e.getLineNumber(t);if(null==i)return void p();var n=i+1+l;eK.processCommand(e,n,{callback:p})}else e.releaseLineHandles&&e.releaseLineHandles()};p()},substitute:function(i,n){if(!i.getSearchCursor)throw Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var s,o,a,l=n.argString,h=l?eR(l,l[0]):[],c="",u="",d=!1,p=!1;if(h&&h.length)c=h[0],P("pcre")&&""!==c&&(c=new RegExp(c).source),void 0!==(u=h[1])&&(u=P("pcre")?function(t){for(var i=new e.StringStream(t),n=[];!i.eol();){for(;i.peek()&&"\\"!=i.peek();)n.push(i.next());var r=!1;for(var s in ej)if(i.match(s,!0)){r=!0,n.push(ej[s]);break}r||n.push(i.next())}return n.join("")}(u.replace(/([^\\])&/g,"$1$$&")):function(e){for(var t=!1,i=[],n=-1;n<e.length;n++){var r=e.charAt(n)||"",s=e.charAt(n+1)||"";eE[r+s]?(i.push(eE[r+s]),n++):t?(i.push(r),t=!1):"\\"===r?(t=!0,f.test(s)||"$"===s)?i.push("$"):"/"!==s&&"\\"!==s&&i.push("\\"):("$"===r&&i.push("$"),i.push(r),"/"===s&&i.push("\\"))}return i.join("")}(u),t.lastSubstituteReplacePart=u),s=h[2]?h[2].split(" "):[];else if(l&&l.length)return void eI(i,"Substitutions should be of the form :s/pattern/replace/");if(s&&(o=s[0],a=parseInt(s[1]),o&&(-1!=o.indexOf("c")&&(d=!0),-1!=o.indexOf("g")&&(p=!0),c=P("pcre")?c+"/"+o:c.replace(/\//g,"\\/")+"/"+o)),c)try{eY(i,c,!0,!0)}catch(e){eI(i,"Invalid regex: "+c);return}if(void 0===(u=u||t.lastSubstituteReplacePart))return void eI(i,"No previous substitute regular expression");var O=eZ(i).getQuery(),g=void 0!==n.line?n.line:i.getCursor().line,m=n.lineEnd||g;g==i.firstLine()&&m==i.lastLine()&&(m=1/0),a&&(m=(g=m)+a-1);var v=et(i,new r(g,0)),y=i.getSearchCursor(O,v);!function(t,i,n,r,s,o,a,l,h){t.state.vim.exMode=!0;var c,u,f,d=!1,p=0;function O(){t.operation(function(){for(;!d;)g(),m();v()})}function g(){var e="",i=o.match||o.pos&&o.pos.match;e=i?l.replace(/\$(\d{1,3}|[$&])/g,function(e,t){if("$"==t)return"$";if("&"==t)return i[0];for(var n=t;parseInt(n)>=i.length&&n.length>0;)n=n.slice(0,n.length-1);return n?i[n]+t.slice(n.length,t.length):e}):t.getRange(o.from(),o.to()).replace(a,l);var n=o.to().line;o.replace(e),u=o.to().line,s+=u-n,f=u<n}function m(){for(var e,i;function(){var e=c&&es(o.to()),t=o.findNext();return t&&!t[0]&&e&&eo(o.from(),e)&&(t=o.findNext()),t&&p++,t}()&&(e=o.from(),i=s,("number"!=typeof e&&(e=e.line),r instanceof Array)?S(e,r):"number"==typeof i?e>=r&&e<=i:e==r);)if(n||o.from().line!=u||f){t.scrollIntoView(o.from(),30),t.setSelection(o.from(),o.to()),c=o.from(),d=!1;return}d=!0}function v(e){if(e&&e(),t.focus(),c){t.setCursor(c);var i=t.state.vim;i.exMode=!1,i.lastHPos=i.lastHSPos=c.ch}h?h():d&&eI(t,(p?"Found "+p+" matches":"No matches found")+" for pattern: "+a+(P("pcre")?" (set nopcre to use Vim regexps)":""))}if(m(),d)return eI(t,"No matches for "+a+(P("pcre")?" (set nopcre to use vim regexps)":""));if(!i){O(),h&&h();return}ez(t,{prefix:eL("span","replace with ",eL("strong",l)," (y/n/a/q/l)"),onKeyDown:function(i,n,r){switch(e.e_stop(i),z(i)){case"y":g(),m();break;case"n":m();break;case"a":var s=h;h=void 0,t.operation(O),h=s;break;case"l":g();case"q":case"<Esc>":case"<C-c>":case"<C-[>":v(r)}return d&&v(r),!0}})}(i,d,p,g,m,y,O,u,n.callback)},startinsert:function(e,t){j(e,"!"==t.argString?"A":"i",{})},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){eq(e)},yank:function(e,i){var n=i.selectionLine,s=isNaN(i.selectionLineEnd)?n:i.selectionLineEnd;if(s<n){var o=s;s=n,n=o}var a=e.getRange(new r(n,0),new r(s+1,0)),l=i.args&&i.args[0]?i.args[0]:"0";t.registerController.pushText(l,"yank",a,!0,!1),eI(e,s+1-n+" lines yanked"+(l?' into "'+l:""),!1,1500)},put:function(e,t,i){var n={after:!0,isEdit:!0,matchIndent:!!i,repeat:1,lineWise:!0,registerName:""},s=t.args||[];"!"==s[0]&&(n.after=!1,s.shift()),s[0]&&(n.registerName=s[0]);var o=t.selectionLine;void 0!=o&&e.setCursor(new r(o,0)),ee.paste(e,n,e.state.vim)},iput:function(e,t){this.put(e,t,!0)},delete:function(e,t){var i=t.selectionLine,n=isNaN(t.selectionLineEnd)?i:t.selectionLineEnd;J.delete(e,{linewise:!0},[{anchor:new r(i,0),head:new r(n+1,0)}])},join:function(e,t){var i=t.selectionLine,n=isNaN(t.selectionLineEnd)?i:t.selectionLineEnd;e.setCursor(new r(i,0)),ee.joinLines(e,{repeat:n-i},e.state.vim)},delmarks:function(t,i){if(!i.argString||!ef(i.argString))return void eI(t,"Argument required");for(var n=t.state.vim,r=new e.StringStream(ef(i.argString));!r.eol();){r.eatSpace();var s=r.pos;if(!r.match(/[a-zA-Z]/,!1))return void eI(t,"Invalid argument: "+i.argString.substring(s));var o=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1))return void eI(t,"Invalid argument: "+i.argString.substring(s));var a=r.next();if(!o||!a||w(o)!=w(a))return void eI(t,"Invalid argument: "+o+"-");var l=o.charCodeAt(0),h=a.charCodeAt(0);if(l>=h)return void eI(t,"Invalid argument: "+i.argString.substring(s));for(var c=0;c<=h-l;c++){var u=String.fromCharCode(l+c);delete n.marks[u]}}else o&&delete n.marks[o]}}},eK=new class{constructor(){this.commandMap_,this.buildCommandMap_()}processCommand(e,t,i){var n=this;e.operation(function(){e.curOp&&(e.curOp.isVimOp=!0),n._processCommand(e,t,i)})}_processCommand(i,n,r){var s,o,a=i.state.vim,l=t.registerController.getRegister(":"),h=l.toString(),c=new e.StringStream(n);l.setText(n);var u=r||{};u.input=n;try{this.parseInput_(i,c,u)}catch(e){eI(i,e+"");return}if(a.visualMode&&ev(i),u.commandName){if(s=this.matchCommand_(u.commandName)){if(o=s.name,s.excludeFromCommandHistory&&l.setText(h),this.parseCommandArgs_(c,u,s),"exToKey"==s.type)return void j(i,s.toKeys||"",s);if("exToEx"==s.type)return void this.processCommand(i,s.toInput||"")}}else void 0!==u.line&&(o="move");if(!o)return void eI(i,'Not an editor command ":'+n+'"');try{eF[o](i,u),s&&s.possiblyAsync||!u.callback||u.callback()}catch(e){throw eI(i,e+""),e}}parseInput_(e,t,i){if(t.eatWhile(":"),t.eat("%"))i.line=e.firstLine(),i.lineEnd=e.lastLine();else if(t.eat("*")){var n=e.state.vim.lastSelection,r=n?.anchorMark.find()?.line||0,s=n?.headMark.find()?.line||0;i.line=Math.max(r,s),i.lineEnd=Math.min(r,s)}else i.line=this.parseLineSpec_(e,t),void 0!==i.line&&t.eat(",")&&(i.lineEnd=this.parseLineSpec_(e,t));void 0==i.line?e.state.vim.visualMode?(i.selectionLine=eU(e,e.state.vim,"<")?.line,i.selectionLineEnd=eU(e,e.state.vim,">")?.line):i.selectionLine=e.getCursor().line:(i.selectionLine=i.line,i.selectionLineEnd=i.lineEnd),t.eatSpace();var o=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return o?i.commandName=o[1]:i.commandName=(t.match(/.*/)||[""])[0],i}parseLineSpec_(e,t){var i=t.match(/^([\d]+)/);if(i)return this.parseLineSpecOffset_(e,t,parseInt(i[1],10)-1);switch(t.next()){case".":return this.parseLineSpecOffset_(e,t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(e,t,e.lastLine());case"'":var n=t.next()||"",r=eU(e,e.state.vim,n);if(!r)throw Error("Mark not set");return this.parseLineSpecOffset_(e,t,r.line);case"-":case"+":case"/":case"?":return t.backUp(1),this.parseLineSpecOffset_(e,t,e.getCursor().line);default:t.backUp(1);return}}parseLineSpecOffset_(e,i,n){for(;;){var s=i.match(/^([\/\?]|\\[\?\/])|([+-]?)(\d*)/);if(!s||!s[0])break;if(s[1]){var o="",a=!s[1].endsWith("?");if(1==s[1].length){var l=i.match(a?/^([^\/\\]|\\\/)*/:/^([^\/\?]|\\\?)*/);i.match(a?/^\/?/:/^\??/),o=l&&l[0]}o||(o=t.registerController.getRegister("/")?.toString()||"");var h=new RegExp(o),c=e.getSearchCursor(h,new r(n+ +!!a,0));a?c.findNext():c.findPrevious();var u=c.from();if(!u)throw Error("Pattern not found"+h);n=u.line}else{var f=parseInt(s[2]+(s[3]||"1"),10);n+=f}}return n}parseCommandArgs_(e,t,i){if(!e.eol()){t.argString=e.match(/.*/)?.[0];var n=i.argDelimiter||/\s+/,r=ef(t.argString||"").split(n);r.length&&r[0]&&(t.args=r)}}matchCommand_(e){for(var t=e.length;t>0;t--){var i=e.substring(0,t);if(this.commandMap_[i]){var n=this.commandMap_[i];if(0===n.name.indexOf(e))return n}}}buildCommandMap_(){this.commandMap_={};for(var e=0;e<h.length;e++){var t=h[e],i=t.shortName||t.name;this.commandMap_[i]=t}}map(e,t,i,n){if(":"!=e&&":"==e.charAt(0)){if(i)throw Error("Mode not supported for ex mappings");var r=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[r]={name:r,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:t,user:!0}}else{var s={keys:e,type:"keyToKey",toKeys:t,noremap:!!n};i&&(s.context=i),eJ(s)}}unmap(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var i=e.substring(1);if(this.commandMap_[i]&&this.commandMap_[i].user)return delete this.commandMap_[i],!0}else for(var n=0;n<o.length;n++)if(e==o[n].keys&&o[n].context===t)return o.splice(n,1),e.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){a[e]&&a[e]--}),!0}};function eH(i,n){var r=i.state.vim,s=t.macroModeState,o=t.registerController.getRegister("."),a=s.isPlaying,l=s.lastInsertModeChanges;a||(i.off("change",e0),r.insertEnd&&r.insertEnd.clear(),r.insertEnd=void 0,e.off(i.getInputField(),"keydown",e5)),!a&&r.insertModeRepeat&&r.insertModeRepeat>1&&(e3(i,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,n||i.setCursor(i.getCursor().line,i.getCursor().ch-1),i.setOption("keyMap","vim"),i.setOption("disableInput",!0),i.toggleOverwrite(!1),o.setText(l.changes.join("")),e.signal(i,"vim-mode-change",{mode:"normal"}),s.isRecording&&function(e){if(!e.isPlaying){var i=e.latestRegister,n=t.registerController.getRegister(i);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}(s)}function eJ(e){o.unshift(e),e.keys&&e.keys.split(/(<(?:[CSMA]-)*\w+>|.)/i).forEach(function(e){e&&(a[e]||(a[e]=0),a[e]++)})}function e0(e,i){var n=t.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(var s=e.state.vim;i;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==i.origin||"paste"==i.origin||void 0===i.origin){var o=e.listSelections().length;o>1&&(r.ignoreCount=o);var a=i.text.join("\n");if(r.maybeReset&&(r.changes=[],r.maybeReset=!1),a)if(e.state.overwrite&&!/\n/.test(a))r.changes.push([a]);else{if(a.length>1){var l=s&&s.insertEnd&&s.insertEnd.find(),h=e.getCursor();if(l&&l.line==h.line){var c=l.ch-h.ch;c>0&&c<a.length&&(r.changes.push([a,c]),a="")}}a&&r.changes.push(a)}}i=i.next}}function e1(e){var i=e.state.vim;if(i.insertMode){var n=t.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:(r.maybeReset=!0,i.insertEnd&&i.insertEnd.clear(),i.insertEnd=e.setBookmark(e.getCursor(),{insertLeft:!0}))}else e.curOp?.isVimOp||e2(e,i)}function e2(t,i){var n=t.getCursor("anchor"),r=t.getCursor("head");if(i.visualMode&&!t.somethingSelected()?ev(t,!1):!i.visualMode&&!i.insertMode&&t.somethingSelected()&&(i.visualMode=!0,i.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),i.visualMode){var s=ea(r,n)?0:-1,o=ea(r,n)?-1:0;r=en(r,0,s),i.sel={anchor:n=en(n,0,o),head:r},eA(t,i,"<",el(r,n)),eA(t,i,">",eh(r,n))}else i.insertMode||(i.lastHPos=t.getCursor().ch)}function e5(i){var n=t.macroModeState.lastInsertModeChanges,r=e.keyName?e.keyName(i):i.key;r&&(-1!=r.indexOf("Delete")||-1!=r.indexOf("Backspace"))&&(n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new Z(r,i)))}function e3(e,i,n,r){var s=t.macroModeState;s.isPlaying=!0;var o=i.lastEditActionCommand,a=i.inputState;function l(){o?F.processAction(e,i,o):F.evalInput(e,i)}function h(t){s.lastInsertModeChanges.changes.length>0&&(t=i.lastEditActionCommand?t:1,e4(e,s.lastInsertModeChanges.changes,t))}if(i.inputState=i.lastEditInputState,o&&o.interlaceInsertRepeat)for(var c=0;c<n;c++)l(),h(1);else r||l(),h(n);i.inputState=a,i.insertMode&&!r&&eH(e),s.isPlaying=!1}function e6(t,i){e.lookupKey(i,"vim-insert",function(i){return"string"==typeof i?e.commands[i](t):i(t),!0})}function e4(e,i,n){var r=e.getCursor("head"),s=t.macroModeState.lastInsertModeChanges.visualBlock;s&&(ep(e,r,s+1),n=e.listSelections().length,e.setCursor(r));for(var o=0;o<n;o++){s&&e.setCursor(en(r,o,0));for(var a=0;a<i.length;a++){var l=i[a];if(l instanceof Z)e6(e,l.keyName);else if("string"==typeof l)e.replaceSelection(l);else{var h=e.getCursor(),c=en(h,0,l[0].length-(l[1]||0));e.replaceRange(l[0],h,l[1]?h:c),e.setCursor(c)}}}s&&e.setCursor(en(r,0,1))}function e8(e){var t=new e.constructor;return Object.keys(e).forEach(function(i){if("insertEnd"!=i){var n=e[i];Array.isArray(n)?n=n.slice():n&&"object"==typeof n&&n.constructor!=Object&&(n=e8(n)),t[i]=n}}),e.sel&&(t.sel={head:e.sel.head&&es(e.sel.head),anchor:e.sel.anchor&&es(e.sel.anchor)}),t}return R.defineEx("version","ve",e=>{eI(e,"Codemirror-vim version: <DEV>")}),Q("insertModeEscKeysTimeout",200,"number"),M(),R}(dB),dH=sq.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:"none"},".cm-vim-panel":{padding:"0px 10px",fontFamily:"monospace",minHeight:"1.3em",display:"flex"},".cm-vim-panel input":{border:"none",outline:"none",backgroundColor:"inherit"},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"}}),dJ=nK.fromClass(class{constructor(e){this.status="",this.query=null,this.decorations=iH.none,this.waitForCopy=!1,this.lastKeydown="",this.useNextTextInput=!1,this.compositionText="",this.view=e;let t=this.cm=new dB(e);dK.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new dU(e,t),this.updateClass(),this.cm.on("vim-command-done",()=>{t.state.vim&&(t.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",e=>{t.state.vim&&(t.state.vim.mode=e.mode,e.subMode&&(t.state.vim.mode+="linewise"===e.subMode?" line":" block"),t.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus())}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():e.dispatch({effects:d1.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.spacer=document.createElement("span"),this.spacer.style.flex="1",this.statusButton=document.createElement("span"),this.statusButton.onclick=e=>{dK.handleKey(this.cm,"<Esc>","user"),this.cm.focus()},this.statusButton.style.cssText="cursor: pointer"}update(e){var t;if((e.viewportChanged||e.docChanged)&&this.query&&this.highlight(this.query),e.docChanged&&this.cm.onChange(e),e.selectionSet&&this.cm.onSelectionChange(),e.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),e.transactions){for(let i of e.transactions)for(let e of i.effects)if(e.is(dA))if(null==(t=e.value)?void 0:t.forVim){let t=e.value.create();this.highlight(t)}else this.highlight(null)}this.blockCursor.update(e)}updateClass(){let e=this.cm.state;e.vim&&(!e.vim.insertMode||e.overwrite)?this.view.scrollDOM.classList.add("cm-vimMode"):this.view.scrollDOM.classList.remove("cm-vimMode")}updateStatus(){let e=this.cm.state.statusbar,t=this.cm.state.vim;if(!e||!t)return;let i=this.cm.state.dialog;if(i)i.parentElement!=e&&(e.textContent="",e.appendChild(i));else{e.textContent="";var n=(t.mode||"normal").toUpperCase();t.insertModeReturn&&(n+="(C-O)"),this.statusButton.textContent=`--${n}--`,e.appendChild(this.statusButton),e.appendChild(this.spacer)}this.dom.textContent=t.status,e.appendChild(this.dom)}destroy(){dK.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(e){if(this.query=e,!e)return this.decorations=iH.none;let{view:t}=this,i=new ih;for(let n=0,r=t.visibleRanges,s=r.length;n<s;n++){let{from:o,to:a}=r[n];for(;n<s-1&&a>r[n+1].from-500;)a=r[++n].to;e.highlight(t.state,o,a,(e,t)=>{i.add(e,t,d0)})}return this.decorations=i.finish()}handleKey(e,t){let i=this.cm,n=i.state.vim;if(!n)return;let r=dK.vimKeyFromEvent(e,n);if(dB.signal(this.cm,"inputEvent",{type:"handleKey",key:r}),!r)return;if("<Esc>"==r&&!n.insertMode&&!n.visualMode&&this.query){let e=n.searchState_;e&&(i.removeOverlay(e.getOverlay()),e.setOverlay(null))}if("<C-c>"===r&&!dB.isMac&&i.somethingSelected())return this.waitForCopy=!0,!0;n.status=(n.status||"")+r;let s=dK.multiSelectHandleKey(i,r,"user");return n=dK.maybeInitVimState_(i),!s&&n.insertMode&&i.state.overwrite&&(e.key&&1==e.key.length&&!/\n/.test(e.key)?(s=!0,i.overWriteSelection(e.key)):"Backspace"==e.key&&(s=!0,dB.commands.cursorCharLeft(i))),s&&(dB.signal(this.cm,"vim-keypress",r),e.preventDefault(),e.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!s}},{eventHandlers:{copy:function(e,t){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var e=this.cm,t=e.state.vim;t&&(t.insertMode?e.setSelection(e.getCursor(),e.getCursor()):e.operation(()=>{e.curOp&&(e.curOp.isVimOp=!0),dK.handleKey(e,"<Esc>","user")}))}))},compositionstart:function(e,t){this.useNextTextInput=!0,dB.signal(this.cm,"inputEvent",e)},compositionupdate:function(e,t){dB.signal(this.cm,"inputEvent",e)},compositionend:function(e,t){dB.signal(this.cm,"inputEvent",e)},keypress:function(e,t){dB.signal(this.cm,"inputEvent",e),"Dead"==this.lastKeydown&&this.handleKey(e,t)},keydown:function(e,t){dB.signal(this.cm,"inputEvent",e),this.lastKeydown=e.key,"Unidentified"==this.lastKeydown||"Process"==this.lastKeydown||"Dead"==this.lastKeydown?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(e,t))}},provide:()=>[sq.inputHandler.of((e,t,i,n)=>{var r,s,o=e.cm||null;if(!o)return!1;var a=null==(r=o.state)?void 0:r.vim,l=o.state.vimPlugin;if(a&&!a.insertMode&&!(null==(s=o.curOp)?void 0:s.isVimOp)){if("\0\0"===n)return!0;if(dB.signal(o,"inputEvent",{type:"text",text:n,from:t,to:i}),1==n.length&&l.useNextTextInput){if(a.expectLiteralNext&&e.composing)return l.compositionText=n,!1;if(l.compositionText){var h=l.compositionText;l.compositionText="";var c=e.state.selection.main.head,u=e.state.sliceDoc(c-h.length,c);if(h===u){var f=o.getCursor();o.replaceRange("",o.posFromIndex(c-h.length),f)}}return l.handleKey({key:n,preventDefault:()=>{},stopPropagation:()=>{}}),function(e){var t=e.scrollDOM.parentElement;if(t){if(dF){e.contentDOM.textContent="\0\0",e.contentDOM.dispatchEvent(new CustomEvent("compositionend"));return}var i=e.scrollDOM.nextSibling,n=window.getSelection(),r=n&&{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset};e.scrollDOM.remove(),t.insertBefore(e.scrollDOM,i);try{r&&n&&(n.setPosition(r.anchorNode,r.anchorOffset),r.focusNode&&n.extend(r.focusNode,r.focusOffset))}catch(e){console.error(e)}e.focus(),e.contentDOM.dispatchEvent(new CustomEvent("compositionend"))}}(e),!0}}return!1})],decorations:e=>e.decorations}),d0=iH.mark({class:"cm-searchMatch"}),d1=t1.define(),d2=tE.define({create:()=>!1,update(e,t){for(let i of t.effects)i.is(d1)&&(e=i.value);return e},provide:e=>ok.from(e,e=>e?d5:null)});function d5(e){let t=document.createElement("div");t.className="cm-vim-panel";let i=e.cm;return i.state.dialog&&t.appendChild(i.state.dialog),{top:!1,dom:t}}function d3(e){let t=document.createElement("div");t.className="cm-vim-panel";let i=e.cm;return i.state.statusbar=t,i.state.vimPlugin.updateStatus(),{dom:t}}function d6(){return(d6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(null,arguments)}var d4=[{tag:aq.keyword,color:"#5e81ac"},{tag:[aq.name,aq.deleted,aq.character,aq.propertyName,aq.macroName],color:"#88c0d0"},{tag:[aq.variableName],color:"#8fbcbb"},{tag:[aq.function(aq.variableName)],color:"#8fbcbb"},{tag:[aq.labelName],color:"#81a1c1"},{tag:[aq.color,aq.constant(aq.name),aq.standard(aq.name)],color:"#5e81ac"},{tag:[aq.definition(aq.name),aq.separator],color:"#a3be8c"},{tag:[aq.brace],color:"#8fbcbb"},{tag:[aq.annotation],color:"#d30102"},{tag:[aq.number,aq.changed,aq.annotation,aq.modifier,aq.self,aq.namespace],color:"#b48ead"},{tag:[aq.typeName,aq.className],color:"#ebcb8b"},{tag:[aq.operator,aq.operatorKeyword],color:"#a3be8c"},{tag:[aq.tagName],color:"#b48ead"},{tag:[aq.squareBracket],color:"#bf616a"},{tag:[aq.angleBracket],color:"#d08770"},{tag:[aq.attributeName],color:"#ebcb8b"},{tag:[aq.regexp],color:"#5e81ac"},{tag:[aq.quote],color:"#b48ead"},{tag:[aq.string],color:"#a3be8c"},{tag:aq.link,color:"#a3be8c",textDecoration:"underline",textUnderlinePosition:"under"},{tag:[aq.url,aq.escape,aq.special(aq.string)],color:"#8fbcbb"},{tag:[aq.meta],color:"#88c0d0"},{tag:[aq.monospace],color:"#d8dee9",fontStyle:"italic"},{tag:[aq.comment],color:"#4c566a",fontStyle:"italic"},{tag:aq.strong,fontWeight:"bold",color:"#5e81ac"},{tag:aq.emphasis,fontStyle:"italic",color:"#5e81ac"},{tag:aq.strikethrough,textDecoration:"line-through"},{tag:aq.heading,fontWeight:"bold",color:"#5e81ac"},{tag:aq.special(aq.heading1),fontWeight:"bold",color:"#5e81ac"},{tag:aq.heading1,fontWeight:"bold",color:"#5e81ac"},{tag:[aq.heading2,aq.heading3,aq.heading4],fontWeight:"bold",color:"#5e81ac"},{tag:[aq.heading5,aq.heading6],color:"#5e81ac"},{tag:[aq.atom,aq.bool,aq.special(aq.variableName)],color:"#d08770"},{tag:[aq.processingInstruction,aq.inserted],color:"#8fbcbb"},{tag:[aq.contentSeparator],color:"#ebcb8b"},{tag:aq.invalid,color:"#434c5e",borderBottom:"1px dotted #d30102"}],d8=(p=(d={}).theme,O=d.settings,g=d.styles,v=(m={theme:void 0===p?"dark":p,settings:d6({},{background:"#2e3440",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#00000073",selectionMatch:"#00000073",gutterBackground:"#2e3440",gutterForeground:"#4c566a",gutterActiveForeground:"#d8dee9",lineHighlight:"#4c566a29"},void 0===O?{}:O),styles:[...d4,...void 0===g?[]:g]}).theme,w=void 0===(y=m.settings)?{}:y,b=m.styles,x={".cm-gutters":{}},S={},w.background&&(S.backgroundColor=w.background),w.backgroundImage&&(S.backgroundImage=w.backgroundImage),w.foreground&&(S.color=w.foreground),w.fontSize&&(S.fontSize=w.fontSize),(w.background||w.foreground)&&(x["&"]=S),w.fontFamily&&(x["&.cm-editor .cm-scroller"]={fontFamily:w.fontFamily}),w.gutterBackground&&(x[".cm-gutters"].backgroundColor=w.gutterBackground),w.gutterForeground&&(x[".cm-gutters"].color=w.gutterForeground),w.gutterBorder&&(x[".cm-gutters"].borderRightColor=w.gutterBorder),w.caret&&(x[".cm-content"]={caretColor:w.caret},x[".cm-cursor, .cm-dropCursor"]={borderLeftColor:w.caret}),k={},w.gutterActiveForeground&&(k.color=w.gutterActiveForeground),w.lineHighlight&&(x[".cm-activeLine"]={backgroundColor:w.lineHighlight},k.backgroundColor=w.lineHighlight),x[".cm-activeLineGutter"]=k,w.selection&&(x["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:w.selection+" !important"}),w.selectionMatch&&(x["& .cm-selectionMatch"]={backgroundColor:w.selectionMatch}),[sq.theme(x,{dark:"dark"===v}),lE(lM.define(void 0===b?[]:b))]);let d7={key:"Enter",run:ct};function d9(e){return"vim"===e?function(e={}){return[dH,dJ,dG,e.status?ok.of(d3):d2]}():"emacs"===e?s0.of([...cl,cc]):tB.highest(s0.of([d7,cc,...ch]))}function pe(e){return"nord"===e||"dark"===e||"one-dark"===e?d8:[]}function pt(e){let t="object"==typeof e?e?.name:e;return"javascript"===t||"js"===t?u0():"json"===t?new le(u4):"html"===t?function(e={}){let t="",i;return!1===e.matchClosingTags&&(t="noMatch"),!0===e.selfClosingTags&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(i=fb((e.nestedLanguages||[]).concat(dr),(e.nestedAttributes||[]).concat(ds))),new le(i?da.configure({wrap:i,dialect:t}):t?dl.configure({dialect:t}):dl,[dl.data.of({autocomplete:function(e){let{extraTags:t,extraGlobalAttributes:i}=e,n=i||t?new f6(t,i):f6.default;return e=>(function(e,t){let{state:i,pos:n}=t,r=aJ(i).resolveInner(n,-1),s=r.resolve(n);for(let e=n,t;s==r&&(t=r.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from<i.to)break;s=r=t,e=i.from}if("TagName"==r.name)return r.parent&&/CloseTag$/.test(r.parent.name)?di(i,r,r.from,n):dt(i,e,r,r.from,n);if("StartTag"==r.name||"IncompleteTag"==r.name)return dt(i,e,r,n,n);if("StartCloseTag"==r.name||"IncompleteCloseTag"==r.name)return di(i,r,n,n);if("OpenTag"==r.name||"SelfClosingTag"==r.name||"AttributeName"==r.name){var o,a;let t,s,l;return o=r,a="AttributeName"==r.name?r.from:n,l=(s=(t=f8(o))?e.tags[f4(i.doc,t)]:null)&&s.attrs?Object.keys(s.attrs):[],{from:a,to:n,options:(s&&!1===s.globalAttrs?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames).map(e=>({label:e,type:"property"})),validFor:de}}{if("Is"==r.name||"AttributeValue"==r.name||"UnquotedAttributeValue"==r.name)return function(e,t,i,n,r){var s;let o=null==(s=i.parent)?void 0:s.getChild("AttributeName"),a=[],l;if(o){let s=e.sliceDoc(o.from,o.to),h=t.globalAttrs[s];if(!h){let n=f8(i),r=n?t.tags[f4(e.doc,n)]:null;h=(null==r?void 0:r.attrs)&&r.attrs[s]}if(h){let t=e.sliceDoc(n,r).toLowerCase(),i='"',s='"';for(let o of(/^['"]/.test(t)?(l='"'==t[0]?/^[^"]*$/:/^[^']*$/,i="",s=e.sliceDoc(r,r+1)==t[0]?"":t[0],t=t.slice(1),n++):l=/^[^\s<>='"]*$/,h))a.push({label:o,apply:i+o+s,type:"constant"})}}return{from:n,to:r,options:a,validFor:l}}(i,e,r,"Is"==r.name?n:r.from,n);if(!t.explicit||"Element"!=s.name&&"Text"!=s.name&&"Document"!=s.name)return null;var l=r;let o=[],a=0;for(let t of f7(i.doc,l,e))o.push({label:"<"+t,type:"type"});for(let e of f9(i.doc,l))o.push({label:"</"+e+">",type:"type",boost:99-a++});return{from:n,to:n,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}})(n,e)}(e)}),!1!==e.autoCloseTags?dc:[],u0().support,new le(fG,fG.data.of({autocomplete:fU})).support])}():[]}function pi(e,t){let i=t<0?0:t>e.length?e.length:t,n=e.lineAt(i);return{line:n.number-1,ch:i-n.from}}function pn(e,{line:t,ch:i}){return e.line(t+1).from+i}s0.of([cc]);let pr=e=>e.state.selection.main.head,ps=()=>{},po=t1.define(),pa=t1.define(),pl=t1.define(),ph=t1.define(),pc=tE.define({create:()=>iH.none,update(e,t){for(let i of(e=e.map(t.changes),t.effects))i.is(po)&&(e=e.update({add:[i.value],sort:!0})),i.is(pa)&&(e=iH.none);return e},provide:e=>sq.decorations.from(e)}),pu=tE.define({create:()=>iH.none,update(e,t){for(let i of(e=e.map(t.changes),t.effects)){if(i.is(pl)){let{line:n,cls:r}=i.value,{from:s}=t.state.doc.line(Math.min(n+1,t.state.doc.lines));e=e.update({add:[iH.line({class:r}).range(s)],sort:!0})}if(i.is(ph)){let{line:n,cls:r}=i.value;e=e.update({filter:(e,i,s)=>s.spec.class!==r||t.state.doc.lineAt(e).number!==n+1})}}return e},provide:e=>sq.decorations.from(e)});class pf{#e;#t=!1;#i="";#n;constructor(e,t={}){var i;this.#n=e5(),this.#e=function(e,t={}){let{value:i="",mode:n="javascript",keyMap:r="default",theme:s="default",lineNumbers:o=!0,readOnly:a=!1,foldGutter:l=!1,updateListener:h}=t,c=new tI,u=new tI,f=new tI,d=new tI,p=sq.theme({"&:not(.cm-focused) .cm-fat-cursor":{display:"none"}}),O=[d.of([hr(),s0.of(hv)]),pc,pu,c.of(pe(s)),u.of(d9(r)),function(e={}){return[lI.of(e),lD]}(),f.of(pt(n)),lE(cu),t9.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let i=e.newDoc,{head:n}=e.newSelection.main,r=i.lineAt(n);if(n>r.from+200)return e;let s=i.sliceString(r.from,n);if(!t.some(e=>e.test(s)))return e;let{state:o}=e,a=-1,l=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==a)continue;a=t.from;let i=ls(o,t.from);if(null==i)continue;let n=/^\s*/.exec(t.text)[0],r=lr(o,i);n!=r&&l.push({from:t.from,to:t.from+n.length,insert:r})}return l.length?[e,{changes:l,sequential:!0}]:e}),li.of(" "),...o?[function(e={}){return[oI.of(e),oT(),oV]}()]:[],...l?[function(e={}){var t;let i={...lC,...e},n=new l_(i,!0),r=new l_(i,!1),s=nK.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(a9)!=e.state.facet(a9)||e.startState.field(lw,!1)!=e.state.field(lw,!1)||aJ(e.startState)!=aJ(e.state)||i.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new ih;for(let i of e.viewportLineBlocks){let s=lx(e.state,i.from,i.to)?r:lg(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:o}=i;return[s,(t={class:"cm-foldGutter",markers(e){var t;return(null==(t=e.plugin(s))?void 0:t.markers)||ia.empty},initialSpacer:()=>new l_(i,!1),domEventHandlers:{...o,click:(e,t,i)=>{if(o.click&&o.click(e,t,i))return!0;let n=lx(e.state,t.from,t.to);if(n)return e.dispatch({effects:ly.of(n)}),!0;let r=lg(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:lv.of(r)}),!0)}}},[oT(),oC.of({...oA,...t})]),lQ()]}(),lQ()]:[],...a?[t9.readOnly.of(!0)]:[],...h?[sq.updateListener.of(h)]:[],function(e={}){return[on.of(e),os,oa,oh,nY.of(!0)]}(),p],g=new sq({state:t9.create({doc:i,extensions:O}),parent:e});return g._themeCompartment=c,g._keymapCompartment=u,g._langCompartment=f,g._historyCompartment=d,g}(e,{...t,updateListener:e=>{e.docChanged&&this.#n.emit("change",{value:this.getValue(),cursor:this.getCursorIndex()}),e.selectionSet&&this.#n.emit("cursorMove",this.getCursorIndex())}}),i=this.#e,new ResizeObserver(()=>i.requestMeasure()).observe(e)}getValue(){return this.#e.state.doc.toString()}setValue(e){var t;return t=this.#e,t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e}}),this}getCursorIndex(){return pr(this.#e)}getCursor(){var e;let t,i;return t=pr(e=this.#e),{row:(i=pi(e.state.doc,t)).line,column:i.ch}}posFromIndex(e){var t;return t=this.#e,pi(t.state.doc,e)}focus(){return this.#e.focus(),this}moveCursorTo(e,t=0){let i=this.#e.state.doc.line(e+1);return this.#e.dispatch({selection:{anchor:i.from+t},scrollIntoView:!0}),this}markRange(e,t,i){return function(e,t,i,{className:n}){let r=pn(e.state.doc,t),s=pn(e.state.doc,i);if(r===s)return{clear:ps};let o=iH.mark({class:n}).range(r,s);return e.dispatch({effects:po.of(o)}),{clear:()=>e.dispatch({effects:pa.of(null)})}}(this.#e,e,t,{className:i})}addLineClass(e,t){var i;return i=this.#e,i.dispatch({effects:pl.of({line:e,cls:t})}),this}removeLineClass(e,t){var i;return i=this.#e,i.dispatch({effects:ph.of({line:e,cls:t})}),this}setOption(e,t){var i;return"keyMap"===e&&(this.#t="vim"===t),i=this.#e,"theme"===e?i.dispatch({effects:i._themeCompartment.reconfigure(pe(t))}):"keyMap"===e?i.dispatch({effects:i._keymapCompartment.reconfigure(d9(t))}):"mode"===e&&i.dispatch({effects:i._langCompartment.reconfigure(pt(t))}),this}setMode(e){return this.setOption("mode",e)}setTheme(e){return this.setOption("theme",e)}setKeyMap(e){return this.setOption("keyMap",e)}setModeForPath(e){return this.setMode(e.split(".").pop())}isChanged(){return this.getValue()!==this.#i}clearHistory(){var e,t,i;return e=this.#e,t=this.#e._historyCompartment,i=this.#t,e&&e.dispatch({effects:t.reconfigure(i?[]:[hr(),s0.of(hv)])}),this}on(e,t){return this.#n.on(e,t),this}addListener(e,t){return this.on(e,t)}once(e,t){return this.#n.once(e,t),this}removeListener(e,t){return this.#n.removeListener(e,t),this}emit(...e){return this.#n.emit(...e),this}setOptions(e={}){return e.fontSize&&this._view.dispatch({effects:this._view._themeCompartment.reconfigure(sq.theme({"&":{fontSize:`${e.fontSize}px`}}))}),this}get _view(){return this.#e}}function pd(e){if("function"!=typeof e)throw TypeError("Argument to promisify must be a function");var t=e["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],i=pd.Promise||Promise;if("function"!=typeof i)throw Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];return new i((i,n)=>{r.push(function(e){if(e)return n(e);for(var r=arguments.length,s=Array(1<r?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(1===s.length||!t)return i(s[0]);var a={};s.forEach((e,i)=>{var n=t[i];n&&(a[n]=e)}),i(a)}),e.apply(this,r)})}}function pp(){if(!(this instanceof pp))return new pp}pd.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",pd.Promise=void 0,pp.prototype.checkHash=async function(e){let t=await this.loadHash(e),i=`${e}-hash`;return t===localStorage.getItem(i)},pp.prototype.loadHash=pd(function(e,t){return e1({method:"GET",url:eJ+(e+"?hash"),callback:t}),this}),pp.prototype.setData=function(e,t){let i=`${e}-data`;return localStorage.setItem(i,t),this},pp.prototype.setHash=function(e,t){let i=`${e}-hash`;return localStorage.setItem(i,t),this},pp.prototype.getData=function(e){let t=`${e}-data`;return localStorage.getItem(t)||""},pp.prototype.getHash=function(e){let t=`${e}-hash`;return localStorage.getItem(t)||""};var pO=i(735),pg=i(519);function pm(e){return this._ElementMsg||(this._ElementMsg=W("div",{innerHTML:'<div class="dword-msg">/div>'}).firstChild,this._Element.appendChild(this._ElementMsg)),this._ElementMsg.textContent=e,this._ElementMsg.hidden=!1,setTimeout(()=>{this._ElementMsg.hidden=!0},2e3),this}let pv=pg(pm);var py=i(317);let pw=pd(i(955)),pb=py(function(e){e._Value=e.getValue()});async function px(){let e=this.getValue(),{length:t}=e,{_FileName:i,_maxSize:n}=this,{diff:r,zip:s}=await this._loadOptions();if(r){var o,a,l;let e,r,s=await this._doDiff(i);if(o=t,a=n,l=s,e=l?.length||0,r="string"==typeof l,l&&r&&o<a&&e<o)return this._patch(i,s)}if(!s)return this._write(i,e);let h=await pw(e);return this._write(`${i}?unzip`,h)}function pS(){let e,t=this,i=(e=location).origin||e.protocol+"//"+e.host,n=(e,t)=>{s.emit("patch",e,t)},{_prefixSocket:r}=t,s=globalThis.io.connect(i+r,{"max reconnection attempts":0x100000000,"reconnection limit":5e3,path:this._socketPath+"/socket.io"});this._socket=s,s.on("reject",()=>{this.emit("reject")}),s.on("connect",()=>{t._patch=n}),s.on("message",e=>{this._onSave(null,e)}),s.on("file",(e,i)=>{t.setModeForPath(e).setValueFirst(e,i).moveCursorTo(0,0)}),s.on("patch",(e,i,n)=>{if(e!==this._FileName||n!==this._story.getHash(e))return;let r=t.getCursor(),s=t.getValue(),o=(0,eH.applyPatch)(s,i);this.setValue(o),this._story.setData(e,s).setHash(e,this.sha()),t.moveCursorTo(r.row,r.column)}),s.on("disconnect",()=>{t.save.patch=globalThis._patchHttp}),s.on("err",e=>{F(this._TITLE,e)})}function pk(){}let pQ=pg(async e=>{let t=`${e}/modules.json`;return await eK.json(t)}),p$=pg(async e=>{let t=`${e}/options.json`;return await eK.json(t)}),pP=async({remote:e,local:t})=>{let[i]=await e2(eK.parallel,e);i&&await pA(t)},pA=async function(e){await eK.parallel(e)},pC=async(e,t={})=>{let i,n,{prefix:r=""}=t;if(t.name&&global[t.name])return;let s=[pQ(r),p$(r)],[o,[a,l]]=await e2(Promise.all.bind(Promise),s);if(o)return alert(`Error: could not load module or config: ${o.message}`);let h=l.online&&navigator.onLine,c=function(e,t){let i;if("string"!=typeof e)throw Error("name should be string!");if(!Array.isArray(t))throw Error("array should be array!");return t.some(t=>{let n=t.name===e;return n&&(i=t),n}),i}(e,a),u=Array.isArray(c.local),{version:f}=c;for(let e of(u?(i=c.remote,{local:n}=c):(i=[c.remote],n=[c.local]),n=[]))n.push(r+e);let d=[];for(let e of i)d.push(e.replace(/{{\s*version\s*}}/g,f));if(!h)return await pA(n);await pP({remote:d,local:n})},p_=()=>{};function pT(e,t,i){return"string"==typeof e&&(e=document.querySelector(e)),new pM(e,t,i)}class pM extends pf{constructor(e,t={},i=p_){super(e,t),this._initSocket=pS,this._TITLE="Qword",this._story=pp(),this._savedValue="",this._filename="",this._maxSize=t.maxSize||512e3,this._PREFIX=t.prefix||"/qword",this._prefixSocket=t.prefixSocket||"/qword",this._socketPath=t.socketPath||"",eJ=`${this._PREFIX}/api/v1/fs`,this._init().then(()=>i(this))}async _init(){let[e,t]=await e2(eK.json,`${this._PREFIX}/edit.json`);if(e)return F(this._TITLE,"Could not load edit.json!");this._Config=t,await Promise.all([p$(this._PREFIX),pQ(this._PREFIX)]),await pC("socket",{prefix:this._socketPath}),this._initSocket()}setValueFirst(e,t){return this.setModeForPath(e),this.setValue(t),this._filename=e,this._savedValue=t,this.clearHistory(),this.moveCursorTo(0,0),this}sha(){let e=new eF("SHA-1","TEXT");return e.update(this.getValue()),e.getHash("HEX")}evaluate(){if(!this._filename?.endsWith(".js"))return F(this._TITLE,"JS only");let[e]=((e,...t)=>{try{return[null,e(...t)]}catch(e){return[e]}})(Function(this.getValue()));return e&&F(this._TITLE,e.message),this}goToLine(){let e=Number(prompt("Line number"));if(!e)return;let t=this._view.state.doc.line(e);this._view.dispatch({selection:{anchor:t.from},scrollIntoView:!0}),this.focus()}remove(e){let{state:t}=this._view,{from:i,to:n}=t.selection.main,r=i===n;if("right"===e)this._view.dispatch({changes:{from:i,to:r?n+1:n,insert:""}});else{let e=r?i-1:i;e>=0&&this._view.dispatch({changes:{from:e,to:n,insert:""}})}return this}selectAll(){let{doc:e}=this._view.state;return this._view.dispatch({selection:{anchor:0,head:e.length}}),this}enableKey(){return this}cutToClipboard(){return this._clipboard("cut")}copyToClipboard(){return this._clipboard("copy")}pasteFromClipboard(){return this._clipboard("paste")}_patchHttp(e,t){var i=t,n=this._onSave.bind(this);n||"function"!=typeof i||(n=i,i=null),e1({method:"PATCH",url:eJ+e,data:i,callback:n})}_writeHttp(e,t){e0(e,t,this._onSave.bind(this))}async _doDiff(e){return await this._story.checkHash(e).catch(()=>!1)?"":(0,eH.createPatch)(this._savedValue||"",this.getValue())}}pT.prototype._clipboard=function(e){let{_view:t,_story:i}=this,n="editor-clipboard",r=()=>{let{from:e,to:i}=t.state.selection.main;return t.state.sliceDoc(e,i)},s=e=>{let{from:i,to:n}=t.state.selection.main;t.dispatch({changes:{from:i,to:n,insert:e}})};if("copy"===e){let e=r();return i.setData(n,e),pO.writeText(e)}if("cut"===e){let e=r();return i.setData(n,e),s(""),pO.writeText(e)}return pO.readText().then(s).catch(()=>{pv.call(this,"Could not paste from clipboard. Inner buffer used."),s(i.getData(n))})},pT.prototype.save=function(){return px.call(this).then(pb(this)).catch(this._onSave.bind(this)),this},pT.prototype._onSave=function(e,t){let i=this._Value,n=this._FileName,r="Try again?";if(e){r=e.message?e.message+"\n"+r:"Can't save."+r;let t=this._onSave.bind(this);return H(this._TITLE,r,"",K(void 0)||U,void 0).then(()=>{e0(this._FileName,this._Value,t)}).catch(pk).then(()=>{this.focus()})}this.showMessage(t);let s=this.sha();this._story.setData(n,i).setHash(n,s),this._Emitter.emit("save",i.length)},pT.prototype.showMessage=pm})(),qword=n.default})();
|
|
219
219
|
//# sourceMappingURL=qword.js.map
|