diff --git a/front_end/third_party/codemirror.next/chunk/codemirror.js b/front_end/third_party/codemirror.next/chunk/codemirror.js index b391b5282e..6846c1b4c0 100644 --- a/front_end/third_party/codemirror.next/chunk/codemirror.js +++ b/front_end/third_party/codemirror.next/chunk/codemirror.js @@ -1 +1 @@ -const t=1024;let e=0;class i{constructor(t,e){this.from=t,this.to=e}}class n{constructor(t={}){this.id=e++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=o.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}n.closedBy=new n({deserialize:t=>t.split(" ")}),n.openedBy=new n({deserialize:t=>t.split(" ")}),n.group=new n({deserialize:t=>t.split(" ")}),n.contextHash=new n({perNode:!0}),n.lookAhead=new n({perNode:!0}),n.mounted=new n({perNode:!0});class s{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}}const r=Object.create(null);class o{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):r,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new o(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return n}prop(t){return this.props[t.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(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(n.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(n.group),s=-1;s<(i?i.length:0);s++){let n=e[s<0?t.name:i[s]];if(n)return n}}}}o.none=new o("",Object.create(null),0,8);class a{constructor(t){this.types=t;for(let e=0;et.node;;){let o=!1;if(t.from<=s&&t.to>=n&&(t.type.isAnonymous||!1!==e(t.type,t.from,t.to,r))){if(t.firstChild())continue;t.type.isAnonymous||(o=!0)}for(;o&&i&&i(t.type,t.from,t.to,r),o=t.type.isAnonymous,!t.nextSibling();){if(!t.parent())return;o=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:$(o.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new c(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new c(o.none,t,e,i)))}static build(e){return function(e){var i;let{buffer:s,nodeSet:r,maxBufferLength:o=t,reused:a=[],minRepeatType:l=r.types.length}=e,h=Array.isArray(s)?new u(s,s.length):s,f=r.types,d=0,p=0;function m(t,e,i,n,s){let{id:c,start:u,end:v,size:x}=h,k=p;for(;x<0;){if(h.next(),-1==x){let e=a[c];return i.push(e),void n.push(u-t)}if(-3==x)return void(d=c);if(-4==x)return void(p=c);throw new RangeError(`Unrecognized record size: ${x}`)}let P,S,T=f[c],W=u-t;if(v-u<=o&&(S=w(h.pos-e,s))){let e=new Uint16Array(S.size-S.skip),i=h.pos-S.size,n=e.length;for(;h.pos>i;)n=y(S.start,e,n);P=new O(e,v-S.start,r),W=S.start-t}else{let t=h.pos-x;h.next();let e=[],i=[],n=c>=l?c:-1,s=0,r=v;for(;h.pos>t;)n>=0&&h.id==n&&h.size>=0?(h.end<=r-o&&(Q(e,i,u,s,h.end,r,n,k),s=e.length,r=h.end),h.next()):m(u,t,e,i,n);if(n>=0&&s>0&&s-1&&s>0){let t=g(T);P=$(T,e,i,0,e.length,0,v-u,t,t)}else P=b(T,e,i,v-u,k-v)}i.push(P),n.push(W)}function g(t){return(e,i,s)=>{let r,o,a=0,l=e.length-1;if(l>=0&&(r=e[l])instanceof c){if(!l&&r.type==t&&r.length==s)return r;(o=r.prop(n.lookAhead))&&(a=i[l]+r.length+o)}return b(t,e,i,s,a)}}function Q(t,e,i,n,s,o,a,l){let h=[],c=[];for(;t.length>n;)h.push(t.pop()),c.push(e.pop()+i-s);t.push(b(r.types[a],h,c,o-s,l-o)),e.push(s-i)}function b(t,e,i,s,r=0,o){if(d){let t=[n.contextHash,d];o=o?[t].concat(o):[t]}if(r>25){let t=[n.lookAhead,r];o=o?[t].concat(o):[t]}return new c(t,e,i,s,o)}function w(t,e){let i=h.fork(),n=0,s=0,r=0,a=i.end-o,c={size:0,start:0,skip:0};t:for(let o=i.pos-t;i.pos>o;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=s,c.skip=r,r+=4,n+=4,i.next();continue}let h=i.pos-t;if(t<0||h=l?4:0,O=i.start;for(i.next();i.pos>h;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=l&&(u+=4);i.next()}s=O,n+=t,r+=u}return(e<0||n==t)&&(c.size=n,c.start=s,c.skip=r),c.size>4?c:void 0}function y(t,e,i){let{id:n,start:s,end:r,size:o}=h;if(h.next(),o>=0&&n4){let n=h.pos-(o-4);for(;h.pos>n;)i=y(t,e,i)}e[--i]=a,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==o?d=n:-4==o&&(p=n);return i}let v=[],x=[];for(;h.pos>0;)m(e.start||0,e.bufferStart||0,v,x,-1);let k=null!==(i=e.length)&&void 0!==i?i:v.length?x[0]+v[0].length:0;return new c(f[e.topID],v.reverse(),x.reverse(),k)}(e)}}c.empty=new c(o.none,[],[],0);class u{constructor(t,e){this.buffer=t,this.index=e}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 u(this.buffer,this.index)}}class O{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return o.none}toString(){let t=[];for(let e=0;e0));a=r[a+3]);return o}slice(t,e,i,n){let s=this.buffer,r=new Uint16Array(e-t);for(let n=t,o=0;n=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function d(t,e){let i=t.childBefore(e);for(;i;){let e=i.lastChild;if(!e||e.to!=i.to)break;e.type.isError&&e.from==e.to?(t=i,i=e.prevSibling):i=e}return t}function p(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?a.length:-1;t!=h;t+=e){let h=a[t],c=l[t]+o._from;if(f(s,i,c,c+h.length))if(h instanceof O){if(2&r)continue;let n=h.findChild(0,h.buffer.length,e,i-c,s);if(n>-1)return new b(new Q(o,h,t,c),null,n)}else if(1&r||!h.type.isAnonymous||y(h)){let a;if(!(1&r)&&h.props&&(a=h.prop(n.mounted))&&!a.overlay)return new m(a.tree,c,t,o);let l=new m(h,c,t,o);return 1&r||!l.type.isAnonymous?l:l.nextChild(e<0?h.children.length-1:0,e,i,s)}}if(1&r||!o.type.isAnonymous)return null;if(t=o.index>=0?o.index+e:e<0?-1:o._parent.node.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this.node.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}enter(t,e,i=!0,s=!0){let r;if(i&&(r=this.node.prop(n.mounted))&&r.overlay){let i=t-this.from;for(let{from:t,to:n}of r.overlay)if((e>0?t<=i:t=i:n>i))return new m(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,s?0:2)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 cursor(){return new w(this)}get tree(){return this.node}toTree(){return this.node}resolve(t,e=0){return p(this,t,e,!1)}resolveInner(t,e=0){return p(this,t,e,!0)}enterUnfinishedNodesBefore(t){return d(this,t)}getChild(t,e=null,i=null){let n=g(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return g(this,t,e,i)}toString(){return this.node.toString()}}function g(t,e,i,n){let s=t.cursor,r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}class Q{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class b{constructor(t,e,i){this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}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]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new b(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i,n=!0){if(!n)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new b(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new b(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new b(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get cursor(){return new w(this)}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1],o=i.buffer[this.index+2];t.push(i.slice(n,s,r,o)),e.push(0)}return new c(this.type,t,e,this.to-this.from)}resolve(t,e=0){return p(this,t,e,!1)}resolveInner(t,e=0){return p(this,t,e,!0)}enterUnfinishedNodesBefore(t){return d(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,i=null){let n=g(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return g(this,t,e,i)}}class w{constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof m)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}get name(){return this.type.name}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:n}=this.buffer;return this.type=e||n.set.types[n.buffer[t]],this.from=i+n.buffer[t+1],this.to=i+n.buffer[t+2],!0}yield(t){return!!t&&(t instanceof m?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.buffer.start,i);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=!0,n=!0){return this.buffer?!!n&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i&&!(1&this.mode),n))}parent(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:n}=this;if(n){if(t>0){if(this.index-1)for(let n=e+t,s=t<0?-1:i.node.children.length;n!=s;n+=t){let t=i.node.children[n];if(1&this.mode||t instanceof O||!t.type.isAnonymous||y(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let t=i;tt instanceof O||!t.type.isAnonymous||y(t)))}const v=new WeakMap;function x(t,e){if(!t.isAnonymous||e instanceof O||e.type!=t)return 1;let i=v.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof c)){i=1;break}i+=x(t,n)}v.set(e,i)}return i}function $(t,e,i,n,s,r,o,a,l){let h=0;for(let i=n;i=c)break;d+=e}if(h==s+1){if(d>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+a);continue}u.push(i[s])}else{let e=n[h-1]+i[h-1].length-f;u.push($(t,i,n,s,h,f,e,null,l))}O.push(f+a-r)}}(e,i,n,s,0),(a||l)(u,O,o)}class k{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new k(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&n.push(i);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,a=0,l=0;;o++){let h=o=i)for(;r&&r.from=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new k(t,i,e.tree,e.offset+l,o>0,!!h)}if(e&&n.push(e),r.to>c)break;r=snew i(t.from,t.to))):[new i(0,0)]:[new i(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class S{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function T(t){return(e,i,n,s)=>new A(e,t,i,n,s)}class W{constructor(t,e,i,n,s){this.parser=t,this.parse=e,this.overlay=i,this.target=n,this.ranges=s}}class R{constructor(t,e,i,n,s,r,o){this.parser=t,this.predicate=e,this.mounts=i,this.index=n,this.start=s,this.target=r,this.prev=o,this.depth=0,this.ranges=[]}}const X=new n({perNode:!0});class A{constructor(t,e,i,n,s){this.nest=e,this.input=i,this.fragments=n,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new c(t.type,t.children,t.positions,t.length,t.propValues.concat([[X,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[n.mounted.id]=new s(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;et.frag.from<=s.from&&t.frag.to>=s.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let n=i.from+t.pos,r=i.to+t.pos;n>=s.from&&r<=s.to&&e.ranges.push({from:n,to:r})}}l=!1}else if(n&&(o=C(n.ranges,s.from,s.to)))l=2!=o;else if(!s.type.isAnonymous&&s.fromnew i(t.from-s.from,t.to-s.from))):null,s.tree,t)),r.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):l=!1}}else e&&(a=e.predicate(s))&&(!0===a&&(a=new i(s.from,s.to)),a.fromnew i(t.from-e.start,t.to-e.start))),e.target,t)),e=e.prev}n&&!--n.depth&&(n=n.prev)}}}}function C(t,e,i){for(let n of t){if(n.from>=i)break;if(n.to>e)return n.from<=e&&n.to>=i?2:1}return 0}function Z(t,e,i,n,s,r){if(e=e.to);n++);let a=s.children[n],l=a.buffer;s.children[n]=function t(i,n,s,o){let h=i;for(;l[h+2]+r<=e.from;)h=l[h+3];let u=[],O=[];Z(a,i,h,u,O,o);let f=l[h+1]+r==e.from&&l[h+2]+r==e.to&&l[h]==e.type.id;u.push(f?e.toTree():t(h+4,l[h+3],a.set.types[l[h]],l[h+1])),O.push(l[h+1]-o),Z(a,l[h+3],n,u,O,o);let d=u.length-1;return new c(s,u,O,O[d]+u[d].length)}(0,l.length,o.none,0);for(let n=0;n<=i;n++)t.childAfter(e.from)}class U{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.fullCursor()}moveTo(t){let{cursor:e}=this,i=t-this.offset;for(;!this.done&&e.from=t&&e.enter(i,1,!1,!1)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof c))break;e=e.children[0]}return!1}}class Y{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(X))&&void 0!==e?e:i.to,this.inner=new U(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(X))&&void 0!==t?t:e.to,this.inner=new U(e.tree,-e.offset)}}findMounts(t,e){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let r=null===(i=t.tree)||void 0===i?void 0:i.prop(n.mounted);if(r&&r.parser==e)for(let e=this.fragI;e=t.to)break;i.tree==this.curFrag.tree&&s.push({frag:i,pos:t.from-i.offset,mount:r})}}}return s}}function z(t,e){let n=null,s=e;for(let r=1,o=0;r=l)break;t.to<=a||(n||(s=n=e.slice()),t.froml&&n.splice(o+1,0,new i(l,t.to))):t.to>l?n[o--]=new i(l,t.to):n.splice(o--,1))}}return s}function L(t,e,n,s){let r=0,o=0,a=!1,l=!1,h=-1e9,c=[];for(;;){let u=r==t.length?1e9:a?t[r].to:t[r].from,O=o==e.length?1e9:l?e[o].to:e[o].from;if(a!=l){let t=Math.max(h,n),e=Math.min(u,O,s);tnew i(t.from+s,t.to+s))),l,h);for(let e=0,i=l;;e++){let s=e==a.length,l=s?h:a[e].from;if(l>i&&n.push(new k(i,l,r.tree,-t,o.from>=i,o.to<=l)),s)break;i=a[e].to}}else n.push(new k(l,h,r.tree,-t,o.from>=t,o.to<=a))}return n}const V="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),q="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class M{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)s(n(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=E[V]||1;return E[V]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[q]||new j(t)).mount(Array.isArray(e)?e:[e])}}let G=null;class j{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(G)return t.adoptedStyleSheets=[G.sheet].concat(t.adoptedStyleSheets),t[q]=G;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),G=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[q]=this}mount(t){let e=this.sheet,i=0,n=0;for(let s=0;s-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),e)for(let t=0;tt?parseInt(t,36):1));for(let t=1;tt)return N[e-1]<=t;return!1}function B(t){return t>=127462&&t<=127487}function H(t,e,i=!0){return(i?F:K)(t,e)}function F(t,e){if(e==t.length)return e;e&&J(t.charCodeAt(e))&&tt(t.charCodeAt(e-1))&&e--;let i=et(t,e);for(e+=nt(i);e=0&&B(et(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function K(t,e){for(;e>0;){let i=F(t,e-2);if(i=56320&&t<57344}function tt(t){return t>=55296&&t<56320}function et(t,e){let i=t.charCodeAt(e);if(!tt(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return J(n)?n-56320+(i-55296<<10)+65536:i}function it(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function nt(t){return t<65536?1:2}function st(t,e,i=t.length){let n=0;for(let s=0;sthis.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),at.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];return this.decompose(t,e,i,0),at.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new ct(this),s=new ct(t);for(let t=e,r=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(t=1){return new ct(this,t)}iterRange(t,e=this.length){return new ut(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Ot(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new ot(t):at.from(ot.split(t,[])):rt.empty}}class ot extends rt{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new ft(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new ot(ht(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=lt(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new ot(e,t.length+s.length));else{let t=e.length>>1;i.push(new ot(e.slice(0,t)),new ot(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof ot))return super.replace(t,e,i);let n=lt(this.text,lt(i.text,ht(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new ot(n,s):at.from(ot.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=a+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new ot(i,n)),i=[],n=-1);return n>-1&&e.push(new ot(i,n)),e}}class at extends rt{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((e?a:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=a+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(a>=e?2:0));r>=t&&a<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=a+1}}replace(t,e,i){if(i.lines=s&&e<=o){let a=r.replace(t-s,e-s,i),l=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new at(s,this.length-(e-t)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=a+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof at))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let a=this.children[n],l=t.children[s];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new ot(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>s&&t instanceof at)for(let e of t.children)c(e);else t.lines>r&&(a>r||!a)?(u(),o.push(t)):t instanceof ot&&a&&(e=h[h.length-1])instanceof ot&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new ot(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>n&&u(),a+=t.lines,l+=t.length+1,h.push(t))}function u(){0!=a&&(o.push(1==h.length?h[0]:at.from(h,l)),l=-1,a=h.length=0)}for(let e of t)c(e);return u(),1==o.length?o[0]:new at(o,e)}}function lt(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(l>n&&(a=a.slice(0,n-s)),s0?1:(t instanceof ot?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof ot?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof ot){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof ot?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class ut{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new ct(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Ot{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e?(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}}"undefined"!=typeof Symbol&&(rt.prototype[Symbol.iterator]=function(){return this.iter()},ct.prototype[Symbol.iterator]=ut.prototype[Symbol.iterator]=Ot.prototype[Symbol.iterator]=function(){return this});class ft{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}const dt=/\r\n?|\n/;var pt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(pt||(pt={}));class mt{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=pt.Simple&&l>=t&&(i==pt.TrackDel&&nt||i==pt.TrackBefore&&nt))return null;if(l>t||l==t&&e<0&&!o)return t==n||e<0?s:s+a;s+=a}n=l}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new mt(t)}}class gt extends mt{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return wt(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return yt(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let a=n>>1;for(;i.length0&&bt(i,e,s.text),s.forward(t),o+=t}let l=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function a(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=h?"string"==typeof h?rt.of(h.split(i||dt)):h:rt.empty,u=c.length;if(t==o&&0==u)return;tr&&Qt(n,t-r,-1),Qt(n,o-t,u),bt(s,n,c),r=o}}(t),a(!o),o}static empty(t){return new gt(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function bt(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,h,r,c,u),s=h,r=c}}}function yt(t,e,i,n=!1){let s=[],r=n?[]:null,o=new xt(t),a=new xt(e);for(let t=0,e=0;;)if(-1==o.ins)t+=o.len,o.next();else if(-1==a.ins&&e=0&&(o.done||ee&&!o.done&&t+o.len=0)){if(o.done&&a.done)return r?new gt(s,r):new mt(s);throw new Error("Mismatched change set lengths")}{let i=0,n=t+o.len;for(;;)if(a.ins>=0&&e>t&&e+a.lene||o.ins>=0&&o.len>e)&&(t||n.length>i),r.forward2(e),o.forward(e)}}else Qt(n,0,o.ins,t),s&&bt(s,n,o.text),o.next()}}class xt{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?rt.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?rt.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class $t{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let i=t.mapPos(this.from,e),n=t.mapPos(this.to,e);return i==this.from&&n==this.to?this:new $t(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return kt.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return kt.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return kt.range(t.anchor,t.head)}}class kt{constructor(t,e=0){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:kt.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new kt(t.ranges.map((t=>$t.fromJSON(t))),t.main)}static single(t,e=t){return new kt([kt.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?kt.range(o,r):kt.range(r,o))}}return new kt(t,e)}function St(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let Tt=0;class Wt{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.extensions=s,this.id=Tt++,this.default=t([])}static define(t={}){return new Wt(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:Rt),!!t.static,t.enables)}of(t){return new Xt([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xt(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xt(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function Rt(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class Xt{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=Tt++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=t[this.id]>>1,r=2==this.type,o=!1,a=!1,l=[];for(let i of this.dependencies)"doc"==i?o=!0:"selection"==i?a=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&l.push(t[i.id]);return(t,e)=>{let h=t.values[s];if(h===jt)return t.values[s]=i(t),1;if(e){if(o&&e.docChanged||a&&(e.docChanged||e.selection)||l.some((e=>(1&Nt(t,e))>0))){let e=i(t);if(r?!function(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;return(t,i)=>{let a=t.values[o],l=a===jt||!i;for(let e of r)1&Nt(t,e)&&(l=!0);if(!l)return 0;let h=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Ct).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return(t,i)=>{let n=t.values[e];if(n===jt)return t.values[e]=this.create(t),1;if(i){let s=this.updateF(n,i);if(!this.compareF(n,s))return t.values[e]=s,1}return 0}}init(t){return[this,Ct.of({field:this,create:t})]}get extension(){return this}}const _t=4,Ut=3,Yt=2,zt=1,Lt=0;function Dt(t){return e=>new qt(e,t)}const Vt={lowest:Dt(_t),low:Dt(Ut),default:Dt(Yt),high:Dt(zt),highest:Dt(Lt),fallback:Dt(_t),extend:Dt(zt),override:Dt(Lt)};class qt{constructor(t,e){this.inner=t,this.prec=e}}class Et{of(t){return new Mt(this,t)}reconfigure(t){return Et.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Mt{constructor(t,e){this.compartment=t,this.inner=e}}class Gt{constructor(t,e,i,n,s){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let a=s.get(t);if(null!=a){if(a>=o)return;let e=n[a].indexOf(t);e>-1&&n[a].splice(e,1),t instanceof Mt&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof Mt){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof qt)r(t.inner,t.prec);else if(t instanceof Zt)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof Xt)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,o);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,Yt),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))i instanceof Zt?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),a=[],l=[],h=[];for(let t of n)o[t.id]=l.length<<1,l.push((e=>t.slot(e))),h.push([]);for(let t in s){let e=s[t],n=e[0].facet;if(e.every((t=>0==t.type))){o[n.id]=a.length<<1|1;let t=n.combine(e.map((t=>t.value))),s=i?i.config.address[n.id]:null;if(null!=s){let e=It(i,s);n.compare(t,e)&&(t=e)}a.push(t)}else{for(let t of e)0==t.type?(o[t.id]=a.length<<1|1,a.push(t.value)):(o[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))),h.push(t.dependencies.filter((t=>"string"!=typeof t)).map((t=>t.id))));o[n.id]=l.length<<1,l.push((t=>At(t,n,e))),h.push(e.filter((t=>0!=t.type)).map((t=>t.id)))}}let c=l.map((t=>jt));if(i){let t=(e,n)=>{if(n>7)return!1;let s=o[e];if(!(1&s))return h[s>>1].every((e=>t(e,n+1)));let r=i.config.address[e];return null!=r&&It(i,r)==a[s>>1]};for(let e in o){let n=o[e],s=i.config.address[e];null!=s&&0==(1&n)&&t(+e,0)&&(c[n>>1]=It(i,s))}}return{configuration:new Gt(t,r,l.map((t=>t(o))),o,a),values:c}}}const jt={};function Nt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.config.dynamicSlots[i](t,t.applying);return t.status[i]=2|s}function It(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Bt=Wt.define(),Ht=Wt.define({combine:t=>t.some((t=>t)),static:!0}),Ft=Wt.define({combine:t=>t.length?t[0]:void 0,static:!0}),Kt=Wt.define(),Jt=Wt.define(),te=Wt.define(),ee=Wt.define({combine:t=>!!t.length&&t[0]});class ie{constructor(t,e){this.type=t,this.value=e}static define(){return new ne}}class ne{of(t){return new ie(this,t)}}class se{constructor(t){this.map=t}of(t){return new re(this,t)}}class re{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new re(this.type,e)}is(t){return this.type==t}static define(t={}){return new se(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}re.reconfigure=re.define(),re.appendConfig=re.define();class oe{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&St(i,e.newLength),s.some((t=>t.type==oe.time))||(this.annotations=s.concat(oe.time.of(Date.now())))}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(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(oe.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ae(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=le(t,he(e,r,t.changes.newLength),!0))}return n==t?t:new oe(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(Kt)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:ae(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=gt.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.invertedDesc}t=new oe(e,n,t.selection&&t.selection.map(s),re.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(Jt);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof oe?s:Array.isArray(s)&&1==s.length&&s[0]instanceof oe?s[0]:ce(e,Oe(s),!1)}return t}(s):s)}oe.time=ie.define(),oe.userEvent=ie.define(),oe.addToHistory=ie.define(),oe.remote=ie.define();const ue=[];function Oe(t){return null==t?ue:Array.isArray(t)?t:[t]}var fe=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(fe||(fe={}));const de=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let pe;try{pe=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function me(t){return e=>{if(!/\S/.test(e))return fe.Space;if(function(t){if(pe)return pe.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||de.test(i)))return!0}return!1}(e))return fe.Word;for(let i=0;i-1)return fe.Word;return fe.Other}}class ge{constructor(t,e,i,n,s=null){this.config=t,this.doc=e,this.selection=i,this.values=n,this.applying=null,this.status=t.statusTemplate.slice(),this.applying=s,s&&(s._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(re.reconfigure)?(i=null,n=e.value):e.is(re.appendConfig)&&(i=null,n=Oe(n).concat(e.value));if(i)e=t.startState.values.slice();else{let t=Gt.resolve(n,s,this);i=t.configuration,e=new ge(i,this.doc,this.selection,t.values,null).values}new ge(i,t.newDoc,t.newSelection,e,t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:kt.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=Oe(i.effects);for(let i=1;is.spec.fromJSON(r,t))))}return ge.create({doc:t.doc,selection:kt.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let{configuration:e,values:i}=Gt.resolve(t.extensions||[],new Map),n=t.doc instanceof rt?t.doc:rt.of((t.doc||"").split(e.staticFacet(ge.lineSeparator)||dt)),s=t.selection?t.selection instanceof kt?t.selection:kt.single(t.selection.anchor,t.selection.head):kt.single(0);return St(s,n.length),e.staticFacet(Ht)||(s=s.asSingle()),new ge(e,n,s,i)}get tabSize(){return this.facet(ge.tabSize)}get lineBreak(){return this.facet(ge.lineSeparator)||"\n"}get readOnly(){return this.facet(ee)}phrase(t){for(let e of this.facet(ge.phrases))if(Object.prototype.hasOwnProperty.call(e,t))return e[t];return t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(Bt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return me(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-i,o=t-i;for(;r>0;){let t=H(e,r,!1);if(s(e.slice(t,r))!=fe.Word)break;r=t}for(;ot.length?t[0]:4}),ge.lineSeparator=Ft,ge.readOnly=ee,ge.phrases=Wt.define(),ge.languageData=Bt,ge.changeFilter=Kt,ge.transactionFilter=Jt,ge.transactionExtender=te,Et.reconfigure=re.define();class be{eq(t){return this==t}range(t,e=t){return new we(t,e,this)}}be.prototype.startSide=be.prototype.endSide=0,be.prototype.point=!1,be.prototype.mapMode=pt.TrackDel;class we{constructor(t,e,i){this.from=t,this.to=e,this.value=i}}function ye(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ve{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sh||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new ve(n,s,i,o):null,pos:r}}}class xe{constructor(t,e,i=xe.empty,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&e.slice().sort(ye),this.isEmpty)return e.length?xe.of(e):this;let o=new Pe(this,null,-1).goto(0),a=0,l=[],h=new $e;for(;o.value||a=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Se.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Se.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>=500||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>=500||!t.isEmpty&&t.maxPoint>=s)),a=ke(r,o,i),l=new We(r,a,s),h=new We(o,a,s);i.iterGaps(((t,e,i)=>Re(l,t,h,e,i,n))),i.empty&&0==i.length&&Re(l,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=1e9);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=ke(s,r),a=new We(s,o,0).goto(i),l=new We(r,o,0).goto(i);for(;;){if(a.to!=l.to||!Xe(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(t,e,i,n,s=-1){let r=new We(t,null,s).goto(e),o=e,a=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point?(n.point(o,t,r.point,r.activeForPoint(r.to),a),a=r.openEnd(t)+(r.to>t?1:0)):t>o&&(n.span(o,t,r.active,a),a=r.openEnd(t)),r.to>i)break;o=r.to,r.next()}return a}static of(t,e=!1){let i=new $e;for(let n of t instanceof we?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(ye);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}}xe.empty=new xe([],[],null,-1),xe.empty.nextLayer=xe.empty;class $e{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}finishChunk(t){this.chunks.push(new ve(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,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new $e)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(xe.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=new xe(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function ke(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Pe(r,e,i,s));return 1==n.length?n[0]:new Se(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Te(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Te(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Te(this.heap,0)}}}function Te(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class We{constructor(t,e,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=Se.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Ae(this.active,t),Ae(this.activeTo,t),Ae(this.activeRank,t),this.minActive=Ze(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Ae(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let s=this.cursor.value;if(s.point){if(!(e&&this.cursor.to==this.to&&this.cursor.fromt&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){let e=0;for(;e=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function Re(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,a=n,l=n-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,n=e<0?t.to+l:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Xe(t.activeForPoint(t.to+l),i.activeForPoint(i.to))||r.comparePoint(a,s,t.point,i.point):s>a&&!Xe(t.active,i.active)&&r.compareRange(a,s,t.active,i.active),n>o)break;a=n,e<=0&&t.next(),e>=0&&i.next()}}function Xe(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function Ze(t,e){let i=-1,n=1e9;for(let s=0;s",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Ye="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),ze="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Le="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),De="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ve="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),qe=Ye&&(De||+Ye[1]<57)||Le&&De,Ee=0;Ee<10;Ee++)_e[48+Ee]=_e[96+Ee]=String(Ee);for(Ee=1;Ee<=24;Ee++)_e[Ee+111]="F"+Ee;for(Ee=65;Ee<=90;Ee++)_e[Ee]=String.fromCharCode(Ee+32),Ue[Ee]=String.fromCharCode(Ee);for(var Me in _e)Ue.hasOwnProperty(Me)||(Ue[Me]=_e[Me]);function Ge(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function je(t,e){return!!e&&t.contains(1!=e.nodeType?e.parentNode:e)}function Ne(t,e){if(!e.anchorNode)return!1;try{return je(t,e.anchorNode)}catch(t){return!1}}function Ie(t){return 3==t.nodeType?oi(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Be(t,e,i,n){return!!i&&(Fe(t,e,i,n,-1)||Fe(t,e,i,n,1))}function He(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Fe(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:Ke(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=He(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?Ke(t):0}}}function Ke(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}const Je={left:0,right:0,top:0,bottom:0};function ti(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function ei(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}class ii{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let ni,si=null;function ri(t){if(t.setActive)return t.setActive();if(si)return t.focus(si);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==si?{get preventScroll(){return si={preventScroll:!0},!0}}:void 0),!si){si=!1;for(let t=0;te)return i.domBoundsAround(t,e,l);if(c>=t&&-1==n&&(n=a,s=l),l>e&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=hi){this.markDirty();for(let i=t;ithis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}let[fi,di]="undefined"!=typeof navigator?[navigator,document]:[{userAgent:"",vendor:"",platform:""},{documentElement:{style:{}}}];const pi=/Edge\/(\d+)/.exec(fi.userAgent),mi=/MSIE \d/.test(fi.userAgent),gi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fi.userAgent),Qi=!!(mi||gi||pi),bi=!Qi&&/gecko\/(\d+)/i.test(fi.userAgent),wi=!Qi&&/Chrome\/(\d+)/.exec(fi.userAgent),yi="webkitFontSmoothing"in di.documentElement.style,vi=!Qi&&/Apple Computer/.test(fi.vendor),xi=vi&&(/Mobile\/\w+/.test(fi.userAgent)||fi.maxTouchPoints>2);var $i={mac:xi||/Mac/.test(fi.platform),windows:/Win/.test(fi.platform),linux:/Linux|X11/.test(fi.platform),ie:Qi,ie_version:mi?di.documentMode||6:gi?+gi[1]:pi?+pi[1]:0,gecko:bi,gecko_version:bi?+(/Firefox\/(\d+)/.exec(fi.userAgent)||[0,0])[1]:0,chrome:!!wi,chrome_version:wi?+wi[1]:0,ios:xi,android:/Android\b/.test(fi.userAgent),webkit:yi,safari:vi,webkit_version:yi?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=di.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};const ki=[];class Pi extends ci{become(t){return!1}getSide(){return 0}}Pi.prototype.children=ki;class Si extends Pi{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){return 3==t.nodeType&&(this.createDOM(t),!0)}merge(t,e,i){return(!i||i instanceof Si&&!(this.length-(e-t)+i.length>256))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}slice(t){let e=new Si(this.text.slice(t));return this.text=this.text.slice(0,t),e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new li(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return Wi(this.dom,t,e)}}class Ti extends Pi{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}createDOM(){let t=document.createElement(this.mark.tagName);if(this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);this.setDOM(t)}sync(t){(!this.dom||4&this.dirty)&&this.createDOM(),super.sync(t)}merge(t,e,i,n,s){return(!i||!(!(i instanceof Ti&&i.mark.eq(this.mark))||t&&n<=0||et&&e.push(i=t&&(n=s),i=o,s++}let r=this.length-t;return this.length=t,n>-1&&this.replaceChildren(n,this.children.length),new Ti(this.mark,e,r)}domAtPos(t){return Zi(this.dom,this.children,t)}coordsAt(t,e){return Ui(this,t,e)}}function Wi(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?$i.chrome||$i.gecko||(e?(s--,o=1):(r++,o=-1)):i<0?s--:r++;let a=oi(t,s,r).getClientRects();if(!a.length)return Je;let l=a[(o?o<0:i>=0)?0:a.length-1];return $i.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l),o?ti(l,o<0):l||null}class Ri extends Pi{constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i}static create(t,e,i){return new(t.customView||Ri)(t,e,i)}slice(t){let e=Ri.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,i,n,s){return!(i&&(!(i instanceof Ri&&this.widget.compare(i.widget))||t>0&&n<=0||e0?i.length-1:0;n=i[e],!(t>0?0==e:e==i.length-1||n.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?n:ti(n,0==t)}get isEditable(){return!1}}class Xi extends Ri{domAtPos(t){return new li(this.widget.text,t)}sync(){this.dom||this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){return e?3==t.nodeType?Math.min(e,this.length):this.length:0}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,e){return Wi(this.widget.text,t,e)}get isEditable(){return!0}}class Ai extends Pi{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Ai&&t.side==this.side}slice(){return new Ai(this.side)}sync(){this.dom?this.dirty&&"​"!=this.dom.nodeValue&&(this.dom.nodeValue="​"):this.setDOM(document.createTextNode("​"))}getSide(){return this.side}domAtPos(t){return li.before(this.dom)}domBoundsAround(){return null}coordsAt(t){let e=Ie(this.dom);return e[e.length-1]||null}get overrideDOMText(){return rt.of([this.dom.nodeValue.replace(/\u200b/g,"")])}}function Ci(t,e,i,n,s,r){let o=t.childCursor(),{i:a,off:l}=o.findPos(i,1),{i:h,off:c}=o.findPos(e,-1),u=e-i;for(let t of n)u+=t.length;t.length+=u;let{children:O}=t;if(h==a&&c){let t=O[h];if(1==n.length&&t.merge(c,l,n[0],s,r))return;if(0==n.length)return void t.merge(c,l,null,s,r);let e=t.slice(l);e.merge(0,0,n[n.length-1],0,r)?n[n.length-1]=e:n.push(e),a++,r=l=0}if(l){let t=O[a];n.length&&t.merge(0,l,n[n.length-1],0,r)?(n.pop(),r=n.length?0:s):t.merge(0,l,null,0,0)}else as&&i0;n--){let i=e[n-1].dom;if(i.parentNode==t)return li.after(i)}return new li(t,0)}function _i(t,e,i){let n,{children:s}=t;i>0&&e instanceof Ti&&s.length&&(n=s[s.length-1])instanceof Ti&&n.mark.eq(e.mark)?_i(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Ui(t,e,i){for(let n=0,s=0;s0?a>=e:a>e)&&(e0)){let t=0;if(a==n){if(o.getSide()<=0)continue;t=i=-o.getSide()}let s=o.coordsAt(e-n,i);return t&&s?ti(s,i<0):s}n=a}let n=t.dom.lastChild;if(!n)return t.dom.getBoundingClientRect();let s=Ie(n);return s[s.length-1]||null}function Yi(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}function zi(t,e){if(t==e)return!0;if(!t||!e)return!1;let i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let s of i)if(-1==n.indexOf(s)||t[s]!==e[s])return!1;return!0}function Li(t,e,i){if(e)for(let n in e)i&&n in i||t.removeAttribute(n);if(i)for(let n in i)e&&e[n]==i[n]||t.setAttribute(n,i[n])}class Di{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}}var Vi=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Vi||(Vi={}));class qi extends be{constructor(t,e,i,n){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(t){return new Ei(t)}static widget(t){let e=t.side||0;return new Gi(t,e,e,!!t.block,t.widget||null,!1)}static replace(t){let e=!!t.block,{start:i,end:n}=ji(t,e);return new Gi(t,1e8*(i?-1:1)*(e?2:1),1e8*(n?1:-1)*(e?2:1),e,t.widget||null,!0)}static line(t){return new Mi(t)}static set(t,e=!1){return xe.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}qi.none=xe.empty;class Ei extends qi{constructor(t){let{start:e,end:i}=ji(t);super(1e8*(e?-1:1),1e8*(i?1:-1),null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof Ei&&this.tagName==t.tagName&&this.class==t.class&&zi(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Ei.prototype.point=!1;class Mi extends qi{constructor(t){super(-1e8,-1e8,null,t)}eq(t){return t instanceof Mi&&zi(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Mi.prototype.mapMode=pt.TrackBefore,Mi.prototype.point=!0;class Gi extends qi{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<0?pt.TrackBefore:pt.TrackAfter:pt.TrackDel}get type(){return this.startSide=5}eq(t){return t instanceof Gi&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function ji(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function Ni(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>t?i[s]=Math.max(i[s],e):i.push(t,e)}Gi.prototype.point=!0;class Ii extends ci{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof Ii))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Ci(this,t,e,i?i.children:Bi,s,r),!0}split(t){let e=new Ii;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].slice(n),0),this.children[i].merge(n,this.children[i].length,null,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[i-1].parent=null,i--;return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){zi(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){_i(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Yi(e,this.attrs||{})),i&&(this.attrs=Yi(e,{class:i}))}domAtPos(t){return Zi(this.dom,this.children,t)}sync(t){var e;(!this.dom||4&this.dirty)&&(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Li(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let i=this.dom.lastChild;for(;i&&ci.get(i)instanceof Ti;)i=i.lastChild;if(!i||"BR"!=i.nodeName&&0==(null===(e=ci.get(i))||void 0===e?void 0:e.isEditable)&&(!$i.ios||!this.children.some((t=>t instanceof Si)))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof Si))return null;let i=Ie(e.dom);if(1!=i.length)return null;t+=i[0].width}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return Ui(this,t,e)}match(t){return!1}get type(){return Vi.Text}static find(t,e){for(let i=0,n=0;;i++){let s=t.children[i],r=n+s.length;if(r>=e){if(s instanceof Ii)return s;if(s.length)return null}n=r+s.breakAfter}}}const Bi=[];class Hi extends ci{constructor(t,e,i){super(),this.widget=t,this.length=e,this.type=i,this.breakAfter=0}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof Hi&&this.widget.compare(i.widget))||t>0&&s<=0||e0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e),this.getLine().append(Ki(new Si(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s){let r=e-t;if(i instanceof Gi)if(i.block){let{type:t}=i;t!=Vi.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Hi(i.widget||new Ji("div"),r,t))}else{let o=Ri.create(i.widget||new Ji("span"),r,i.startSide),a=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),l=!o.isEditable&&(tt.map(e)}),hn=re.define({map:(t,e)=>t.map(e)});function cn(t,e,i){let n=t.facet(rn);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const un=Wt.define({combine:t=>!t.length||t[0]});class On{constructor(t,e){this.field=t,this.get=e}}class fn{from(t){return new On(this,t)}static define(){return new fn}}fn.decorations=fn.define(),fn.atomicRanges=fn.define(),fn.scrollMargins=fn.define();let dn=0;const pn=Wt.define();class mn{constructor(t,e,i){this.id=t,this.create=e,this.fields=i,this.extension=pn.of(this)}static define(t,e){let{eventHandlers:i,provide:n,decorations:s}=e||{},r=[];if(n)for(let t of Array.isArray(n)?n:[n])r.push(t);return i&&r.push(gn.from((t=>({plugin:t,handlers:i})))),s&&r.push(fn.decorations.from(s)),new mn(dn++,t,r)}static fromClass(t,e){return mn.define((e=>new t(e)),e)}}const gn=fn.define();class Qn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}takeField(t,e){for(let{field:i,get:n}of this.spec.fields)i==t&&e.push(n(this.value))}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,!this.value.update)return this;try{this.value.update(t)}catch(e){if(cn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}return Qn.dummy}}}else try{this.value=this.spec.create(t)}catch(e){return cn(t.state,e,"CodeMirror plugin crashed"),Qn.dummy}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){cn(t.state,e,"CodeMirror plugin crashed")}}}function bn(t){let e={};for(let i=t.length-1;i>=0;i--)Yi(t[i],e);return e}Qn.dummy=new Qn(mn.define((()=>({}))));const wn=Wt.define({combine:bn}),yn=Wt.define({combine:bn}),vn=Wt.define(),xn=Wt.define();class $n{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new $n(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!a)return i;new $n(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class kn{constructor(t,e,i=tn){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=gt.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new $n(t,e,i,s)))),this.changedRanges=n;let s=t.hasFocus;s!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=s,this.flags|=1),this.docChanged&&(this.flags|=2)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class Pn extends ci{constructor(t){super(),this.view=t,this.compositionDeco=qi.none,this.decorations=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Ii],this.children[0].setParent(this),this.updateInner([new $n(0,0,0,t.state.doc.length)],this.updateDeco(),0)}get root(){return this.view.root}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let e=t.changedRanges;this.minWidth>0&&e.length&&(e.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=0),this.view.inputState.composing<0?this.compositionDeco=qi.none:t.transactions.length&&(this.compositionDeco=function(t,e){let i=t.observer.selectionRange,n=i.focusNode&&Wn(i.focusNode,i.focusOffset,0);if(!n)return qi.none;let s,r,o=t.docView.nearest(n),a=n;if(o instanceof Pi){for(;o.parent instanceof Pi;)o=o.parent;s=o.posAtStart,r=s+o.length,a=o.dom}else{if(!(o instanceof Ii))return qi.none;{for(;a.parentNode!=o.dom;)a=a.parentNode;let t=a.previousSibling;for(;t&&!ci.get(t);)t=t.previousSibling;s=r=t?ci.get(t).posAtEnd:o.posAtStart}}let l=e.mapPos(s,1),h=Math.max(l,e.mapPos(r,-1)),c=n.nodeValue,{state:u}=t;if(h-lthis.view.docView.sync())),this.dirty=0,this.updateSelection(!0)):this.updateSelection()}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.minWidth=this.minWidth?this.minWidth+"px":"";let t=$i.chrome||$i.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(t),this.dirty=0,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?t[i]:null;if(!s)break;let{fromA:r,toA:o,fromB:a,toB:l}=s,{content:h,breakAtStart:c,openStart:u,openEnd:O}=Fi.build(this.view.state.doc,a,l,e),{i:f,off:d}=n.findPos(o,1),{i:p,off:m}=n.findPos(r,-1);this.replaceRange(p,m,f,d,h,c,u,O)}}replaceRange(t,e,i,n,s,r,o,a){let l=this.children[t],h=s.length?s[s.length-1]:null,c=h?h.breakAfter:r;if(t==i&&!r&&!c&&s.length<2&&l.merge(e,n,s.length?h:null,0==e,o,a))return;let u=this.children[i];for(n0&&(!r&&s.length&&l.merge(e,l.length,s[0],!1,o,0)?l.breakAfter=s.shift().breakAfter:(es.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=r=new li(t,0),i=!0}var o;let a=this.view.observer.selectionRange;!i&&a.focusNode&&Be(s.node,s.offset,a.anchorNode,a.anchorOffset)&&Be(r.node,r.offset,a.focusNode,a.focusOffset)||(this.view.observer.ignore((()=>{$i.android&&$i.chrome&&this.dom.contains(a.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(a.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Ge(this.root);if(n.empty){if($i.gecko){let t=(e=s.node,i=s.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(in.head&&([s,r]=[r,s]),e.setEnd(r.node,r.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,i})),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new li(a.anchorNode,a.anchorOffset),this.impreciseHead=r.precise?null:new li(a.focusNode,a.focusOffset)}enforceCursorAssoc(){if(this.view.composing)return;let t=this.view.state.selection.main,e=Ge(this.root);if(!t.empty||!t.assoc||!e.modify)return;let i=Ii.find(this,t.head);if(!i)return;let n=i.posAtStart;if(t.head==n||t.head==n+i.length)return;let s=this.coordsAt(t.head,-1),r=this.coordsAt(t.head,1);if(!s||!r||s.bottom>r.top)return;let o=this.domAtPos(t.head+t.assoc);e.collapse(o.node,o.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){return this.view.state.facet(un)?this.root.activeElement==this.dom:Ne(this.dom,this.view.observer.selectionRange)}nearest(t){for(let e=t;e;){let t=ci.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;er||t==r&&s.type!=Vi.WidgetBefore&&s.type!=Vi.WidgetAfter&&(!n||2==e||this.children[n-1].breakAfter||this.children[n-1].type==Vi.WidgetBefore&&e>-2))return s.coordsAt(t-r,e);i=r}}measureVisibleLineHeights(){let t=[],{from:e,to:i}=this.view.viewState.viewport,n=Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1;for(let s=0,r=0;ri)break;if(s>=e){t.push(o.dom.getBoundingClientRect().height);let e=o.dom.scrollWidth;e>n&&(this.minWidth=n=e,this.minWidthFrom=s,this.minWidthTo=a)}s=a+o.breakAfter}return t}measureTextSize(){for(let t of this.children)if(t instanceof Ii){let e=t.measureTextSize();if(e)return e}let t,e,i=document.createElement("div");return i.className="cm-line",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let n=Ie(i.firstChild)[0];t=i.getBoundingClientRect().height,e=n?n.width/27:7,i.remove()})),{lineHeight:t,charWidth:e}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Oi(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=e.lineBlockAt(r).bottom-e.lineBlockAt(i).top;t.push(qi.replace({widget:new Sn(n),block:!0,inclusive:!0}).range(i,r))}if(!s)break;i=s.to+1}return qi.set(t)}updateDeco(){return this.decorations=[...this.view.pluginField(fn.decorations),...this.view.state.facet(vn),this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView({range:t,center:e}){let i,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1);if(!n)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let s=0,r=0,o=0,a=0;for(let t of this.view.pluginField(fn.scrollMargins))if(t){let{left:e,right:i,top:n,bottom:l}=t;null!=e&&(s=Math.max(s,e)),null!=i&&(r=Math.max(r,i)),null!=n&&(o=Math.max(o,n)),null!=l&&(a=Math.max(a,l))}!function(t,e,i,n){let s=t.ownerDocument,r=s.defaultView;for(let o=t;o;)if(1==o.nodeType){let t,a=o==s.body;if(a)t=ei(r);else{if(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth){o=o.parentNode;continue}let e=o.getBoundingClientRect();t={left:e.left,right:e.left+o.clientWidth,top:e.top,bottom:e.top+o.clientHeight}}let l=0,h=0;if(n){let n,s=e.bottom-e.top,r=t.bottom-t.top;n=s<=r?e.top+s/2-r/2:i<0?e.top-5:e.bottom+5-r,h=n-t.top,Math.abs(h)<=1&&(h=0)}else e.top0&&e.bottom>t.bottom+h&&(h=e.bottom-t.bottom+h+5)):e.bottom>t.bottom&&(h=e.bottom-t.bottom+5,i<0&&e.top-h0&&e.right>t.right+l&&(l=e.right-t.right+l+5)):e.right>t.right&&(l=e.right-t.right+5,i<0&&e.left0&&i<=0)e=Ke(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}class Rn{constructor(){this.changes=[]}compareRange(t,e){Ni(t,e,this.changes)}comparePoint(t,e){Ni(t,e,this.changes)}}var Xn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Xn||(Xn={}));const An=Xn.LTR,Cn=Xn.RTL;function Zn(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}const Vn=[];function qn(t){return[new Dn(0,t,0)]}let En="";function Mn(t,e,i,n,s){var r;let o=n.head-t.from,a=-1;if(0==o){if(!s||!t.length)return null;e[0].level!=i&&(o=e[0].side(!1,i),a=0)}else if(o==t.length){if(s)return null;let t=e[e.length-1];t.level!=i&&(o=t.side(!0,i),a=e.length-1)}a<0&&(a=Dn.find(e,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc));let l=e[a];o==l.side(s,i)&&(l=e[a+=s?1:-1],o=l.side(!s,i));let h=s==(l.dir==i),c=H(t.text,o,h);if(En=t.text.slice(Math.min(o,c),Math.max(o,c)),c!=l.side(s,i))return kt.cursor(c+t.from,h?-1:1,l.level);let u=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return u||l.level==i?u&&u.levelt?e.left-t:Math.max(0,t-e.right)}function jn(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Nn(t,e){return t.tope.top+1}function In(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Hn(t,e,i){let n,s,r,o,a,l,h,c;for(let u=t.firstChild;u;u=u.nextSibling){let t=Ie(u);for(let O=0;Op||o==p&&r>d)&&(n=u,s=f,r=d,o=p),0==d?i>f.bottom&&(!h||h.bottomf.top)&&(l=u,c=f):h&&Nn(h,f)?h=Bn(h,f.bottom):c&&Nn(c,f)&&(c=In(c,f.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:t,offset:0};let u=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Fn(n,u,i):r||"true"!=n.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}:Hn(n,u,i)}function Fn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;ai?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if($i.chrome||$i.gecko){oi(t,a).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function Kn(t,{x:e,y:i},n,s=-1){var r;let o,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,h=t.defaultLineHeight/2,c=i-l;for(let e=!1;;){if(o=t.elementAtHeight(c),o.top>c||o.bottomc?-1:1,c=Math.min(o.bottom-h,Math.max(o.top+h,c)),e)return n?null:0;e=!0}if(o.type==Vi.Text)break;c=s>0?o.bottom+h:o.top-h}i=l+c;let u=o.from;if(e=Math.max(a.left+1,Math.min(a.right-1,e)),ut.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:Jn(t,a,o,e,i);let O,f=t.dom.ownerDocument,d=(t.root.elementFromPoint?t.root:f).elementFromPoint(e,i),p=-1;if(d&&t.contentDOM.contains(d)&&0!=(null===(r=t.docView.nearest(d))||void 0===r?void 0:r.isEditable))if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(e,i);t&&({offsetNode:O,offset:p}=t)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(e,i);t&&(({startContainer:O,startOffset:p}=t),$i.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return oi(t,n-1,n).getBoundingClientRect().left>i}(O,p,e)&&(O=void 0))}if(!O||!t.docView.dom.contains(O)){let n=Ii.find(t.docView,u);({node:O,offset:p}=Hn(n.dom,e,i))}return t.docView.posFromDOM(O,p)}function Jn(t,e,i,n,s){let r=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){r+=Math.floor((s-i.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+function(t,e,i,n){for(let n=0,s=0;;){if(s>=e)return n;if(n==t.length)break;s+=9==t.charCodeAt(n)?i-s%i:1,n=H(t,n)}return!0===n?-1:t.length}(o,r,t.state.tabSize)}function ts(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s);for(let o=e,a=null;;){let e=Mn(s,r,t.textDirection,o,i),l=En;if(!e){if(s.number==(i?t.state.doc.lines:1))return o;l="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=kt.cursor(i?s.from:s.to)}if(a){if(!a(l))return o}else{if(!n)return e;a=n(l)}o=e}}function es(t,e,i){let n=t.pluginField(fn.atomicRanges);for(;;){let t=!1;for(let s of n)s.between(i.from-1,i.from+1,((n,s,r)=>{i.from>n&&i.fromi.from?kt.cursor(n,1):kt.cursor(s,-1),t=!0)}));if(!t)return i}}class is{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.pendingAndroidKey=void 0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let e in as){let i=as[e];t.contentDOM.addEventListener(e,(n=>{"keydown"==e&&this.keydown(t,n)||os(t,n)&&!this.ignoreDuringComposition(n)&&(this.mustFlushObserver(n)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,n)?n.preventDefault():i(t,n))})),this.registeredEvents.push(e)}this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),$i.safari&&t.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t){let e=this.customHandlers=t.pluginField(gn);for(let i of e)for(let e in i.handlers)this.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(this.registeredEvents.push(e),t.contentDOM.addEventListener(e,(i=>{os(t,i)&&this.runCustomHandlers(e,t,i)&&i.preventDefault()})))}runCustomHandlers(t,e,i){for(let n of this.customHandlers){let s=n.handlers[t],r=!1;if(s){try{r=s.call(n.plugin,i,e)}catch(t){cn(e.state,t)}if(r||i.defaultPrevented)return $i.android&&"keydown"==t&&13==i.keyCode&&e.observer.flushSoon(),!0}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,e,t)}catch(e){cn(t.state,e)}}}keydown(t,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),this.screenKeyEvent(t,e))return!0;let i;return!(!$i.ios||!(i=ns.find((t=>t.keyCode==e.keyCode)))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=i,setTimeout((()=>this.flushIOSKey(t)),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,ai(t.contentDOM,e.key,e.keyCode))}setPendingAndroidKey(t,e){this.pendingAndroidKey=e,requestAnimationFrame((()=>{let e=this.pendingAndroidKey;if(!e)return;this.pendingAndroidKey=void 0,t.observer.processRecords();let i=t.state;ai(t.contentDOM,e.key,e.keyCode),t.state==i&&t.docView.reset(!0)}))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!($i.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}screenKeyEvent(t,e){let i=9==e.keyCode&&Date.now()=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(e,i)||1!=ws(i))&&null,!1===this.dragging&&(i.preventDefault(),this.select(i))}move(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.inputState.mouseSelection=null}select(t){let e=this.style.get(t,this.extend,this.multiple);e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0})}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function os(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=ci.get(n))&&i.ignoreEvent(e))return!1;return!0}const as=Object.create(null),ls=$i.ie&&$i.ie_version<15||$i.ios&&$i.webkit_version<604;function hs(t,e){let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=vs&&n.selection.ranges.every((t=>t.empty))&&vs==r.toString()){let t=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:a.from,insert:l},range:kt.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:kt.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}as.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select")};let cs=0;function us(t,e,i,n){if(1==n)return kt.cursor(e,i);if(2==n)return function(t,e,i=1){let n=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(0==s.length)return kt.cursor(e);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=H(s.text,r,!1):a=H(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let t=H(s.text,o,!1);if(n(s.text.slice(t,o))!=l)break;o=t}for(;a{cs=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},as.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},as.mousedown=(t,e)=>{if(t.observer.flush(),cs>Date.now()-2e3)return;let i=null;for(let n of t.state.facet(sn))if(i=n(t,e),i)break;i||0!=e.button||(i=function(t,e){let i=ps(t,e),n=ws(e),s=t.state.selection,r=i,o=e;return{update(t){t.docChanged&&(i&&(i.pos=t.changes.mapPos(i.pos)),s=s.map(t.changes),o=null)},get(e,a,l){let h;if(o&&e.clientX==o.clientX&&e.clientY==o.clientY?h=r:(h=r=ps(t,e),o=e),!h||!i)return s;let c=us(t,h.pos,h.bias,n);if(i.pos!=h.pos&&!a){let e=us(t,i.pos,i.bias,n),s=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=sri(t.contentDOM))),t.inputState.startMouseSelection(t,e,i))};let Os=(t,e)=>t>=e.top&&t<=e.bottom,fs=(t,e,i)=>Os(e,i)&&t>=i.left&&t<=i.right;function ds(t,e,i,n){let s=Ii.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&fs(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&fs(i,n,a)?1:o&&Os(n,o)?-1:1}function ps(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:ds(t,i,e.clientX,e.clientY)}}const ms=$i.ie&&$i.ie_version<=11;let gs=null,Qs=0,bs=0;function ws(t){if(!ms)return t.detail;let e=gs,i=bs;return gs=t,bs=Date.now(),Qs=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Qs+1)%3:1}function ys(t,e,i,n){let s=t.posAtCoords({x:e.clientX,y:e.clientY});if(null==s||!i)return;e.preventDefault();let{mouseSelection:r}=t.inputState,o=n&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,a={from:s,insert:i},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}as.dragstart=(t,e)=>{let{selection:{main:i}}=t.state,{mouseSelection:n}=t.inputState;n&&(n.dragging=i),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove")},as.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let n=Array(i.length),s=0,r=()=>{++s==i.length&&ys(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}}else ys(t,e,e.dataTransfer.getData("Text"),!0)},as.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=ls?null:e.clipboardData;i?(hs(t,i.getData("text/plain")),e.preventDefault()):function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),hs(t,i.value)}),50)}(t)};let vs=null;function xs(t,e){if(t.docView.compositionDeco.size){t.inputState.rapidCompositionStart=e;try{t.update([])}finally{t.inputState.rapidCompositionStart=!1}}}as.copy=as.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:n}}(t.state);if(!i&&!s)return;vs=s?i:null;let r=ls?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",i)):function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})},as.focus=as.blur=t=>{setTimeout((()=>{t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},as.beforeprint=t=>{t.viewState.printing=!0,t.requestMeasure(),setTimeout((()=>{t.viewState.printing=!1,t.requestMeasure()}),2e3)},as.compositionstart=as.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.docView.compositionDeco.size&&(t.observer.flush(),xs(t,!0)),t.inputState.composing=0)},as.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((()=>{t.inputState.composing<0&&xs(t,!1)}),50)},as.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},as.beforeinput=(t,e)=>{var i;let n;if($i.chrome&&$i.android&&(n=ns.find((t=>t.inputType==e.inputType)))&&(t.inputState.setPendingAndroidKey(t,n),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};const $s=["pre-wrap","normal","pre-line","break-spaces"];class ks{constructor(){this.doc=rt.empty,this.lineWrapping=!1,this.direction=Xn.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForStyle(t,e){return $s.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,a=Math.round(i)!=Math.round(this.lineHeight)||this.lineWrapping!=o||this.direction!=e;if(this.lineWrapping=o,this.direction=e,this.lineHeight=i,this.charWidth=n,this.lineLength=s,a){this.heightSamples={};for(let t=0;te.moveY(t))):this.type):this}}var Ts=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Ts||(Ts={}));class Ws{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return Ws.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this;for(let r=n.length-1;r>=0;r--){let{fromA:o,toA:a,fromB:l,toB:h}=n[r],c=s.lineAt(o,Ts.ByPosNoHeight,e,0,0),u=c.to>=a?c:s.lineAt(a,Ts.ByPosNoHeight,e,0,0);for(h+=u.to-a,a=u.to;r>0&&c.from<=n[r-1].toA;)o=n[r-1].fromA,l=n[r-1].fromB,r--,o2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n0){let t=i[i.length-1];t instanceof As?i[i.length-1]=new As(t.length+n):i.push(null,new As(n-1))}if(t>0){let e=i[0];e instanceof As?i[0]=new As(t+e.length):i.unshift(new As(t-1),null)}return Ws.of(i)}decomposeLeft(t,e){e.push(new As(t-1),null)}decomposeRight(t,e){e.push(null,new As(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1,a=t.heightChanged;for(n.from>e&&i.push(new As(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=.001&&(o=-2);let a=new Xs(e,s);a.outdated=!1,i.push(a),r+=e+1}r<=s&&i.push(null,new As(s-r).updateHeight(t,r));let l=Ws.of(i);return t.heightChanged=a||o<0||Math.abs(l.height-this.height)>=.001||Math.abs(o-this.lines(t.doc,e).lineHeight)>=.001,l}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Cs extends Ws{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return l;let h=e==Ts.ByPosNoHeight?Ts.ByPosNoHeight:Ts.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)t=a&&this.right.forEachLine(t,e,i,o,a,r);else{let l=this.lineAt(a,Ts.ByPos,i,n,s);t=t&&l.from<=e&&r(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,o,a,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let t of i)s.push(t);if(t>0&&Zs(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Ws.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,a=null;return n&&n.from<=e+s.length&&n.more?a=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Zs(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof As&&(n=t[e+1])instanceof As&&t.splice(e-1,3,new As(i.length+1+n.length))}class _s{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Xs?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Xs(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Xs(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new As(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Xs)return t;let e=new Xs(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine(),t.type!=Vi.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=Vi.WidgetBefore&&(this.covering=t)}addLineDeco(t,e){let i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Xs||this.isCovered?(this.writtenTot.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new Vs(e,i))}}this.viewports=t.sort(((t,e)=>t.from-e.from)),this.scaler=this.heightMap.height<=7e6?Ns:new Is(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(t=>{this.viewportLines.push(1==this.scaler.scale?t:Bs(t,this.scaler))}))}update(t,e=null){let i=this.state;this.state=t.state;let n=this.state.facet(vn),s=t.changedRanges,r=$n.extendWithRanges(s,function(t,e,i){let n=new Us;return xe.compare(t,e,i,n,0),n.changes}(t.startState.facet(vn),n,t?t.changes:gt.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(n,i.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(t.flags|=2);let a=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=!t.changes.empty||2&t.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,l&&this.updateViewportLines(),this.updateForViewport(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace,r="rtl"==i.direction?Xn.RTL:Xn.LTR,o=this.heightOracle.mustRefreshForStyle(s,r),a=o||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,l=0,h=0;if(a){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;let t=parseInt(i.paddingTop)||0,n=parseInt(i.paddingBottom)||0;this.paddingTop==t&&this.paddingBottom==n||(l|=8,this.paddingTop=t,this.paddingBottom=n)}let c=this.printing?{top:-1e8,bottom:1e8,left:-1e8,right:1e8}:function(t,e){let i=t.getBoundingClientRect(),n=Math.max(0,i.left),s=Math.min(innerWidth,i.right),r=Math.max(0,i.top),o=Math.min(innerHeight,i.bottom),a=t.ownerDocument.body;for(let e=t.parentNode;e&&e!=a;)if(1==e.nodeType){let t=e,i=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=i.overflow){let e=t.getBoundingClientRect();n=Math.max(n,e.left),s=Math.min(s,e.right),r=Math.max(r,e.top),o=Math.min(o,e.bottom)}e="absolute"==i.position||"fixed"==i.position?t.offsetParent:t.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-i.left,right:s-i.left,top:r-(i.top+e),bottom:o-(i.top+e)}}(e,this.paddingTop),u=c.top-this.pixelViewport.top,O=c.bottom-this.pixelViewport.bottom;if(this.pixelViewport=c,this.inView=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left,!this.inView)return 0;if(a){let i=t.docView.measureVisibleLineHeights();n.mustRefreshForHeights(i)&&(o=!0);let a=e.clientWidth;if(o||n.lineWrapping&&Math.abs(a-this.contentDOMWidth)>n.charWidth){let{lineHeight:e,charWidth:h}=t.docView.measureTextSize();o=n.refresh(s,r,e,h,a/h,i),o&&(t.docView.minWidth=0,l|=8)}this.contentDOMWidth!=a&&(this.contentDOMWidth=a,l|=8),this.editorHeight!=t.scrollDOM.clientHeight&&(this.editorHeight=t.scrollDOM.clientHeight,l|=8),u>0&&O>0?h=Math.max(u,O):u<0&&O<0&&(h=Math.min(u,O)),n.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(n,0,o,new Ps(this.viewport.from,i)),n.heightChanged&&(l|=2)}let f=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return f&&(this.viewport=this.getViewport(h,this.scrollTarget)),(2&l||f)&&this.updateViewportLines(),this.updateForViewport(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.state.doc,{visibleTop:r,visibleBottom:o}=this,a=new Vs(n.lineAt(r-1e3*i,Ts.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Ts.ByHeight,s,0,0).to);if(e){let{head:t}=e.range,i=o-r;if(ta.to){let r,o=n.lineAt(t,Ts.ByPos,s,0,0);r=e.center?(o.top+o.bottom)/2-i/2:t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&si.from&&o.push({from:i.from,to:n}),s=i.from&&a.from<=i.to&&Gs(o,a.from-10,a.from+10),!a.empty&&a.to>=i.from&&a.to<=i.to&&Gs(o,a.to-10,a.to+10);for(let{from:n,to:s}of o)s-n>1e3&&e.push(js(t,(t=>t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-n)<1e3&&Math.abs(t.to-s)<1e3))||new Ys(n,s,this.gapSize(i,n,s,r)))}return e}gapSize(t,e,i,n){let s=Ms(n,i)-Ms(n,e);return this.heightOracle.lineWrapping?t.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(t){Ys.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=qi.set(t.map((t=>t.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.state.facet(vn);this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];xe.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to<=t))||Bs(this.heightMap.lineAt(t,Ts.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return Bs(this.heightMap.lineAt(this.scaler.fromDOM(t),Ts.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return Bs(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get contentHeight(){return this.scaler.toDOM(this.heightMap.height)+this.paddingTop+this.paddingBottom}}class Vs{constructor(t,e){this.from=t,this.to=e}}function qs(t,e,i){let n=[],s=t,r=0;return xe.spans(i.facet(vn),t,e,{span(){},point(t,e){t>s&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],r=s-i;if(n<=r)return i+n;n-=r}}function Ms(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}function Gs(t,e,i){for(let n=0;ne){let r=[];s.fromi&&r.push({from:i,to:s.to}),t.splice(n,1,...r),n+=r.length-1}}}function js(t,e){for(let i of t)if(e(i))return i}const Ns={toDOM:t=>t,fromDOM:t=>t,scale:1};class Is{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,Ts.ByPos,t,0,0).top,o=e.lineAt(s,Ts.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=r+(t.top-s)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=eBs(t,e))):t.type)}const Hs=Wt.define({combine:t=>t.join(" ")}),Fs=Wt.define({combine:t=>t.indexOf(!0)>-1}),Ks=M.newName(),Js=M.newName(),tr=M.newName(),er={"&light":"."+Js,"&dark":"."+tr};function ir(t,e,i){return new M(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const nr=ir("."+Ks,{"&.cm-editor":{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},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none",display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-placeholder":{color:"#888",display:"inline-block"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"3px"},"&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"}},er),sr={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},rr=$i.ie&&$i.ie_version<=11;class or{constructor(t,e,i){this.view=t,this.onChange=e,this.onScrollChanged=i,this.active=!1,this.selectionRange=new ii,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);($i.ie&&$i.ie_version<=11||$i.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),rr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((()=>{this.view.docView.lastUpdate{this.resizeTimeout=-1,this.view.requestMeasure()}),50))})),this.resize.observe(t.scrollDOM)),this.start(),this.onScroll=this.onScroll.bind(this),window.addEventListener("scroll",this.onScroll),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){if(!this.readSelectionRange())return;let{view:e}=this,i=this.selectionRange;if(e.state.facet(un)?e.root.activeElement!=this.dom:!Ne(e.dom,i))return;let n=i.anchorNode&&e.docView.nearest(i.anchorNode);n&&n.ignoreEvent(t)||($i.ie&&$i.ie_version<=11&&!e.state.selection.main.empty&&i.focusNode&&Be(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{root:t}=this.view,e=Ge(t),i=$i.safari&&11==t.nodeType&&function(){let t=document.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){let e=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),!e)return null;let n=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);Be(a.node,a.offset,r,o)&&([n,s,r,o]=[r,o,n,s]);return{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||e;return!this.selectionRange.eq(i)&&(this.selectionRange.setRange(i),this.selectionChanged=!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t{this.delayedFlush=-1,this.flush()}),20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}processRecords(){let t=this.queue;for(let e of this.observer.takeRecords())t.push(e);t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}flush(t=!0){if(t&&this.readSelectionRange(),this.delayedFlush>=0||this.view.inputState.pendingAndroidKey)return;let{from:e,to:i,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Ne(this.dom,this.selectionRange);if(e<0&&!s)return;this.selectionChanged=!1;let r=this.view.state;this.onChange(e,i,n),this.view.state==r&&this.view.docView.reset(s)}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){let i=ar(e,t.previousSibling||t.target.previousSibling,-1),n=ar(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resize)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);window.removeEventListener("scroll",this.onScroll),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function ar(t,e,i){for(;e;){let n=ci.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function lr(t,e,i,n){let s,r,o=t.state.selection.main;if(e>-1){let n=t.docView.domBoundsAround(e,i,0);if(!n||t.state.readOnly)return;let{from:a,to:l}=n,h=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new ur(i,n)),s==i&&r==n||e.push(new ur(s,r)));return e}(t),c=new hr(h,t);c.readRange(n.startDOM,n.endDOM),r=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?kt.single(i+e,n+e):null}(h,a);let u=o.from,O=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||$i.android&&c.text.length0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,a))-r}if(o=o?r-i:0,a=r+(a-o),o=r}else if(a=a?r-i:0,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}(t.state.sliceDoc(a,l),c.text,u-a,O);f&&(s={from:a+f.from,to:a+f.toA,insert:t.state.toText(c.text.slice(f.from,f.toB))})}else if(t.hasFocus||!t.state.facet(un)){let e=t.observer.selectionRange,{impreciseHead:i,impreciseAnchor:n}=t.docView,s=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!je(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),a=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!je(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);s==o.head&&a==o.anchor||(r=kt.single(a,s))}if(s||r)if(!s&&n&&!o.empty&&r&&r.main.empty?s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:s&&s.from>=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4&&(s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,s.from).append(s.insert).append(t.state.doc.slice(s.to,o.to))}),s){let e=t.state;if($i.ios&&t.inputState.flushIOSKey(t))return;let i,n=s.insert.toString();if(t.state.facet(an).some((e=>e(t,s.from,s.to,n))))return;if(t.inputState.composing>=0&&t.inputState.composing++,s.from>=o.from&&s.to<=o.to&&s.to-s.from>=(o.to-o.from)/3&&(!r||r.main.empty&&r.main.from==s.from+s.insert.length)){let n=o.froms.to?e.sliceDoc(s.to,o.to):"";i=e.replaceSelection(t.state.toText(n+s.insert.sliceString(0,void 0,t.state.lineBreak)+r))}else{let t=e.changes(s);i={changes:t,selection:r&&!e.selection.main.eq(r.main)&&r.main.to<=t.newLength?e.selection.replaceRange(r.main):void 0}}let a="input.type";t.composing&&(a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(i,{scrollIntoView:!0,userEvent:a})}else if(r&&!r.main.eq(o)){let e=!1,i="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i})}}class hr{constructor(t,e){this.points=t,this.view=e,this.text="",this.lineBreak=e.state.lineBreak}readRange(t,e){if(!t)return;let i=t.parentNode;for(let n=t;;){this.findPointBefore(i,n),this.readNode(n);let t=n.nextSibling;if(t==e)break;let s=ci.get(n),r=ci.get(t);(s&&r?s.breakAfter:(s?s.breakAfter:cr(n))||cr(t)&&("BR"!=n.nodeName||n.cmIgnore))&&(this.text+=this.lineBreak),n=t}this.findPointBefore(i,e)}readNode(t){if(t.cmIgnore)return;let e,i=ci.get(t),n=i&&i.overrideDOMText;null!=n?e=n.sliceString(0,void 0,this.lineBreak):3==t.nodeType?e=t.nodeValue:"BR"==t.nodeName?e=t.nextSibling?this.lineBreak:"":1==t.nodeType&&this.readRange(t.firstChild,null),null!=e&&(this.findPointIn(t,e.length),this.text+=e,$i.chrome&&13==this.view.inputState.lastKeyCode&&!t.nextSibling&&/\n\n$/.test(this.text)&&(this.text=this.text.slice(0,-1)))}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointIn(t,e){for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e))}}function cr(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class ur{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Or{constructor(t={}){this.plugins=[],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.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this.root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Ds(t.state||ge.create()),this.plugins=this.state.facet(pn).map((t=>new Qn(t).update(this))),this.observer=new or(this,((t,e,i)=>{lr(this,t,e,i)}),(t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()})),this.inputState=new is(this),this.docView=new Pn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,window.addEventListener("resize",(()=>{-1==pr&&(pr=setTimeout(mr,50))})),this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}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.composing>0}dispatch(...t){this._dispatch(1==t.length&&t[0]instanceof oe?t[0]:this.state.update(...t))}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);if(n.facet(ge.phrases)!=this.state.facet(ge.phrases))return this.setState(n);e=new kn(this,n,t);let s=null;try{this.updateState=2;for(let e of t){if(s&&(s=s.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;s=new Ls(t.empty?t:kt.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(ln)?s=new Ls(t.value):t.is(hn)&&(s=new Ls(t.value,!0))}this.viewState.update(e,s),this.bidiCache=Qr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(xn)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if((i||s||this.viewState.mustEnforceCursorAssoc)&&this.requestMeasure(),!e.empty)for(let t of this.state.facet(on))t(e)}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=t;else{this.updateState=2;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Ds(t),this.plugins=t.facet(pn).map((t=>new Qn(t).update(this))),this.docView=new Pn(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}this.requestMeasure()}}updatePlugins(t){let e=t.startState.facet(pn),i=t.state.facet(pn);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new Qn(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.inputState.ensureHandlers(this)}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();let e=null;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport,n=this.viewState.measure(this);if(!n&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&n||([this.measureRequests,s]=[s,this.measureRequests]);let r=s.map((t=>{try{return t.read(this)}catch(t){return cn(this.state,t),gr}})),o=new kn(this,this.state),a=!1;o.flags|=n,e?e.flags|=n:e=o,this.updateState=2,o.empty||(this.updatePlugins(o),this.inputState.update(o),this.updateAttrs(),a=this.docView.update(o));for(let t=0;t{Li(this.contentDOM,this.contentAttrs,e),Li(this.dom,this.editorAttrs,t)})),this.editorAttrs=t,this.contentAttrs=e}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(Or.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(xn),M.mount(this.root,this.styleModules.concat(nr).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((()=>this.measure()))),t){if(null!=t.key)for(let e=0;efunction(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==fe.Space&&(s=e),s==e}}(this,t.head,e))))}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=n&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.posAtCoords({x:i==(t.textDirection==Xn.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=n)return kt.cursor(n,i?-1:1)}let o=Ii.find(t.docView,e.head),a=o?i?o.posAtEnd:o.posAtStart:i?s.to:s.from;return kt.cursor(a,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return es(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return kt.cursor(s);let o,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(s),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(s-c);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=l.left+a,O=null!=n?n:t.defaultLineHeight>>1;for(let e=0;;e+=10){let i=o+(O+e)*r,n=Kn(t,{x:u,y:i},!1,r);if(il.bottom||(r<0?ns))return kt.cursor(n,void 0,void 0,a)}}(this,t,e,i))}scrollPosIntoView(t){this.dispatch({effects:ln.of(kt.cursor(t))})}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Kn(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(t),s=this.bidiSpans(n);return ti(i,s[Dn.find(s,t-n.from,-1,e)].dir==Xn.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.heightOracle.direction}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>fr)return qn(t.length);let e=this.textDirection;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e)return i.order;let i=function(t,e){let i=t.length,n=e==An?1:2,s=e==An?2:1;if(!t||1==n&&!Ln.test(t))return qn(i);for(let e=0,s=n,o=n;e=0;t-=3)if(zn[t+1]==-r){let e=zn[t+2],i=2&e?n:4&e?1&e?s:n:0;i&&(Vn[a]=Vn[zn[t]]=i),l=t;break}}else{if(189==zn.length)break;zn[l++]=a,zn[l++]=e,zn[l++]=h}else if(2==(o=Vn[a])||1==o){let t=o==n;h=t?0:1;for(let e=l-3;e>=0;e-=3){let i=zn[e+2];if(2&i)break;if(t)zn[e+2]|=2;else{if(4&i)break;zn[e+2]|=4}}}for(let t=0;te;){let t=i,n=2!=Vn[--i];for(;i>e&&n==(2!=Vn[i-1]);)i--;o.push(new Dn(i,t,n?2:1))}else o.push(new Dn(e,t,0))}else for(let t=0;tDate.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{ri(this.contentDOM),this.docView.updateSelection()}))}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static domEventHandlers(t){return mn.define((()=>({})),{eventHandlers:t})}static theme(t,e){let i=M.newName(),n=[Hs.of(i),xn.of(ir(`.${i}`,t))];return e&&e.dark&&n.push(Fs.of(!0)),n}static baseTheme(t){return Vt.lowest(xn.of(ir("."+Ks,t,er)))}}Or.scrollTo=ln,Or.centerOn=hn,Or.styleModule=xn,Or.inputHandler=an,Or.exceptionSink=rn,Or.updateListener=on,Or.editable=un,Or.mouseSelectionStyle=sn,Or.dragMovesSelection=nn,Or.clickAddsSelectionRange=en,Or.decorations=vn,Or.contentAttributes=yn,Or.editorAttributes=wn,Or.lineWrapping=Or.contentAttributes.of({class:"cm-lineWrapping"}),Or.announce=re.define();const fr=4096;function dr(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}let pr=-1;function mr(){pr=-1;let t=document.querySelectorAll(".cm-content");for(let e=0;efunction(t,e,i,n){let s=function(t){var e=!(qe&&(t.ctrlKey||t.altKey||t.metaKey)||(ze||Ve)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?Ue:_e)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=1==s.length&&" "!=s,o="",a=!1;$r&&$r.view==i&&$r.scope==n&&(o=$r.prefix+" ",(a=ss.indexOf(e.keyCode)<0)&&($r=null));let l,h=t=>{if(t){for(let e of t.commands)if(e(i))return!0;t.preventDefault&&(a=!0)}return!1},c=t[n];if(c){if(h(c[o+wr(s,e,!r)]))return!0;if(r&&(e.shiftKey||e.altKey||e.metaKey)&&(l=_e[e.keyCode])&&l!=s){if(h(c[o+wr(l,e,!0)]))return!0}else if(r&&e.shiftKey&&h(c[o+wr(s,e,!0)]))return!0}return a}(function(t){let e=t.facet(vr),i=xr.get(e);i||xr.set(e,i=function(t,e=br){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o)=>{let a=i[t]||(i[t]=Object.create(null)),l=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let t=0;t{let n=$r={view:e,prefix:i,scope:t};return setTimeout((()=>{$r==n&&($r=null)}),4e3),!0}]})}let h=l.join(" ");s(h,!1);let c=a[h]||(a[h]={preventDefault:!1,commands:[]});c.commands.push(r),o&&(c.preventDefault=!0)};for(let i of t){let t=i[e]||i.key;if(t)for(let e of i.scope?i.scope.split(" "):["editor"])r(e,t,i.run,i.preventDefault),i.shift&&r(e,"Shift-"+t,i.shift,i.preventDefault)}return i}(e.reduce(((t,e)=>t.concat(e)),[])));return i}(e.state),t,e,"editor")}),vr=Wt.define({enables:yr}),xr=new WeakMap;let $r=null;const kr=!$i.ios,Pr=Wt.define({combine:t=>Qe(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Sr(t={}){return[Pr.of(t),Wr,Xr]}class Tr{constructor(t,e,i,n,s){this.left=t,this.top=e,this.width=i,this.height=n,this.className=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}const Wr=mn.fromClass(class{constructor(t){this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(Pr).cursorBlinkRate+"ms"}update(t){let e=t.startState.facet(Pr)!=t.state.facet(Pr);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((t=>t.scrollIntoView))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:t}=this.view,e=t.facet(Pr),i=t.selection.ranges.map((t=>t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let i=Math.max(e.from,t.viewport.from),n=Math.min(e.to,t.viewport.to),s=t.textDirection==Xn.LTR,r=t.contentDOM,o=r.getBoundingClientRect(),a=Ar(t),l=window.getComputedStyle(r.firstChild),h=o.left+parseInt(l.paddingLeft),c=o.right-parseInt(l.paddingRight),u=Zr(t,i),O=Zr(t,n),f=u.type==Vi.Text?u:null,d=O.type==Vi.Text?O:null;t.lineWrapping&&(f&&(f=Cr(t,i,f)),d&&(d=Cr(t,n,d)));if(f&&d&&f.from==d.from)return m(g(e.from,e.to,f));{let i=f?g(e.from,null,f):Q(u,!1),n=d?g(null,e.to,d):Q(O,!0),s=[];return(f||u).to<(d||O).from-1?s.push(p(h,i.bottom,c,n.top)):i.bottomu&&n.from=r)break;a>s&&l(Math.max(t,s),null==e&&t<=u,Math.min(a,r),null==i&&a>=O,o.dir)}if(s=n.to+1,s>=r)break}return 0==a.length&&l(u,null==e,O,null==i,t.textDirection),{top:r,bottom:o,horizontal:a}}function Q(t,e){let i=o.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(this.view,t))).reduce(((t,e)=>t.concat(e))),n=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||kr:e.drawRangeCursor){let t=_r(this.view,i,s);t&&n.push(t)}}return{rangePieces:i,cursors:n}}drawSel({rangePieces:t,cursors:e}){if(t.length!=this.rangePieces.length||t.some(((t,e)=>!t.eq(this.rangePieces[e])))){this.selectionLayer.textContent="";for(let e of t)this.selectionLayer.appendChild(e.draw());this.rangePieces=t}if(e.length!=this.cursors.length||e.some(((t,e)=>!t.eq(this.cursors[e])))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach(((e,i)=>e.adjust(t[i])));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),Rr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kr&&(Rr[".cm-line"].caretColor="transparent !important");const Xr=Vt.highest(Or.theme(Rr));function Ar(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Xn.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Cr(t,e,i){let n=kt.cursor(e);return{from:Math.max(i.from,t.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,t.moveToLineBoundary(n,!0,!0).from),type:Vi.Text}}function Zr(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==Vi.Text))return t;return i}function _r(t,e,i){let n=t.coordsAtPos(e.head,e.assoc||1);if(!n)return null;let s=Ar(t);return new Tr(n.left-s.left,n.top-s.top,-1,n.bottom-n.top,i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function Ur(t,e,i,n,s){e.lastIndex=0;for(let r,o=t.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=e.exec(o.value);)s(a+r.index,a+r.index+r[0].length,r)}class Yr{constructor(t){let{regexp:e,decoration:i,boundary:n}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=e,this.getDeco="function"==typeof i?i:()=>i,this.boundary=n}createDeco(t){let e=new $e;for(let{from:i,to:n}of t.visibleRanges)Ur(t.state.doc,this.regexp,i,n,((i,n,s)=>e.add(i,n,this.getDeco(s,t,i))));return e.finish()}updateDeco(t,e){let i=1e9,n=-1;return t.docChanged&&t.changes.iterChanges(((e,s,r,o)=>{o>t.view.viewport.from&&r1e3?this.createDeco(t.view):n>-1?this.updateRange(t.view,e.map(t.changes),i,n):e}updateRange(t,e,i,n){for(let s of t.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=t.state.doc.lineAt(r),n=i.toi.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;oc.push(this.getDeco(n,t,e).range(e,i))));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>tl,add:c})}}return e}}const zr=null!=/x/.unicode?"gu":"g",Lr=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮\ufeff-]",zr),Dr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Vr=null;const qr=Wt.define({combine(t){let e=Qe(t,{render:null,specialChars:Lr,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Vr&&"undefined"!=typeof document&&document.body){let e=document.body.style;Vr=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Vr||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,zr)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,zr)),e}});function Er(t={}){return[qr.of(t),Mr||(Mr=mn.fromClass(class{constructor(t){this.view=t,this.decorations=qi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(qr)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Yr({regexp:t.specialChars,decoration:(e,i,n)=>{let{doc:s}=i.state,r=et(e[0],0);if(9==r){let t=s.lineAt(n),e=i.state.tabSize,r=st(t.text,e,n-t.from);return qi.replace({widget:new jr((e-r%e)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=qi.replace({widget:new Gr(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(qr);t.startState.facet(qr)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Mr=null;class Gr extends Di{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"␤":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(Dr[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,e);if(n)return n;let s=document.createElement("span");return s.textContent=e,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class jr extends Di{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Nr=mn.fromClass(class{constructor(t){this.height=-1,this.measure={read:t=>Math.max(0,t.scrollDOM.clientHeight-t.defaultLineHeight),write:(t,e)=>{Math.abs(t-this.height)>1&&(this.height=t,e.contentDOM.style.paddingBottom=t+"px")}},t.requestMeasure(this.measure)}update(t){t.geometryChanged&&t.view.requestMeasure(this.measure)}});function Ir(){return Nr}class Br extends Di{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}ignoreEvent(){return!1}}function Hr(t){return mn.fromClass(class{constructor(e){this.view=e,this.placeholder=qi.set([qi.widget({widget:new Br(t),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?qi.none:this.placeholder}},{decorations:t=>t.decorations})}const Fr=new n;function Kr(t){return Wt.define({combine:t?e=>e.concat(t):void 0})}class Jr{constructor(t,e,i,n=[]){this.data=t,this.topNode=i,ge.prototype.hasOwnProperty("tree")||Object.defineProperty(ge.prototype,"tree",{get(){return io(this)}}),this.parser=e,this.extension=[uo.of(this),ge.languageData.of(((t,e,i)=>t.facet(to(t,e,i))))].concat(n)}isActiveAt(t,e,i=-1){return to(t,e,i)==this.data}findRegions(t){let e=t.facet(uo);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],s=(t,e)=>{if(t.prop(Fr)==this.data)return void i.push({from:e,to:e+t.length});let r=t.prop(n.mounted);if(r){if(r.tree.prop(Fr)==this.data){if(r.overlay)for(let t of r.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(r.overlay){let t=i.length;if(s(r.tree,r.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}))}configure(t){return new eo(this.data,this.parser.configure(t))}get allowsNesting(){return this.parser.wrappers.length>0}}function io(t){let e=t.field(Jr.state,!1);return e?e.tree:c.empty}function no(t,e,i=50){var n;let s=null===(n=t.field(Jr.state,!1))||void 0===n?void 0:n.context;return s&&(s.treeLen>=e||s.work(i,e))?s.tree:null}class so{constructor(t,e=t.length){this.doc=t,this.length=e,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let ro=null;class oo{constructor(t,e,i=[],n,s,r,o,a){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}startParse(){return this.parser.startParse(new so(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=c.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;let n=Date.now()+t;for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&en)return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(k.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=ro;ro=this;try{return t()}finally{ro=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=ao(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=k.applyChanges(i,e),n=c.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=ao(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends P{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=ro;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new c(o.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return ro}}function ao(t,e,i){return k.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class lo{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new lo(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=new oo(t.facet(uo).parser,t,[],c.empty,0,{from:0,to:e},[],null);return i.work(20,e)||i.takeTree(),new lo(i)}}Jr.state=Zt.define({create:lo.init,update(t,e){for(let t of e.effects)if(t.is(Jr.setState))return t.value;return e.startState.facet(uo)!=e.state.facet(uo)?lo.init(e.state):t.apply(e)}});let ho=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(ho=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const co=mn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Jr.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Jr.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=ho(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd=n+1e5)return;let r=Math.min(this.chunkBudget,100,t?Math.max(25,t.timeRemaining()-5):1e9),o=s.context.treeLenn+1e3,a=s.context.work(r,n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Jr.setState.of(new lo(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>cn(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return this.working||this.workScheduled>0}},{eventHandlers:{focus(){this.scheduleWork()}}}),uo=Wt.define({combine:t=>t.length?t[0]:null,enables:[Jr.state,co]});class Oo{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class fo{constructor(t,e,i,n,s,r){this.name=t,this.alias=e,this.extensions=i,this.filename=n,this.loadFunc=s,this.support=r,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:i}=t;if(!e){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(i)}return new fo(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,i)}static matchFilename(t,e){for(let i of t)if(i.filename&&i.filename.test(e))return i;let i=/\.([^.]+)$/.exec(e);if(i)for(let e of t)if(e.extensions.indexOf(i[1])>-1)return e;return null}static matchLanguageName(t,e,i=!0){e=e.toLowerCase();for(let i of t)if(i.alias.some((t=>t==e)))return i;if(i)for(let i of t)for(let t of i.alias){let n=e.indexOf(t);if(n>-1&&(t.length>2||!/\w/.test(e[n-1])&&!/\w/.test(e[n+t.length])))return i}return null}}const po=Wt.define(),mo=Wt.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function go(t){let e=t.facet(mo);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Qo(t,e){let i="",n=t.tabSize;if(9==t.facet(mo).charCodeAt(0))for(;e>=n;)i+="\t",e-=n;for(let t=0;t=i.from&&n<=i.to?(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return st(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const yo=new n;function vo(t){let e=t.type.prop(yo);if(e)return e;let i,s=t.firstChild;if(s&&(i=s.type.prop(n.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>To(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?$o:null}function xo(t,e,i){for(;t;t=t.parent){let n=vo(t);if(n)return n(new ko(i,e,t))}return null}function $o(){return 0}class ko extends wo{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.node=i}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let e=this.node.resolve(t.from);for(;e.parent&&e.parent.from==e.from;)e=e.parent;if(Po(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?xo(t,this.pos,this.base):0}}function Po(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function So({closing:t,align:e=!0,units:i=1}){return n=>To(n,e,i,t)}function To(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==t.pos+o,l=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped)return s.fromt.baseIndent;function Ro({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}function Xo(){return ge.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return t;let r=i.sliceString(s.from,n);if(!e.some((t=>t.test(r))))return t;let{state:o}=t,a=-1,l=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==a)continue;a=e.from;let i=bo(o,e.from);if(null==i)continue;let n=/^\s*/.exec(e.text)[0],s=Qo(o,i);n!=s&&l.push({from:e.from,to:e.from+n.length,insert:s})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const Ao=Wt.define(),Co=new n;function Zo(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&r.from=e&&o.to>i&&(s=o)}}return s}(t,e,i)}let Uo=0;class Yo{constructor(t,e,i){this.set=t,this.base=e,this.modified=i,this.id=Uo++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new Yo([],null,[]);if(e.set.push(e),t)for(let i of t.set)e.set.push(i);return e}static defineModifier(){let t=new Lo;return e=>e.modified.indexOf(t)>-1?e:Lo.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let zo=0;class Lo{constructor(){this.instances=[],this.id=zo++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new Yo(n,t,e);for(let t of e)t.instances.push(s);let r=Do(e);for(let e of t.set)for(let t of r)n.push(Lo.get(e,t));return s}}function Do(t){let e=[t];for(let i=0;i0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?null:'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+t);let l=new jo(n,s,o>0?i.slice(0,o):null);e[a]=l.sort(e[a])}}return qo.add(e)}const qo=new n,Eo=Wt.define({combine:t=>t.length?No.combinedMatch(t):null}),Mo=Wt.define({combine:t=>t.length?t[0].match:null});function Go(t){return t.facet(Eo)||t.facet(Mo)}class jo{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}sort(t){return!t||t.deptht.scope))?void 0:Object.create(null);return(i,n)=>{let s=e&&e[i.id];if(void 0!==s)return s;let r=null;for(let e of t){let t=e.match(i,n);t&&(r=r?r+" "+t:t)}return e&&(e[i.id]=r),r}}static define(t,e){return new No(t,e||{})}static get(t,e,i){let n=Go(t);return n&&n(e,i||o.none)}}function Io(t,e,i,n=0,s=t.length){Jo(t,n,s,e,i)}class Bo{constructor(t){this.markCache=Object.create(null),this.tree=io(t.state),this.decorations=this.buildDeco(t,Go(t.state))}update(t){let e=io(t.state),i=Go(t.state),n=i!=t.startState.facet(Eo);e.length{i.add(t,e,this.markCache[n]||(this.markCache[n]=qi.mark({class:n})))}));return i.finish()}}const Ho=Vt.extend(mn.fromClass(Bo,{decorations:t=>t.decorations})),Fo=[""];class Ko{constructor(t,e,i){this.at=t,this.style=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,s,r,o){let{type:a,from:l,to:h}=t;if(l>=i||h<=e)return;Fo[r]=a.name,a.isTop&&(o=a);let c=s,u=a.prop(qo),O=!1;for(;u;){if(!u.context||ta(u.context,Fo,r)){for(let t of u.tags){let e=this.style(t,o);e&&(c&&(c+=" "),c+=e,1==u.mode?s+=(s?" ":"")+e:0==u.mode&&(O=!0))}break}u=u.next}if(this.startSpan(t.from,c),O)return;let f=t.tree&&t.tree.prop(n.mounted);if(f&&f.overlay){let n=t.node.enter(f.overlay[0].from+l,1),a=t.firstChild();for(let u=0,O=l;;u++){let d=u=p)&&t.nextSibling()););if(!d||p>i)break;O=d.to+l,O>e&&(this.highlightRange(n.cursor,Math.max(e,d.from+l),Math.min(i,O),s,r,f.tree.type),this.startSpan(O,c))}a&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,s,r+1,o),this.startSpan(Math.min(i,t.to),c)}}while(t.nextSibling());t.parent()}}}function Jo(t,e,i,n,s){let r=new Ko(e,n,s);r.highlightRange(t.cursor(),e,i,"",0,t.type),r.flush(i)}function ta(t,e,i){if(t.length>i-1)return!1;for(let n=i-1,s=t.length-1;s>=0;s--,n--){let i=t[s];if(i&&i!=e[n])return!1}return!0}const ea=Yo.define,ia=ea(),na=ea(),sa=ea(na),ra=ea(na),oa=ea(),aa=ea(oa),la=ea(oa),ha=ea(),ca=ea(ha),ua=ea(),Oa=ea(),fa=ea(),da=ea(fa),pa=ea(),ma={comment:ia,lineComment:ea(ia),blockComment:ea(ia),docComment:ea(ia),name:na,variableName:ea(na),typeName:sa,tagName:ea(sa),propertyName:ra,attributeName:ea(ra),className:ea(na),labelName:ea(na),namespace:ea(na),macroName:ea(na),literal:oa,string:aa,docString:ea(aa),character:ea(aa),attributeValue:ea(aa),number:la,integer:ea(la),float:ea(la),bool:ea(oa),regexp:ea(oa),escape:ea(oa),color:ea(oa),url:ea(oa),keyword:ua,self:ea(ua),null:ea(ua),atom:ea(ua),unit:ea(ua),modifier:ea(ua),operatorKeyword:ea(ua),controlKeyword:ea(ua),definitionKeyword:ea(ua),operator:Oa,derefOperator:ea(Oa),arithmeticOperator:ea(Oa),logicOperator:ea(Oa),bitwiseOperator:ea(Oa),compareOperator:ea(Oa),updateOperator:ea(Oa),definitionOperator:ea(Oa),typeOperator:ea(Oa),controlOperator:ea(Oa),punctuation:fa,separator:ea(fa),bracket:da,angleBracket:ea(da),squareBracket:ea(da),paren:ea(da),brace:ea(da),content:ha,heading:ca,heading1:ea(ca),heading2:ea(ca),heading3:ea(ca),heading4:ea(ca),heading5:ea(ca),heading6:ea(ca),contentSeparator:ea(ha),list:ea(ha),quote:ea(ha),emphasis:ea(ha),strong:ea(ha),link:ea(ha),monospace:ea(ha),strikethrough:ea(ha),inserted:ea(),deleted:ea(),changed:ea(),invalid:ea(),meta:pa,documentMeta:ea(pa),annotation:ea(pa),processingInstruction:ea(pa),definition:Yo.defineModifier(),constant:Yo.defineModifier(),function:Yo.defineModifier(),standard:Yo.defineModifier(),local:Yo.defineModifier(),special:Yo.defineModifier()};function ga(t,e,i,n=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let r=s;for(let s=n;s=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function ba(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}class wa extends Jr{constructor(t){let e,i=Kr(t.languageData),s={token:(r=t).token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||ba,indent:r.indent||(()=>null),languageData:r.languageData||{}};var r;super(i,new class extends P{createParse(t,i,n){return new xa(e,t,i,n)}},function(t){let e=o.define({id:Pa.length,name:"Document",props:[Fr.add((()=>t))]});return Pa.push(e),e}(i),[po.of(((t,e)=>this.getIndent(t,e)))]),e=this,this.streamParser=s,this.stateAfter=new n({perNode:!0})}static define(t){return new wa(t)}getIndent(t,e){let i=io(t.state),n=i.resolve(e);for(;n&&n.type!=this.topNode;)n=n.parent;if(!n)return null;let s,r,o=ya(this,i,0,n.from,e);if(o?(r=o.state,s=o.pos+1):(r=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let r=e.children.length-1;r>=0;r--){let o=e.children[r],a=i+e.positions[r],l=o instanceof c&&a=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,a=e.positions[r]+i,l=e.children[r];if(ai&&ya(t,n.tree,0-n.offset,i,r);if(o&&(e=va(t,n.tree,i+n.offset,o.pos+n.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?go(n):4),tree:c.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+a.length,a.length&&(this.chunks.push(a),this.chunkPos.push(0)),s&&this.parsedPos=e?this.finish():t&&this.parsedPos>t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let t=this.rangeIndex;;){let n=this.ranges[t].to;if(n>=i)break;if(e=e.slice(0,n-(i-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}emitToken(t,e,i,n,s){if(this.ranges.length>1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new Qa(e,t?t.state.tabSize:4,t?go(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=$a(s.token,r,this.state);t&&(n=this.emitToken(Wa(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n))}this.parsedPos=i,this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const ka=Object.create(null),Pa=[o.none],Sa=new a(Pa),Ta=[];function Wa(t){return t?ka[t]||(ka[t]=function(t){let e=null;for(let i of t.split(".")){let t=ma[i];t?"function"==typeof t?e?e=t(e):Ra(i,`Modifier ${i} used at start of tag`):e?Ra(i,`Tag ${i} used as modifier`):e=t:Ra(i,`Unknown highlighting tag ${i}`)}if(!e)return 0;let i=t.replace(/ /g,"_"),n=o.define({id:Pa.length,name:i,props:[Vo({[i]:e})]});return Pa.push(n),n.id}(t)):0}for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ka[t]=Wa(e);function Ra(t,e){Ta.indexOf(t)>-1||(Ta.push(t),console.warn(e))}const Xa="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2);class Aa{constructor(t,e,i){this.facet=e,this.createTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t)),this.tooltipViews=this.tooltips.map(i)}update(t){let e=t.state.facet(this.facet),i=e.filter((t=>t));if(e===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[];for(let e=0;e{var e,i,n;return{position:Xa?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||Za}}}),Ua=mn.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.intersectionTimeout=-1;let e=t.state.facet(_a);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Aa(t,La,(t=>this.createTooltip(t))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{this.intersectionTimeout<0&&Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&(this.intersectionTimeout=setTimeout((()=>{this.intersectionTimeout=-1,this.maybeMeasure()}),50))}),{threshold:[1]}):null,this.observeIntersection(),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){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(_a);if(n.position!=this.position){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector("cm-tooltip > cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t;for(let{dom:t}of this.manager.tooltipViews)t.remove();null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.intersectionTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((t=>this.view.coordsAtPos(t.pos))),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(_a).tooltipSpace(this.view)}}writeMeasure(t){let{editor:e,space:i}=t,n=[];for(let s=0;s=Math.min(e.bottom,i.bottom)||l.right<=Math.max(e.left,i.left)||l.left>=Math.min(e.right,i.right)){a.style.top="-10000px";continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=c?7:0,O=h.right-h.left,f=h.bottom-h.top,d=o.offset||za,p=this.view.textDirection==Xn.LTR,m=h.width>i.right-i.left?p?i.left:i.right-h.width:p?Math.min(l.left-(c?14:0)+d.x,i.right-O):Math.max(i.left,l.left-O+(c?14:0)-d.x),g=!!r.above;!r.strictSide&&(g?l.top-(h.bottom-h.top)-d.yi.bottom)&&g==i.bottom-l.bottom>l.top-i.top&&(g=!g);let Q=g?l.top-f-u-d.y:l.bottom+u+d.y,b=m+O;for(let t of n)t.leftm&&t.topQ&&(Q=g?t.top-f-2-u:t.bottom+u+2);"absolute"==this.position?(a.style.top=Q-t.parent.top+"px",a.style.left=m-t.parent.left+"px"):(a.style.top=Q+"px",a.style.left=m+"px"),c&&(c.style.left=l.left+(p?d.x:-d.x)-(m+14-7)+"px"),n.push({left:m,top:Q,right:b,bottom:Q+f}),a.classList.toggle("cm-tooltip-above",g),a.classList.toggle("cm-tooltip-below",!g),o.positioned&&o.positioned()}}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 t of this.manager.tooltipViews)t.dom.style.top="-10000px"}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Ya=Or.baseTheme({".cm-tooltip":{zIndex:100},"&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"}}}),za={x:0,y:0},La=Wt.define({enables:[Ua,Ya]});function Da(t){var e;null===(e=t.plugin(Ua))||void 0===e||e.maybeMeasure()}class Va{constructor(t,e,i){this.state=t,this.pos=e,this.explicit=i,this.abortListeners=[]}tokenBefore(t){let e=io(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(Na(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function qa(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ea(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,span:i}:null}}function Ma(t,e){return i=>{for(let e=io(i.state).resolveInner(i.pos,-1);e;e=e.parent)if(t.indexOf(e.name)>-1)return null;return e(i)}}class Ga{constructor(t,e,i){this.completion=t,this.source=e,this.match=i}}function ja(t){return t.selection.main.head}function Na(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const Ia=ie.define();function Ba(t,e){let i=e.completion.apply||e.completion.label,n=e.source;"string"==typeof i?t.dispatch({changes:{from:n.from,to:n.to,insert:i},selection:{anchor:n.from+i.length},userEvent:"input.complete",annotations:Ia.of(e.completion)}):i(t,e.completion,n.from,n.to)}const Ha=new WeakMap;function Fa(t){if(!Array.isArray(t))return t;let e=Ha.get(t);return e||Ha.set(t,e=Ea(t)),e}class Ka{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(g=it(l))!=g.toLowerCase()?1:g!=g.toUpperCase()?2:0;(1==Q&&p||0==m&&0!=Q)&&(e[c]==l||i[c]==l&&(u=!0))&&(r[c++]=n),m=Q,n+=nt(l)}return c==a&&0==r[0]?this.result((u?-200:0)-100,r,t):O==a&&0==f?[-200,0,d]:o>-1?[-700,o,o+this.pattern.length]:O==a?[-900,f,d]:c==a?this.result((u?-200:0)-100-700,r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[t],s=1;for(let t of e){let e=t+(this.astral?nt(et(i,t)):1);s>1&&n[s-1]==t?n[s-1]=e:(n[s++]=t,n[s++]=e)}return n}}const Ja=Wt.define({combine:t=>Qe(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:(t,e)=>t&&e,icons:(t,e)=>t&&e,optionClass:(t,e)=>i=>function(t,e){return t?e?t+" "+e:t:e}(t(i),e(i)),addToOptions:(t,e)=>t.concat(e)})});function tl(t,e,i){if(t<=i)return{from:0,to:t};if(e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class el{constructor(t,e){this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this};let i=t.state.field(e),{options:n,selected:s}=i.open,r=t.state.facet(Ja);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:s}=t,r=0;for(let t=1;tr&&n.appendChild(document.createTextNode(s.slice(r,e)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(e,o))),a.className="cm-completionMatchedText",r=o}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.range=tl(n.length,s,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",(e=>{for(let i,s=e.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(i=/-(\d+)$/.exec(s.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected=this.range.to)&&(this.range=tl(e.options.length,e.selected,this.view.state.facet(Ja).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let t=e.options[e.selected];t.completion.info&&(this.info=this.dom.appendChild(function(t,e){let i=document.createElement("div");i.className="cm-tooltip cm-completionInfo";let{info:n}=t.completion;if("string"==typeof n)i.textContent=n;else{let s=n(t.completion);s.then?s.then((t=>i.appendChild(t)),(t=>cn(e.state,t,"completion info"))):i.appendChild(s)}return i}(t,this.view)),this.view.requestMeasure(this.placeInfo))}}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();n.topi.bottom&&(t.scrollTop+=n.bottom-i.bottom)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect();if(e.top>innerHeight-10||e.bottom<10)return null;let n=Math.max(0,Math.min(t.getBoundingClientRect().top,innerHeight-i.height))-e.top,s=this.view.textDirection==Xn.RTL,r=e.left,o=innerWidth-e.right;return s&&r=this.options.length?this:new nl(this.options,ol(e,t),this.tooltip,this.timestamp,t)}static build(t,e,i,n,s){let r=function(t,e){let i=[],n=0;for(let s of t)if(s.hasResult())if(!1===s.result.filter)for(let t of s.result.options)i.push(new Ga(t,s,[1e9-n++]));else{let t,n=new Ka(e.sliceDoc(s.from,s.to));for(let e of s.result.options)(t=n.match(e.label))&&(null!=e.boost&&(t[0]+=e.boost),i.push(new Ga(e,s,t)))}i.sort(ll);let s=[],r=null;for(let t of i.sort(ll)){if(300==s.length)break;r&&r.label==t.completion.label&&r.detail==t.completion.detail&&r.type==t.completion.type&&r.apply==t.completion.apply?il(t.completion)>il(r)&&(s[s.length-1]=t):s.push(t),r=t.completion}return s}(t,e);if(!r.length)return null;let o=0;if(n&&n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:(a=ml,t=>new el(t,a)),above:s.aboveCursor},n?n.timestamp:Date.now(),o);var a}map(t){return new nl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class sl{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new sl(al,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Ja),n=(i.override||e.languageDataAt("autocomplete",ja(e)).map(Fa)).map((e=>(this.active.find((t=>t.source==e))||new cl(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new cl(t.source,0):t)));for(let e of t.effects)e.is(pl)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new sl(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:rl}}const rl={"aria-autocomplete":"list","aria-expanded":"false"};function ol(t,e){return{"aria-autocomplete":"list","aria-expanded":"true","aria-activedescendant":t+"-"+e,"aria-controls":t}}const al=[];function ll(t,e){let i=e.match[0]-t.match[0];return i||t.completion.label.localeCompare(e.completion.label)}function hl(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class cl{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=hl(t),n=this;i?n=n.handleUserEvent(t,i,e):t.docChanged?n=n.handleChange(t):t.selection&&0!=n.state&&(n=new cl(n.source,0));for(let e of t.effects)if(e.is(Ol))n=new cl(n.source,1,e.value?ja(t.state):-1);else if(e.is(fl))n=new cl(n.source,0);else if(e.is(dl))for(let t of e.value)t.source==n.source&&(n=t);return n}handleUserEvent(t,e,i){return"delete"!=e&&i.activateOnTyping?new cl(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(ja(t.startState))?new cl(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new cl(this.source,this.state,t.mapPos(this.explicitPos))}}class ul extends cl{constructor(t,e,i,n,s,r){super(t,2,e),this.result=i,this.from=n,this.to=s,this.span=r}hasResult(){return!0}handleUserEvent(t,e,i){let n=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),r=ja(t.state);if((this.explicitPos>-1?rs)return new cl(this.source,"input"==e&&i.activateOnTyping?1:0);let o=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(n==s||this.span.test(t.state.sliceDoc(n,s)))?new ul(this.source,o,this.result,n,s,this.span):new cl(this.source,1,o)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new cl(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new ul(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}const Ol=re.define(),fl=re.define(),dl=re.define({map:(t,e)=>t.map((t=>t.map(e)))}),pl=re.define(),ml=Zt.define({create:()=>sl.start(),update:(t,e)=>t.update(e),provide:t=>[La.from(t,(t=>t.tooltip)),Or.contentAttributes.from(t,(t=>t.attrs))]});function gl(t,e="option"){return i=>{let n=i.state.field(ml,!1);if(!n||!n.open||Date.now()-n.open.timestamp<75)return!1;let s,r=1;"page"==e&&(s=i.dom.querySelector(".cm-tooltip-autocomplete"))&&(r=Math.max(2,Math.floor(s.offsetHeight/s.firstChild.offsetHeight)));let o=n.open.selected+r*(t?1:-1),{length:a}=n.open.options;return o<0?o="page"==e?0:a-1:o>=a&&(o="page"==e?a-1:0),i.dispatch({effects:pl.of(o)}),!0}}const Ql=t=>{let e=t.state.field(ml,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(Ba(t,e.open.options[e.open.selected]),!0)},bl=t=>!!t.state.field(ml,!1)&&(t.dispatch({effects:Ol.of(!0)}),!0),wl=t=>{let e=t.state.field(ml,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:fl.of(null)}),!0)};class yl{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const vl=mn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(ml).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(ml);if(!t.selectionSet&&!t.docChanged&&t.startState.field(ml)==e)return;let i=t.transactions.some((t=>(t.selection||t.docChanged)&&!hl(t)));for(let e=0;e50&&n.time-Date.now()>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){cn(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let e of t.transactions)"input"==hl(e)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(ml);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=ja(e),n=new Va(e,i,t.explicitPos==i),s=new yl(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:fl.of(null)}),cn(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Ja);for(let n=0;nt.source==s.active.source));if(r&&1==r.state)if(null==s.done){let t=new cl(s.active.source,0);for(let e of s.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:dl.of(e)})}},{eventHandlers:{compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Ol.of(!1)})),20),this.composing=0}}}),xl=Or.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",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#39e",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",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"},".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 $l{constructor(t,e,i,n){this.field=t,this.line=e,this.from=i,this.to=n}}class kl{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){return new kl(this.field,t.mapPos(this.from,-1),t.mapPos(this.to,1))}}class Pl{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],n=[e],s=t.doc.lineAt(e),r=/^\s*/.exec(s.text)[0];for(let s of this.lines){if(i.length){let i=r,o=/^\t*/.exec(s)[0].length;for(let e=0;enew kl(t.field,n[t.line]+t.from,n[t.line]+t.to)));return{text:i,ranges:o}}static parse(t){let e,i=[],n=[],s=[];for(let r of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(r);){let t=e[1]?+e[1]:null,o=e[2]||e[3]||"",a=-1;for(let e=0;e=a&&t.field++}s.push(new $l(a,n.length,e.index,e.index+o.length)),r=r.slice(0,e.index)+o+r.slice(e.index+e[0].length)}n.push(r)}return new Pl(n,s)}}let Sl=qi.widget({widget:new class extends Di{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Tl=qi.mark({class:"cm-snippetField"});class Wl{constructor(t,e){this.ranges=t,this.active=e,this.deco=qi.set(t.map((t=>(t.from==t.to?Sl:Tl).range(t.from,t.to))))}map(t){return new Wl(this.ranges.map((e=>e.map(t))),this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const Rl=re.define({map:(t,e)=>t&&t.map(e)}),Xl=re.define(),Al=Zt.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(Rl))return i.value;if(i.is(Xl)&&t)return new Wl(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Or.decorations.from(t,(t=>t?t.deco:qi.none))});function Cl(t,e){return kt.create(t.filter((t=>t.field==e)).map((t=>kt.range(t.from,t.to))))}function Zl(t){let e=Pl.parse(t);return(t,i,n,s)=>{let{text:r,ranges:o}=e.instantiate(t.state,n),a={changes:{from:n,to:s,insert:rt.of(r)}};if(o.length&&(a.selection=Cl(o,0)),o.length>1){let e=new Wl(o,0),i=a.effects=[Rl.of(e)];void 0===t.state.field(Al,!1)&&i.push(re.appendConfig.of([Al,zl,Dl,xl]))}t.dispatch(t.state.update(a))}}function _l(t){return({state:e,dispatch:i})=>{let n=e.field(Al,!1);if(!n||t<0&&0==n.active)return!1;let s=n.active+t,r=t>0&&!n.ranges.some((e=>e.field==s+t));return i(e.update({selection:Cl(n.ranges,s),effects:Rl.of(r?null:new Wl(n.ranges,s))})),!0}}const Ul=[{key:"Tab",run:_l(1),shift:_l(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(Al,!1)&&(e(t.update({effects:Rl.of(null)})),!0)}],Yl=Wt.define({combine:t=>t.length?t[0]:Ul}),zl=Vt.highest(vr.compute([Yl],(t=>t.facet(Yl))));function Ll(t,e){return Object.assign(Object.assign({},e),{apply:Zl(t)})}const Dl=Or.domEventHandlers({mousedown(t,e){let i,n=e.state.field(Al,!1);if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let s=n.ranges.find((t=>t.from<=i&&t.to>=i));return!(!s||s.field==n.active)&&(e.dispatch({selection:Cl(n.ranges,s.field),effects:Rl.of(n.ranges.some((t=>t.field>s.field))?new Wl(n.ranges,s.field):null)}),!0)}});function Vl(t,e){return new RegExp(e(t.source),t.unicode?"u":"")}const ql=Object.create(null);function El(t,e,i,n,s){for(let r=t.iterLines(),o=0;!r.next().done;){let t,{value:a}=r;for(e.lastIndex=0;t=e.exec(a);)if(!n[t[0]]&&o+t.index!=s&&(i.push({type:"text",label:t[0]}),n[t[0]]=!0,i.length>=2e3))return;o+=a.length+1}}function Ml(t,e,i,n,s){let r=t.length>=1e3,o=r&&e.get(t);if(o)return o;let a=[],l=Object.create(null);if(t.children){let r=0;for(let o of t.children){if(o.length>=1e3)for(let t of Ml(o,e,i,n-r,s-r))l[t.label]||(l[t.label]=!0,a.push(t));else El(o,i,a,l,s-r);r+=o.length+1}}else El(t,i,a,l,s);return r&&a.length<2e3&&e.set(t,a),a}const Gl=t=>{let e=t.state.languageDataAt("wordChars",t.pos).join(""),i=function(t){let e=t.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${e}]+`,"ug")}catch(t){return new RegExp(`[w${e}]`,"g")}}(e),n=t.matchBefore(Vl(i,(t=>t+"$")));if(!n&&!t.explicit)return null;let s=n?n.from:t.pos,r=Ml(t.state.doc,function(t){return ql[t]||(ql[t]=new WeakMap)}(e),i,5e4,s);return{from:s,options:r,span:Vl(i,(t=>"^"+t))}};function jl(t={}){return[ml,Ja.of(t),vl,Il,xl]}const Nl=[{key:"Ctrl-Space",run:bl},{key:"Escape",run:wl},{key:"ArrowDown",run:gl(!0)},{key:"ArrowUp",run:gl(!1)},{key:"PageDown",run:gl(!0,"page")},{key:"PageUp",run:gl(!1,"page")},{key:"Enter",run:Ql}],Il=Vt.highest(vr.computeN([Ja],(t=>t.facet(Ja).defaultKeymap?[Nl]:[])));function Bl(t){var e;let i=null===(e=t.field(ml,!1))||void 0===e?void 0:e.open;return i?i.options.map((t=>t.completion)):[]}function Hl(t){var e;let i=null===(e=t.field(ml,!1))||void 0===e?void 0:e.open;return i?i.options[i.selected].completion:null}const Fl={brackets:["(","[","{","'",'"'],before:")]}'\":;>"},Kl=re.define({map(t,e){let i=e.mapPos(t,-1,pt.TrackAfter);return null==i?void 0:i}}),Jl=re.define({map:(t,e)=>e.mapPos(t)}),th=new class extends be{};th.startSide=1,th.endSide=-1;const eh=Zt.define({create:()=>xe.empty,update(t,e){if(e.selection){let i=e.state.doc.lineAt(e.selection.main.head).from,n=e.startState.doc.lineAt(e.startState.selection.main.head).from;i!=e.changes.mapPos(n,-1)&&(t=xe.empty)}t=t.map(e.changes);for(let i of e.effects)i.is(Kl)?t=t.update({add:[th.range(i.value,i.value+1)]}):i.is(Jl)&&(t=t.update({filter:t=>t!=i.value}));return t}});function ih(){return[Or.inputHandler.of(rh),eh]}function nh(t){for(let e=0;e<"()[]{}<>".length;e+=2)if("()[]{}<>".charCodeAt(e)==t)return"()[]{}<>".charAt(e+1);return it(t<128?t:t+1)}function sh(t,e){return t.languageDataAt("closeBrackets",e)[0]||Fl}function rh(t,e,i,n){if(t.composing)return!1;let s=t.state.selection.main;if(n.length>2||2==n.length&&1==nt(et(n,0))||e!=s.from||i!=s.to)return!1;let r=function(t,e){let i=sh(t,t.selection.main.head),n=i.brackets||Fl.brackets;for(let s of n){let r=nh(et(s,0));if(e==s)return r==s?uh(t,s,n.indexOf(s+s+s)>-1):hh(t,s,r,i.before||Fl.before);if(e==r&&ah(t,t.selection.main.from))return ch(t,s,r)}return null}(t.state,n);return!!r&&(t.dispatch(r),!0)}const oh=[{key:"Backspace",run:({state:t,dispatch:e})=>{let i=sh(t,t.selection.main.head).brackets||Fl.brackets,n=null,s=t.changeByRange((e=>{if(e.empty){let n=function(t,e){let i=t.sliceString(e-2,e);return nt(et(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let s of i)if(s==n&&lh(t.doc,e.head)==nh(et(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:kt.cursor(e.head-s.length),userEvent:"delete.backward"}}return{range:n=e}}));return n||e(t.update(s,{scrollIntoView:!0})),!n}}];function ah(t,e){let i=!1;return t.field(eh).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function lh(t,e){let i=t.sliceString(e,e+2);return i.slice(0,nt(et(i,0)))}function hh(t,e,i,n){let s=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Kl.of(r.to+e.length),range:kt.range(r.anchor+e.length,r.head+e.length)};let o=lh(t.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+i,from:r.head},effects:Kl.of(r.head+e.length),range:kt.cursor(r.head+e.length)}:{range:s=r}}));return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ch(t,e,i){let n=null,s=t.selection.ranges.map((e=>e.empty&&lh(t.doc,e.head)==i?kt.cursor(e.head+i.length):n=e));return n?null:t.update({selection:kt.create(s,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map((({from:t})=>Jl.of(t)))})}function uh(t,e,i){let n=null,s=t.changeByRange((s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Kl.of(s.to+e.length),range:kt.range(s.anchor+e.length,s.head+e.length)};let r=s.head,o=lh(t.doc,r);if(o==e){if(Oh(t,r))return{changes:{insert:e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)};if(ah(t,r)){let n=i&&t.sliceDoc(r,r+3*e.length)==e+e+e;return{range:kt.cursor(r+e.length*(n?3:1)),effects:Jl.of(r)}}}else{if(i&&t.sliceDoc(r-2*e.length,r)==e+e&&Oh(t,r-2*e.length))return{changes:{insert:e+e+e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)};if(t.charCategorizer(r)(o)!=fe.Word){let i=t.sliceDoc(r-1,r);if(i!=e&&t.charCategorizer(r)(i)!=fe.Word)return{changes:{insert:e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)}}}return{range:n=s}}));return n?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Oh(t,e){let i=io(t).resolveInner(e+1);return i.parent&&i.from==e}const fh=Or.baseTheme({".cm-matchingBracket":{backgroundColor:"#328c8252"},".cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),dh=Wt.define({combine:t=>Qe(t,{afterCursor:!0,brackets:"()[]{}",maxScanDistance:1e4})}),ph=qi.mark({class:"cm-matchingBracket"}),mh=qi.mark({class:"cm-nonmatchingBracket"}),gh=Zt.define({create:()=>qi.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(dh);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=yh(e.state,t.head,-1,n)||t.head>0&&yh(e.state,t.head-1,1,n)||n.afterCursor&&(yh(e.state,t.head,1,n)||t.headOr.decorations.from(t)}),Qh=[gh,fh];function bh(t={}){return[dh.of(t),Qh]}function wh(t,e,i){let s=t.prop(e<0?n.openedBy:n.closedBy);if(s)return s;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function yh(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||"()[]{}",o=io(t),a=o.resolveInner(e,i);for(let n=a;n;n=n.parent){let s=wh(n.type,i,r);if(s&&n.from0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let t=0;!c.next().done&&t<=r;){let r=c.value;i<0&&(t+=r.length);let a=e+t*i;for(let t=i>0?0:r.length-1,e=i>0?r.length:-1;t!=e;t+=i){let e=o.indexOf(r[t]);if(!(e<0||n.resolve(a+t,1).type!=s))if(e%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};u--}}i>0&&(t+=r.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,o,a.type,s,r)}function vh(t,e,i,n,s,r){let o=n.parent,a={from:n.from,to:n.to},l=0,h=null==o?void 0:o.cursor;if(h&&(i<0?h.childBefore(n.from):h.childAfter(n.to)))do{if(i<0?h.to<=n.from:h.from>=n.to){if(0==l&&s.indexOf(h.type.name)>-1&&h.fromi.empty?t.moveByChar(i,e):Ph(i,e)))}const Th=t=>Sh(t,t.textDirection!=Xn.LTR),Wh=t=>Sh(t,t.textDirection==Xn.LTR);function Rh(t,e){return kh(t,(i=>i.empty?t.moveByGroup(i,e):Ph(i,e)))}function Xh(t,e,i){let n=t.state.charCategorizer(e.from);return t.moveByChar(e,i,(s=>{let r=fe.Space,o=e.from,a=!1,l=!1,h=!1,c=e=>{if(a)return!1;o+=i?e.length:-e.length;let s,c=n(e);if(r==fe.Space&&(r=c),r!=c)return!1;if(r==fe.Word)if(e.toLowerCase()==e){if(!i&&l)return!1;h=!0}else if(h){if(i)return!1;a=!0}else{if(l&&i&&n(s=t.state.sliceDoc(o,o+1))==fe.Word&&s.toLowerCase()==s)return!1;l=!0}return!0};return c(s),c}))}function Ah(t,e){return kh(t,(i=>i.empty?Xh(t,i,e):Ph(i,e)))}const Ch=t=>Ah(t,!0),Zh=t=>Ah(t,!1);function _h(t,e){return kh(t,(i=>{if(!i.empty)return Ph(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const Uh=t=>_h(t,!1),Yh=t=>_h(t,!0);function zh(t,e){return kh(t,(i=>i.empty?t.moveVertically(i,e,t.dom.clientHeight):Ph(i,e)))}const Lh=t=>zh(t,!1),Dh=t=>zh(t,!0);function Vh(t,e,i){let n=t.visualLineAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=kt.cursor(n.from+i))}return s}const qh=t=>kh(t,(e=>Vh(t,e,!0))),Eh=t=>kh(t,(e=>Vh(t,e,!1)));function Mh(t,e,i){let n=!1,s=xh(t.selection,(e=>{let s=yh(t,e.head,-1)||yh(t,e.head,1)||e.head>0&&yh(t,e.head-1,1)||e.headMh(t,e,!1),jh=({state:t,dispatch:e})=>Mh(t,e,!0);function Nh(t,e){let i=xh(t.state.selection,(t=>{let i=e(t);return kt.range(t.anchor,i.head,i.goalColumn)}));return!i.eq(t.state.selection)&&(t.dispatch($h(t.state,i)),!0)}function Ih(t,e){return Nh(t,(i=>t.moveByChar(i,e)))}const Bh=t=>Ih(t,t.textDirection!=Xn.LTR),Hh=t=>Ih(t,t.textDirection==Xn.LTR);function Fh(t,e){return Nh(t,(i=>t.moveByGroup(i,e)))}function Kh(t,e){return Nh(t,(i=>Xh(t,i,e)))}const Jh=t=>Kh(t,!0),tc=t=>Kh(t,!1);function ec(t,e){return Nh(t,(i=>t.moveVertically(i,e)))}const ic=t=>ec(t,!1),nc=t=>ec(t,!0);function sc(t,e){return Nh(t,(i=>t.moveVertically(i,e,t.dom.clientHeight)))}const rc=t=>sc(t,!1),oc=t=>sc(t,!0),ac=t=>Nh(t,(e=>Vh(t,e,!0))),lc=t=>Nh(t,(e=>Vh(t,e,!1))),hc=({state:t,dispatch:e})=>(e($h(t,{anchor:0})),!0),cc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.doc.length})),!0),uc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.selection.main.anchor,head:0})),!0),Oc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function fc({state:t,dispatch:e},i){if(t.readOnly)return!1;let n="delete.selection",s=t.changeByRange((t=>{let{from:e,to:s}=t;if(e==s){let t=i(e);te&&(n="delete.forward"),e=Math.min(e,t),s=Math.max(s,t)}return e==s?{range:t}:{changes:{from:e,to:s},range:kt.cursor(e)}}));return!s.changes.empty&&(e(t.update(s,{scrollIntoView:!0,userEvent:n})),!0)}function dc(t,e,i){if(t instanceof Or)for(let n of t.pluginField(fn.atomicRanges))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const pc=(t,e)=>fc(t,(i=>{let n,s,{state:r}=t,o=r.doc.lineAt(i);if(!e&&i>o.from&&ipc(t,!1),gc=t=>pc(t,!0),Qc=(t,e)=>fc(t,(i=>{let n=i,{state:s}=t,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let t=null;;){if(n==(e?r.to:r.from)){n==i&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let a=H(r.text,n-r.from,e)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=t&&h!=t)break;" "==l&&n==i||(t=h),n=a}return dc(t,n,e)})),bc=t=>Qc(t,!1),wc=t=>fc(t,(e=>{let i=t.visualLineAt(e).to;return dc(t,e{if(e.readOnly)return!1;let s=e.changeByRange((i=>{let{from:s,to:r}=i,o=e.doc.lineAt(s),a=!t&&s==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,s=io(t).resolveInner(e),r=s.childBefore(e),o=s.childAfter(e);return r&&o&&r.to<=e&&o.from>=e&&(i=r.type.prop(n.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from?{from:r.to,to:o.from}:null}(e,s);t&&(s=r=(r<=o.to?o:e.doc.lineAt(r)).to);let l=new wo(e,{simulateBreak:s,simulateDoubleBreak:!!a}),h=bo(l,s);for(null==h&&(h=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);ro.from&&s{let s=[];for(let r=n.from;r<=n.to;){let o=t.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(e(o,s,n),i=o.number),r=o.to+1}let r=t.changes(s);return{changes:s,range:kt.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const $c=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(xc(t,((e,i)=>{i.push({from:e.from,insert:t.facet(mo)})})),{userEvent:"input.indent"})),!0),kc=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(xc(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=st(n,t.tabSize),r=0,o=Qo(t,Math.max(0,s-go(t)));for(;rRh(t,t.textDirection!=Xn.LTR),shift:t=>Fh(t,t.textDirection!=Xn.LTR)},{mac:"Cmd-ArrowLeft",run:Eh,shift:lc},{key:"ArrowRight",run:Wh,shift:Hh,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>Rh(t,t.textDirection==Xn.LTR),shift:t=>Fh(t,t.textDirection==Xn.LTR)},{mac:"Cmd-ArrowRight",run:qh,shift:ac},{key:"ArrowUp",run:Uh,shift:ic,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hc,shift:uc},{mac:"Ctrl-ArrowUp",run:Lh,shift:rc},{key:"ArrowDown",run:Yh,shift:nc,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cc,shift:Oc},{mac:"Ctrl-ArrowDown",run:Dh,shift:oc},{key:"PageUp",run:Lh,shift:rc},{key:"PageDown",run:Dh,shift:oc},{key:"Home",run:Eh,shift:lc},{key:"Mod-Home",run:hc,shift:uc},{key:"End",run:qh,shift:ac},{key:"Mod-End",run:cc,shift:Oc},{key:"Enter",run:yc},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:mc,shift:mc},{key:"Delete",run:gc,shift:gc},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bc},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Qc(t,!0)},{mac:"Mod-Backspace",run:t=>fc(t,(e=>{let i=t.visualLineAt(e).from;return dc(t,e>i?i:Math.max(0,e-1),!1)}))},{mac:"Mod-Delete",run:wc}].concat([{key:"Ctrl-b",run:Th,shift:Bh,preventDefault:!0},{key:"Ctrl-f",run:Wh,shift:Hh},{key:"Ctrl-p",run:Uh,shift:ic},{key:"Ctrl-n",run:Yh,shift:nc},{key:"Ctrl-a",run:t=>kh(t,(e=>kt.cursor(t.visualLineAt(e.head).from,1))),shift:t=>Nh(t,(e=>kt.cursor(t.visualLineAt(e.head).from)))},{key:"Ctrl-e",run:t=>kh(t,(e=>kt.cursor(t.visualLineAt(e.head).to,-1))),shift:t=>Nh(t,(e=>kt.cursor(t.visualLineAt(e.head).to)))},{key:"Ctrl-d",run:gc},{key:"Ctrl-h",run:mc},{key:"Ctrl-k",run:wc},{key:"Ctrl-Alt-h",run:bc},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:rt.of(["",""])},range:kt.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,n=t.doc.lineAt(i),s=i==n.from?i-1:H(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:H(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(s,i))},range:kt.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Alt-<",run:hc},{key:"Alt->",run:cc},{key:"Ctrl-v",run:Dh},{key:"Alt-v",run:Lh}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),Sc=t=>{let e=Xc(t.state);return e.line?Wc(t):!!e.block&&Rc(t)};function Tc(t,e){return({state:i,dispatch:n})=>{let s=t(e,i.selection.ranges,i);return!!s&&(n(i.update(s)),!0)}}const Wc=Tc(Cc,0),Rc=Tc(Ac,0);function Xc(t,e=t.selection.main.head){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}function Ac(t,e,i){let n=e.map((t=>Xc(i,t.from).block));if(!n.every((t=>t)))return null;let s=e.map(((t,e)=>function(t,{open:e,close:i},n,s){let r,o,a=t.sliceDoc(n-50,n),l=t.sliceDoc(s,s+50),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-e.length,u)==e&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=100?r=o=t.sliceDoc(n,s):(r=t.sliceDoc(n,n+50),o=t.sliceDoc(s-50,s));let O=/^\s*/.exec(r)[0].length,f=/\s*$/.exec(o)[0].length,d=o.length-f-i.length;return r.slice(O,O+e.length)==e&&o.slice(d,d+i.length)==i?{open:{pos:n+O+e.length,margin:/\s/.test(r.charAt(O+e.length))?1:0},close:{pos:s-f-i.length,margin:/\s/.test(o.charAt(d-1))?1:0}}:null}(i,n[e],t.from,t.to)));if(2!=t&&!s.every((t=>t))){let t=0;return i.changeByRange((e=>{let{open:i,close:r}=n[t++];if(s[t])return{range:e};let o=i.length+1;return{changes:[{from:e.from,insert:i+" "},{from:e.to,insert:" "+r}],range:kt.range(e.anchor+o,e.head+o)}}))}if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(t==r||r>a.from)){s=a.from;let t=Xc(i,e).line;if(!t)continue;let r=/^\s*/.exec(a.text)[0].length,l=r==a.length,h=a.text.slice(r,r+t.length)==t?r:-1;rt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:s,empty:r,single:o}of n)!o&&r||t.push({from:e.from+s,insert:i+" "});let e=i.changes(t);return{changes:e,selection:i.selection.map(e,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,r=n+s.length;" "==e.text[r-e.from]&&r++,t.push({from:n,to:r})}return{changes:t}}return null}class Zc extends be{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}}Zc.prototype.elementClass="",Zc.prototype.toDOM=void 0,Zc.prototype.mapMode=pt.TrackBefore,Zc.prototype.startSide=Zc.prototype.endSide=-1,Zc.prototype.point=!0;const _c=Wt.define(),Uc={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>xe.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Yc=Wt.define();function zc(t){return[Vc(),Yc.of(Object.assign(Object.assign({},Uc),t))]}const Lc=Or.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",borderRight:"1px solid #ddd"},"&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"}}),Dc=Wt.define({combine:t=>t.some((t=>t))});function Vc(t){let e=[qc,Lc];return t&&!1===t.fixed&&e.push(Dc.of(!0)),e}const qc=mn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(Yc).map((e=>new jc(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(Dc),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Dc)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=xe.iter(this.view.state.facet(_c),this.view.viewport.from),n=[],s=this.gutters.map((t=>new Gc(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks){let e;if(Array.isArray(t.type)){for(let i of t.type)if(i.type==Vi.Text){e=i;break}}else e=t.type==Vi.Text?t:void 0;if(!e)return;n.length&&(n=[]),Mc(i,n,t.from);for(let t of s)t.line(this.view,e,n)}for(let t of s)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Yc),i=t.state.facet(Yc),n=t.docChanged||t.heightChanged||t.viewportChanged||!xe.eq(t.startState.facet(_c),t.state.facet(_c),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new jc(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){this.dom.remove()}},{provide:fn.scrollMargins.from((t=>0!=t.gutters.length&&t.fixed?t.view.textDirection==Xn.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}:null))});function Ec(t){return Array.isArray(t)?t:[t]}function Mc(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class Gc{constructor(t,e,i){this.gutter=t,this.height=i,this.localMarkers=[],this.i=0,this.cursor=xe.iter(t.markers,e.from)}line(t,e,i){this.localMarkers.length&&(this.localMarkers=[]),Mc(this.cursor,this.localMarkers,e.from);let n=i.length?this.localMarkers.concat(i):this.localMarkers,s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;if(0==n.length&&!r.config.renderEmptyElements)return;let o=e.top-this.height;if(this.i==r.elements.length){let i=new Nc(t,e.height,o,n);r.elements.push(i),r.dom.appendChild(i.dom)}else{let i=r.elements[this.i];(function(t,e){if(t.length!=e.length)return!1;for(let i=0;ithis.i;)t.dom.removeChild(t.elements.pop().dom)}}class jc{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s=t.lineBlockAtHeight(n.clientY-t.documentTop);e.domEventHandlers[i](t,s,n)&&n.preventDefault()}));this.markers=Ec(e.markers(t)),e.initialSpacer&&(this.spacer=new Nc(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Ec(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!xe.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}}class Nc{constructor(t,e,i,n){this.height=-1,this.above=0,this.dom=document.createElement("div"),this.update(t,e,i,n)}update(t,e,i,n){if(this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),this.markers!=n){this.markers=n;for(let t;t=this.dom.lastChild;)t.remove();let e="cm-gutterElement";for(let i of n){i.toDOM&&this.dom.appendChild(i.toDOM(t));let n=i.elementClass;n&&(e+=" "+n)}this.dom.className=e}}}const Ic=Wt.define(),Bc=Wt.define({combine:t=>Qe(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class Hc extends Zc{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Fc(t,e){return t.state.facet(Bc).formatNumber(e,t.state)}const Kc=Yc.compute([Bc],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Ic),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new Hc(Fc(t,t.state.doc.lineAt(e.from).number)),lineMarkerChange:t=>t.startState.facet(Bc)!=t.state.facet(Bc),initialSpacer:t=>new Hc(Fc(t,tu(t.state.doc.lines))),updateSpacer(t,e){let i=Fc(e.view,tu(e.view.state.doc.lines));return i==t.number?t:new Hc(i)},domEventHandlers:t.facet(Bc).domEventHandlers})));function Jc(t={}){return[Bc.of(t),Vc(),Kc]}function tu(t){let e=9;for(;e=n?void 0:{from:i,to:n}}const iu=re.define({map:eu}),nu=re.define({map:eu});function su(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const ru=Zt.define({create:()=>qi.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)i.is(iu)&&!au(t,i.value.from,i.value.to)?t=t.update({add:[du.range(i.value.from,i.value.to)]}):i.is(nu)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>Or.decorations.from(t)});function ou(t,e,i){var n;let s=null;return null===(n=t.field(ru,!1))||void 0===n||n.between(e,i,((t,e)=>{(!s||s.from>t)&&(s={from:t,to:e})})),s}function au(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}function lu(t,e){return t.field(ru,!1)?e:e.concat(re.appendConfig.of(fu()))}function hu(t,e,i=!0){let n=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return Or.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${t.state.phrase("to")} ${s}.`)}const cu=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of su(t)){let i=_o(t.state,e.from,e.to);if(i)return t.dispatch({effects:lu(t.state,[iu.of(i),hu(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(ru,!1))return!1;let e=[];for(let i of su(t)){let n=ou(t.state,i.from,i.to);n&&e.push(nu.of(n),hu(t,n,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let n=0;n{let e=t.state.field(ru,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(nu.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],uu={placeholderDOM:null,placeholderText:"…"},Ou=Wt.define({combine:t=>Qe(t,uu)});function fu(t){let e=[ru,Qu];return t&&e.push(Ou.of(t)),e}const du=qi.replace({widget:new class extends Di{ignoreEvents(){return!1}toDOM(t){let{state:e}=t,i=e.facet(Ou),n=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=ou(t.state,i.from,i.to);n&&t.dispatch({effects:nu.of(n)}),e.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,n);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",e.phrase("folded code")),s.title=e.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=n,s}}}),pu={openText:"⌄",closedText:"›",markerDOM:null};class mu extends Zc{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function gu(t={}){let e=Object.assign(Object.assign({},pu),t),i=new mu(e,!0),n=new mu(e,!1),s=mn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(uo)!=t.state.facet(uo)||t.startState.field(ru,!1)!=t.state.field(ru,!1))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new $e;for(let s of t.viewportLineBlocks){let r=ou(t.state,s.from,s.to)?n:_o(t.state,s.from,s.to)?i:null;r&&e.add(s.from,s.from,r)}return e.finish()}});return[s,zc({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||xe.empty},initialSpacer:()=>new mu(e,!1),domEventHandlers:{click:(t,e)=>{let i=ou(t.state,e.from,e.to);if(i)return t.dispatch({effects:nu.of(i)}),!0;let n=_o(t.state,e.from,e.to);return!!n&&(t.dispatch({effects:iu.of(n)}),!0)}}}),fu()]}const Qu=Or.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"}}),bu=ie.define(),wu=ie.define(),yu=Wt.define(),vu=Wt.define({combine:t=>Qe(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}),xu=Zt.define({create:()=>zu.empty,update(t,e){let i=e.state.facet(vu),n=e.annotation(bu);if(n){let s=Ru.fromTransaction(e),r=n.side,o=0==r?t.undone:t.done;return o=s?Xu(o,o.length,i.minDepth,s):Zu(o,e.startState.selection),new zu(0==r?n.rest:o,0==r?o:n.rest)}let s=e.annotation(wu);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(oe.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Ru.fromTransaction(e),o=e.annotation(oe.time),a=e.annotation(oe.userEvent);return r?t=t.addChanges(r,o,a,i.newGroupDelay,i.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new zu(t.done.map(Ru.fromJSON),t.undone.map(Ru.fromJSON))});function $u(t={}){return[xu,vu.of(t),Or.domEventHandlers({beforeinput:(t,e)=>"historyUndo"==t.inputType?Pu(e):"historyRedo"==t.inputType&&Su(e)})]}function ku(t,e){return function({state:i,dispatch:n}){let s=i.field(xu,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const Pu=ku(0,!1),Su=ku(1,!1),Tu=ku(0,!0),Wu=ku(1,!0);class Ru{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new Ru(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new Ru(t.changes&>.fromJSON(t.changes),[],t.mapped&&mt.fromJSON(t.mapped),t.startSelection&&kt.fromJSON(t.startSelection),t.selectionsAfter.map(kt.fromJSON))}static fromTransaction(t){let e=Cu;for(let i of t.startState.facet(yu)){let n=i(t);n.length&&(e=e.concat(n))}return!e.length&&t.changes.empty?null:new Ru(t.changes.invert(t.startState.doc),e,void 0,t.startState.selection,Cu)}static selection(t){return new Ru(void 0,Cu,void 0,void 0,t)}}function Xu(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function Au(t,e){return t.length?e.length?t.concat(e):t:e}const Cu=[];function Zu(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),Xu(t,t.length-1,1e9,i.setSelAfter(n)))}return[Ru.selection([e])]}function _u(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Uu(t,e){if(!t.length)return t;let i=t.length,n=Cu;for(;i;){let s=Yu(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[Ru.selection(n)]:Cu}function Yu(t,e,i){let n=Au(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Cu,i);if(!t.changes)return Ru.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new Ru(s,re.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}class zu{constructor(t,e,i=0,n){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new zu(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let t=0;t=e&&s<=o&&(n=!0)}})),n}(o.changes,t.changes)||"input.type.compose"==i)?Xu(r,r.length-1,s,new Ru(t.changes.compose(o.changes),Au(t.effects,o.effects),o.mapped,o.startSelection,Cu)):Xu(r,r.length,s,t),new zu(r,Cu,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Cu;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new zu(Zu(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new zu(Uu(this.done,t),Uu(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:bu.of({side:t,rest:_u(n)}),userEvent:0==t?"select.undo":"select.redo"});if(s.changes){let i=1==n.length?Cu:n.slice(0,n.length-1);return s.mapped&&(i=Uu(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:bu.of({side:t,rest:i}),filter:!1,userEvent:0==t?"undo":"redo"})}return null}}zu.empty=new zu(Cu,Cu);const Lu=[{key:"Mod-z",run:Pu,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Su,preventDefault:!0},{key:"Mod-u",run:Tu,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Wu,preventDefault:!0}];class Du{constructor(t,e,i,n,s,r,o,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let n=t.parser.context;return new Du(t,[],e,i,i,0,[],0,n?new Vu(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){let e=t>>19,i=65535&t,{parser:n}=this.p,s=n.dynamicPrecedence(i);if(s&&(this.score+=s),0==e)return ir;)this.stack.pop();this.reduceContext(i,o)}storeNode(t,e,i,n=4,s=!1){if(0==t){let t=this,n=this.buffer.length;if(0==n&&t.parent&&(n=t.bufferBase-t.parent.bufferBase,t=t.parent),n>0&&0==t.buffer[n-4]&&t.buffer[n-1]>-1){if(e==i)return;if(t.buffer[n-2]>=e)return void(t.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4);this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(t,e,i,n)}shift(t,e,i){let n=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if(0==(262144&t)){let s=t,{parser:r}=this.p;(i>this.pos||e<=r.maxNode)&&(this.pos=i,r.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(e,n),e<=r.maxNode&&this.buffer.push(e,n,i,4)}else this.pos=i,this.shiftContext(e,n),e<=this.p.parser.maxNode&&this.buffer.push(e,n,i,4)}apply(t,e,i){65536&t?this.reduce(t):this.shift(t,e,i)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let n=this.pos;this.reducePos=this.pos=n+t.length,this.pushState(e,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),n=t.bufferBase+e;for(;t&&n==t.bufferBase;)t=t.parent;return new Du(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new Eu(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s1&e&&t==n))||i.push(e[t],n)}e=i}let i=[];for(let t=0;t>19,n=65535&t,s=this.stack.length-3*i;if(s<0||e.getGoto(this.stack[s],n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reduce(t),!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:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Vu{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}var qu;!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(qu||(qu={}));class Eu{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=n}}class Mu{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new Mu(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 Mu(this.stack,this.pos,this.index)}}class Gu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const ju=new Gu;class Nu{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ju,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,n=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(n==this.ranges.length-1)return null;let t=this.ranges[++n];s+=t.from-i.to,i=t}return s}peek(t){let e,i,n=this.chunkOff+t;if(n>=0&&n=this.chunk2Pos&&en.to&&(this.chunk2=this.chunk2.slice(0,n.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=ju,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let n of this.ranges){if(n.from>=e)break;n.to>t&&(i+=this.input.read(Math.max(n.from,t),Math.min(n.to,e)))}return i}}class Iu{constructor(t,e){this.data=t,this.id=e}token(t,e){!function(t,e,i,n){let s=0,r=1<0){let i=t[n];if(a.allows(i)&&(-1==e.token.value||e.token.value==i||o.overrides(i,e.token.value))){e.acceptToken(i);break}}for(let n=e.next,r=0,o=t[s+2];r>1,l=i+a+(a<<1),h=t[l],c=t[l+1];if(n=c)){s=t[l+2],e.advance();continue t}r=a+1}}break}}(this.data,t,e,this.id)}}Iu.prototype.contextual=Iu.prototype.fallback=Iu.prototype.extend=!1;class Bu{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Hu(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let n=0,s=0;n=92&&e--,e>=34&&e--;let s=e-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new e(r)}return i}const Fu="undefined"!=typeof process&&/\bparse\b/.test(process.env.LOG);let Ku=null;var Ju,tO;function eO(t,e,i){let n=t.fullCursor();for(n.moveTo(e);;)if(!(i<0?n.childBefore(e):n.childAfter(e)))for(;;){if((i<0?n.toe)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Ju||(Ju={}));class iO{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?eO(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?eO(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=o,null;if(r instanceof c){if(o==t){if(o=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+r.length}}}class nO{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new Gu))}getActions(t){let e=0,i=null,{parser:n}=t.p,{tokenizers:s}=n,r=n.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,a=0;for(let n=0;nh.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!l.extend&&(i=h,e>n))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new Gu,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new Gu,{pos:i,p:n}=t;return e.start=i,e.end=Math.min(i+1,n.stream.end),e.value=i==n.stream.end?n.parser.eofTerm:0,e}updateCachedToken(t,e,i){if(e.token(this.stream.reset(i.pos,t),i),t.value>-1){let{parser:e}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(s>>1)){0==(1&s)?t.value=s>>1:t.extended=s>>1;break}}}else t.value=0,t.end=Math.min(i.p.stream.end,i.pos+1)}putAction(t,e,i,n){for(let e=0;e4*t.bufferLength?new iO(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,n=this.minStackPos,s=this.stacks=[];for(let r=0;rn)s.push(o);else{if(this.advanceStack(o,s,i))continue;{t||(t=[],e=[]),t.push(o);let i=this.tokens.getMainToken(o);e.push(i.value,i.end)}}break}}if(!s.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,s);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(s.length>t)for(s.sort(((t,e)=>e.score-t.score));s.length>t;)s.pop();s.some((t=>t.reducePos>n))&&this.recovering--}else if(s.length>1)t:for(let t=0;t200&&n.buffer.length>200){if(!((e.score-n.score||e.buffer.length-n.buffer.length)>0)){s.splice(t--,1);continue t}s.splice(i--,1)}}}this.minStackPos=s[0].pos;for(let t=1;t ":"";if(null!=this.stoppedAt&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(s);a;){let s=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(s>-1&&a.length&&(!e||(a.prop(n.contextHash)||0)==i))return t.useNode(a,s),Fu&&console.log(o+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof c)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof c&&0==a.positions[0]))break;a=l}}let a=r.stateSlot(t.state,4);if(a>0)return t.reduce(a),Fu&&console.log(o+this.stackID(t)+` (via always-reduce ${r.getName(65535&a)})`),!0;let l=this.tokens.getActions(t);for(let n=0;ns?e.push(O):i.push(O)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return rO(t,e),!0}}runRecovery(t,e,i){let n=null,s=!1;for(let r=0;r ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),Fu&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let t=0;c.forceReduce()&&t<10;t++){if(Fu&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,i))break;Fu&&(u=this.stackID(c)+" -> ")}for(let t of o.recoverByInsert(a))Fu&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),Fu&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),rO(o,i)):(!n||n.scoret;class lO{constructor(t){this.start=t.start,this.shift=t.shift||aO,this.reduce=t.reduce||aO,this.reuse=t.reuse||aO,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class hO extends P{constructor(e){if(super(),this.wrappers=[],13!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (13)`);let i=e.nodeNames.split(" ");this.minRepeatTerm=i.length;for(let t=0;te.topRules[t][1])),s=[];for(let t=0;t=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 a(i.map(((t,i)=>o.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:s[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1})))),this.strict=!1,this.bufferLength=t;let l=Hu(e.tokenData);if(this.context=e.context,this.specialized=new Uint16Array(e.specialized?e.specialized.length:0),this.specializers=[],e.specialized)for(let t=0;t"number"==typeof t?new Iu(l,t):t)),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(t,e,i){let n=new sO(this,t,e,i);for(let s of this.wrappers)n=s(n,t,e,i);return n}getGoto(t,e,i=!1){let n=this.goto;if(e>=n[0])return-1;for(let s=n[e+1];;){let e=n[s++],r=1&e,o=n[s++];if(r&&i)return o;for(let i=s+(e>>1);s0}validAction(t,e){if(e==this.stateSlot(t,4))return!0;for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])return!1;i=cO(this.data,i+2)}if(e==cO(this.data,i+1))return!0}}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=cO(this.data,i+2)}if(0==(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}overrides(t,e){let i=uO(this.data,this.tokenPrecTable,e);return i<0||uO(this.data,this.tokenPrecTable,t){let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let n of t.split(" ")){let t=e.indexOf(n);t>=0&&(i[t]=!0)}let n=null;for(let t=0;t=65&&t<=90||t>=97&&t<=122||t>=161}const dO=new Bu(((t,e)=>{for(let n=!1,s=0,r=0;;r++){let{next:o}=t;if(!(fO(o)||45==o||95==o||n&&(i=o,i>=48&&i<=57))){n&&t.acceptToken(40==o?94:2==s&&e.canShift(2)?2:95);break}!n&&(45!=o||r>0)&&(n=!0),s===r&&45==o&&s++,t.advance()}var i})),pO=new Bu((t=>{if(OO.includes(t.peek(-1))){let{next:e}=t;(fO(e)||95==e||35==e||46==e||91==e||58==e||45==e)&&t.acceptToken(93)}})),mO=new Bu((t=>{if(!OO.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),fO(e)){do{t.advance()}while(fO(t.next));t.acceptToken(1)}}})),gO={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,dir:32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},QO={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},bO={__proto__:null,not:128,only:128,from:158,to:160},wO=hO.deserialize({version:13,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'iQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QOOQP1G.l1G.lO+yQXO,5:qOOQO-E8T-E8TOOQS1G.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y%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[pO,mO,dO,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:t=>gO[t]||-1},{term:56,get:t=>QO[t]||-1},{term:95,get:t=>bO[t]||-1}],tokenPrec:1078});let yO=null;function vO(){if(!yO&&"object"==typeof document&&document.body){let t=[];for(let e in document.body.style)/[A-Z]|^-|^(item|length)$/.test(e)||t.push(e);yO=t.sort().map((t=>({type:"property",label:t})))}return yO||[]}const xO=["active","after","before","checked","default","disabled","empty","enabled","first-child","first-letter","first-line","first-of-type","focus","hover","in-range","indeterminate","invalid","lang","last-child","last-of-type","link","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-of-type","only-child","optional","out-of-range","placeholder","read-only","read-write","required","root","selection","target","valid","visited"].map((t=>({type:"class",label:t}))),$O=["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((t=>({type:"keyword",label:t}))).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((t=>({type:"constant",label:t})))),kO=["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((t=>({type:"type",label:t}))),PO=/^[\w-]*/,SO=t=>{let{state:e,pos:i}=t,n=io(e).resolveInner(i,-1);if("PropertyName"==n.name)return{from:n.from,options:vO(),span:PO};if("ValueName"==n.name)return{from:n.from,options:$O,span:PO};if("PseudoClassName"==n.name)return{from:n.from,options:xO,span:PO};if("TagName"==n.name){for(let{parent:t}=n;t;t=t.parent)if("Block"==t.name)return{from:n.from,options:vO(),span:PO};return{from:n.from,options:kO,span:PO}}if(!t.explicit)return null;let s=n.resolve(i),r=s.childBefore(i);return r&&":"==r.name&&"PseudoClassSelector"==s.name?{from:i,options:xO,span:PO}:r&&":"==r.name&&"Declaration"==s.name||"ArgList"==s.name?{from:i,options:$O,span:PO}:"Block"==s.name?{from:i,options:vO(),span:PO}:null},TO=eo.define({parser:wO.configure({props:[yo.add({Declaration:Ro()}),Co.add({Block:Zo}),Vo({"import charset namespace keyframes":ma.definitionKeyword,"media supports":ma.controlKeyword,"from to selector":ma.keyword,NamespaceName:ma.namespace,KeyframeName:ma.labelName,TagName:ma.tagName,ClassName:ma.className,PseudoClassName:ma.constant(ma.className),IdName:ma.labelName,"FeatureName PropertyName":ma.propertyName,AttributeName:ma.attributeName,NumberLiteral:ma.number,KeywordQuery:ma.keyword,UnaryQueryOp:ma.operatorKeyword,"CallTag ValueName":ma.atom,VariableName:ma.variableName,Callee:ma.operatorKeyword,Unit:ma.unit,"UniversalSelector NestingSelector":ma.definitionOperator,AtKeyword:ma.keyword,MatchOp:ma.compareOperator,"ChildOp SiblingOp, LogicOp":ma.logicOperator,BinOp:ma.arithmeticOperator,Important:ma.modifier,Comment:ma.blockComment,ParenthesizedContent:ma.special(ma.name),ColorLiteral:ma.color,StringLiteral:ma.string,":":ma.punctuation,"PseudoOp #":ma.derefOperator,"; ,":ma.separator,"( )":ma.paren,"[ ]":ma.squareBracket,"{ }":ma.brace})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),WO=TO.data.of({autocomplete:SO});function RO(){return new Oo(TO,WO)}var XO=Object.freeze({__proto__:null,css:RO,cssCompletion:WO,cssCompletionSource:SO,cssLanguage:TO});const AO={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},CO={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},ZO={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}};function _O(t){return 9==t||10==t||13==t||32==t}let UO=null,YO=null,zO=0;function LO(t,e){let i=t.pos+e;if(zO==i&&YO==t)return UO;let n=t.peek(e);for(;_O(n);)n=t.peek(++e);let s="";for(;45==(r=n)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)s+=String.fromCharCode(n),n=t.peek(++e);var r;return YO=t,zO=i,UO=s||(n==DO||n==VO?void 0:null)}const DO=63,VO=33;function qO(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let e=0;eEO.indexOf(e)>-1?new qO(LO(n,1)||"",t):t,reduce:(t,e)=>18==e&&t?t.parent:t,reuse(t,e,i,n){let s=e.type.id;return 4==s||35==s?new qO(LO(n,1)||"",t):t},hash:t=>t?t.hash:0,strict:!1}),GO=new Bu(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(56));t.advance();let i=47==t.next;i&&t.advance();let n=LO(t,0);if(void 0===n)return;if(!n)return t.acceptToken(i?11:4);let s=e.context?e.context.name:null;if(i){if(n==s)return t.acceptToken(8);if(s&&CO[s])return t.acceptToken(56,-2);if(e.dialectEnabled(0))return t.acceptToken(9);for(let t=e.context;t;t=t.parent)if(t.name==n)return;t.acceptToken(10)}else{if("script"==n)return t.acceptToken(5);if("style"==n)return t.acceptToken(6);if("textarea"==n)return t.acceptToken(7);s&&ZO[s]&&ZO[s][n]?t.acceptToken(56,-1):t.acceptToken(4)}}),{contextual:!0}),jO=new Bu(((t,e)=>{let i=1;if(47==t.next){if(62!=t.peek(1))return;i=2}else if(62!=t.next)return;e.context&&AO[e.context.name]&&t.acceptToken(12,i)})),NO=new Bu((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(57);break}if(t.next=="--\x3e".charCodeAt(e)){if(e++,3==e){i>3&&t.acceptToken(57,-2);break}}else e=0;t.advance()}}));function IO(t,e,i){let n=2+t.length;return new Bu((s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(e);break}if(0==r&&60==s.next||1==r&&47==s.next||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(i,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(e,1);break}r=o=0}else o++;s.advance()}}))}const BO=IO("script",53,1),HO=IO("style",54,2),FO=IO("textarea",55,3),KO=hO.deserialize({version:13,states:",fOVO!jOOO!TQ#tO'#CoO!YQ#tO'#CyO!_Q#tO'#C|O!dQ#tO'#DPO!iOXO'#CnO!tOYO'#CnO#PO[O'#CnO$YO!jO'#CnOOOW'#Cn'#CnO$aO$fO'#DSO$iQ#tO'#DUO$nQ#tO'#DVOOOW'#Dj'#DjOOOW'#DX'#DXQVO!jOOO$sQ&jO,59ZO${Q&jO,59eO%TQ&jO,59hO%]Q&zO,59kOOOX'#D]'#D]O%hOXO'#CwO%sOXO,59YOOOY'#D^'#D^O%{OYO'#CzO&WOYO,59YOOO['#D_'#D_O&`O[O'#C}O&kO[O,59YOOOW'#D`'#D`O&sO!jO,59YO&zQ#tO'#DQOOOW,59Y,59YOOOp'#Da'#DaO'PO$fO,59nOOOW,59n,59nO'XQ#tO,59pO'^Q#tO,59qOOOW-E7V-E7VO'cQ&zO'#CqOOQ`'#DY'#DYO'qQ&jO1G.uOOOX1G.u1G.uO'yQ&jO1G/POOOY1G/P1G/PO(RQ&jO1G/SOOO[1G/S1G/SO(ZQ&zO1G/VOOOW1G/V1G/VOOOW1G/X1G/XOOOX-E7Z-E7ZO(fQ#tO'#CxOOOW1G.t1G.tOOOY-E7[-E7[O(kQ#tO'#C{OOO[-E7]-E7]O(pQ#tO'#DOOOOW-E7^-E7^O(uQ#tO,59lOOOp-E7_-E7_OOOW1G/Y1G/YOOOW1G/[1G/[OOOW1G/]1G/]O(zQ,UO,59]OOQ`-E7W-E7WOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)VQ#tO,59dO)[Q#tO,59gO)aQ#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:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag SelfCloseEndTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:66,context:MO,nodeProps:[[n.closedBy,-9,1,2,3,5,6,7,8,9,10,"EndTag",4,"EndTag SelfCloseEndTag",-4,19,29,32,35,"CloseTag"],[n.group,-9,11,15,16,17,18,38,39,40,41,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],[n.openedBy,12,"StartTag",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag"]],skippedNodes:[0],repeatNodeCount:9,tokenData:"!#b!aR!WOX$kXY)sYZ)sZ]$k]^)s^p$kpq)sqr$krs*zsv$kvw+dwx2yx}$k}!O3f!O!P$k!P!Q7_!Q![$k![!]8u!]!^$k!^!_>b!_!`!!p!`!a8T!a!c$k!c!}8u!}#R$k#R#S8u#S#T$k#T#o8u#o$f$k$f$g&R$g%W$k%W%o8u%o%p$k%p&a8u&a&b$k&b1p8u1p4U$k4U4d8u4d4e$k4e$IS8u$IS$I`$k$I`$Ib8u$Ib$Kh$k$Kh%#t8u%#t&/x$k&/x&Et8u&Et&FV$k&FV;'S8u;'S;:jiW!``!bpOq(kqr?Rrs'gsv(kwx(]x!a(k!a!bKj!b~(k!R?YZ!``!bpOr(krs'gsv(kwx(]x}(k}!O?{!O!f(k!f!gAR!g#W(k#W#XGz#X~(k!R@SV!``!bpOr(krs'gsv(kwx(]x}(k}!O@i!O~(k!R@rT!``!bp!cPOr(krs'gsv(kwx(]x~(k!RAYV!``!bpOr(krs'gsv(kwx(]x!q(k!q!rAo!r~(k!RAvV!``!bpOr(krs'gsv(kwx(]x!e(k!e!fB]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~&R",tokenizers:[BO,HO,FO,GO,jO,NO,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0},tokenPrec:446});function JO(t,e){let i=Object.create(null);for(let n of t.firstChild.getChildren("Attribute")){let t=n.getChild("AttributeName"),s=n.getChild("AttributeValue")||n.getChild("UnquotedAttributeValue");t&&(i[e.read(t.from,t.to)]=s?"AttributeValue"==s.name?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return i}function tf(t,e,i){let n;for(let s of i)if(!s.attrs||s.attrs(n||(n=JO(t.node.parent,e))))return{parser:s.parser};return null}function ef(t){let e=[],i=[],n=[];for(let s of t){let t="script"==s.tag?e:"style"==s.tag?i:"textarea"==s.tag?n:null;if(!t)throw new RangeError("Only script, style, and textarea tags can host nested parsers");t.push(s)}return T(((t,s)=>{let r=t.type.id;return 27==r?tf(t,s,e):30==r?tf(t,s,i):33==r?tf(t,s,n):null}))}const nf=[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],sf=new lO({start:!1,shift:(t,e)=>4==e||5==e||280==e?t:281==e,strict:!1}),rf=new Bu(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&e.canShift(278)&&t.acceptToken(278)}),{contextual:!0,fallback:!0}),of=new Bu(((t,e)=>{let i,{next:n}=t;nf.indexOf(n)>-1||(47!=n||47!=(i=t.peek(1))&&42!=i)&&125!=n&&59!=n&&-1!=n&&!e.context&&e.canShift(274)&&t.acceptToken(274)}),{contextual:!0}),af=new Bu(((t,e)=>{let{next:i}=t;if((43==i||45==i)&&(t.advance(),i==t.next)){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}),{contextual:!0}),lf=new Bu((t=>{for(let e=!1,i=0;;i++){let{next:n}=t;if(n<0){i&&t.acceptToken(275);break}if(96==n){i?t.acceptToken(275):t.acceptToken(277,1);break}if(123==n&&e){1==i?t.acceptToken(276,1):t.acceptToken(275,-1);break}if(10==n&&i){t.advance(),t.acceptToken(275);break}92==n&&t.advance(),e=36==n,t.advance()}}));const hf={__proto__:null,export:16,as:21,from:25,default:30,async:35,function:36,this:46,true:54,false:54,void:60,typeof:64,null:78,super:80,new:114,await:131,yield:133,delete:134,class:144,extends:146,public:187,private:187,protected:187,readonly:189,in:210,instanceof:212,const:214,import:246,keyof:297,unique:301,infer:307,is:341,abstract:361,implements:363,type:365,let:368,var:370,interface:377,enum:381,namespace:387,module:389,declare:393,global:397,for:418,of:427,while:430,with:434,do:438,if:442,else:444,switch:448,case:454,try:460,catch:462,finally:464,return:468,throw:472,break:476,continue:480,debugger:484},cf={__proto__:null,async:101,get:103,set:105,public:153,private:153,protected:153,static:155,abstract:157,override:159,readonly:165,new:345},uf={__proto__:null,"<":121},Of=hO.deserialize({version:13,states:"$0nO`QYOOO&}Q!LdO'#CgO'UOSO'#DSO)^QYO'#DXO)nQYO'#DdO)uQYO'#DnO-lQYO'#DtOOQO'#EW'#EWO.PQWO'#EVO.UQWO'#EVO0TQ!LdO'#IpO2kQ!LdO'#IqO3XQWO'#EuO3^QpO'#F[OOQ!LS'#E}'#E}O3fO!bO'#E}O3tQWO'#FcO5RQWO'#FbOOQ!LS'#Iq'#IqOOQ!LQ'#Ip'#IpOOQQ'#JZ'#JZO5WQWO'#HiO5]Q!LYO'#HjOOQQ'#Ib'#IbOOQQ'#Hk'#HkQ`QYOOO)uQYO'#DfO5eQWO'#GVO5jQ#tO'#ClO5xQWO'#EUO6TQ#tO'#E|O6oQWO'#GVO6tQWO'#GZO7PQWO'#GZO7_QWO'#G^O7_QWO'#G_O7_QWO'#GaO5eQWO'#GdO8OQWO'#GgO9^QWO'#CcO9nQWO'#GtO9vQWO'#GzO9vQWO'#G|O`QYO'#HOO9vQWO'#HQO9vQWO'#HTO9{QWO'#HZO:QQ!LZO'#H_O)uQYO'#HaO:]Q!LZO'#HcO:hQ!LZO'#HeO5]Q!LYO'#HgO)uQYO'#IrOOOS'#Hm'#HmO:sOSO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ArithOp extends LineComment BlockComment Script ExportDeclaration export Star as VariableName from String ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp in instanceof const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplatExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try catch finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:329,context:sf,nodeProps:[[n.group,-26,7,14,16,54,179,183,186,187,189,192,195,206,208,214,216,218,220,223,229,233,235,237,239,241,243,244,"Statement",-30,11,13,23,26,27,38,39,40,41,43,48,56,64,70,71,86,87,96,98,114,117,119,120,121,122,124,125,143,144,146,"Expression",-22,22,24,28,29,31,147,149,151,152,154,155,156,158,159,160,162,163,164,173,175,177,178,"Type",-2,75,81,"ClassItem"],[n.closedBy,37,"]",47,"}",62,")",127,"JSXSelfCloseEndTag JSXEndTag",141,"JSXEndTag"],[n.openedBy,42,"[",46,"{",61,"(",126,"JSXStartTag",136,"JSXStartTag JSXStartCloseTag"]],skippedNodes:[0,4,5],repeatNodeCount:28,tokenData:"!Ck~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxyk|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7a!]!^!7s!^!_!8T!_!`!9Q!`!a!9x!a!b!;o!b!c%T!c!}2`!}#O!=Q#O#P%T#P#Q!=b#Q#R!=r#R#S2`#S#T!>V#T#o2`#o#p!>g#p#q!>l#q#r!?S#r#s!?f#s$f%T$f$g%c$g#BY2`#BY#BZ!?v#BZ$IS2`$IS$I_!?v$I_$I|2`$I|$I}!B_$I}$JO!B_$JO$JT2`$JT$JU!?v$JU$KV2`$KV$KW!?v$KW&FU2`&FU&FV!?v&FV?HT2`?HT?HU!?v?HU~2`W%YR$PWO!^%T!_#o%T#p~%T,T%jg$PW'S+{OX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_$JT%T$JT$JU%c$JU$KV%T$KV$KW%c$KW&FU%T&FU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T!P!7zR^w$PWO!^%T!_#o%T#p~%T+c!8`R'[d!]%Y#s&s'yP!P!Q!8i!^!_!8n!_!`!8{W!8nO$RW#v!8sP#Z#v!_!`!8v#v!8{O#j#v#v!9QO#[#v%w!9XT!w%o$PWO!^%T!_!`'v!`!a!9h!a#o%T#p~%T$P!9oR#R#w$PWO!^%T!_#o%T#p~%T%w!:TT'Z!s#[#v#|S$PWO!^%T!_!`!:d!`!a!:t!a#o%T#p~%T$O!:kR#[#v$PWO!^%T!_#o%T#p~%T$O!:{T#Z#v$PWO!^%T!_!`5T!`!a!;[!a#o%T#p~%T$O!;cS#Z#v$PWO!^%T!_!`5T!`#o%T#p~%T%w!;vV'm%o$PWO!O%T!O!P!<]!P!^%T!_!a%T!a!b!^R$PW'`#wO!^%T!_#o%T#p~%T~!>lO!P~%r!>sT't%j$PWO!^%T!_!`5T!`#o%T#p#q!function(t,e){return"extends"==t&&e.dialectEnabled(1)?3:-1}(t,e)<<1},{term:283,get:t=>hf[t]||-1},{term:295,get:t=>cf[t]||-1},{term:59,get:t=>uf[t]||-1}],tokenPrec:11253}),ff=[Ll("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ll("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ll("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ll("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"block",type:"keyword"}),Ll("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Ll('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ll('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],df=eo.define({parser:Of.configure({props:[yo.add({IfStatement:Ro({except:/^\s*({|else\b)/}),TryStatement:Ro({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Wo,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:n?1:2)*t.unit},Block:So({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>-1,"Statement Property":Ro({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Co.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":Zo,BlockComment:t=>({from:t.from+2,to:t.to-2})}),Vo({"get set async static":ma.modifier,"for while do if else switch try catch finally return throw break continue default case":ma.controlKeyword,"in of await yield void typeof delete instanceof":ma.operatorKeyword,"export import let var const function class extends":ma.definitionKeyword,"with debugger from as new":ma.keyword,TemplateString:ma.special(ma.string),Super:ma.atom,BooleanLiteral:ma.bool,this:ma.self,null:ma.null,Star:ma.modifier,VariableName:ma.variableName,"CallExpression/VariableName":ma.function(ma.variableName),VariableDefinition:ma.definition(ma.variableName),Label:ma.labelName,PropertyName:ma.propertyName,PrivatePropertyName:ma.special(ma.propertyName),"CallExpression/MemberExpression/PropertyName":ma.function(ma.propertyName),"FunctionDeclaration/VariableDefinition":ma.function(ma.definition(ma.variableName)),"ClassDeclaration/VariableDefinition":ma.definition(ma.className),PropertyDefinition:ma.definition(ma.propertyName),PrivatePropertyDefinition:ma.definition(ma.special(ma.propertyName)),UpdateOp:ma.updateOperator,LineComment:ma.lineComment,BlockComment:ma.blockComment,Number:ma.number,String:ma.string,ArithOp:ma.arithmeticOperator,LogicOp:ma.logicOperator,BitOp:ma.bitwiseOperator,CompareOp:ma.compareOperator,RegExp:ma.regexp,Equals:ma.definitionOperator,"Arrow : Spread":ma.punctuation,"( )":ma.paren,"[ ]":ma.squareBracket,"{ }":ma.brace,".":ma.derefOperator,", ;":ma.separator,TypeName:ma.typeName,TypeDefinition:ma.definition(ma.typeName),"type enum interface implements namespace module declare":ma.definitionKeyword,"abstract global privacy readonly override":ma.modifier,"is keyof unique infer":ma.operatorKeyword,JSXAttributeValue:ma.attributeValue,JSXText:ma.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ma.angleBracket,"JSXIdentifier JSXNameSpacedName":ma.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ma.attributeName})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),pf=df.configure({dialect:"ts"}),mf=df.configure({dialect:"jsx"}),gf=df.configure({dialect:"jsx ts"});function Qf(t={}){let e=t.jsx?t.typescript?gf:mf:t.typescript?pf:df;return new Oo(e,df.data.of({autocomplete:Ma(["LineComment","BlockComment","String"],Ea(ff))}))}function bf(t,e,i,n){return i.line(t+n.line).from+e+(1==t?n.col-1:-1)}function wf(t,e,i){let n=bf(t.line,t.column,e,i),s={from:n,to:null!=t.endLine&&1!=t.endColumn?bf(t.endLine,t.endColumn,e,i):n,message:t.message,source:t.ruleId?"jshint:"+t.ruleId:"jshint",severity:1==t.severity?"warning":"error"};if(t.fix){let{range:e,text:r}=t.fix,o=e[0]+i.pos-n,a=e[1]+i.pos-n;s.actions=[{name:"fix",apply(t,e){t.dispatch({changes:{from:e+o,to:e+a,insert:r},scrollIntoView:!0})}}]}return s}var yf=Object.freeze({__proto__:null,esLint:function(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach(((t,i)=>{t.meta.docs.recommended&&(e.rules[i]=2)}))),i=>{let{state:n}=i,s=[];for(let{from:i,to:r}of df.findRegions(n)){let o=n.doc.lineAt(i),a={line:o.number-1,col:i-o.from,pos:i};for(let o of t.verify(n.sliceDoc(i,r),e))s.push(wf(o,n.doc,a))}return s}},javascript:Qf,javascriptLanguage:df,jsxLanguage:mf,snippets:ff,tsxLanguage:gf,typescriptLanguage:pf});const vf=["_blank","_self","_top","_parent"],xf=["ascii","utf-8","utf-16","latin1","latin1"],$f=["get","post","put","delete"],kf=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Pf=["true","false"],Sf={},Tf={a:{attrs:{href:null,ping:null,type:null,media:null,target:vf,hreflang:null}},abbr:Sf,acronym:Sf,address:Sf,applet:Sf,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Sf,aside:Sf,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Sf,base:{attrs:{href:null,target:vf}},basefont:Sf,bdi:Sf,bdo:Sf,big:Sf,blockquote:{attrs:{cite:null}},body:Sf,br:Sf,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:kf,formmethod:$f,formnovalidate:["novalidate"],formtarget:vf,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Sf,center:Sf,cite:Sf,code:Sf,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:Sf,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Sf,dir:Sf,div:Sf,dl:Sf,dt:Sf,em:Sf,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Sf,figure:Sf,font:Sf,footer:Sf,form:{attrs:{action:null,name:null,"accept-charset":xf,autocomplete:["on","off"],enctype:kf,method:$f,novalidate:["novalidate"],target:vf}},frame:Sf,frameset:Sf,h1:Sf,h2:Sf,h3:Sf,h4:Sf,h5:Sf,h6:Sf,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Sf,hgroup:Sf,hr:Sf,html:{attrs:{manifest:null}},i:Sf,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:kf,formmethod:$f,formnovalidate:["novalidate"],formtarget:vf,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:Sf,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Sf,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:Sf,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:xf,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:Sf,noframes:Sf,noscript:Sf,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:Sf,param:{attrs:{name:null,value:null}},pre:Sf,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Sf,rt:Sf,ruby:Sf,s:Sf,samp:Sf,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:xf}},section:Sf,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},small:Sf,source:{attrs:{src:null,type:null,media:null}},span:Sf,strike:Sf,strong:Sf,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Sf,summary:Sf,sup:Sf,table:Sf,tbody:Sf,td:{attrs:{colspan:null,rowspan:null,headers:null}},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:Sf,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Sf,time:{attrs:{datetime:null}},title:Sf,tr:Sf,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},tt:Sf,u:Sf,ul:{children:["li","script","template","ul","ol"]},var:Sf,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:Sf},Wf={accesskey:null,class:null,contenteditable:Pf,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:Pf,autocorrect:Pf,autocapitalize:Pf,style:null,tabindex:null,title:null,translate:["yes","no"],onclick:null,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":Pf,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Pf,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Pf,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Pf,"aria-hidden":Pf,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Pf,"aria-multiselectable":Pf,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Pf,"aria-relevant":null,"aria-required":Pf,"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},Rf=Object.keys(Tf),Xf=Object.keys(Wf);function Af(t,e,i=t.length){if(!e)return"";let n=e.firstChild,s=n&&n.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,i)):""}function Cf(t,e=!1){for(let i=t.parent;i;i=i.parent)if("Element"==i.name){if(!e)return i;e=!1}return null}function Zf(t,e){let i=Tf[Af(t,Cf(e,!0))];return(null==i?void 0:i.children)||Rf}function _f(t,e){let i=[];for(let n=e;n=Cf(n);){let s=Af(t,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&i.indexOf(s)<0&&("EndTag"==e.name||e.from>=n.firstChild.to)&&i.push(s)}return i}const Uf=/^[:\-\.\w\u00b7-\uffff]+$/;function Yf(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:Zf(t.doc,e).map((t=>({label:t,type:"type"}))).concat(_f(t.doc,e).map(((t,e)=>({label:"/"+t,apply:"/"+t+s,type:"type",boost:99-e})))),span:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function zf(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:_f(t.doc,e).map(((t,e)=>({label:t,apply:t+s,type:"type",boost:99-e}))),span:Uf}}function Lf(t){let{state:e,pos:i}=t,n=io(e).resolveInner(i),s=n.resolve(i,-1);for(let t,e=i;n==s&&(t=s.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from({label:t,type:"property"}))),span:Uf}}(e,s,"AttributeName"==s.name?s.from:i,i):"Is"==s.name||"AttributeValue"==s.name||"UnquotedAttributeValue"==s.name?function(t,e,i,n){var s;let r,o=null===(s=e.parent)||void 0===s?void 0:s.getChild("AttributeName"),a=[];if(o){let s=t.sliceDoc(o.from,o.to),l=Wf[s];if(!l){let i=Cf(e),n=i?Tf[Af(t.doc,i)]:null;l=(null==n?void 0:n.attrs)&&n.attrs[s]}if(l){let e=t.sliceDoc(i,n).toLowerCase(),s='"',o='"';/^['"]/.test(e)?(r='"'==e[0]?/^[^"]*$/:/^[^']*$/,s="",o=t.sliceDoc(n,n+1)==e[0]?"":e[0],e=e.slice(1),i++):r=/^[^\s<>='"]*$/;for(let t of l)a.push({label:t,apply:s+t+o,type:"constant"})}}return{from:i,to:n,options:a,span:r}}(e,s,"Is"==s.name?i:s.from,i):!t.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,i){let n=[],s=0;for(let i of Zf(t.doc,e))n.push({label:"<"+i,type:"type"});for(let i of _f(t.doc,e))n.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:n,span:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(e,s,i)}const Df=eo.define({parser:KO.configure({props:[yo.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:df.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:TO.parser}])}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Vf=Df.data.of({autocomplete:Lf});function qf(t={}){let e=Df;return!1===t.matchClosingTags&&(e=e.configure({dialect:"noMatch"})),new Oo(e,[Vf,!1!==t.autoCloseTags?Ef:[],Qf().support,RO().support])}const Ef=Or.inputHandler.of(((t,e,i,n)=>{if(t.composing||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!Df.isActiveAt(t.state,e,-1))return!1;let{state:s}=t,r=s.changeByRange((t=>{var e,i,r;let o,{head:a}=t,l=io(s).resolveInner(a,-1);if("TagName"!=l.name&&"StartTag"!=l.name||(l=l.parent),">"==n&&"OpenTag"==l.name){if("CloseTag"!=(null===(i=null===(e=l.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(o=Af(s.doc,l.parent,a)))return{range:kt.cursor(a+1),changes:{from:a,insert:`>`}}}else if("/"==n&&"OpenTag"==l.name){let t=l.parent,e=null==t?void 0:t.parent;if(t.from==a-1&&"CloseTag"!=(null===(r=e.lastChild)||void 0===r?void 0:r.name)&&(o=Af(s.doc,e,a))){let t=`/${o}>`;return{range:kt.cursor(a+t.length),changes:{from:a,insert:t}}}}return{range:t}}));return!r.changes.empty&&(t.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}));var Mf=Object.freeze({__proto__:null,autoCloseTags:Ef,html:qf,htmlCompletion:Vf,htmlCompletionSource:Lf,htmlLanguage:Df});const Gf=Wt.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}}),jf=mn.fromClass(class{constructor(t){this.input=t.state.facet(Hf),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Gf);this.top=new Nf(t,!0,e.topContainer),this.bottom=new Nf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Gf);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Nf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Nf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(Hf);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),o.push(e)):(e=this.panels[a],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:fn.scrollMargins.from((t=>({top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()})))});class Nf{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=If(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=If(t)}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 t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function If(t){let e=t.nextSibling;return t.remove(),e}const Bf=Or.baseTheme({".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"}}),Hf=Wt.define({enables:[jf,Bf]}),Ff="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Kf{constructor(t,e,i=0,n=t.length,s){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(Ff(t)):Ff,this.query=this.normalize(e)}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 et(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=it(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=nt(t);let n=this.normalize(e);for(let t=0,s=i;;t++){let r=n.charCodeAt(t),o=this.match(r,s);if(o)return this.value=o,this;if(t==n.length-1)break;s==i&&t=i||n.to<=e){let n=new id(e,t.sliceString(e,i));return ed.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){let t=this.flat.from+e.index,i=t+e[0].length;return this.value={from:t,to:i,match:e},this.matchPos=i+(t==i?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=id.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}"undefined"!=typeof Symbol&&(class{constructor(t,e,i,n=0,s=t.length){if(this.to=s,this.curLine="",this.done=!1,this.value=Jf,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new nd(t,e,i,n,s);this.re=new RegExp(e,td+((null==i?void 0:i.ignoreCase)?"i":"")),this.iter=t.iter();let r=t.lineAt(n);this.curLineStart=r.from,this.matchPos=n,this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=n+(i==n?1:0),i==this.curLine.length&&this.nextLine(),ithis.value.to)return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=kt.create(i.ranges.map((e=>t.wordAt(e.head)||kt.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new Kf(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(r){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new Kf(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(kt.range(s.from,s.to),!1),scrollIntoView:!0})),!0)};async function rd(){return wa.define((await import("./legacy.js").then((function(t){return t.c}))).clojure)}async function od(){return wa.define((await import("./legacy.js").then((function(t){return t.a}))).coffeeScript)}function ad(){return import("./cpp.js")}function ld(){return import("./java.js")}function hd(){return import("./json.js")}function cd(){return import("./markdown.js")}function ud(){return import("./php.js")}function Od(){return import("./python.js")}async function fd(){return wa.define((await import("./legacy.js").then((function(t){return t.s}))).shell)}function dd(){return import("./wast.js")}function pd(){return import("./xml.js")}export{Ch as $,ld as A,hd as B,lO as C,cd as D,Bu as E,ud as F,Od as G,fd as H,dd as I,pd as J,Ql as K,hO as L,jl as M,n as N,wl as O,P,Gl as Q,Va as R,Bl as S,c as T,Ma as U,Hl as V,bl as W,ih as X,oh as Y,Gh as Z,Zh as _,eo as a,mn as a$,kc as a0,$c as a1,yc as a2,jh as a3,tc as a4,Jh as a5,Pc as a6,Sc as a7,fu as a8,gu as a9,sd as aA,ie as aB,ne as aC,mt as aD,gt as aE,Et as aF,ge as aG,Wt as aH,$t as aI,re as aJ,se as aK,Zt as aL,oe as aM,wa as aN,Qa as aO,ft as aP,rt as aQ,Da as aR,La as aS,Ca as aT,qi as aU,Sr as aV,Or as aW,Er as aX,Yr as aY,Hr as aZ,Ir as a_,cu as aa,zc as ab,Zc as ac,Vc as ad,Ic as ae,Jc as af,No as ag,Io as ah,Yo as ai,$u as aj,Lu as ak,Su as al,Wu as am,Pu as an,Tu as ao,XO as ap,Mf as aq,yf as ar,no as as,Xo as at,mo as au,bh as av,Hf as aw,we as ax,xe as ay,$e as az,Co as b,kn as b0,Di as b1,w as b2,M as b3,Ro as c,Zo as d,Oo as e,Wo as f,o as g,a as h,yo as i,Jr as j,io as k,Fr as l,kt as m,Vt as n,vr as o,T as p,Kr as q,qf as r,Vo as s,ma as t,fo as u,oo as v,So as w,rd as x,od as y,ad as z}; +const t=1024;let e=0;class i{constructor(t,e){this.from=t,this.to=e}}class n{constructor(t={}){this.id=e++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=o.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}n.closedBy=new n({deserialize:t=>t.split(" ")}),n.openedBy=new n({deserialize:t=>t.split(" ")}),n.group=new n({deserialize:t=>t.split(" ")}),n.contextHash=new n({perNode:!0}),n.lookAhead=new n({perNode:!0}),n.mounted=new n({perNode:!0});class s{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}}const r=Object.create(null);class o{constructor(t,e,i,n=0){this.name=t,this.props=e,this.id=i,this.flags=n}static define(t){let e=t.props&&t.props.length?Object.create(null):r,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),n=new o(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return n}prop(t){return this.props[t.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(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(n.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let n of i.split(" "))e[n]=t[i];return t=>{for(let i=t.prop(n.group),s=-1;s<(i?i.length:0);s++){let n=e[s<0?t.name:i[s]];if(n)return n}}}}o.none=new o("",Object.create(null),0,8);class a{constructor(t){this.types=t;for(let e=0;et.node;;){let o=!1;if(t.from<=s&&t.to>=n&&(t.type.isAnonymous||!1!==e(t.type,t.from,t.to,r))){if(t.firstChild())continue;t.type.isAnonymous||(o=!0)}for(;o&&i&&i(t.type,t.from,t.to,r),o=t.type.isAnonymous,!t.nextSibling();){if(!t.parent())return;o=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:$(o.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new c(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new c(o.none,t,e,i)))}static build(e){return function(e){var i;let{buffer:s,nodeSet:r,maxBufferLength:o=t,reused:a=[],minRepeatType:l=r.types.length}=e,h=Array.isArray(s)?new u(s,s.length):s,f=r.types,d=0,p=0;function m(t,e,i,n,s){let{id:c,start:u,end:v,size:x}=h,k=p;for(;x<0;){if(h.next(),-1==x){let e=a[c];return i.push(e),void n.push(u-t)}if(-3==x)return void(d=c);if(-4==x)return void(p=c);throw new RangeError(`Unrecognized record size: ${x}`)}let P,S,T=f[c],W=u-t;if(v-u<=o&&(S=w(h.pos-e,s))){let e=new Uint16Array(S.size-S.skip),i=h.pos-S.size,n=e.length;for(;h.pos>i;)n=y(S.start,e,n);P=new O(e,v-S.start,r),W=S.start-t}else{let t=h.pos-x;h.next();let e=[],i=[],n=c>=l?c:-1,s=0,r=v;for(;h.pos>t;)n>=0&&h.id==n&&h.size>=0?(h.end<=r-o&&(Q(e,i,u,s,h.end,r,n,k),s=e.length,r=h.end),h.next()):m(u,t,e,i,n);if(n>=0&&s>0&&s-1&&s>0){let t=g(T);P=$(T,e,i,0,e.length,0,v-u,t,t)}else P=b(T,e,i,v-u,k-v)}i.push(P),n.push(W)}function g(t){return(e,i,s)=>{let r,o,a=0,l=e.length-1;if(l>=0&&(r=e[l])instanceof c){if(!l&&r.type==t&&r.length==s)return r;(o=r.prop(n.lookAhead))&&(a=i[l]+r.length+o)}return b(t,e,i,s,a)}}function Q(t,e,i,n,s,o,a,l){let h=[],c=[];for(;t.length>n;)h.push(t.pop()),c.push(e.pop()+i-s);t.push(b(r.types[a],h,c,o-s,l-o)),e.push(s-i)}function b(t,e,i,s,r=0,o){if(d){let t=[n.contextHash,d];o=o?[t].concat(o):[t]}if(r>25){let t=[n.lookAhead,r];o=o?[t].concat(o):[t]}return new c(t,e,i,s,o)}function w(t,e){let i=h.fork(),n=0,s=0,r=0,a=i.end-o,c={size:0,start:0,skip:0};t:for(let o=i.pos-t;i.pos>o;){let t=i.size;if(i.id==e&&t>=0){c.size=n,c.start=s,c.skip=r,r+=4,n+=4,i.next();continue}let h=i.pos-t;if(t<0||h=l?4:0,O=i.start;for(i.next();i.pos>h;){if(i.size<0){if(-3!=i.size)break t;u+=4}else i.id>=l&&(u+=4);i.next()}s=O,n+=t,r+=u}return(e<0||n==t)&&(c.size=n,c.start=s,c.skip=r),c.size>4?c:void 0}function y(t,e,i){let{id:n,start:s,end:r,size:o}=h;if(h.next(),o>=0&&n4){let n=h.pos-(o-4);for(;h.pos>n;)i=y(t,e,i)}e[--i]=a,e[--i]=r-t,e[--i]=s-t,e[--i]=n}else-3==o?d=n:-4==o&&(p=n);return i}let v=[],x=[];for(;h.pos>0;)m(e.start||0,e.bufferStart||0,v,x,-1);let k=null!==(i=e.length)&&void 0!==i?i:v.length?x[0]+v[0].length:0;return new c(f[e.topID],v.reverse(),x.reverse(),k)}(e)}}c.empty=new c(o.none,[],[],0);class u{constructor(t,e){this.buffer=t,this.index=e}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 u(this.buffer,this.index)}}class O{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return o.none}toString(){let t=[];for(let e=0;e0));a=r[a+3]);return o}slice(t,e,i,n){let s=this.buffer,r=new Uint16Array(e-t);for(let n=t,o=0;n=e&&ie;case 1:return i<=e&&n>e;case 2:return n>e;case 4:return!0}}function d(t,e){let i=t.childBefore(e);for(;i;){let e=i.lastChild;if(!e||e.to!=i.to)break;e.type.isError&&e.from==e.to?(t=i,i=e.prevSibling):i=e}return t}function p(t,e,i,n){for(var s;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to0?a.length:-1;t!=h;t+=e){let h=a[t],c=l[t]+o._from;if(f(s,i,c,c+h.length))if(h instanceof O){if(2&r)continue;let n=h.findChild(0,h.buffer.length,e,i-c,s);if(n>-1)return new b(new Q(o,h,t,c),null,n)}else if(1&r||!h.type.isAnonymous||y(h)){let a;if(!(1&r)&&h.props&&(a=h.prop(n.mounted))&&!a.overlay)return new m(a.tree,c,t,o);let l=new m(h,c,t,o);return 1&r||!l.type.isAnonymous?l:l.nextChild(e<0?h.children.length-1:0,e,i,s)}}if(1&r||!o.type.isAnonymous)return null;if(t=o.index>=0?o.index+e:e<0?-1:o._parent.node.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this.node.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}enter(t,e,i=!0,s=!0){let r;if(i&&(r=this.node.prop(n.mounted))&&r.overlay){let i=t-this.from;for(let{from:t,to:n}of r.overlay)if((e>0?t<=i:t=i:n>i))return new m(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,s?0:2)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 cursor(){return new w(this)}get tree(){return this.node}toTree(){return this.node}resolve(t,e=0){return p(this,t,e,!1)}resolveInner(t,e=0){return p(this,t,e,!0)}enterUnfinishedNodesBefore(t){return d(this,t)}getChild(t,e=null,i=null){let n=g(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return g(this,t,e,i)}toString(){return this.node.toString()}}function g(t,e,i,n){let s=t.cursor,r=[];if(!s.firstChild())return r;if(null!=i)for(;!s.type.is(i);)if(!s.nextSibling())return r;for(;;){if(null!=n&&s.type.is(n))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return null==n?r:[]}}class Q{constructor(t,e,i,n){this.parent=t,this.buffer=e,this.index=i,this.start=n}}class b{constructor(t,e,i){this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}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]}child(t,e,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.context.start,i);return s<0?null:new b(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i,n=!0){if(!n)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new b(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new b(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new b(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get cursor(){return new w(this)}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let r=i.buffer[this.index+1],o=i.buffer[this.index+2];t.push(i.slice(n,s,r,o)),e.push(0)}return new c(this.type,t,e,this.to-this.from)}resolve(t,e=0){return p(this,t,e,!1)}resolveInner(t,e=0){return p(this,t,e,!0)}enterUnfinishedNodesBefore(t){return d(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,e=null,i=null){let n=g(this,t,e,i);return n.length?n[0]:null}getChildren(t,e=null,i=null){return g(this,t,e,i)}}class w{constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof m)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}get name(){return this.type.name}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:n}=this.buffer;return this.type=e||n.set.types[n.buffer[t]],this.from=i+n.buffer[t+1],this.to=i+n.buffer[t+2],!0}yield(t){return!!t&&(t instanceof m?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,e,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],t,e-this.buffer.start,i);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=!0,n=!0){return this.buffer?!!n&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i&&!(1&this.mode),n))}parent(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:n}=this;if(n){if(t>0){if(this.index-1)for(let n=e+t,s=t<0?-1:i.node.children.length;n!=s;n+=t){let t=i.node.children[n];if(1&this.mode||t instanceof O||!t.type.isAnonymous||y(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==n){if(n==this.index)return r;e=r,i=s+1;break t}n=this.stack[--s]}for(let t=i;tt instanceof O||!t.type.isAnonymous||y(t)))}const v=new WeakMap;function x(t,e){if(!t.isAnonymous||e instanceof O||e.type!=t)return 1;let i=v.get(e);if(null==i){i=1;for(let n of e.children){if(n.type!=t||!(n instanceof c)){i=1;break}i+=x(t,n)}v.set(e,i)}return i}function $(t,e,i,n,s,r,o,a,l){let h=0;for(let i=n;i=c)break;d+=e}if(h==s+1){if(d>c){let t=i[s];e(t.children,t.positions,0,t.children.length,n[s]+a);continue}u.push(i[s])}else{let e=n[h-1]+i[h-1].length-f;u.push($(t,i,n,s,h,f,e,null,l))}O.push(f+a-r)}}(e,i,n,s,0),(a||l)(u,O,o)}class k{constructor(t,e,i,n,s=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=n,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let n=[new k(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&n.push(i);return n}static applyChanges(t,e,i=128){if(!e.length)return t;let n=[],s=1,r=t.length?t[0]:null;for(let o=0,a=0,l=0;;o++){let h=o=i)for(;r&&r.from=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new k(t,i,e.tree,e.offset+l,o>0,!!h)}if(e&&n.push(e),r.to>c)break;r=snew i(t.from,t.to))):[new i(0,0)]:[new i(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,i){let n=this.startParse(t,e,i);for(;;){let t=n.advance();if(t)return t}}}class S{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}function T(t){return(e,i,n,s)=>new A(e,t,i,n,s)}class W{constructor(t,e,i,n,s){this.parser=t,this.parse=e,this.overlay=i,this.target=n,this.ranges=s}}class R{constructor(t,e,i,n,s,r,o){this.parser=t,this.predicate=e,this.mounts=i,this.index=n,this.start=s,this.target=r,this.prev=o,this.depth=0,this.ranges=[]}}const X=new n({perNode:!0});class A{constructor(t,e,i,n,s){this.nest=e,this.input=i,this.fragments=n,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new c(t.type,t.children,t.positions,t.length,t.propValues.concat([[X,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[n.mounted.id]=new s(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;et.frag.from<=s.from&&t.frag.to>=s.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let n=i.from+t.pos,r=i.to+t.pos;n>=s.from&&r<=s.to&&e.ranges.push({from:n,to:r})}}l=!1}else if(n&&(o=C(n.ranges,s.from,s.to)))l=2!=o;else if(!s.type.isAnonymous&&s.fromnew i(t.from-s.from,t.to-s.from))):null,s.tree,t)),r.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):l=!1}}else e&&(a=e.predicate(s))&&(!0===a&&(a=new i(s.from,s.to)),a.fromnew i(t.from-e.start,t.to-e.start))),e.target,t)),e=e.prev}n&&!--n.depth&&(n=n.prev)}}}}function C(t,e,i){for(let n of t){if(n.from>=i)break;if(n.to>e)return n.from<=e&&n.to>=i?2:1}return 0}function Z(t,e,i,n,s,r){if(e=e.to);n++);let a=s.children[n],l=a.buffer;s.children[n]=function t(i,n,s,o){let h=i;for(;l[h+2]+r<=e.from;)h=l[h+3];let u=[],O=[];Z(a,i,h,u,O,o);let f=l[h+1]+r==e.from&&l[h+2]+r==e.to&&l[h]==e.type.id;u.push(f?e.toTree():t(h+4,l[h+3],a.set.types[l[h]],l[h+1])),O.push(l[h+1]-o),Z(a,l[h+3],n,u,O,o);let d=u.length-1;return new c(s,u,O,O[d]+u[d].length)}(0,l.length,o.none,0);for(let n=0;n<=i;n++)t.childAfter(e.from)}class U{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.fullCursor()}moveTo(t){let{cursor:e}=this,i=t-this.offset;for(;!this.done&&e.from=t&&e.enter(i,1,!1,!1)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof c))break;e=e.children[0]}return!1}}class Y{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(X))&&void 0!==e?e:i.to,this.inner=new U(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(X))&&void 0!==t?t:e.to,this.inner=new U(e.tree,-e.offset)}}findMounts(t,e){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let r=null===(i=t.tree)||void 0===i?void 0:i.prop(n.mounted);if(r&&r.parser==e)for(let e=this.fragI;e=t.to)break;i.tree==this.curFrag.tree&&s.push({frag:i,pos:t.from-i.offset,mount:r})}}}return s}}function z(t,e){let n=null,s=e;for(let r=1,o=0;r=l)break;t.to<=a||(n||(s=n=e.slice()),t.froml&&n.splice(o+1,0,new i(l,t.to))):t.to>l?n[o--]=new i(l,t.to):n.splice(o--,1))}}return s}function L(t,e,n,s){let r=0,o=0,a=!1,l=!1,h=-1e9,c=[];for(;;){let u=r==t.length?1e9:a?t[r].to:t[r].from,O=o==e.length?1e9:l?e[o].to:e[o].from;if(a!=l){let t=Math.max(h,n),e=Math.min(u,O,s);tnew i(t.from+s,t.to+s))),l,h);for(let e=0,i=l;;e++){let s=e==a.length,l=s?h:a[e].from;if(l>i&&n.push(new k(i,l,r.tree,-t,o.from>=i,o.to<=l)),s)break;i=a[e].to}}else n.push(new k(l,h,r.tree,-t,o.from>=t,o.to<=a))}return n}const V="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),q="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class M{constructor(t,e){this.rules=[];let{finish:i}=e||{};function n(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function s(t,e,r,o){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))s(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),o,r);else if(o&&"object"==typeof o){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");s(n(i),o,a,h)}else null!=o&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+o+";")}(a.length||h)&&r.push((!i||l||o?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)s(n(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=E[V]||1;return E[V]=t+1,"ͼ"+t.toString(36)}static mount(t,e){(t[q]||new j(t)).mount(Array.isArray(e)?e:[e])}}let G=null;class j{constructor(t){if(!t.head&&t.adoptedStyleSheets&&"undefined"!=typeof CSSStyleSheet){if(G)return t.adoptedStyleSheets=[G.sheet].concat(t.adoptedStyleSheets),t[q]=G;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),G=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");let e=t.head||t;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],t[q]=this}mount(t){let e=this.sheet,i=0,n=0;for(let s=0;s-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),e)for(let t=0;tt?parseInt(t,36):1));for(let t=1;tt)return N[e-1]<=t;return!1}function B(t){return t>=127462&&t<=127487}function H(t,e,i=!0){return(i?F:K)(t,e)}function F(t,e){if(e==t.length)return e;e&&J(t.charCodeAt(e))&&tt(t.charCodeAt(e-1))&&e--;let i=et(t,e);for(e+=nt(i);e=0&&B(et(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function K(t,e){for(;e>0;){let i=F(t,e-2);if(i=56320&&t<57344}function tt(t){return t>=55296&&t<56320}function et(t,e){let i=t.charCodeAt(e);if(!tt(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return J(n)?n-56320+(i-55296<<10)+65536:i}function it(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function nt(t){return t<65536?1:2}function st(t,e,i=t.length){let n=0;for(let s=0;sthis.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),at.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];return this.decompose(t,e,i,0),at.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new ct(this),s=new ct(t);for(let t=e,r=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(r+=n.value.length,n.done||r>=i)return!0}}iter(t=1){return new ct(this,t)}iterRange(t,e=this.length){return new ut(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Ot(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new ot(t):at.from(ot.split(t,[])):rt.empty}}class ot extends rt{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.text[s],o=n+r.length;if((e?i:o)>=t)return new ft(n,o,i,r);n=o+1,i++}}decompose(t,e,i,n){let s=t<=0&&e>=this.length?this:new ot(ht(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=lt(s.text,t.text.slice(),0,s.length);if(e.length<=32)i.push(new ot(e,t.length+s.length));else{let t=e.length>>1;i.push(new ot(e.slice(0,t)),new ot(e.slice(t)))}}else i.push(s)}replace(t,e,i){if(!(i instanceof ot))return super.replace(t,e,i);let n=lt(this.text,lt(i.text,ht(this.text,0,t)),e),s=this.length+i.length-(e-t);return n.length<=32?new ot(n,s):at.from(ot.split(n,[]),s)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;s<=e&&rt&&r&&(n+=i),ts&&(n+=o.slice(Math.max(0,t-s),e-s)),s=a+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let s of t)i.push(s),n+=s.length+1,32==i.length&&(e.push(new ot(i,n)),i=[],n=-1);return n>-1&&e.push(new ot(i,n)),e}}class at extends rt{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let r=this.children[s],o=n+r.length,a=i+r.lines-1;if((e?a:o)>=t)return r.lineInner(t,e,i,n);n=o+1,i=a+1}}decompose(t,e,i,n){for(let s=0,r=0;r<=e&&s=r){let s=n&((r<=t?1:0)|(a>=e?2:0));r>=t&&a<=e&&!s?i.push(o):o.decompose(t-r,e-r,i,s)}r=a+1}}replace(t,e,i){if(i.lines=s&&e<=o){let a=r.replace(t-s,e-s,i),l=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let s=this.children.slice();return s[n]=a,new at(s,this.length-(e-t)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){let n="";for(let s=0,r=0;st&&s&&(n+=i),tr&&(n+=o.sliceString(t-r,e-r,i)),r=a+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof at))return 0;let i=0,[n,s,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==o)return i;let a=this.children[n],l=t.children[s];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new ot(i,e)}let n=Math.max(32,i>>5),s=n<<1,r=n>>1,o=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>s&&t instanceof at)for(let e of t.children)c(e);else t.lines>r&&(a>r||!a)?(u(),o.push(t)):t instanceof ot&&a&&(e=h[h.length-1])instanceof ot&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new ot(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>n&&u(),a+=t.lines,l+=t.length+1,h.push(t))}function u(){0!=a&&(o.push(1==h.length?h[0]:at.from(h,l)),l=-1,a=h.length=0)}for(let e of t)c(e);return u(),1==o.length?o[0]:new at(o,e)}}function lt(t,e,i=0,n=1e9){for(let s=0,r=0,o=!0;r=i&&(l>n&&(a=a.slice(0,n-s)),s0?1:(t instanceof ot?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],r=s>>1,o=n instanceof ot?n.text.length:n.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof ot){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let s=n.children[r+(e<0?-1:0)];t>s.length?(t-=s.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(s),this.offsets.push(e>0?1:(s instanceof ot?s.text.length:s.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class ut{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new ct(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Ot{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e?(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}}"undefined"!=typeof Symbol&&(rt.prototype[Symbol.iterator]=function(){return this.iter()},ct.prototype[Symbol.iterator]=ut.prototype[Symbol.iterator]=Ot.prototype[Symbol.iterator]=function(){return this});class ft{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}const dt=/\r\n?|\n/;var pt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(pt||(pt={}));class mt{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=o}else{if(i!=pt.Simple&&l>=t&&(i==pt.TrackDel&&nt||i==pt.TrackBefore&&nt))return null;if(l>t||l==t&&e<0&&!o)return t==n||e<0?s:s+a;s+=a}n=l}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new mt(t)}}class gt extends mt{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return wt(this,((e,i,n,s,r)=>t=t.replace(n,n+(i-e),r)),!1),t}mapDesc(t,e=!1){return yt(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,s=0;n=0){e[n]=o,e[n+1]=r;let a=n>>1;for(;i.length0&&bt(i,e,s.text),s.forward(t),o+=t}let l=t[r++];for(;o>1].toJSON()))}return t}static of(t,e,i){let n=[],s=[],r=0,o=null;function a(t=!1){if(!t&&!n.length)return;ro||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=h?"string"==typeof h?rt.of(h.split(i||dt)):h:rt.empty,u=c.length;if(t==o&&0==u)return;tr&&Qt(n,t-r,-1),Qt(n,o-t,u),bt(s,n,c),r=o}}(t),a(!o),o}static empty(t){return new gt(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;ne&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function bt(t,e,i){if(0==i.length)return;let n=e.length-2>>1;if(n>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(s,h,r,c,u),s=h,r=c}}}function yt(t,e,i,n=!1){let s=[],r=n?[]:null,o=new xt(t),a=new xt(e);for(let t=0,e=0;;)if(-1==o.ins)t+=o.len,o.next();else if(-1==a.ins&&e=0&&(o.done||ee&&!o.done&&t+o.len=0)){if(o.done&&a.done)return r?new gt(s,r):new mt(s);throw new Error("Mismatched change set lengths")}{let i=0,n=t+o.len;for(;;)if(a.ins>=0&&e>t&&e+a.lene||o.ins>=0&&o.len>e)&&(t||n.length>i),r.forward2(e),o.forward(e)}}else Qt(n,0,o.ins,t),s&&bt(s,n,o.text),o.next()}}class xt{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?rt.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?rt.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class $t{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,e=-1){let i=t.mapPos(this.from,e),n=t.mapPos(this.to,e);return i==this.from&&n==this.to?this:new $t(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return kt.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return kt.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return kt.range(t.anchor,t.head)}}class kt{constructor(t,e=0){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:kt.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new kt(t.ranges.map((t=>$t.fromJSON(t))),t.main)}static single(t,e=t){return new kt([kt.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?kt.range(o,r):kt.range(r,o))}}return new kt(t,e)}function St(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let Tt=0;class Wt{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.extensions=s,this.id=Tt++,this.default=t([])}static define(t={}){return new Wt(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:Rt),!!t.static,t.enables)}of(t){return new Xt([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xt(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xt(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function Rt(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class Xt{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=Tt++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=t[this.id]>>1,r=2==this.type,o=!1,a=!1,l=[];for(let i of this.dependencies)"doc"==i?o=!0:"selection"==i?a=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&l.push(t[i.id]);return(t,e)=>{let h=t.values[s];if(h===jt)return t.values[s]=i(t),1;if(e){if(o&&e.docChanged||a&&(e.docChanged||e.selection)||l.some((e=>(1&Nt(t,e))>0))){let e=i(t);if(r?!function(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),r=n.filter((t=>!(1&t))),o=t[e.id]>>1;return(t,i)=>{let a=t.values[o],l=a===jt||!i;for(let e of r)1&Nt(t,e)&&(l=!0);if(!l)return 0;let h=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Ct).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return(t,i)=>{let n=t.values[e];if(n===jt)return t.values[e]=this.create(t),1;if(i){let s=this.updateF(n,i);if(!this.compareF(n,s))return t.values[e]=s,1}return 0}}init(t){return[this,Ct.of({field:this,create:t})]}get extension(){return this}}const _t=4,Ut=3,Yt=2,zt=1,Lt=0;function Dt(t){return e=>new qt(e,t)}const Vt={lowest:Dt(_t),low:Dt(Ut),default:Dt(Yt),high:Dt(zt),highest:Dt(Lt),fallback:Dt(_t),extend:Dt(zt),override:Dt(Lt)};class qt{constructor(t,e){this.inner=t,this.prec=e}}class Et{of(t){return new Mt(this,t)}reconfigure(t){return Et.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Mt{constructor(t,e){this.compartment=t,this.inner=e}}class Gt{constructor(t,e,i,n,s){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),r=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function r(t,o){let a=s.get(t);if(null!=a){if(a>=o)return;let e=n[a].indexOf(t);e>-1&&n[a].splice(e,1),t instanceof Mt&&i.delete(t.compartment)}if(s.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof Mt){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),r(n,o)}else if(t instanceof qt)r(t.inner,t.prec);else if(t instanceof Zt)n[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof Xt)n[o].push(t),t.facet.extensions&&r(t.facet.extensions,o);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,Yt),n.reduce(((t,e)=>t.concat(e)))}(t,e,r))i instanceof Zt?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let o=Object.create(null),a=[],l=[],h=[];for(let t of n)o[t.id]=l.length<<1,l.push((e=>t.slot(e))),h.push([]);for(let t in s){let e=s[t],n=e[0].facet;if(e.every((t=>0==t.type))){o[n.id]=a.length<<1|1;let t=n.combine(e.map((t=>t.value))),s=i?i.config.address[n.id]:null;if(null!=s){let e=It(i,s);n.compare(t,e)&&(t=e)}a.push(t)}else{for(let t of e)0==t.type?(o[t.id]=a.length<<1|1,a.push(t.value)):(o[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))),h.push(t.dependencies.filter((t=>"string"!=typeof t)).map((t=>t.id))));o[n.id]=l.length<<1,l.push((t=>At(t,n,e))),h.push(e.filter((t=>0!=t.type)).map((t=>t.id)))}}let c=l.map((t=>jt));if(i){let t=(e,n)=>{if(n>7)return!1;let s=o[e];if(!(1&s))return h[s>>1].every((e=>t(e,n+1)));let r=i.config.address[e];return null!=r&&It(i,r)==a[s>>1]};for(let e in o){let n=o[e],s=i.config.address[e];null!=s&&0==(1&n)&&t(+e,0)&&(c[n>>1]=It(i,s))}}return{configuration:new Gt(t,r,l.map((t=>t(o))),o,a),values:c}}}const jt={};function Nt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.config.dynamicSlots[i](t,t.applying);return t.status[i]=2|s}function It(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Bt=Wt.define(),Ht=Wt.define({combine:t=>t.some((t=>t)),static:!0}),Ft=Wt.define({combine:t=>t.length?t[0]:void 0,static:!0}),Kt=Wt.define(),Jt=Wt.define(),te=Wt.define(),ee=Wt.define({combine:t=>!!t.length&&t[0]});class ie{constructor(t,e){this.type=t,this.value=e}static define(){return new ne}}class ne{of(t){return new ie(this,t)}}class se{constructor(t){this.map=t}of(t){return new re(this,t)}}class re{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new re(this.type,e)}is(t){return this.type==t}static define(t={}){return new se(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}re.reconfigure=re.define(),re.appendConfig=re.define();class oe{constructor(t,e,i,n,s,r){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,i&&St(i,e.newLength),s.some((t=>t.type==oe.time))||(this.annotations=s.concat(oe.time.of(Date.now())))}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(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(oe.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ae(t,e){let i=[];for(let n=0,s=0;;){let r,o;if(n=t[n]))r=t[n++],o=t[n++];else{if(!(s=0;s--){let r=i[s](t);r&&Object.keys(r).length&&(n=le(t,he(e,r,t.changes.newLength),!0))}return n==t?t:new oe(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(Kt)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:ae(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=gt.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.invertedDesc}t=new oe(e,n,t.selection&&t.selection.map(s),re.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(Jt);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof oe?s:Array.isArray(s)&&1==s.length&&s[0]instanceof oe?s[0]:ce(e,Oe(s),!1)}return t}(s):s)}oe.time=ie.define(),oe.userEvent=ie.define(),oe.addToHistory=ie.define(),oe.remote=ie.define();const ue=[];function Oe(t){return null==t?ue:Array.isArray(t)?t:[t]}var fe=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(fe||(fe={}));const de=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let pe;try{pe=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function me(t){return e=>{if(!/\S/.test(e))return fe.Space;if(function(t){if(pe)return pe.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||de.test(i)))return!0}return!1}(e))return fe.Word;for(let i=0;i-1)return fe.Word;return fe.Other}}class ge{constructor(t,e,i,n,s=null){this.config=t,this.doc=e,this.selection=i,this.values=n,this.applying=null,this.status=t.statusTemplate.slice(),this.applying=s,s&&(s._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(re.reconfigure)?(i=null,n=e.value):e.is(re.appendConfig)&&(i=null,n=Oe(n).concat(e.value));if(i)e=t.startState.values.slice();else{let t=Gt.resolve(n,s,this);i=t.configuration,e=new ge(i,this.doc,this.selection,t.values,null).values}new ge(i,t.newDoc,t.newSelection,e,t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:kt.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],r=Oe(i.effects);for(let i=1;is.spec.fromJSON(r,t))))}return ge.create({doc:t.doc,selection:kt.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let{configuration:e,values:i}=Gt.resolve(t.extensions||[],new Map),n=t.doc instanceof rt?t.doc:rt.of((t.doc||"").split(e.staticFacet(ge.lineSeparator)||dt)),s=t.selection?t.selection instanceof kt?t.selection:kt.single(t.selection.anchor,t.selection.head):kt.single(0);return St(s,n.length),e.staticFacet(Ht)||(s=s.asSingle()),new ge(e,n,s,i)}get tabSize(){return this.facet(ge.tabSize)}get lineBreak(){return this.facet(ge.lineSeparator)||"\n"}get readOnly(){return this.facet(ee)}phrase(t){for(let e of this.facet(ge.phrases))if(Object.prototype.hasOwnProperty.call(e,t))return e[t];return t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(Bt))for(let r of s(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&n.push(r[t]);return n}charCategorizer(t){return me(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-i,o=t-i;for(;r>0;){let t=H(e,r,!1);if(s(e.slice(t,r))!=fe.Word)break;r=t}for(;ot.length?t[0]:4}),ge.lineSeparator=Ft,ge.readOnly=ee,ge.phrases=Wt.define(),ge.languageData=Bt,ge.changeFilter=Kt,ge.transactionFilter=Jt,ge.transactionExtender=te,Et.reconfigure=re.define();class be{eq(t){return this==t}range(t,e=t){return new we(t,e,this)}}be.prototype.startSide=be.prototype.endSide=0,be.prototype.point=!1,be.prototype.mapMode=pt.TrackDel;class we{constructor(t,e,i){this.from=t,this.to=e,this.value=i}}function ye(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ve{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let r=n,o=s.length;;){if(r==o)return r;let n=r+o>>1,a=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==r)return a>=0?r:o;a>=0?o=n:r=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,s);sh||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(o=Math.max(o,h-l)),i.push(c),n.push(l-r),s.push(h-r))}return{mapped:i.length?new ve(n,s,i,o):null,pos:r}}}class xe{constructor(t,e,i=xe.empty,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&e.slice().sort(ye),this.isEmpty)return e.length?xe.of(e):this;let o=new Pe(this,null,-1).goto(0),a=0,l=[],h=new $e;for(;o.value||a=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==o.rangeIndex&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Se.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Se.from(t).goto(e)}static compare(t,e,i,n,s=-1){let r=t.filter((t=>t.maxPoint>=500||!t.isEmpty&&t.maxPoint>=s)),o=e.filter((t=>t.maxPoint>=500||!t.isEmpty&&t.maxPoint>=s)),a=ke(r,o,i),l=new We(r,a,s),h=new We(o,a,s);i.iterGaps(((t,e,i)=>Re(l,t,h,e,i,n))),i.empty&&0==i.length&&Re(l,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=1e9);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=ke(s,r),a=new We(s,o,0).goto(i),l=new We(r,o,0).goto(i);for(;;){if(a.to!=l.to||!Xe(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>n)return!0;a.next(),l.next()}}static spans(t,e,i,n,s=-1){let r=new We(t,null,s).goto(e),o=e,a=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point?(n.point(o,t,r.point,r.activeForPoint(r.to),a),a=r.openEnd(t)+(r.to>t?1:0)):t>o&&(n.span(o,t,r.active,a),a=r.openEnd(t)),r.to>i)break;o=r.to,r.next()}return a}static of(t,e=!1){let i=new $e;for(let n of t instanceof we?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(ye);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}}xe.empty=new xe([],[],null,-1),xe.empty.nextLayer=xe.empty;class $e{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}finishChunk(t){this.chunks.push(new ve(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,t&&(this.from=[],this.to=[],this.value=[])}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new $e)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(xe.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=new xe(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function ke(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Pe(r,e,i,s));return 1==n.length?n[0]:new Se(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Te(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Te(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Te(this.heap,0)}}}function Te(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class We{constructor(t,e,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=Se.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Ae(this.active,t),Ae(this.activeTo,t),Ae(this.activeRank,t),this.minActive=Ze(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Ae(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let s=this.cursor.value;if(s.point){if(!(e&&this.cursor.to==this.to&&this.cursor.fromt&&this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){let e=0;for(;e=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function Re(t,e,i,n,s,r){t.goto(e),i.goto(n);let o=n+s,a=n,l=n-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,n=e<0?t.to+l:i.to,s=Math.min(n,o);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Xe(t.activeForPoint(t.to+l),i.activeForPoint(i.to))||r.comparePoint(a,s,t.point,i.point):s>a&&!Xe(t.active,i.active)&&r.compareRange(a,s,t.active,i.active),n>o)break;a=n,e<=0&&t.next(),e>=0&&i.next()}}function Xe(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function Ze(t,e){let i=-1,n=1e9;for(let s=0;s",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Ye="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),ze="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Le="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),De="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ve="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),qe=Ye&&(De||+Ye[1]<57)||Le&&De,Ee=0;Ee<10;Ee++)_e[48+Ee]=_e[96+Ee]=String(Ee);for(Ee=1;Ee<=24;Ee++)_e[Ee+111]="F"+Ee;for(Ee=65;Ee<=90;Ee++)_e[Ee]=String.fromCharCode(Ee+32),Ue[Ee]=String.fromCharCode(Ee);for(var Me in _e)Ue.hasOwnProperty(Me)||(Ue[Me]=_e[Me]);function Ge(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function je(t,e){return!!e&&t.contains(1!=e.nodeType?e.parentNode:e)}function Ne(t,e){if(!e.anchorNode)return!1;try{return je(t,e.anchorNode)}catch(t){return!1}}function Ie(t){return 3==t.nodeType?oi(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Be(t,e,i,n){return!!i&&(Fe(t,e,i,n,-1)||Fe(t,e,i,n,1))}function He(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Fe(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:Ke(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=He(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?Ke(t):0}}}function Ke(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}const Je={left:0,right:0,top:0,bottom:0};function ti(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function ei(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}class ii{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let ni,si=null;function ri(t){if(t.setActive)return t.setActive();if(si)return t.focus(si);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==si?{get preventScroll(){return si={preventScroll:!0},!0}}:void 0),!si){si=!1;for(let t=0;te)return i.domBoundsAround(t,e,l);if(c>=t&&-1==n&&(n=a,s=l),l>e&&i.dom.parentNode==this.dom){r=a,o=h;break}h=c,l=c+i.breakAfter}return{from:s,to:o<0?i+this.length:o,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=hi){this.markDirty();for(let i=t;ithis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}let[fi,di]="undefined"!=typeof navigator?[navigator,document]:[{userAgent:"",vendor:"",platform:""},{documentElement:{style:{}}}];const pi=/Edge\/(\d+)/.exec(fi.userAgent),mi=/MSIE \d/.test(fi.userAgent),gi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fi.userAgent),Qi=!!(mi||gi||pi),bi=!Qi&&/gecko\/(\d+)/i.test(fi.userAgent),wi=!Qi&&/Chrome\/(\d+)/.exec(fi.userAgent),yi="webkitFontSmoothing"in di.documentElement.style,vi=!Qi&&/Apple Computer/.test(fi.vendor),xi=vi&&(/Mobile\/\w+/.test(fi.userAgent)||fi.maxTouchPoints>2);var $i={mac:xi||/Mac/.test(fi.platform),windows:/Win/.test(fi.platform),linux:/Linux|X11/.test(fi.platform),ie:Qi,ie_version:mi?di.documentMode||6:gi?+gi[1]:pi?+pi[1]:0,gecko:bi,gecko_version:bi?+(/Firefox\/(\d+)/.exec(fi.userAgent)||[0,0])[1]:0,chrome:!!wi,chrome_version:wi?+wi[1]:0,ios:xi,android:/Android\b/.test(fi.userAgent),webkit:yi,safari:vi,webkit_version:yi?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=di.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};const ki=[];class Pi extends ci{become(t){return!1}getSide(){return 0}}Pi.prototype.children=ki;class Si extends Pi{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){return 3==t.nodeType&&(this.createDOM(t),!0)}merge(t,e,i){return(!i||i instanceof Si&&!(this.length-(e-t)+i.length>256))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}slice(t){let e=new Si(this.text.slice(t));return this.text=this.text.slice(0,t),e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new li(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return Wi(this.dom,t,e)}}class Ti extends Pi{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}createDOM(){let t=document.createElement(this.mark.tagName);if(this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);this.setDOM(t)}sync(t){(!this.dom||4&this.dirty)&&this.createDOM(),super.sync(t)}merge(t,e,i,n,s){return(!i||!(!(i instanceof Ti&&i.mark.eq(this.mark))||t&&n<=0||et&&e.push(i=t&&(n=s),i=o,s++}let r=this.length-t;return this.length=t,n>-1&&this.replaceChildren(n,this.children.length),new Ti(this.mark,e,r)}domAtPos(t){return Zi(this.dom,this.children,t)}coordsAt(t,e){return Ui(this,t,e)}}function Wi(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,r=e,o=0;0==e&&i<0||e==n&&i>=0?$i.chrome||$i.gecko||(e?(s--,o=1):(r++,o=-1)):i<0?s--:r++;let a=oi(t,s,r).getClientRects();if(!a.length)return Je;let l=a[(o?o<0:i>=0)?0:a.length-1];return $i.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l),o?ti(l,o<0):l||null}class Ri extends Pi{constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i}static create(t,e,i){return new(t.customView||Ri)(t,e,i)}slice(t){let e=Ri.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,i,n,s){return!(i&&(!(i instanceof Ri&&this.widget.compare(i.widget))||t>0&&n<=0||e0?i.length-1:0;n=i[e],!(t>0?0==e:e==i.length-1||n.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?n:ti(n,0==t)}get isEditable(){return!1}}class Xi extends Ri{domAtPos(t){return new li(this.widget.text,t)}sync(){this.dom||this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){return e?3==t.nodeType?Math.min(e,this.length):this.length:0}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,e){return Wi(this.widget.text,t,e)}get isEditable(){return!0}}class Ai extends Pi{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Ai&&t.side==this.side}slice(){return new Ai(this.side)}sync(){this.dom?this.dirty&&"​"!=this.dom.nodeValue&&(this.dom.nodeValue="​"):this.setDOM(document.createTextNode("​"))}getSide(){return this.side}domAtPos(t){return li.before(this.dom)}domBoundsAround(){return null}coordsAt(t){let e=Ie(this.dom);return e[e.length-1]||null}get overrideDOMText(){return rt.of([this.dom.nodeValue.replace(/\u200b/g,"")])}}function Ci(t,e,i,n,s,r){let o=t.childCursor(),{i:a,off:l}=o.findPos(i,1),{i:h,off:c}=o.findPos(e,-1),u=e-i;for(let t of n)u+=t.length;t.length+=u;let{children:O}=t;if(h==a&&c){let t=O[h];if(1==n.length&&t.merge(c,l,n[0],s,r))return;if(0==n.length)return void t.merge(c,l,null,s,r);let e=t.slice(l);e.merge(0,0,n[n.length-1],0,r)?n[n.length-1]=e:n.push(e),a++,r=l=0}if(l){let t=O[a];n.length&&t.merge(0,l,n[n.length-1],0,r)?(n.pop(),r=n.length?0:s):t.merge(0,l,null,0,0)}else as&&i0;n--){let i=e[n-1].dom;if(i.parentNode==t)return li.after(i)}return new li(t,0)}function _i(t,e,i){let n,{children:s}=t;i>0&&e instanceof Ti&&s.length&&(n=s[s.length-1])instanceof Ti&&n.mark.eq(e.mark)?_i(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Ui(t,e,i){for(let n=0,s=0;s0?a>=e:a>e)&&(e0)){let t=0;if(a==n){if(o.getSide()<=0)continue;t=i=-o.getSide()}let s=o.coordsAt(e-n,i);return t&&s?ti(s,i<0):s}n=a}let n=t.dom.lastChild;if(!n)return t.dom.getBoundingClientRect();let s=Ie(n);return s[s.length-1]||null}function Yi(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}function zi(t,e){if(t==e)return!0;if(!t||!e)return!1;let i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let s of i)if(-1==n.indexOf(s)||t[s]!==e[s])return!1;return!0}function Li(t,e,i){if(e)for(let n in e)i&&n in i||t.removeAttribute(n);if(i)for(let n in i)e&&e[n]==i[n]||t.setAttribute(n,i[n])}class Di{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return!0}get customView(){return null}}var Vi=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Vi||(Vi={}));class qi extends be{constructor(t,e,i,n){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(t){return new Ei(t)}static widget(t){let e=t.side||0,i=!!t.block;return e+=i?e>0?3e8:-4e8:e>0?1e8:-1e8,new Gi(t,e,e,i,t.widget||null,!1)}static replace(t){let e=!!t.block,{start:i,end:n}=ji(t,e);return new Gi(t,e?i?-3e8:-1:4e8,e?n?2e8:1:-5e8,e,t.widget||null,!0)}static line(t){return new Mi(t)}static set(t,e=!1){return xe.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}qi.none=xe.empty;class Ei extends qi{constructor(t){let{start:e,end:i}=ji(t);super(e?-1:4e8,i?1:-5e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof Ei&&this.tagName==t.tagName&&this.class==t.class&&zi(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Ei.prototype.point=!1;class Mi extends qi{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Mi&&zi(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Mi.prototype.mapMode=pt.TrackBefore,Mi.prototype.point=!0;class Gi extends qi{constructor(t,e,i,n,s,r){super(e,i,s,t),this.block=n,this.isReplace=r,this.mapMode=n?e<0?pt.TrackBefore:pt.TrackAfter:pt.TrackDel}get type(){return this.startSide=5}eq(t){return t instanceof Gi&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function ji(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function Ni(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>t?i[s]=Math.max(i[s],e):i.push(t,e)}Gi.prototype.point=!0;class Ii extends ci{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,r){if(i){if(!(i instanceof Ii))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Ci(this,t,e,i?i.children:Bi,s,r),!0}split(t){let e=new Ii;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:i,off:n}=this.childPos(t);n&&(e.append(this.children[i].slice(n),0),this.children[i].merge(n,this.children[i].length,null,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[i-1].parent=null,i--;return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){zi(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){_i(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Yi(e,this.attrs||{})),i&&(this.attrs=Yi(e,{class:i}))}domAtPos(t){return Zi(this.dom,this.children,t)}sync(t){var e;(!this.dom||4&this.dirty)&&(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Li(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let i=this.dom.lastChild;for(;i&&ci.get(i)instanceof Ti;)i=i.lastChild;if(!i||"BR"!=i.nodeName&&0==(null===(e=ci.get(i))||void 0===e?void 0:e.isEditable)&&(!$i.ios||!this.children.some((t=>t instanceof Si)))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof Si))return null;let i=Ie(e.dom);if(1!=i.length)return null;t+=i[0].width}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return Ui(this,t,e)}match(t){return!1}get type(){return Vi.Text}static find(t,e){for(let i=0,n=0;;i++){let s=t.children[i],r=n+s.length;if(r>=e){if(s instanceof Ii)return s;if(s.length)return null}n=r+s.breakAfter}}}const Bi=[];class Hi extends ci{constructor(t,e,i){super(),this.widget=t,this.length=e,this.type=i,this.breakAfter=0}merge(t,e,i,n,s,r){return!(i&&(!(i instanceof Hi&&this.widget.compare(i.widget))||t>0&&s<=0||e0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e),this.getLine().append(Ki(new Si(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s){let r=e-t;if(i instanceof Gi)if(i.block){let{type:t}=i;t!=Vi.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Hi(i.widget||new Ji("div"),r,t))}else{let o=Ri.create(i.widget||new Ji("span"),r,i.startSide),a=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),l=!o.isEditable&&(tt.map(e)}),hn=re.define({map:(t,e)=>t.map(e)});function cn(t,e,i){let n=t.facet(rn);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const un=Wt.define({combine:t=>!t.length||t[0]});class On{constructor(t,e){this.field=t,this.get=e}}class fn{from(t){return new On(this,t)}static define(){return new fn}}fn.decorations=fn.define(),fn.atomicRanges=fn.define(),fn.scrollMargins=fn.define();let dn=0;const pn=Wt.define();class mn{constructor(t,e,i){this.id=t,this.create=e,this.fields=i,this.extension=pn.of(this)}static define(t,e){let{eventHandlers:i,provide:n,decorations:s}=e||{},r=[];if(n)for(let t of Array.isArray(n)?n:[n])r.push(t);return i&&r.push(gn.from((t=>({plugin:t,handlers:i})))),s&&r.push(fn.decorations.from(s)),new mn(dn++,t,r)}static fromClass(t,e){return mn.define((e=>new t(e)),e)}}const gn=fn.define();class Qn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}takeField(t,e){if(this.spec)for(let{field:i,get:n}of this.spec.fields)i==t&&e.push(n(this.value))}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(cn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){cn(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){cn(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const bn=Wt.define(),wn=Wt.define(),yn=Wt.define(),vn=Wt.define();class xn{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new xn(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!a)return i;new xn(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),r=a.toA,o=a.toB}}}class $n{constructor(t,e,i=tn){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=gt.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new xn(t,e,i,s)))),this.changedRanges=n;let s=t.hasFocus;s!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=s,this.flags|=1),this.docChanged&&(this.flags|=2)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class kn extends ci{constructor(t){super(),this.view=t,this.compositionDeco=qi.none,this.decorations=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Ii],this.children[0].setParent(this),this.updateInner([new xn(0,0,0,t.state.doc.length)],this.updateDeco(),0)}get root(){return this.view.root}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let e=t.changedRanges;this.minWidth>0&&e.length&&(e.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=0),this.view.inputState.composing<0?this.compositionDeco=qi.none:t.transactions.length&&(this.compositionDeco=function(t,e){let i=t.observer.selectionRange,n=i.focusNode&&Tn(i.focusNode,i.focusOffset,0);if(!n)return qi.none;let s,r,o=t.docView.nearest(n),a=n;if(o instanceof Pi){for(;o.parent instanceof Pi;)o=o.parent;s=o.posAtStart,r=s+o.length,a=o.dom}else{if(!(o instanceof Ii))return qi.none;{for(;a.parentNode!=o.dom;)a=a.parentNode;let t=a.previousSibling;for(;t&&!ci.get(t);)t=t.previousSibling;s=r=t?ci.get(t).posAtEnd:o.posAtStart}}let l=e.mapPos(s,1),h=Math.max(l,e.mapPos(r,-1)),c=n.nodeValue,{state:u}=t;if(h-lthis.view.docView.sync())),this.dirty=0,this.updateSelection(!0)):this.updateSelection()}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.minWidth=this.minWidth?this.minWidth+"px":"";let t=$i.chrome||$i.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(t),this.dirty=0,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""}));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?t[i]:null;if(!s)break;let{fromA:r,toA:o,fromB:a,toB:l}=s,{content:h,breakAtStart:c,openStart:u,openEnd:O}=Fi.build(this.view.state.doc,a,l,e),{i:f,off:d}=n.findPos(o,1),{i:p,off:m}=n.findPos(r,-1);this.replaceRange(p,m,f,d,h,c,u,O)}}replaceRange(t,e,i,n,s,r,o,a){let l=this.children[t],h=s.length?s[s.length-1]:null,c=h?h.breakAfter:r;if(t==i&&!r&&!c&&s.length<2&&l.merge(e,n,s.length?h:null,0==e,o,a))return;let u=this.children[i];for(n0&&(!r&&s.length&&l.merge(e,l.length,s[0],!1,o,0)?l.breakAfter=s.shift().breakAfter:(es.node.insertBefore(t,s.node.childNodes[s.offset]||null))),s=r=new li(t,0),i=!0}var o;let a=this.view.observer.selectionRange;!i&&a.focusNode&&Be(s.node,s.offset,a.anchorNode,a.anchorOffset)&&Be(r.node,r.offset,a.focusNode,a.focusOffset)||(this.view.observer.ignore((()=>{$i.android&&$i.chrome&&this.dom.contains(a.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(a.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Ge(this.root);if(n.empty){if($i.gecko){let t=(e=s.node,i=s.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(in.head&&([s,r]=[r,s]),e.setEnd(r.node,r.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}var e,i})),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new li(a.anchorNode,a.anchorOffset),this.impreciseHead=r.precise?null:new li(a.focusNode,a.focusOffset)}enforceCursorAssoc(){if(this.view.composing)return;let t=this.view.state.selection.main,e=Ge(this.root);if(!t.empty||!t.assoc||!e.modify)return;let i=Ii.find(this,t.head);if(!i)return;let n=i.posAtStart;if(t.head==n||t.head==n+i.length)return;let s=this.coordsAt(t.head,-1),r=this.coordsAt(t.head,1);if(!s||!r||s.bottom>r.top)return;let o=this.domAtPos(t.head+t.assoc);e.collapse(o.node,o.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){return this.view.state.facet(un)?this.root.activeElement==this.dom:Ne(this.dom,this.view.observer.selectionRange)}nearest(t){for(let e=t;e;){let t=ci.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;er||t==r&&s.type!=Vi.WidgetBefore&&s.type!=Vi.WidgetAfter&&(!n||2==e||this.children[n-1].breakAfter||this.children[n-1].type==Vi.WidgetBefore&&e>-2))return s.coordsAt(t-r,e);i=r}}measureVisibleLineHeights(){let t=[],{from:e,to:i}=this.view.viewState.viewport,n=Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1;for(let s=0,r=0;ri)break;if(s>=e){t.push(o.dom.getBoundingClientRect().height);let e=o.dom.scrollWidth;e>n&&(this.minWidth=n=e,this.minWidthFrom=s,this.minWidthTo=a)}s=a+o.breakAfter}return t}measureTextSize(){for(let t of this.children)if(t instanceof Ii){let e=t.measureTextSize();if(e)return e}let t,e,i=document.createElement("div");return i.className="cm-line",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(i);let n=Ie(i.firstChild)[0];t=i.getBoundingClientRect().height,e=n?n.width/27:7,i.remove()})),{lineHeight:t,charWidth:e}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Oi(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],r=s?s.from-1:this.length;if(r>i){let n=e.lineBlockAt(r).bottom-e.lineBlockAt(i).top;t.push(qi.replace({widget:new Pn(n),block:!0,inclusive:!0}).range(i,r))}if(!s)break;i=s.to+1}return qi.set(t)}updateDeco(){return this.decorations=[...this.view.pluginField(fn.decorations),...this.view.state.facet(yn),this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView({range:t,center:e}){let i,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1);if(!n)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let s=0,r=0,o=0,a=0;for(let t of this.view.pluginField(fn.scrollMargins))if(t){let{left:e,right:i,top:n,bottom:l}=t;null!=e&&(s=Math.max(s,e)),null!=i&&(r=Math.max(r,i)),null!=n&&(o=Math.max(o,n)),null!=l&&(a=Math.max(a,l))}!function(t,e,i,n){let s=t.ownerDocument,r=s.defaultView;for(let o=t;o;)if(1==o.nodeType){let t,a=o==s.body;if(a)t=ei(r);else{if(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth){o=o.parentNode;continue}let e=o.getBoundingClientRect();t={left:e.left,right:e.left+o.clientWidth,top:e.top,bottom:e.top+o.clientHeight}}let l=0,h=0;if(n){let n,s=e.bottom-e.top,r=t.bottom-t.top;n=s<=r?e.top+s/2-r/2:i<0?e.top-5:e.bottom+5-r,h=n-t.top,Math.abs(h)<=1&&(h=0)}else e.top0&&e.bottom>t.bottom+h&&(h=e.bottom-t.bottom+h+5)):e.bottom>t.bottom&&(h=e.bottom-t.bottom+5,i<0&&e.top-h0&&e.right>t.right+l&&(l=e.right-t.right+l+5)):e.right>t.right&&(l=e.right-t.right+5,i<0&&e.left0&&i<=0)e=Ke(t=t.childNodes[e-1]);else{if(!(1==t.nodeType&&e=0))return null;t=t.childNodes[e],e=0}}}class Wn{constructor(){this.changes=[]}compareRange(t,e){Ni(t,e,this.changes)}comparePoint(t,e){Ni(t,e,this.changes)}}var Rn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Rn||(Rn={}));const Xn=Rn.LTR,An=Rn.RTL;function Cn(t){let e=[];for(let i=0;i=e){if(o.level==i)return r;(s<0||(0!=n?n<0?o.frome:t[s].level>o.level))&&(s=r)}}if(s<0)throw new RangeError("Index out of range");return s}}const Dn=[];function Vn(t){return[new Ln(0,t,0)]}let qn="";function En(t,e,i,n,s){var r;let o=n.head-t.from,a=-1;if(0==o){if(!s||!t.length)return null;e[0].level!=i&&(o=e[0].side(!1,i),a=0)}else if(o==t.length){if(s)return null;let t=e[e.length-1];t.level!=i&&(o=t.side(!0,i),a=e.length-1)}a<0&&(a=Ln.find(e,o,null!==(r=n.bidiLevel)&&void 0!==r?r:-1,n.assoc));let l=e[a];o==l.side(s,i)&&(l=e[a+=s?1:-1],o=l.side(!s,i));let h=s==(l.dir==i),c=H(t.text,o,h);if(qn=t.text.slice(Math.min(o,c),Math.max(o,c)),c!=l.side(s,i))return kt.cursor(c+t.from,h?-1:1,l.level);let u=a==(s?e.length-1:0)?null:e[a+(s?1:-1)];return u||l.level==i?u&&u.levelt?e.left-t:Math.max(0,t-e.right)}function Gn(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function jn(t,e){return t.tope.top+1}function Nn(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Bn(t,e,i){let n,s,r,o,a,l,h,c;for(let u=t.firstChild;u;u=u.nextSibling){let t=Ie(u);for(let O=0;Op||o==p&&r>d)&&(n=u,s=f,r=d,o=p),0==d?i>f.bottom&&(!h||h.bottomf.top)&&(l=u,c=f):h&&jn(h,f)?h=In(h,f.bottom):c&&jn(c,f)&&(c=Nn(c,f.top))}}if(h&&h.bottom>=i?(n=a,s=h):c&&c.top<=i&&(n=l,s=c),!n)return{node:t,offset:0};let u=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Hn(n,u,i):r||"true"!=n.contentEditable?{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}:Bn(n,u,i)}function Hn(t,e,i){let n=t.nodeValue.length,s=-1,r=1e9,o=0;for(let a=0;ai?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if($i.chrome||$i.gecko){oi(t,a).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:a+(n?1:0)};s=a+(n?1:0),r=c}}}return{node:t,offset:s>-1?s:o>0?t.nodeValue.length:0}}function Fn(t,{x:e,y:i},n,s=-1){var r;let o,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,h=t.defaultLineHeight/2,c=i-l;for(let e=!1;;){if(o=t.elementAtHeight(c),o.top>c||o.bottomc?-1:1,c=Math.min(o.bottom-h,Math.max(o.top+h,c)),e)return n?null:0;e=!0}if(o.type==Vi.Text)break;c=s>0?o.bottom+h:o.top-h}i=l+c;let u=o.from;if(e=Math.max(a.left+1,Math.min(Math.max(a.right,a.left+t.docView.minWidth)-1,e)),ut.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:Kn(t,a,o,e,i);let O,f=t.dom.ownerDocument,d=(t.root.elementFromPoint?t.root:f).elementFromPoint(e,i),p=-1;if(d&&t.contentDOM.contains(d)&&0!=(null===(r=t.docView.nearest(d))||void 0===r?void 0:r.isEditable))if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(e,i);t&&({offsetNode:O,offset:p}=t)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(e,i);t&&(({startContainer:O,startOffset:p}=t),$i.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return oi(t,n-1,n).getBoundingClientRect().left>i}(O,p,e)&&(O=void 0))}if(!O||!t.docView.dom.contains(O)){let n=Ii.find(t.docView,u);({node:O,offset:p}=Bn(n.dom,e,i))}return t.docView.posFromDOM(O,p)}function Kn(t,e,i,n,s){let r=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){r+=Math.floor((s-i.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+function(t,e,i,n){for(let n=0,s=0;;){if(s>=e)return n;if(n==t.length)break;s+=9==t.charCodeAt(n)?i-s%i:1,n=H(t,n)}return!0===n?-1:t.length}(o,r,t.state.tabSize)}function Jn(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=t.bidiSpans(s);for(let o=e,a=null;;){let e=En(s,r,t.textDirection,o,i),l=qn;if(!e){if(s.number==(i?t.state.doc.lines:1))return o;l="\n",s=t.state.doc.line(s.number+(i?1:-1)),r=t.bidiSpans(s),e=kt.cursor(i?s.from:s.to)}if(a){if(!a(l))return o}else{if(!n)return e;a=n(l)}o=e}}function ts(t,e,i){let n=t.pluginField(fn.atomicRanges);for(;;){let t=!1;for(let s of n)s.between(i.from-1,i.from+1,((n,s,r)=>{i.from>n&&i.fromi.from?kt.cursor(n,1):kt.cursor(s,-1),t=!0)}));if(!t)return i}}class es{constructor(t){this.lastKeyCode=0,this.lastKeyTime=0,this.pendingAndroidKey=void 0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let e in os){let i=os[e];t.contentDOM.addEventListener(e,(n=>{"keydown"==e&&this.keydown(t,n)||rs(t,n)&&!this.ignoreDuringComposition(n)&&(this.mustFlushObserver(n)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,n)?n.preventDefault():i(t,n))})),this.registeredEvents.push(e)}this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),$i.safari&&t.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t){let e=this.customHandlers=t.pluginField(gn);for(let i of e)for(let e in i.handlers)this.registeredEvents.indexOf(e)<0&&"scroll"!=e&&(this.registeredEvents.push(e),t.contentDOM.addEventListener(e,(i=>{rs(t,i)&&this.runCustomHandlers(e,t,i)&&i.preventDefault()})))}runCustomHandlers(t,e,i){for(let n of this.customHandlers){let s=n.handlers[t],r=!1;if(s){try{r=s.call(n.plugin,i,e)}catch(t){cn(e.state,t)}if(r||i.defaultPrevented)return $i.android&&"keydown"==t&&13==i.keyCode&&e.observer.flushSoon(),!0}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let n=i.handlers.scroll;if(n)try{n.call(i.plugin,e,t)}catch(e){cn(t.state,e)}}}keydown(t,e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),this.screenKeyEvent(t,e))return!0;let i;return!(!$i.ios||!(i=is.find((t=>t.keyCode==e.keyCode)))||e.ctrlKey||e.altKey||e.metaKey||e.synthetic)&&(this.pendingIOSKey=i,setTimeout((()=>this.flushIOSKey(t)),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,ai(t.contentDOM,e.key,e.keyCode))}setPendingAndroidKey(t,e){this.pendingAndroidKey=e,requestAnimationFrame((()=>{let e=this.pendingAndroidKey;if(!e)return;this.pendingAndroidKey=void 0,t.observer.processRecords();let i=t.state;ai(t.contentDOM,e.key,e.keyCode),t.state==i&&t.docView.reset(!0)}))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!($i.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}screenKeyEvent(t,e){let i=9==e.keyCode&&Date.now()=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(e,i)||1!=bs(i))&&null,!1===this.dragging&&(i.preventDefault(),this.select(i))}move(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.inputState.mouseSelection=null}select(t){let e=this.style.get(t,this.extend,this.multiple);e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0})}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}function rs(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=ci.get(n))&&i.ignoreEvent(e))return!1;return!0}const os=Object.create(null),as=$i.ie&&$i.ie_version<15||$i.ios&&$i.webkit_version<604;function ls(t,e){let i,{state:n}=t,s=1,r=n.toText(e),o=r.lines==n.selection.ranges.length;if(null!=ys&&n.selection.ranges.every((t=>t.empty))&&ys==r.toString()){let t=-1;i=n.changeByRange((i=>{let a=n.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=n.toText((o?r.line(s++).text:e)+n.lineBreak);return{changes:{from:a.from,insert:l},range:kt.cursor(i.from+l.length)}}))}else i=o?n.changeByRange((t=>{let e=r.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:kt.cursor(t.from+e.length)}})):n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}os.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select")};let hs=0;function cs(t,e,i,n){if(1==n)return kt.cursor(e,i);if(2==n)return function(t,e,i=1){let n=t.charCategorizer(e),s=t.doc.lineAt(e),r=e-s.from;if(0==s.length)return kt.cursor(e);0==r?i=1:r==s.length&&(i=-1);let o=r,a=r;i<0?o=H(s.text,r,!1):a=H(s.text,r);let l=n(s.text.slice(o,a));for(;o>0;){let t=H(s.text,o,!1);if(n(s.text.slice(t,o))!=l)break;o=t}for(;a{hs=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},os.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},os.mousedown=(t,e)=>{if(t.observer.flush(),hs>Date.now()-2e3)return;let i=null;for(let n of t.state.facet(sn))if(i=n(t,e),i)break;i||0!=e.button||(i=function(t,e){let i=ds(t,e),n=bs(e),s=t.state.selection,r=i,o=e;return{update(t){t.docChanged&&(i&&(i.pos=t.changes.mapPos(i.pos)),s=s.map(t.changes),o=null)},get(e,a,l){let h;if(o&&e.clientX==o.clientX&&e.clientY==o.clientY?h=r:(h=r=ds(t,e),o=e),!h||!i)return s;let c=cs(t,h.pos,h.bias,n);if(i.pos!=h.pos&&!a){let e=cs(t,i.pos,i.bias,n),s=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=sri(t.contentDOM))),t.inputState.startMouseSelection(t,e,i))};let us=(t,e)=>t>=e.top&&t<=e.bottom,Os=(t,e,i)=>us(e,i)&&t>=i.left&&t<=i.right;function fs(t,e,i,n){let s=Ii.find(t.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(0==r)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Os(i,n,o))return-1;let a=s.coordsAt(r,1);return a&&Os(i,n,a)?1:o&&us(n,o)?-1:1}function ds(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:fs(t,i,e.clientX,e.clientY)}}const ps=$i.ie&&$i.ie_version<=11;let ms=null,gs=0,Qs=0;function bs(t){if(!ps)return t.detail;let e=ms,i=Qs;return ms=t,Qs=Date.now(),gs=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(gs+1)%3:1}function ws(t,e,i,n){let s=t.posAtCoords({x:e.clientX,y:e.clientY});if(null==s||!i)return;e.preventDefault();let{mouseSelection:r}=t.inputState,o=n&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,a={from:s,insert:i},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(s,-1),head:l.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}os.dragstart=(t,e)=>{let{selection:{main:i}}=t.state,{mouseSelection:n}=t.inputState;n&&(n.dragging=i),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove")},os.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let n=Array(i.length),s=0,r=()=>{++s==i.length&&ws(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),r()},e.readAsText(i[t])}}else ws(t,e,e.dataTransfer.getData("Text"),!0)},os.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=as?null:e.clipboardData;i?(ls(t,i.getData("text/plain")),e.preventDefault()):function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),ls(t,i.value)}),50)}(t)};let ys=null;function vs(t,e){if(t.docView.compositionDeco.size){t.inputState.rapidCompositionStart=e;try{t.update([])}finally{t.inputState.rapidCompositionStart=!1}}}os.copy=os.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let r=t.doc.lineAt(n);r.number>s&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),s=r.number}n=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:n}}(t.state);if(!i&&!s)return;ys=s?i:null;let r=as?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",i)):function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"})},os.focus=os.blur=t=>{setTimeout((()=>{t.hasFocus!=t.inputState.notifiedFocused&&t.update([])}),10)},os.beforeprint=t=>{t.viewState.printing=!0,t.requestMeasure(),setTimeout((()=>{t.viewState.printing=!1,t.requestMeasure()}),2e3)},os.compositionstart=os.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.docView.compositionDeco.size&&(t.observer.flush(),vs(t,!0)),t.inputState.composing=0)},os.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout((()=>{t.inputState.composing<0&&vs(t,!1)}),50)},os.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},os.beforeinput=(t,e)=>{var i;let n;if($i.chrome&&$i.android&&(n=is.find((t=>t.inputType==e.inputType)))&&(t.inputState.setPendingAndroidKey(t,n),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}};const xs=["pre-wrap","normal","pre-line","break-spaces"];class $s{constructor(){this.doc=rt.empty,this.lineWrapping=!1,this.direction=Rn.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForStyle(t,e){return xs.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,a=Math.round(i)!=Math.round(this.lineHeight)||this.lineWrapping!=o||this.direction!=e;if(this.lineWrapping=o,this.direction=e,this.lineHeight=i,this.charWidth=n,this.lineLength=s,a){this.heightSamples={};for(let t=0;te.moveY(t))):this.type):this}}var Ss=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Ss||(Ss={}));class Ts{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return Ts.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this;for(let r=n.length-1;r>=0;r--){let{fromA:o,toA:a,fromB:l,toB:h}=n[r],c=s.lineAt(o,Ss.ByPosNoHeight,e,0,0),u=c.to>=a?c:s.lineAt(a,Ss.ByPosNoHeight,e,0,0);for(h+=u.to-a,a=u.to;r>0&&c.from<=n[r-1].toA;)o=n[r-1].fromA,l=n[r-1].fromB,r--,o2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n0){let t=i[i.length-1];t instanceof Xs?i[i.length-1]=new Xs(t.length+n):i.push(null,new Xs(n-1))}if(t>0){let e=i[0];e instanceof Xs?i[0]=new Xs(t+e.length):i.unshift(new Xs(t-1),null)}return Ts.of(i)}decomposeLeft(t,e){e.push(new Xs(t-1),null)}decomposeRight(t,e){e.push(null,new Xs(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],r=Math.max(e,n.from),o=-1,a=t.heightChanged;for(n.from>e&&i.push(new Xs(n.from-e-1).updateHeight(t,e));r<=s&&n.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==o?o=s:Math.abs(s-o)>=.001&&(o=-2);let a=new Rs(e,s);a.outdated=!1,i.push(a),r+=e+1}r<=s&&i.push(null,new Xs(s-r).updateHeight(t,r));let l=Ts.of(i);return t.heightChanged=a||o<0||Math.abs(l.height-this.height)>=.001||Math.abs(o-this.lines(t.doc,e).lineHeight)>=.001,l}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class As extends Ts{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return to))return l;let h=e==Ss.ByPosNoHeight?Ss.ByPosNoHeight:Ss.ByPos;return a?l.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,n,s).join(l)}forEachLine(t,e,i,n,s,r){let o=n+this.left.height,a=s+this.left.length+this.break;if(this.break)t=a&&this.right.forEachLine(t,e,i,o,a,r);else{let l=this.lineAt(a,Ss.ByPos,i,n,s);t=t&&l.from<=e&&r(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,o,a,r)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let r=s.length;for(let t of i)s.push(t);if(t>0&&Cs(s,r-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Ts.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:r}=this,o=e+s.length+this.break,a=null;return n&&n.from<=e+s.length&&n.more?a=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=o+r.length&&n.more?a=r=r.updateHeight(t,o,i,n):r.updateHeight(t,o,i),a?this.balanced(s,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Cs(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Xs&&(n=t[e+1])instanceof Xs&&t.splice(e-1,3,new Xs(i.length+1+n.length))}class Zs{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Rs?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Rs(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Rs(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Xs(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Rs)return t;let e=new Rs(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine(),t.type!=Vi.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=Vi.WidgetBefore&&(this.covering=t)}addLineDeco(t,e){let i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Rs||this.isCovered?(this.writtenTot.draw(!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new Ds(e,i))}}this.viewports=t.sort(((t,e)=>t.from-e.from)),this.scaler=this.heightMap.height<=7e6?js:new Ns(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(t=>{this.viewportLines.push(1==this.scaler.scale?t:Is(t,this.scaler))}))}update(t,e=null){let i=this.state;this.state=t.state;let n=this.state.facet(yn),s=t.changedRanges,r=xn.extendWithRanges(s,function(t,e,i){let n=new _s;return xe.compare(t,e,i,n,0),n.changes}(t.startState.facet(yn),n,t?t.changes:gt.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(n,i.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(t.flags|=2);let a=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=!t.changes.empty||2&t.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,l&&this.updateViewportLines(),this.updateForViewport(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),n=this.heightOracle,s=i.whiteSpace,r="rtl"==i.direction?Rn.RTL:Rn.LTR,o=this.heightOracle.mustRefreshForStyle(s,r),a=o||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight,l=0,h=0;if(a){this.mustMeasureContent=!1,this.contentDOMHeight=e.clientHeight;let t=parseInt(i.paddingTop)||0,n=parseInt(i.paddingBottom)||0;this.paddingTop==t&&this.paddingBottom==n||(l|=8,this.paddingTop=t,this.paddingBottom=n)}let c=this.printing?{top:-1e8,bottom:1e8,left:-1e8,right:1e8}:function(t,e){let i=t.getBoundingClientRect(),n=Math.max(0,i.left),s=Math.min(innerWidth,i.right),r=Math.max(0,i.top),o=Math.min(innerHeight,i.bottom),a=t.ownerDocument.body;for(let e=t.parentNode;e&&e!=a;)if(1==e.nodeType){let t=e,i=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=i.overflow){let e=t.getBoundingClientRect();n=Math.max(n,e.left),s=Math.min(s,e.right),r=Math.max(r,e.top),o=Math.min(o,e.bottom)}e="absolute"==i.position||"fixed"==i.position?t.offsetParent:t.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-i.left,right:s-i.left,top:r-(i.top+e),bottom:o-(i.top+e)}}(e,this.paddingTop),u=c.top-this.pixelViewport.top,O=c.bottom-this.pixelViewport.bottom;if(this.pixelViewport=c,this.inView=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left,!this.inView)return 0;if(a){let i=t.docView.measureVisibleLineHeights();n.mustRefreshForHeights(i)&&(o=!0);let a=e.clientWidth;if(o||n.lineWrapping&&Math.abs(a-this.contentDOMWidth)>n.charWidth){let{lineHeight:e,charWidth:h}=t.docView.measureTextSize();o=n.refresh(s,r,e,h,a/h,i),o&&(t.docView.minWidth=0,l|=8)}this.contentDOMWidth!=a&&(this.contentDOMWidth=a,l|=8),this.editorHeight!=t.scrollDOM.clientHeight&&(this.editorHeight=t.scrollDOM.clientHeight,l|=8),u>0&&O>0?h=Math.max(u,O):u<0&&O<0&&(h=Math.min(u,O)),n.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(n,0,o,new ks(this.viewport.from,i)),n.heightChanged&&(l|=2)}let f=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return f&&(this.viewport=this.getViewport(h,this.scrollTarget)),(2&l||f)&&this.updateViewportLines(),this.updateForViewport(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.state.doc,{visibleTop:r,visibleBottom:o}=this,a=new Ds(n.lineAt(r-1e3*i,Ss.ByHeight,s,0,0).from,n.lineAt(o+1e3*(1-i),Ss.ByHeight,s,0,0).to);if(e){let{head:t}=e.range,i=o-r;if(ta.to){let r,o=n.lineAt(t,Ss.ByPos,s,0,0);r=e.center?(o.top+o.bottom)/2-i/2:t=o+Math.max(10,Math.min(i,250)))&&n>r-2e3&&si.from&&o.push({from:i.from,to:n}),s=i.from&&a.from<=i.to&&Ms(o,a.from-10,a.from+10),!a.empty&&a.to>=i.from&&a.to<=i.to&&Ms(o,a.to-10,a.to+10);for(let{from:n,to:s}of o)s-n>1e3&&e.push(Gs(t,(t=>t.from>=i.from&&t.to<=i.to&&Math.abs(t.from-n)<1e3&&Math.abs(t.to-s)<1e3))||new Us(n,s,this.gapSize(i,n,s,r)))}return e}gapSize(t,e,i,n){let s=Es(n,i)-Es(n,e);return this.heightOracle.lineWrapping?t.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(t){Us.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=qi.set(t.map((t=>t.draw(this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.state.facet(yn);this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];xe.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Is(this.heightMap.lineAt(t,Ss.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return Is(this.heightMap.lineAt(this.scaler.fromDOM(t),Ss.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return Is(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get contentHeight(){return this.scaler.toDOM(this.heightMap.height)+this.paddingTop+this.paddingBottom}}class Ds{constructor(t,e){this.from=t,this.to=e}}function Vs(t,e,i){let n=[],s=t,r=0;return xe.spans(i.facet(yn),t,e,{span(){},point(t,e){t>s&&(n.push({from:s,to:t}),r+=t-s),s=e}},20),s=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],r=s-i;if(n<=r)return i+n;n-=r}}function Es(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}function Ms(t,e,i){for(let n=0;ne){let r=[];s.fromi&&r.push({from:i,to:s.to}),t.splice(n,1,...r),n+=r.length-1}}}function Gs(t,e){for(let i of t)if(e(i))return i}const js={toDOM:t=>t,fromDOM:t=>t,scale:1};class Ns{constructor(t,e,i){let n=0,s=0,r=0;this.viewports=i.map((({from:i,to:s})=>{let r=e.lineAt(i,Ss.ByPos,t,0,0).top,o=e.lineAt(s,Ss.ByPos,t,0,0).bottom;return n+=o-r,{from:i,to:s,top:r,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=r+(t.top-s)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=eIs(t,e))):t.type)}const Bs=Wt.define({combine:t=>t.join(" ")}),Hs=Wt.define({combine:t=>t.indexOf(!0)>-1}),Fs=M.newName(),Ks=M.newName(),Js=M.newName(),tr={"&light":"."+Ks,"&dark":"."+Js};function er(t,e,i){return new M(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const ir=er("."+Fs,{"&.cm-editor":{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},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none",display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-placeholder":{color:"#888",display:"inline-block"},".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"}},tr),nr={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sr=$i.ie&&$i.ie_version<=11;class rr{constructor(t,e,i){this.view=t,this.onChange=e,this.onScrollChanged=i,this.active=!1,this.selectionRange=new ii,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);($i.ie&&$i.ie_version<=11||$i.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),sr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver((()=>{this.view.docView.lastUpdate{this.resizeTimeout=-1,this.view.requestMeasure()}),50))})),this.resize.observe(t.scrollDOM)),this.start(),this.onScroll=this.onScroll.bind(this),window.addEventListener("scroll",this.onScroll),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){if(!this.readSelectionRange())return;let{view:e}=this,i=this.selectionRange;if(e.state.facet(un)?e.root.activeElement!=this.dom:!Ne(e.dom,i))return;let n=i.anchorNode&&e.docView.nearest(i.anchorNode);n&&n.ignoreEvent(t)||($i.ie&&$i.ie_version<=11&&!e.state.selection.main.empty&&i.focusNode&&Be(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{root:t}=this.view,e=Ge(t),i=$i.safari&&11==t.nodeType&&function(){let t=document.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){let e=null;function i(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),!e)return null;let n=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);Be(a.node,a.offset,r,o)&&([n,s,r,o]=[r,o,n,s]);return{anchorNode:n,anchorOffset:s,focusNode:r,focusOffset:o}}(this.view)||e;return!this.selectionRange.eq(i)&&(this.selectionRange.setRange(i),this.selectionChanged=!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t{this.delayedFlush=-1,this.flush()}),20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}processRecords(){let t=this.queue;for(let e of this.observer.takeRecords())t.push(e);t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}flush(t=!0){if(t&&this.readSelectionRange(),this.delayedFlush>=0||this.view.inputState.pendingAndroidKey)return;let{from:e,to:i,typeOver:n}=this.processRecords(),s=this.selectionChanged&&Ne(this.dom,this.selectionRange);if(e<0&&!s)return;this.selectionChanged=!1;let r=this.view.state;this.onChange(e,i,n),this.view.state==r&&this.view.docView.reset(s)}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){let i=or(e,t.previousSibling||t.target.previousSibling,-1),n=or(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resize)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);window.removeEventListener("scroll",this.onScroll),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function or(t,e,i){for(;e;){let n=ci.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function ar(t,e,i,n){let s,r,o=t.state.selection.main;if(e>-1){let n=t.docView.domBoundsAround(e,i,0);if(!n||t.state.readOnly)return;let{from:a,to:l}=n,h=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new cr(i,n)),s==i&&r==n||e.push(new cr(s,r)));return e}(t),c=new lr(h,t);c.readRange(n.startDOM,n.endDOM),r=function(t,e){if(0==t.length)return null;let i=t[0].pos,n=2==t.length?t[1].pos:i;return i>-1&&n>-1?kt.single(i+e,n+e):null}(h,a);let u=o.from,O=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||$i.android&&c.text.length0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if("end"==n){i-=o+Math.max(0,r-Math.min(o,a))-r}if(o=o?r-i:0,a=r+(a-o),o=r}else if(a=a?r-i:0,o=r+(o-a),a=r}return{from:r,toA:o,toB:a}}(t.state.sliceDoc(a,l),c.text,u-a,O);f&&(s={from:a+f.from,to:a+f.toA,insert:t.state.toText(c.text.slice(f.from,f.toB))})}else if(t.hasFocus||!t.state.facet(un)){let e=t.observer.selectionRange,{impreciseHead:i,impreciseAnchor:n}=t.docView,s=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!je(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),a=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!je(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);s==o.head&&a==o.anchor||(r=kt.single(a,s))}if(s||r)if(!s&&n&&!o.empty&&r&&r.main.empty?s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:s&&s.from>=o.from&&s.to<=o.to&&(s.from!=o.from||s.to!=o.to)&&o.to-o.from-(s.to-s.from)<=4&&(s={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,s.from).append(s.insert).append(t.state.doc.slice(s.to,o.to))}),s){let e=t.state;if($i.ios&&t.inputState.flushIOSKey(t))return;let i,n=s.insert.toString();if(t.state.facet(an).some((e=>e(t,s.from,s.to,n))))return;if(t.inputState.composing>=0&&t.inputState.composing++,s.from>=o.from&&s.to<=o.to&&s.to-s.from>=(o.to-o.from)/3&&(!r||r.main.empty&&r.main.from==s.from+s.insert.length)){let n=o.froms.to?e.sliceDoc(s.to,o.to):"";i=e.replaceSelection(t.state.toText(n+s.insert.sliceString(0,void 0,t.state.lineBreak)+r))}else{let t=e.changes(s);i={changes:t,selection:r&&!e.selection.main.eq(r.main)&&r.main.to<=t.newLength?e.selection.replaceRange(r.main):void 0}}let a="input.type";t.composing&&(a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(i,{scrollIntoView:!0,userEvent:a})}else if(r&&!r.main.eq(o)){let e=!1,i="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i})}}class lr{constructor(t,e){this.points=t,this.view=e,this.text="",this.lineBreak=e.state.lineBreak}readRange(t,e){if(!t)return;let i=t.parentNode;for(let n=t;;){this.findPointBefore(i,n),this.readNode(n);let t=n.nextSibling;if(t==e)break;let s=ci.get(n),r=ci.get(t);(s&&r?s.breakAfter:(s?s.breakAfter:hr(n))||hr(t)&&("BR"!=n.nodeName||n.cmIgnore))&&(this.text+=this.lineBreak),n=t}this.findPointBefore(i,e)}readNode(t){if(t.cmIgnore)return;let e,i=ci.get(t),n=i&&i.overrideDOMText;null!=n?e=n.sliceString(0,void 0,this.lineBreak):3==t.nodeType?e=t.nodeValue:"BR"==t.nodeName?e=t.nextSibling?this.lineBreak:"":1==t.nodeType&&this.readRange(t.firstChild,null),null!=e&&(this.findPointIn(t,e.length),this.text+=e,$i.chrome&&13==this.view.inputState.lastKeyCode&&!t.nextSibling&&/\n\n$/.test(this.text)&&(this.text=this.text.slice(0,-1)))}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointIn(t,e){for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e))}}function hr(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class cr{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class ur{constructor(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.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this.root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Ls(t.state||ge.create()),this.plugins=this.state.facet(pn).map((t=>new Qn(t).update(this))),this.observer=new rr(this,((t,e,i)=>{ar(this,t,e,i)}),(t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()})),this.inputState=new es(this),this.docView=new kn(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,window.addEventListener("resize",(()=>{-1==dr&&(dr=setTimeout(pr,50))})),this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}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.composing>0}dispatch(...t){this._dispatch(1==t.length&&t[0]instanceof oe?t[0]:this.state.update(...t))}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);if(n.facet(ge.phrases)!=this.state.facet(ge.phrases))return this.setState(n);e=new $n(this,n,t);let s=null;try{this.updateState=2;for(let e of t){if(s&&(s=s.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;s=new zs(t.empty?t:kt.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(ln)?s=new zs(t.value):t.is(hn)&&(s=new zs(t.value,!0))}this.viewState.update(e,s),this.bidiCache=gr.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(vn)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if((i||s||this.viewState.mustEnforceCursorAssoc)&&this.requestMeasure(),!e.empty)for(let t of this.state.facet(on))t(e)}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=t;else{this.updateState=2;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Ls(t),this.plugins=t.facet(pn).map((t=>new Qn(t).update(this))),this.pluginMap.clear(),this.docView=new kn(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}this.requestMeasure()}}updatePlugins(t){let e=t.startState.facet(pn),i=t.state.facet(pn);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new Qn(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();let e=null;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport,n=this.viewState.measure(this);if(!n&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&n||([this.measureRequests,s]=[s,this.measureRequests]);let r=s.map((t=>{try{return t.read(this)}catch(t){return cn(this.state,t),mr}})),o=new $n(this,this.state),a=!1;o.flags|=n,e?e.flags|=n:e=o,this.updateState=2,o.empty||(this.updatePlugins(o),this.inputState.update(o),this.updateAttrs(),a=this.docView.update(o));for(let t=0;t{Li(this.contentDOM,this.contentAttrs,e),Li(this.dom,this.editorAttrs,t)})),this.editorAttrs=t,this.contentAttrs=e}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(ur.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(vn),M.mount(this.root,this.styleModules.concat(ir).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame((()=>this.measure()))),t){if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}blockAtHeight(t,e){let i=fr(e,this);return this.elementAtHeight(t-i).moveY(i)}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}visualLineAtHeight(t,e){let i=fr(e,this);return this.lineBlockAtHeight(t-i).moveY(i)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}viewportLines(t,e){let i=fr(e,this);for(let e of this.viewportLineBlocks)t(e.moveY(i))}get viewportLineBlocks(){return this.viewState.viewportLines}visualLineAt(t,e=0){return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return ts(this,t,Jn(this,t,e,i))}moveByGroup(t,e){return ts(this,t,Jn(this,t,e,(e=>function(t,e,i){let n=t.state.charCategorizer(e),s=n(i);return t=>{let e=n(t);return s==fe.Space&&(s=e),s==e}}(this,t.head,e))))}moveToLineBoundary(t,e,i=!0){return function(t,e,i,n){let s=t.state.doc.lineAt(e.head),r=n&&t.lineWrapping?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),n=t.posAtCoords({x:i==(t.textDirection==Rn.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=n)return kt.cursor(n,i?-1:1)}let o=Ii.find(t.docView,e.head),a=o?i?o.posAtEnd:o.posAtStart:i?s.to:s.from;return kt.cursor(a,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return ts(this,t,function(t,e,i,n){let s=e.head,r=i?1:-1;if(s==(i?t.state.doc.length:0))return kt.cursor(s);let o,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(s),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),o=r<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(s-c);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(s-e.from))),o=(r<0?e.top:e.bottom)+c}let u=l.left+a,O=null!=n?n:t.defaultLineHeight>>1;for(let e=0;;e+=10){let i=o+(O+e)*r,n=Fn(t,{x:u,y:i},!1,r);if(il.bottom||(r<0?ns))return kt.cursor(n,void 0,void 0,a)}}(this,t,e,i))}scrollPosIntoView(t){this.dispatch({effects:ln.of(kt.cursor(t))})}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Fn(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(t),s=this.bidiSpans(n);return ti(i,s[Ln.find(s,t-n.from,-1,e)].dir==Rn.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.heightOracle.direction}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Or)return Vn(t.length);let e=this.textDirection;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e)return i.order;let i=function(t,e){let i=t.length,n=e==Xn?1:2,s=e==Xn?2:1;if(!t||1==n&&!zn.test(t))return Vn(i);for(let e=0,s=n,o=n;e=0;t-=3)if(Yn[t+1]==-r){let e=Yn[t+2],i=2&e?n:4&e?1&e?s:n:0;i&&(Dn[a]=Dn[Yn[t]]=i),l=t;break}}else{if(189==Yn.length)break;Yn[l++]=a,Yn[l++]=e,Yn[l++]=h}else if(2==(o=Dn[a])||1==o){let t=o==n;h=t?0:1;for(let e=l-3;e>=0;e-=3){let i=Yn[e+2];if(2&i)break;if(t)Yn[e+2]|=2;else{if(4&i)break;Yn[e+2]|=4}}}for(let t=0;te;){let t=i,n=2!=Dn[--i];for(;i>e&&n==(2!=Dn[i-1]);)i--;o.push(new Ln(i,t,n?2:1))}else o.push(new Ln(e,t,0))}else for(let t=0;tDate.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{ri(this.contentDOM),this.docView.updateSelection()}))}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static domEventHandlers(t){return mn.define((()=>({})),{eventHandlers:t})}static theme(t,e){let i=M.newName(),n=[Bs.of(i),vn.of(er(`.${i}`,t))];return e&&e.dark&&n.push(Hs.of(!0)),n}static baseTheme(t){return Vt.lowest(vn.of(er("."+Fs,t,tr)))}}ur.scrollTo=ln,ur.centerOn=hn,ur.styleModule=vn,ur.inputHandler=an,ur.exceptionSink=rn,ur.updateListener=on,ur.editable=un,ur.mouseSelectionStyle=sn,ur.dragMovesSelection=nn,ur.clickAddsSelectionRange=en,ur.decorations=yn,ur.contentAttributes=wn,ur.editorAttributes=bn,ur.lineWrapping=ur.contentAttributes.of({class:"cm-lineWrapping"}),ur.announce=re.define();const Or=4096;function fr(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}let dr=-1;function pr(){dr=-1;let t=document.querySelectorAll(".cm-content");for(let e=0;e=0;s--){let e=n[s],r="function"==typeof e?e(t):e;r&&Yi(r,i)}return i}const br=$i.mac?"mac":$i.windows?"win":$i.linux?"linux":"key";function wr(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const yr=ur.domEventHandlers({keydown:(t,e)=>function(t,e,i,n){let s=function(t){var e=!(qe&&(t.ctrlKey||t.altKey||t.metaKey)||(ze||Ve)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?Ue:_e)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=1==s.length&&" "!=s,o="",a=!1;$r&&$r.view==i&&$r.scope==n&&(o=$r.prefix+" ",(a=ns.indexOf(e.keyCode)<0)&&($r=null));let l,h=t=>{if(t){for(let e of t.commands)if(e(i))return!0;t.preventDefault&&(a=!0)}return!1},c=t[n];if(c){if(h(c[o+wr(s,e,!r)]))return!0;if(r&&(e.shiftKey||e.altKey||e.metaKey)&&(l=_e[e.keyCode])&&l!=s){if(h(c[o+wr(l,e,!0)]))return!0}else if(r&&e.shiftKey&&h(c[o+wr(s,e,!0)]))return!0}return a}(function(t){let e=t.facet(vr),i=xr.get(e);i||xr.set(e,i=function(t,e=br){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,n,r,o)=>{let a=i[t]||(i[t]=Object.create(null)),l=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,r,o,a=i[i.length-1];"Space"==a&&(a=" ");for(let t=0;t{let n=$r={view:e,prefix:i,scope:t};return setTimeout((()=>{$r==n&&($r=null)}),4e3),!0}]})}let h=l.join(" ");s(h,!1);let c=a[h]||(a[h]={preventDefault:!1,commands:[]});c.commands.push(r),o&&(c.preventDefault=!0)};for(let i of t){let t=i[e]||i.key;if(t)for(let e of i.scope?i.scope.split(" "):["editor"])r(e,t,i.run,i.preventDefault),i.shift&&r(e,"Shift-"+t,i.shift,i.preventDefault)}return i}(e.reduce(((t,e)=>t.concat(e)),[])));return i}(e.state),t,e,"editor")}),vr=Wt.define({enables:yr}),xr=new WeakMap;let $r=null;const kr=!$i.ios,Pr=Wt.define({combine:t=>Qe(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Sr(t={}){return[Pr.of(t),Wr,Xr]}class Tr{constructor(t,e,i,n,s){this.left=t,this.top=e,this.width=i,this.height=n,this.className=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}const Wr=mn.fromClass(class{constructor(t){this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(Pr).cursorBlinkRate+"ms"}update(t){let e=t.startState.facet(Pr)!=t.state.facet(Pr);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some((t=>t.scrollIntoView))&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:t}=this.view,e=t.facet(Pr),i=t.selection.ranges.map((t=>t.empty?[]:function(t,e){if(e.to<=t.viewport.from||e.from>=t.viewport.to)return[];let i=Math.max(e.from,t.viewport.from),n=Math.min(e.to,t.viewport.to),s=t.textDirection==Rn.LTR,r=t.contentDOM,o=r.getBoundingClientRect(),a=Ar(t),l=window.getComputedStyle(r.firstChild),h=o.left+parseInt(l.paddingLeft),c=o.right-parseInt(l.paddingRight),u=Zr(t,i),O=Zr(t,n),f=u.type==Vi.Text?u:null,d=O.type==Vi.Text?O:null;t.lineWrapping&&(f&&(f=Cr(t,i,f)),d&&(d=Cr(t,n,d)));if(f&&d&&f.from==d.from)return m(g(e.from,e.to,f));{let i=f?g(e.from,null,f):Q(u,!1),n=d?g(null,e.to,d):Q(O,!0),s=[];return(f||u).to<(d||O).from-1?s.push(p(h,i.bottom,c,n.top)):i.bottomu&&n.from=r)break;a>s&&l(Math.max(t,s),null==e&&t<=u,Math.min(a,r),null==i&&a>=O,o.dir)}if(s=n.to+1,s>=r)break}return 0==a.length&&l(u,null==e,O,null==i,t.textDirection),{top:r,bottom:o,horizontal:a}}function Q(t,e){let i=o.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(this.view,t))).reduce(((t,e)=>t.concat(e))),n=[];for(let i of t.selection.ranges){let s=i==t.selection.main;if(i.empty?!s||kr:e.drawRangeCursor){let t=_r(this.view,i,s);t&&n.push(t)}}return{rangePieces:i,cursors:n}}drawSel({rangePieces:t,cursors:e}){if(t.length!=this.rangePieces.length||t.some(((t,e)=>!t.eq(this.rangePieces[e])))){this.selectionLayer.textContent="";for(let e of t)this.selectionLayer.appendChild(e.draw());this.rangePieces=t}if(e.length!=this.cursors.length||e.some(((t,e)=>!t.eq(this.cursors[e])))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const t of e)this.cursorLayer.appendChild(t.draw())}else e.forEach(((e,i)=>e.adjust(t[i])));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),Rr={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};kr&&(Rr[".cm-line"].caretColor="transparent !important");const Xr=Vt.highest(ur.theme(Rr));function Ar(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Rn.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Cr(t,e,i){let n=kt.cursor(e);return{from:Math.max(i.from,t.moveToLineBoundary(n,!1,!0).from),to:Math.min(i.to,t.moveToLineBoundary(n,!0,!0).from),type:Vi.Text}}function Zr(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==Vi.Text))return t;return i}function _r(t,e,i){let n=t.coordsAtPos(e.head,e.assoc||1);if(!n)return null;let s=Ar(t);return new Tr(n.left-s.left,n.top-s.top,-1,n.bottom-n.top,i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}function Ur(t,e,i,n,s){e.lastIndex=0;for(let r,o=t.iterRange(i,n),a=i;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;r=e.exec(o.value);)s(a+r.index,a+r.index+r[0].length,r)}class Yr{constructor(t){let{regexp:e,decoration:i,boundary:n}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=e,this.getDeco="function"==typeof i?i:()=>i,this.boundary=n}createDeco(t){let e=new $e;for(let{from:i,to:n}of t.visibleRanges)Ur(t.state.doc,this.regexp,i,n,((i,n,s)=>e.add(i,n,this.getDeco(s,t,i))));return e.finish()}updateDeco(t,e){let i=1e9,n=-1;return t.docChanged&&t.changes.iterChanges(((e,s,r,o)=>{o>t.view.viewport.from&&r1e3?this.createDeco(t.view):n>-1?this.updateRange(t.view,e.map(t.changes),i,n):e}updateRange(t,e,i,n){for(let s of t.visibleRanges){let r=Math.max(s.from,i),o=Math.min(s.to,n);if(o>r){let i=t.state.doc.lineAt(r),n=i.toi.from;r--)if(this.boundary.test(i.text[r-1-i.from])){a=r;break}for(;oc.push(this.getDeco(n,t,e).range(e,i))));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>tl,add:c})}}return e}}const zr=null!=/x/.unicode?"gu":"g",Lr=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮\ufeff-]",zr),Dr={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Vr=null;const qr=Wt.define({combine(t){let e=Qe(t,{render:null,specialChars:Lr,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Vr&&"undefined"!=typeof document&&document.body){let e=document.body.style;Vr=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Vr||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,zr)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,zr)),e}});function Er(t={}){return[qr.of(t),Mr||(Mr=mn.fromClass(class{constructor(t){this.view=t,this.decorations=qi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(qr)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Yr({regexp:t.specialChars,decoration:(e,i,n)=>{let{doc:s}=i.state,r=et(e[0],0);if(9==r){let t=s.lineAt(n),e=i.state.tabSize,r=st(t.text,e,n-t.from);return qi.replace({widget:new jr((e-r%e)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=qi.replace({widget:new Gr(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(qr);t.startState.facet(qr)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Mr=null;class Gr extends Di{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"␤":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(Dr[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,i,e);if(n)return n;let s=document.createElement("span");return s.textContent=e,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class jr extends Di{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Nr=mn.fromClass(class{constructor(){this.height=1e3,this.attrs={style:"padding-bottom: 1000px"}}update(t){let e=t.view.viewState.editorHeight-t.view.defaultLineHeight;e!=this.height&&(this.height=e,this.attrs={style:`padding-bottom: ${e}px`})}});function Ir(){return[Nr,wn.of((t=>{var e;return(null===(e=t.plugin(Nr))||void 0===e?void 0:e.attrs)||null}))]}class Br extends Di{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}ignoreEvent(){return!1}}function Hr(t){return mn.fromClass(class{constructor(e){this.view=e,this.placeholder=qi.set([qi.widget({widget:new Br(t),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?qi.none:this.placeholder}},{decorations:t=>t.decorations})}const Fr=new n;function Kr(t){return Wt.define({combine:t?e=>e.concat(t):void 0})}class Jr{constructor(t,e,i,n=[]){this.data=t,this.topNode=i,ge.prototype.hasOwnProperty("tree")||Object.defineProperty(ge.prototype,"tree",{get(){return io(this)}}),this.parser=e,this.extension=[uo.of(this),ge.languageData.of(((t,e,i)=>t.facet(to(t,e,i))))].concat(n)}isActiveAt(t,e,i=-1){return to(t,e,i)==this.data}findRegions(t){let e=t.facet(uo);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],s=(t,e)=>{if(t.prop(Fr)==this.data)return void i.push({from:e,to:e+t.length});let r=t.prop(n.mounted);if(r){if(r.tree.prop(Fr)==this.data){if(r.overlay)for(let t of r.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(r.overlay){let t=i.length;if(s(r.tree,r.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}))}configure(t){return new eo(this.data,this.parser.configure(t))}get allowsNesting(){return this.parser.wrappers.length>0}}function io(t){let e=t.field(Jr.state,!1);return e?e.tree:c.empty}function no(t,e,i=50){var n;let s=null===(n=t.field(Jr.state,!1))||void 0===n?void 0:n.context;return s&&(s.isDone(e)||s.work(i,e))?s.tree:null}class so{constructor(t,e=t.length){this.doc=t,this.length=e,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let ro=null;class oo{constructor(t,e,i=[],n,s,r,o,a){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}startParse(){return this.parser.startParse(new so(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=c.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;let n=Date.now()+t;for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&en)return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(k.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=ro;ro=this;try{return t()}finally{ro=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=ao(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:s,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=k.applyChanges(i,e),n=c.empty,s=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=ao(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends P{createParse(e,i,n){let s=n[0].from,r=n[n.length-1].to;return{parsedPos:s,advance(){let e=ro;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new c(o.none,[],[],r-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return ro}}function ao(t,e,i){return k.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class lo{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new lo(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=new oo(t.facet(uo).parser,t,[],c.empty,0,{from:0,to:e},[],null);return i.work(20,e)||i.takeTree(),new lo(i)}}Jr.state=Zt.define({create:lo.init,update(t,e){for(let t of e.effects)if(t.is(Jr.setState))return t.value;return e.startState.facet(uo)!=e.state.facet(uo)?lo.init(e.state):t.apply(e)}});let ho=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(ho=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const co=mn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Jr.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Jr.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=ho(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,a=s.context.work(r,n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Jr.setState.of(new lo(s.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>cn(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return this.working||this.workScheduled>0}},{eventHandlers:{focus(){this.scheduleWork()}}}),uo=Wt.define({combine:t=>t.length?t[0]:null,enables:[Jr.state,co]});class Oo{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}class fo{constructor(t,e,i,n,s,r){this.name=t,this.alias=e,this.extensions=i,this.filename=n,this.loadFunc=s,this.support=r,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((t=>this.support=t),(t=>{throw this.loading=null,t})))}static of(t){let{load:e,support:i}=t;if(!e){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");e=()=>Promise.resolve(i)}return new fo(t.name,(t.alias||[]).concat(t.name).map((t=>t.toLowerCase())),t.extensions||[],t.filename,e,i)}static matchFilename(t,e){for(let i of t)if(i.filename&&i.filename.test(e))return i;let i=/\.([^.]+)$/.exec(e);if(i)for(let e of t)if(e.extensions.indexOf(i[1])>-1)return e;return null}static matchLanguageName(t,e,i=!0){e=e.toLowerCase();for(let i of t)if(i.alias.some((t=>t==e)))return i;if(i)for(let i of t)for(let t of i.alias){let n=e.indexOf(t);if(n>-1&&(t.length>2||!/\w/.test(e[n-1])&&!/\w/.test(e[n+t.length])))return i}return null}}const po=Wt.define(),mo=Wt.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function go(t){let e=t.facet(mo);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Qo(t,e){let i="",n=t.tabSize;if(9==t.facet(mo).charCodeAt(0))for(;e>=n;)i+="\t",e-=n;for(let t=0;t=i.from&&n<=i.to?(e<0?n-1&&(s+=r-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return st(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const yo=new n;function vo(t){let e=t.type.prop(yo);if(e)return e;let i,s=t.firstChild;if(s&&(i=s.type.prop(n.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>To(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?$o:null}function xo(t,e,i){for(;t;t=t.parent){let n=vo(t);if(n)return n(new ko(i,e,t))}return null}function $o(){return 0}class ko extends wo{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.node=i}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let e=this.node.resolve(t.from);for(;e.parent&&e.parent.from==e.from;)e=e.parent;if(Po(e,this.node))break;t=this.state.doc.lineAt(e.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?xo(t,this.pos,this.base):0}}function Po(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function So({closing:t,align:e=!0,units:i=1}){return n=>To(n,e,i,t)}function To(t,e,i,n,s){let r=t.textAfter,o=r.match(/^\s*/)[0].length,a=n&&r.slice(o,o+n.length)==n||s==t.pos+o,l=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped)return s.fromt.baseIndent;function Ro({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}function Xo(){return ge.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+200)return t;let r=i.sliceString(s.from,n);if(!e.some((t=>t.test(r))))return t;let{state:o}=t,a=-1,l=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==a)continue;a=e.from;let i=bo(o,e.from);if(null==i)continue;let n=/^\s*/.exec(e.text)[0],s=Qo(o,i);n!=s&&l.push({from:e.from,to:e.from+n.length,insert:s})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const Ao=Wt.define(),Co=new n;function Zo(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&r.from=e&&o.to>i&&(s=o)}}return s}(t,e,i)}let Uo=0;class Yo{constructor(t,e,i){this.set=t,this.base=e,this.modified=i,this.id=Uo++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new Yo([],null,[]);if(e.set.push(e),t)for(let i of t.set)e.set.push(i);return e}static defineModifier(){let t=new Lo;return e=>e.modified.indexOf(t)>-1?e:Lo.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let zo=0;class Lo{constructor(){this.instances=[],this.id=zo++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>{return i.base==t&&(n=e,s=i.modified,n.length==s.length&&n.every(((t,e)=>t==s[e])));var n,s}));if(i)return i;let n=[],s=new Yo(n,t,e);for(let t of e)t.instances.push(s);let r=Do(e);for(let e of t.set)for(let t of r)n.push(Lo.get(e,t));return s}}function Do(t){let e=[t];for(let i=0;i0&&e+3==t.length){s=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!n)throw new RangeError("Invalid path: "+t);if(i.push("*"==n[0]?null:'"'==n[0][0]?JSON.parse(n[0]):n[0]),e+=n[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){s=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+t);let l=new jo(n,s,o>0?i.slice(0,o):null);e[a]=l.sort(e[a])}}return qo.add(e)}const qo=new n,Eo=Wt.define({combine:t=>t.length?No.combinedMatch(t):null}),Mo=Wt.define({combine:t=>t.length?t[0].match:null});function Go(t){return t.facet(Eo)||t.facet(Mo)}class jo{constructor(t,e,i,n){this.tags=t,this.mode=e,this.context=i,this.next=n}sort(t){return!t||t.deptht.scope))?void 0:Object.create(null);return(i,n)=>{let s=e&&e[i.id];if(void 0!==s)return s;let r=null;for(let e of t){let t=e.match(i,n);t&&(r=r?r+" "+t:t)}return e&&(e[i.id]=r),r}}static define(t,e){return new No(t,e||{})}static get(t,e,i){let n=Go(t);return n&&n(e,i||o.none)}}function Io(t,e,i,n=0,s=t.length){Jo(t,n,s,e,i)}class Bo{constructor(t){this.markCache=Object.create(null),this.tree=io(t.state),this.decorations=this.buildDeco(t,Go(t.state))}update(t){let e=io(t.state),i=Go(t.state),n=i!=t.startState.facet(Eo);e.length{i.add(t,e,this.markCache[n]||(this.markCache[n]=qi.mark({class:n})))}));return i.finish()}}const Ho=Vt.extend(mn.fromClass(Bo,{decorations:t=>t.decorations})),Fo=[""];class Ko{constructor(t,e,i){this.at=t,this.style=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,s,r,o){let{type:a,from:l,to:h}=t;if(l>=i||h<=e)return;Fo[r]=a.name,a.isTop&&(o=a);let c=s,u=a.prop(qo),O=!1;for(;u;){if(!u.context||ta(u.context,Fo,r)){for(let t of u.tags){let e=this.style(t,o);e&&(c&&(c+=" "),c+=e,1==u.mode?s+=(s?" ":"")+e:0==u.mode&&(O=!0))}break}u=u.next}if(this.startSpan(t.from,c),O)return;let f=t.tree&&t.tree.prop(n.mounted);if(f&&f.overlay){let n=t.node.enter(f.overlay[0].from+l,1),a=t.firstChild();for(let u=0,O=l;;u++){let d=u=p)&&t.nextSibling()););if(!d||p>i)break;O=d.to+l,O>e&&(this.highlightRange(n.cursor,Math.max(e,d.from+l),Math.min(i,O),s,r,f.tree.type),this.startSpan(O,c))}a&&t.parent()}else if(t.firstChild()){do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,s,r+1,o),this.startSpan(Math.min(i,t.to),c)}}while(t.nextSibling());t.parent()}}}function Jo(t,e,i,n,s){let r=new Ko(e,n,s);r.highlightRange(t.cursor(),e,i,"",0,t.type),r.flush(i)}function ta(t,e,i){if(t.length>i-1)return!1;for(let n=i-1,s=t.length-1;s>=0;s--,n--){let i=t[s];if(i&&i!=e[n])return!1}return!0}const ea=Yo.define,ia=ea(),na=ea(),sa=ea(na),ra=ea(na),oa=ea(),aa=ea(oa),la=ea(oa),ha=ea(),ca=ea(ha),ua=ea(),Oa=ea(),fa=ea(),da=ea(fa),pa=ea(),ma={comment:ia,lineComment:ea(ia),blockComment:ea(ia),docComment:ea(ia),name:na,variableName:ea(na),typeName:sa,tagName:ea(sa),propertyName:ra,attributeName:ea(ra),className:ea(na),labelName:ea(na),namespace:ea(na),macroName:ea(na),literal:oa,string:aa,docString:ea(aa),character:ea(aa),attributeValue:ea(aa),number:la,integer:ea(la),float:ea(la),bool:ea(oa),regexp:ea(oa),escape:ea(oa),color:ea(oa),url:ea(oa),keyword:ua,self:ea(ua),null:ea(ua),atom:ea(ua),unit:ea(ua),modifier:ea(ua),operatorKeyword:ea(ua),controlKeyword:ea(ua),definitionKeyword:ea(ua),operator:Oa,derefOperator:ea(Oa),arithmeticOperator:ea(Oa),logicOperator:ea(Oa),bitwiseOperator:ea(Oa),compareOperator:ea(Oa),updateOperator:ea(Oa),definitionOperator:ea(Oa),typeOperator:ea(Oa),controlOperator:ea(Oa),punctuation:fa,separator:ea(fa),bracket:da,angleBracket:ea(da),squareBracket:ea(da),paren:ea(da),brace:ea(da),content:ha,heading:ca,heading1:ea(ca),heading2:ea(ca),heading3:ea(ca),heading4:ea(ca),heading5:ea(ca),heading6:ea(ca),contentSeparator:ea(ha),list:ea(ha),quote:ea(ha),emphasis:ea(ha),strong:ea(ha),link:ea(ha),monospace:ea(ha),strikethrough:ea(ha),inserted:ea(),deleted:ea(),changed:ea(),invalid:ea(),meta:pa,documentMeta:ea(pa),annotation:ea(pa),processingInstruction:ea(pa),definition:Yo.defineModifier(),constant:Yo.defineModifier(),function:Yo.defineModifier(),standard:Yo.defineModifier(),local:Yo.defineModifier(),special:Yo.defineModifier()};function ga(t,e,i,n=0,s=0){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);let r=s;for(let s=n;s=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pose}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return n(this.string.substr(this.pos,t.length))==n(t)?(!1!==e&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function ba(t){if("object"!=typeof t)return t;let e={};for(let i in t){let n=t[i];e[i]=n instanceof Array?n.slice():n}return e}class wa extends Jr{constructor(t){let e,i=Kr(t.languageData),s={token:(r=t).token,blankLine:r.blankLine||(()=>{}),startState:r.startState||(()=>!0),copyState:r.copyState||ba,indent:r.indent||(()=>null),languageData:r.languageData||{}};var r;super(i,new class extends P{createParse(t,i,n){return new xa(e,t,i,n)}},function(t){let e=o.define({id:Pa.length,name:"Document",props:[Fr.add((()=>t))]});return Pa.push(e),e}(i),[po.of(((t,e)=>this.getIndent(t,e)))]),e=this,this.streamParser=s,this.stateAfter=new n({perNode:!0})}static define(t){return new wa(t)}getIndent(t,e){let i=io(t.state),n=i.resolve(e);for(;n&&n.type!=this.topNode;)n=n.parent;if(!n)return null;let s,r,o=ya(this,i,0,n.from,e);if(o?(r=o.state,s=o.pos+1):(r=this.streamParser.startState(t.unit),s=0),e-s>1e4)return null;for(;s=n&&i+e.length<=s&&e.prop(t.stateAfter);if(r)return{state:t.streamParser.copyState(r),pos:i+e.length};for(let r=e.children.length-1;r>=0;r--){let o=e.children[r],a=i+e.positions[r],l=o instanceof c&&a=e.length)return e;s||e.type!=t.topNode||(s=!0);for(let r=e.children.length-1;r>=0;r--){let o,a=e.positions[r]+i,l=e.children[r];if(ai&&ya(t,n.tree,0-n.offset,i,r);if(o&&(e=va(t,n.tree,i+n.offset,o.pos+n.offset,!1)))return{state:o.state,tree:e}}return{state:t.streamParser.startState(n?go(n):4),tree:c.empty}}(t,i,r,null==s?void 0:s.state);this.state=o,this.parsedPos=this.chunkStart=r+a.length,a.length&&(this.chunks.push(a),this.chunkPos.push(0)),s&&this.parsedPos=e?this.finish():t&&this.parsedPos>t.viewport.to?(t.skipUntilInView(this.parsedPos,e),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let e=this.input.chunk(t);if(this.input.lineChunks)"\n"==e&&(e="");else{let t=e.indexOf("\n");t>-1&&(e=e.slice(0,t))}return t+e.length<=this.to?e:e.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,e=this.lineAfter(t),i=t+e.length;for(let t=this.rangeIndex;;){let n=this.ranges[t].to;if(n>=i)break;if(e=e.slice(0,n-(i-e.length)),t++,t==this.ranges.length)break;let s=this.ranges[t].from,r=this.lineAfter(s);e+=r,i=s+r.length}return{line:e,end:i}}skipGapsTo(t,e,i){for(;;){let n=this.ranges[this.rangeIndex].to,s=t+e;if(i>0?n>s:n>=s)break;e+=this.ranges[++this.rangeIndex].from-n}return e}emitToken(t,e,i,n,s){if(this.ranges.length>1){e+=s=this.skipGapsTo(e,s,1);let t=this.chunk.length;i+=s=this.skipGapsTo(i,s,-1),n+=this.chunk.length-t}return this.chunk.push(t,e,i,n),s}parseLine(t){let{line:e,end:i}=this.nextLine(),n=0,{streamParser:s}=this.lang,r=new Qa(e,t?t.state.tabSize:4,t?go(t.state):2);if(r.eol())s.blankLine(this.state,r.indentUnit);else for(;!r.eol();){let t=$a(s.token,r,this.state);t&&(n=this.emitToken(Wa(t),this.parsedPos+r.start,this.parsedPos+r.pos,4,n))}this.parsedPos=i,this.parsedPose.start)return n}throw new Error("Stream parser failed to advance stream.")}const ka=Object.create(null),Pa=[o.none],Sa=new a(Pa),Ta=[];function Wa(t){return t?ka[t]||(ka[t]=function(t){let e=null;for(let i of t.split(".")){let t=ma[i];t?"function"==typeof t?e?e=t(e):Ra(i,`Modifier ${i} used at start of tag`):e?Ra(i,`Tag ${i} used as modifier`):e=t:Ra(i,`Unknown highlighting tag ${i}`)}if(!e)return 0;let i=t.replace(/ /g,"_"),n=o.define({id:Pa.length,name:i,props:[Vo({[i]:e})]});return Pa.push(n),n.id}(t)):0}for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ka[t]=Wa(e);function Ra(t,e){Ta.indexOf(t)>-1||(Ta.push(t),console.warn(e))}const Xa="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2);class Aa{constructor(t,e,i){this.facet=e,this.createTooltipView=i,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t)),this.tooltipViews=this.tooltips.map(i)}update(t){let e=t.state.facet(this.facet),i=e.filter((t=>t));if(e===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[];for(let e=0;e{var e,i,n;return{position:Xa?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||Za}}}),Ua=mn.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.intersectionTimeout=-1;let e=t.state.facet(_a);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Aa(t,La,(t=>this.createTooltip(t))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{this.intersectionTimeout<0&&Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&(this.intersectionTimeout=setTimeout((()=>{this.intersectionTimeout=-1,this.maybeMeasure()}),50))}),{threshold:[1]}):null,this.observeIntersection(),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){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(_a);if(n.position!=this.position){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector("cm-tooltip > cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t;for(let{dom:t}of this.manager.tooltipViews)t.remove();null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.intersectionTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((t=>this.view.coordsAtPos(t.pos))),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(_a).tooltipSpace(this.view)}}writeMeasure(t){let{editor:e,space:i}=t,n=[];for(let s=0;s=Math.min(e.bottom,i.bottom)||l.right<=Math.max(e.left,i.left)||l.left>=Math.min(e.right,i.right)){a.style.top="-10000px";continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=c?7:0,O=h.right-h.left,f=h.bottom-h.top,d=o.offset||za,p=this.view.textDirection==Rn.LTR,m=h.width>i.right-i.left?p?i.left:i.right-h.width:p?Math.min(l.left-(c?14:0)+d.x,i.right-O):Math.max(i.left,l.left-O+(c?14:0)-d.x),g=!!r.above;!r.strictSide&&(g?l.top-(h.bottom-h.top)-d.yi.bottom)&&g==i.bottom-l.bottom>l.top-i.top&&(g=!g);let Q=g?l.top-f-u-d.y:l.bottom+u+d.y,b=m+O;for(let t of n)t.leftm&&t.topQ&&(Q=g?t.top-f-2-u:t.bottom+u+2);"absolute"==this.position?(a.style.top=Q-t.parent.top+"px",a.style.left=m-t.parent.left+"px"):(a.style.top=Q+"px",a.style.left=m+"px"),c&&(c.style.left=l.left+(p?d.x:-d.x)-(m+14-7)+"px"),n.push({left:m,top:Q,right:b,bottom:Q+f}),a.classList.toggle("cm-tooltip-above",g),a.classList.toggle("cm-tooltip-below",!g),o.positioned&&o.positioned()}}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 t of this.manager.tooltipViews)t.dom.style.top="-10000px"}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Ya=ur.baseTheme({".cm-tooltip":{zIndex:100},"&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"}}}),za={x:0,y:0},La=Wt.define({enables:[Ua,Ya]});function Da(t){var e;null===(e=t.plugin(Ua))||void 0===e||e.maybeMeasure()}class Va{constructor(t,e,i){this.state=t,this.pos=e,this.explicit=i,this.abortListeners=[]}tokenBefore(t){let e=io(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(Na(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function qa(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ea(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,span:i}:null}}function Ma(t,e){return i=>{for(let e=io(i.state).resolveInner(i.pos,-1);e;e=e.parent)if(t.indexOf(e.name)>-1)return null;return e(i)}}class Ga{constructor(t,e,i){this.completion=t,this.source=e,this.match=i}}function ja(t){return t.selection.main.head}function Na(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],r="$"!=n[n.length-1];return s||r?new RegExp(`${s?"^":""}(?:${n})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const Ia=ie.define();function Ba(t,e){let i=e.completion.apply||e.completion.label,n=e.source;"string"==typeof i?t.dispatch({changes:{from:n.from,to:n.to,insert:i},selection:{anchor:n.from+i.length},userEvent:"input.complete",annotations:Ia.of(e.completion)}):i(t,e.completion,n.from,n.to)}const Ha=new WeakMap;function Fa(t){if(!Array.isArray(t))return t;let e=Ha.get(t);return e||Ha.set(t,e=Ea(t)),e}class Ka{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let e=0;e=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(g=it(l))!=g.toLowerCase()?1:g!=g.toUpperCase()?2:0;(1==Q&&p||0==m&&0!=Q)&&(e[c]==l||i[c]==l&&(u=!0))&&(r[c++]=n),m=Q,n+=nt(l)}return c==a&&0==r[0]?this.result((u?-200:0)-100,r,t):O==a&&0==f?[-200,0,d]:o>-1?[-700,o,o+this.pattern.length]:O==a?[-900,f,d]:c==a?this.result((u?-200:0)-100-700,r,t):2==e.length?null:this.result((n[0]?-700:0)-200-1100,n,t)}result(t,e,i){let n=[t],s=1;for(let t of e){let e=t+(this.astral?nt(et(i,t)):1);s>1&&n[s-1]==t?n[s-1]=e:(n[s++]=t,n[s++]=e)}return n}}const Ja=Wt.define({combine:t=>Qe(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:(t,e)=>t&&e,icons:(t,e)=>t&&e,optionClass:(t,e)=>i=>function(t,e){return t?e?t+" "+e:t:e}(t(i),e(i)),addToOptions:(t,e)=>t.concat(e)})});function tl(t,e,i){if(t<=i)return{from:0,to:t};if(e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class el{constructor(t,e){this.view=t,this.stateField=e,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this};let i=t.state.field(e),{options:n,selected:s}=i.open,r=t.state.facet(Ja);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i){let n=document.createElement("span");n.className="cm-completionLabel";let{label:s}=t,r=0;for(let t=1;tr&&n.appendChild(document.createTextNode(s.slice(r,e)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(e,o))),a.className="cm-completionMatchedText",r=o}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.range=tl(n.length,s,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",(e=>{for(let i,s=e.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(i=/-(\d+)$/.exec(s.id))&&+i[1]{this.info&&this.view.requestMeasure(this.placeInfo)}))}mount(){this.updateSel()}update(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected=this.range.to)&&(this.range=tl(e.options.length,e.selected,this.view.state.facet(Ja).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e.options,t.id,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfo)}))),this.updateSelectedOption(e.selected)){this.info&&(this.info.remove(),this.info=null);let t=e.options[e.selected];t.completion.info&&(this.info=this.dom.appendChild(function(t,e){let i=document.createElement("div");i.className="cm-tooltip cm-completionInfo";let{info:n}=t.completion;if("string"==typeof n)i.textContent=n;else{let s=n(t.completion);s.then?s.then((t=>i.appendChild(t)),(t=>cn(e.state,t,"completion info"))):i.appendChild(s)}return i}(t,this.view)),this.view.requestMeasure(this.placeInfo))}}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();n.topi.bottom&&(t.scrollTop+=n.bottom-i.bottom)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect();if(e.top>innerHeight-10||e.bottom<10)return null;let n=Math.max(0,Math.min(t.getBoundingClientRect().top,innerHeight-i.height))-e.top,s=this.view.textDirection==Rn.RTL,r=e.left,o=innerWidth-e.right;return s&&r=this.options.length?this:new nl(this.options,ol(e,t),this.tooltip,this.timestamp,t)}static build(t,e,i,n,s){let r=function(t,e){let i=[],n=0;for(let s of t)if(s.hasResult())if(!1===s.result.filter)for(let t of s.result.options)i.push(new Ga(t,s,[1e9-n++]));else{let t,n=new Ka(e.sliceDoc(s.from,s.to));for(let e of s.result.options)(t=n.match(e.label))&&(null!=e.boost&&(t[0]+=e.boost),i.push(new Ga(e,s,t)))}i.sort(ll);let s=[],r=null;for(let t of i.sort(ll)){if(300==s.length)break;r&&r.label==t.completion.label&&r.detail==t.completion.detail&&r.type==t.completion.type&&r.apply==t.completion.apply?il(t.completion)>il(r)&&(s[s.length-1]=t):s.push(t),r=t.completion}return s}(t,e);if(!r.length)return null;let o=0;if(n&&n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:(a=ml,t=>new el(t,a)),above:s.aboveCursor},n?n.timestamp:Date.now(),o);var a}map(t){return new nl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class sl{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new sl(al,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Ja),n=(i.override||e.languageDataAt("autocomplete",ja(e)).map(Fa)).map((e=>(this.active.find((t=>t.source==e))||new cl(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;i1!=t.state))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new cl(t.source,0):t)));for(let e of t.effects)e.is(pl)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new sl(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:rl}}const rl={"aria-autocomplete":"list","aria-expanded":"false"};function ol(t,e){return{"aria-autocomplete":"list","aria-expanded":"true","aria-activedescendant":t+"-"+e,"aria-controls":t}}const al=[];function ll(t,e){let i=e.match[0]-t.match[0];return i||t.completion.label.localeCompare(e.completion.label)}function hl(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class cl{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=hl(t),n=this;i?n=n.handleUserEvent(t,i,e):t.docChanged?n=n.handleChange(t):t.selection&&0!=n.state&&(n=new cl(n.source,0));for(let e of t.effects)if(e.is(Ol))n=new cl(n.source,1,e.value?ja(t.state):-1);else if(e.is(fl))n=new cl(n.source,0);else if(e.is(dl))for(let t of e.value)t.source==n.source&&(n=t);return n}handleUserEvent(t,e,i){return"delete"!=e&&i.activateOnTyping?new cl(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(ja(t.startState))?new cl(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new cl(this.source,this.state,t.mapPos(this.explicitPos))}}class ul extends cl{constructor(t,e,i,n,s,r){super(t,2,e),this.result=i,this.from=n,this.to=s,this.span=r}hasResult(){return!0}handleUserEvent(t,e,i){let n=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),r=ja(t.state);if((this.explicitPos>-1?rs)return new cl(this.source,"input"==e&&i.activateOnTyping?1:0);let o=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(n==s||this.span.test(t.state.sliceDoc(n,s)))?new ul(this.source,o,this.result,n,s,this.span):new cl(this.source,1,o)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new cl(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new ul(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}}const Ol=re.define(),fl=re.define(),dl=re.define({map:(t,e)=>t.map((t=>t.map(e)))}),pl=re.define(),ml=Zt.define({create:()=>sl.start(),update:(t,e)=>t.update(e),provide:t=>[La.from(t,(t=>t.tooltip)),ur.contentAttributes.from(t,(t=>t.attrs))]});function gl(t,e="option"){return i=>{let n=i.state.field(ml,!1);if(!n||!n.open||Date.now()-n.open.timestamp<75)return!1;let s,r=1;"page"==e&&(s=i.dom.querySelector(".cm-tooltip-autocomplete"))&&(r=Math.max(2,Math.floor(s.offsetHeight/s.firstChild.offsetHeight)));let o=n.open.selected+r*(t?1:-1),{length:a}=n.open.options;return o<0?o="page"==e?0:a-1:o>=a&&(o="page"==e?a-1:0),i.dispatch({effects:pl.of(o)}),!0}}const Ql=t=>{let e=t.state.field(ml,!1);return!(t.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<75)&&(Ba(t,e.open.options[e.open.selected]),!0)},bl=t=>!!t.state.field(ml,!1)&&(t.dispatch({effects:Ol.of(!0)}),!0),wl=t=>{let e=t.state.field(ml,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:fl.of(null)}),!0)};class yl{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const vl=mn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(ml).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(ml);if(!t.selectionSet&&!t.docChanged&&t.startState.field(ml)==e)return;let i=t.transactions.some((t=>(t.selection||t.docChanged)&&!hl(t)));for(let e=0;e50&&n.time-Date.now()>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){cn(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let e of t.transactions)"input"==hl(e)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(ml);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=ja(e),n=new Va(e,i,t.explicitPos==i),s=new yl(t,n);this.running.push(s),Promise.resolve(t.source(n)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:fl.of(null)}),cn(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Ja);for(let n=0;nt.source==s.active.source));if(r&&1==r.state)if(null==s.done){let t=new cl(s.active.source,0);for(let e of s.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:dl.of(e)})}},{eventHandlers:{compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:Ol.of(!1)})),20),this.composing=0}}}),xl=ur.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",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#39e",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",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"},".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 $l{constructor(t,e,i,n){this.field=t,this.line=e,this.from=i,this.to=n}}class kl{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){return new kl(this.field,t.mapPos(this.from,-1),t.mapPos(this.to,1))}}class Pl{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],n=[e],s=t.doc.lineAt(e),r=/^\s*/.exec(s.text)[0];for(let s of this.lines){if(i.length){let i=r,o=/^\t*/.exec(s)[0].length;for(let e=0;enew kl(t.field,n[t.line]+t.from,n[t.line]+t.to)));return{text:i,ranges:o}}static parse(t){let e,i=[],n=[],s=[];for(let r of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(r);){let t=e[1]?+e[1]:null,o=e[2]||e[3]||"",a=-1;for(let e=0;e=a&&t.field++}s.push(new $l(a,n.length,e.index,e.index+o.length)),r=r.slice(0,e.index)+o+r.slice(e.index+e[0].length)}n.push(r)}return new Pl(n,s)}}let Sl=qi.widget({widget:new class extends Di{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Tl=qi.mark({class:"cm-snippetField"});class Wl{constructor(t,e){this.ranges=t,this.active=e,this.deco=qi.set(t.map((t=>(t.from==t.to?Sl:Tl).range(t.from,t.to))))}map(t){return new Wl(this.ranges.map((e=>e.map(t))),this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const Rl=re.define({map:(t,e)=>t&&t.map(e)}),Xl=re.define(),Al=Zt.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(Rl))return i.value;if(i.is(Xl)&&t)return new Wl(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ur.decorations.from(t,(t=>t?t.deco:qi.none))});function Cl(t,e){return kt.create(t.filter((t=>t.field==e)).map((t=>kt.range(t.from,t.to))))}function Zl(t){let e=Pl.parse(t);return(t,i,n,s)=>{let{text:r,ranges:o}=e.instantiate(t.state,n),a={changes:{from:n,to:s,insert:rt.of(r)}};if(o.length&&(a.selection=Cl(o,0)),o.length>1){let e=new Wl(o,0),i=a.effects=[Rl.of(e)];void 0===t.state.field(Al,!1)&&i.push(re.appendConfig.of([Al,zl,Dl,xl]))}t.dispatch(t.state.update(a))}}function _l(t){return({state:e,dispatch:i})=>{let n=e.field(Al,!1);if(!n||t<0&&0==n.active)return!1;let s=n.active+t,r=t>0&&!n.ranges.some((e=>e.field==s+t));return i(e.update({selection:Cl(n.ranges,s),effects:Rl.of(r?null:new Wl(n.ranges,s))})),!0}}const Ul=[{key:"Tab",run:_l(1),shift:_l(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(Al,!1)&&(e(t.update({effects:Rl.of(null)})),!0)}],Yl=Wt.define({combine:t=>t.length?t[0]:Ul}),zl=Vt.highest(vr.compute([Yl],(t=>t.facet(Yl))));function Ll(t,e){return Object.assign(Object.assign({},e),{apply:Zl(t)})}const Dl=ur.domEventHandlers({mousedown(t,e){let i,n=e.state.field(Al,!1);if(!n||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let s=n.ranges.find((t=>t.from<=i&&t.to>=i));return!(!s||s.field==n.active)&&(e.dispatch({selection:Cl(n.ranges,s.field),effects:Rl.of(n.ranges.some((t=>t.field>s.field))?new Wl(n.ranges,s.field):null)}),!0)}});function Vl(t,e){return new RegExp(e(t.source),t.unicode?"u":"")}const ql=Object.create(null);function El(t,e,i,n,s){for(let r=t.iterLines(),o=0;!r.next().done;){let t,{value:a}=r;for(e.lastIndex=0;t=e.exec(a);)if(!n[t[0]]&&o+t.index!=s&&(i.push({type:"text",label:t[0]}),n[t[0]]=!0,i.length>=2e3))return;o+=a.length+1}}function Ml(t,e,i,n,s){let r=t.length>=1e3,o=r&&e.get(t);if(o)return o;let a=[],l=Object.create(null);if(t.children){let r=0;for(let o of t.children){if(o.length>=1e3)for(let t of Ml(o,e,i,n-r,s-r))l[t.label]||(l[t.label]=!0,a.push(t));else El(o,i,a,l,s-r);r+=o.length+1}}else El(t,i,a,l,s);return r&&a.length<2e3&&e.set(t,a),a}const Gl=t=>{let e=t.state.languageDataAt("wordChars",t.pos).join(""),i=function(t){let e=t.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${e}]+`,"ug")}catch(t){return new RegExp(`[w${e}]`,"g")}}(e),n=t.matchBefore(Vl(i,(t=>t+"$")));if(!n&&!t.explicit)return null;let s=n?n.from:t.pos,r=Ml(t.state.doc,function(t){return ql[t]||(ql[t]=new WeakMap)}(e),i,5e4,s);return{from:s,options:r,span:Vl(i,(t=>"^"+t))}};function jl(t={}){return[ml,Ja.of(t),vl,Il,xl]}const Nl=[{key:"Ctrl-Space",run:bl},{key:"Escape",run:wl},{key:"ArrowDown",run:gl(!0)},{key:"ArrowUp",run:gl(!1)},{key:"PageDown",run:gl(!0,"page")},{key:"PageUp",run:gl(!1,"page")},{key:"Enter",run:Ql}],Il=Vt.highest(vr.computeN([Ja],(t=>t.facet(Ja).defaultKeymap?[Nl]:[])));function Bl(t){var e;let i=null===(e=t.field(ml,!1))||void 0===e?void 0:e.open;return i?i.options.map((t=>t.completion)):[]}function Hl(t){var e;let i=null===(e=t.field(ml,!1))||void 0===e?void 0:e.open;return i?i.options[i.selected].completion:null}const Fl={brackets:["(","[","{","'",'"'],before:")]}'\":;>"},Kl=re.define({map(t,e){let i=e.mapPos(t,-1,pt.TrackAfter);return null==i?void 0:i}}),Jl=re.define({map:(t,e)=>e.mapPos(t)}),th=new class extends be{};th.startSide=1,th.endSide=-1;const eh=Zt.define({create:()=>xe.empty,update(t,e){if(e.selection){let i=e.state.doc.lineAt(e.selection.main.head).from,n=e.startState.doc.lineAt(e.startState.selection.main.head).from;i!=e.changes.mapPos(n,-1)&&(t=xe.empty)}t=t.map(e.changes);for(let i of e.effects)i.is(Kl)?t=t.update({add:[th.range(i.value,i.value+1)]}):i.is(Jl)&&(t=t.update({filter:t=>t!=i.value}));return t}});function ih(){return[ur.inputHandler.of(rh),eh]}function nh(t){for(let e=0;e<"()[]{}<>".length;e+=2)if("()[]{}<>".charCodeAt(e)==t)return"()[]{}<>".charAt(e+1);return it(t<128?t:t+1)}function sh(t,e){return t.languageDataAt("closeBrackets",e)[0]||Fl}function rh(t,e,i,n){if(t.composing)return!1;let s=t.state.selection.main;if(n.length>2||2==n.length&&1==nt(et(n,0))||e!=s.from||i!=s.to)return!1;let r=function(t,e){let i=sh(t,t.selection.main.head),n=i.brackets||Fl.brackets;for(let s of n){let r=nh(et(s,0));if(e==s)return r==s?uh(t,s,n.indexOf(s+s+s)>-1):hh(t,s,r,i.before||Fl.before);if(e==r&&ah(t,t.selection.main.from))return ch(t,s,r)}return null}(t.state,n);return!!r&&(t.dispatch(r),!0)}const oh=[{key:"Backspace",run:({state:t,dispatch:e})=>{let i=sh(t,t.selection.main.head).brackets||Fl.brackets,n=null,s=t.changeByRange((e=>{if(e.empty){let n=function(t,e){let i=t.sliceString(e-2,e);return nt(et(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let s of i)if(s==n&&lh(t.doc,e.head)==nh(et(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:kt.cursor(e.head-s.length),userEvent:"delete.backward"}}return{range:n=e}}));return n||e(t.update(s,{scrollIntoView:!0})),!n}}];function ah(t,e){let i=!1;return t.field(eh).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function lh(t,e){let i=t.sliceString(e,e+2);return i.slice(0,nt(et(i,0)))}function hh(t,e,i,n){let s=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Kl.of(r.to+e.length),range:kt.range(r.anchor+e.length,r.head+e.length)};let o=lh(t.doc,r.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+i,from:r.head},effects:Kl.of(r.head+e.length),range:kt.cursor(r.head+e.length)}:{range:s=r}}));return s?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ch(t,e,i){let n=null,s=t.selection.ranges.map((e=>e.empty&&lh(t.doc,e.head)==i?kt.cursor(e.head+i.length):n=e));return n?null:t.update({selection:kt.create(s,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map((({from:t})=>Jl.of(t)))})}function uh(t,e,i){let n=null,s=t.changeByRange((s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Kl.of(s.to+e.length),range:kt.range(s.anchor+e.length,s.head+e.length)};let r=s.head,o=lh(t.doc,r);if(o==e){if(Oh(t,r))return{changes:{insert:e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)};if(ah(t,r)){let n=i&&t.sliceDoc(r,r+3*e.length)==e+e+e;return{range:kt.cursor(r+e.length*(n?3:1)),effects:Jl.of(r)}}}else{if(i&&t.sliceDoc(r-2*e.length,r)==e+e&&Oh(t,r-2*e.length))return{changes:{insert:e+e+e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)};if(t.charCategorizer(r)(o)!=fe.Word){let i=t.sliceDoc(r-1,r);if(i!=e&&t.charCategorizer(r)(i)!=fe.Word)return{changes:{insert:e+e,from:r},effects:Kl.of(r+e.length),range:kt.cursor(r+e.length)}}}return{range:n=s}}));return n?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Oh(t,e){let i=io(t).resolveInner(e+1);return i.parent&&i.from==e}const fh=ur.baseTheme({".cm-matchingBracket":{backgroundColor:"#328c8252"},".cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),dh=Wt.define({combine:t=>Qe(t,{afterCursor:!0,brackets:"()[]{}",maxScanDistance:1e4})}),ph=qi.mark({class:"cm-matchingBracket"}),mh=qi.mark({class:"cm-nonmatchingBracket"}),gh=Zt.define({create:()=>qi.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(dh);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=yh(e.state,t.head,-1,n)||t.head>0&&yh(e.state,t.head-1,1,n)||n.afterCursor&&(yh(e.state,t.head,1,n)||t.headur.decorations.from(t)}),Qh=[gh,fh];function bh(t={}){return[dh.of(t),Qh]}function wh(t,e,i){let s=t.prop(e<0?n.openedBy:n.closedBy);if(s)return s;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function yh(t,e,i,n={}){let s=n.maxScanDistance||1e4,r=n.brackets||"()[]{}",o=io(t),a=o.resolveInner(e,i);for(let n=a;n;n=n.parent){let s=wh(n.type,i,r);if(s&&n.from0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let t=0;!c.next().done&&t<=r;){let r=c.value;i<0&&(t+=r.length);let a=e+t*i;for(let t=i>0?0:r.length-1,e=i>0?r.length:-1;t!=e;t+=i){let e=o.indexOf(r[t]);if(!(e<0||n.resolve(a+t,1).type!=s))if(e%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};u--}}i>0&&(t+=r.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,o,a.type,s,r)}function vh(t,e,i,n,s,r){let o=n.parent,a={from:n.from,to:n.to},l=0,h=null==o?void 0:o.cursor;if(h&&(i<0?h.childBefore(n.from):h.childAfter(n.to)))do{if(i<0?h.to<=n.from:h.from>=n.to){if(0==l&&s.indexOf(h.type.name)>-1&&h.fromi.empty?t.moveByChar(i,e):Ph(i,e)))}const Th=t=>Sh(t,t.textDirection!=Rn.LTR),Wh=t=>Sh(t,t.textDirection==Rn.LTR);function Rh(t,e){return kh(t,(i=>i.empty?t.moveByGroup(i,e):Ph(i,e)))}function Xh(t,e,i){let n=t.state.charCategorizer(e.from);return t.moveByChar(e,i,(s=>{let r=fe.Space,o=e.from,a=!1,l=!1,h=!1,c=e=>{if(a)return!1;o+=i?e.length:-e.length;let s,c=n(e);if(r==fe.Space&&(r=c),r!=c)return!1;if(r==fe.Word)if(e.toLowerCase()==e){if(!i&&l)return!1;h=!0}else if(h){if(i)return!1;a=!0}else{if(l&&i&&n(s=t.state.sliceDoc(o,o+1))==fe.Word&&s.toLowerCase()==s)return!1;l=!0}return!0};return c(s),c}))}function Ah(t,e){return kh(t,(i=>i.empty?Xh(t,i,e):Ph(i,e)))}const Ch=t=>Ah(t,!0),Zh=t=>Ah(t,!1);function _h(t,e){return kh(t,(i=>{if(!i.empty)return Ph(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const Uh=t=>_h(t,!1),Yh=t=>_h(t,!0);function zh(t,e){return kh(t,(i=>i.empty?t.moveVertically(i,e,t.dom.clientHeight):Ph(i,e)))}const Lh=t=>zh(t,!1),Dh=t=>zh(t,!0);function Vh(t,e,i){let n=t.visualLineAt(e.head),s=t.moveToLineBoundary(e,i);if(s.head==e.head&&s.head!=(i?n.to:n.from)&&(s=t.moveToLineBoundary(e,i,!1)),!i&&s.head==n.from&&n.length){let i=/^\s*/.exec(t.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;i&&e.head!=n.from+i&&(s=kt.cursor(n.from+i))}return s}const qh=t=>kh(t,(e=>Vh(t,e,!0))),Eh=t=>kh(t,(e=>Vh(t,e,!1)));function Mh(t,e,i){let n=!1,s=xh(t.selection,(e=>{let s=yh(t,e.head,-1)||yh(t,e.head,1)||e.head>0&&yh(t,e.head-1,1)||e.headMh(t,e,!1),jh=({state:t,dispatch:e})=>Mh(t,e,!0);function Nh(t,e){let i=xh(t.state.selection,(t=>{let i=e(t);return kt.range(t.anchor,i.head,i.goalColumn)}));return!i.eq(t.state.selection)&&(t.dispatch($h(t.state,i)),!0)}function Ih(t,e){return Nh(t,(i=>t.moveByChar(i,e)))}const Bh=t=>Ih(t,t.textDirection!=Rn.LTR),Hh=t=>Ih(t,t.textDirection==Rn.LTR);function Fh(t,e){return Nh(t,(i=>t.moveByGroup(i,e)))}function Kh(t,e){return Nh(t,(i=>Xh(t,i,e)))}const Jh=t=>Kh(t,!0),tc=t=>Kh(t,!1);function ec(t,e){return Nh(t,(i=>t.moveVertically(i,e)))}const ic=t=>ec(t,!1),nc=t=>ec(t,!0);function sc(t,e){return Nh(t,(i=>t.moveVertically(i,e,t.dom.clientHeight)))}const rc=t=>sc(t,!1),oc=t=>sc(t,!0),ac=t=>Nh(t,(e=>Vh(t,e,!0))),lc=t=>Nh(t,(e=>Vh(t,e,!1))),hc=({state:t,dispatch:e})=>(e($h(t,{anchor:0})),!0),cc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.doc.length})),!0),uc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.selection.main.anchor,head:0})),!0),Oc=({state:t,dispatch:e})=>(e($h(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function fc({state:t,dispatch:e},i){if(t.readOnly)return!1;let n="delete.selection",s=t.changeByRange((t=>{let{from:e,to:s}=t;if(e==s){let t=i(e);te&&(n="delete.forward"),e=Math.min(e,t),s=Math.max(s,t)}return e==s?{range:t}:{changes:{from:e,to:s},range:kt.cursor(e)}}));return!s.changes.empty&&(e(t.update(s,{scrollIntoView:!0,userEvent:n})),!0)}function dc(t,e,i){if(t instanceof ur)for(let n of t.pluginField(fn.atomicRanges))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const pc=(t,e)=>fc(t,(i=>{let n,s,{state:r}=t,o=r.doc.lineAt(i);if(!e&&i>o.from&&ipc(t,!1),gc=t=>pc(t,!0),Qc=(t,e)=>fc(t,(i=>{let n=i,{state:s}=t,r=s.doc.lineAt(n),o=s.charCategorizer(n);for(let t=null;;){if(n==(e?r.to:r.from)){n==i&&r.number!=(e?s.doc.lines:1)&&(n+=e?1:-1);break}let a=H(r.text,n-r.from,e)+r.from,l=r.text.slice(Math.min(n,a)-r.from,Math.max(n,a)-r.from),h=o(l);if(null!=t&&h!=t)break;" "==l&&n==i||(t=h),n=a}return dc(t,n,e)})),bc=t=>Qc(t,!1),wc=t=>fc(t,(e=>{let i=t.visualLineAt(e).to;return dc(t,e{if(e.readOnly)return!1;let s=e.changeByRange((i=>{let{from:s,to:r}=i,o=e.doc.lineAt(s),a=!t&&s==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,s=io(t).resolveInner(e),r=s.childBefore(e),o=s.childAfter(e);return r&&o&&r.to<=e&&o.from>=e&&(i=r.type.prop(n.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from?{from:r.to,to:o.from}:null}(e,s);t&&(s=r=(r<=o.to?o:e.doc.lineAt(r)).to);let l=new wo(e,{simulateBreak:s,simulateDoubleBreak:!!a}),h=bo(l,s);for(null==h&&(h=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);ro.from&&s{let s=[];for(let r=n.from;r<=n.to;){let o=t.doc.lineAt(r);o.number>i&&(n.empty||n.to>o.from)&&(e(o,s,n),i=o.number),r=o.to+1}let r=t.changes(s);return{changes:s,range:kt.range(r.mapPos(n.anchor,1),r.mapPos(n.head,1))}}))}const $c=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(xc(t,((e,i)=>{i.push({from:e.from,insert:t.facet(mo)})})),{userEvent:"input.indent"})),!0),kc=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(xc(t,((e,i)=>{let n=/^\s*/.exec(e.text)[0];if(!n)return;let s=st(n,t.tabSize),r=0,o=Qo(t,Math.max(0,s-go(t)));for(;rRh(t,t.textDirection!=Rn.LTR),shift:t=>Fh(t,t.textDirection!=Rn.LTR)},{mac:"Cmd-ArrowLeft",run:Eh,shift:lc},{key:"ArrowRight",run:Wh,shift:Hh,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>Rh(t,t.textDirection==Rn.LTR),shift:t=>Fh(t,t.textDirection==Rn.LTR)},{mac:"Cmd-ArrowRight",run:qh,shift:ac},{key:"ArrowUp",run:Uh,shift:ic,preventDefault:!0},{mac:"Cmd-ArrowUp",run:hc,shift:uc},{mac:"Ctrl-ArrowUp",run:Lh,shift:rc},{key:"ArrowDown",run:Yh,shift:nc,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cc,shift:Oc},{mac:"Ctrl-ArrowDown",run:Dh,shift:oc},{key:"PageUp",run:Lh,shift:rc},{key:"PageDown",run:Dh,shift:oc},{key:"Home",run:Eh,shift:lc},{key:"Mod-Home",run:hc,shift:uc},{key:"End",run:qh,shift:ac},{key:"Mod-End",run:cc,shift:Oc},{key:"Enter",run:yc},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:mc,shift:mc},{key:"Delete",run:gc,shift:gc},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bc},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Qc(t,!0)},{mac:"Mod-Backspace",run:t=>fc(t,(e=>{let i=t.visualLineAt(e).from;return dc(t,e>i?i:Math.max(0,e-1),!1)}))},{mac:"Mod-Delete",run:wc}].concat([{key:"Ctrl-b",run:Th,shift:Bh,preventDefault:!0},{key:"Ctrl-f",run:Wh,shift:Hh},{key:"Ctrl-p",run:Uh,shift:ic},{key:"Ctrl-n",run:Yh,shift:nc},{key:"Ctrl-a",run:t=>kh(t,(e=>kt.cursor(t.visualLineAt(e.head).from,1))),shift:t=>Nh(t,(e=>kt.cursor(t.visualLineAt(e.head).from)))},{key:"Ctrl-e",run:t=>kh(t,(e=>kt.cursor(t.visualLineAt(e.head).to,-1))),shift:t=>Nh(t,(e=>kt.cursor(t.visualLineAt(e.head).to)))},{key:"Ctrl-d",run:gc},{key:"Ctrl-h",run:mc},{key:"Ctrl-k",run:wc},{key:"Ctrl-Alt-h",run:bc},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:rt.of(["",""])},range:kt.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,n=t.doc.lineAt(i),s=i==n.from?i-1:H(n.text,i-n.from,!1)+n.from,r=i==n.to?i+1:H(n.text,i-n.from,!0)+n.from;return{changes:{from:s,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(s,i))},range:kt.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Alt-<",run:hc},{key:"Alt->",run:cc},{key:"Ctrl-v",run:Dh},{key:"Alt-v",run:Lh}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),Sc=t=>{let e=Xc(t.state);return e.line?Wc(t):!!e.block&&Rc(t)};function Tc(t,e){return({state:i,dispatch:n})=>{let s=t(e,i.selection.ranges,i);return!!s&&(n(i.update(s)),!0)}}const Wc=Tc(Cc,0),Rc=Tc(Ac,0);function Xc(t,e=t.selection.main.head){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}function Ac(t,e,i){let n=e.map((t=>Xc(i,t.from).block));if(!n.every((t=>t)))return null;let s=e.map(((t,e)=>function(t,{open:e,close:i},n,s){let r,o,a=t.sliceDoc(n-50,n),l=t.sliceDoc(s,s+50),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,u=a.length-h;if(a.slice(u-e.length,u)==e&&l.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=100?r=o=t.sliceDoc(n,s):(r=t.sliceDoc(n,n+50),o=t.sliceDoc(s-50,s));let O=/^\s*/.exec(r)[0].length,f=/\s*$/.exec(o)[0].length,d=o.length-f-i.length;return r.slice(O,O+e.length)==e&&o.slice(d,d+i.length)==i?{open:{pos:n+O+e.length,margin:/\s/.test(r.charAt(O+e.length))?1:0},close:{pos:s-f-i.length,margin:/\s/.test(o.charAt(d-1))?1:0}}:null}(i,n[e],t.from,t.to)));if(2!=t&&!s.every((t=>t))){let t=0;return i.changeByRange((e=>{let{open:i,close:r}=n[t++];if(s[t])return{range:e};let o=i.length+1;return{changes:[{from:e.from,insert:i+" "},{from:e.to,insert:" "+r}],range:kt.range(e.anchor+o,e.head+o)}}))}if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(t==r||r>a.from)){s=a.from;let t=Xc(i,e).line;if(!t)continue;let r=/^\s*/.exec(a.text)[0].length,l=r==a.length,h=a.text.slice(r,r+t.length)==t?r:-1;rt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:s,empty:r,single:o}of n)!o&&r||t.push({from:e.from+s,insert:i+" "});let e=i.changes(t);return{changes:e,selection:i.selection.map(e,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,r=n+s.length;" "==e.text[r-e.from]&&r++,t.push({from:n,to:r})}return{changes:t}}return null}class Zc extends be{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}}Zc.prototype.elementClass="",Zc.prototype.toDOM=void 0,Zc.prototype.mapMode=pt.TrackBefore,Zc.prototype.startSide=Zc.prototype.endSide=-1,Zc.prototype.point=!0;const _c=Wt.define(),Uc={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>xe.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Yc=Wt.define();function zc(t){return[Vc(),Yc.of(Object.assign(Object.assign({},Uc),t))]}const Lc=ur.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",borderRight:"1px solid #ddd"},"&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"}}),Dc=Wt.define({combine:t=>t.some((t=>t))});function Vc(t){let e=[qc,Lc];return t&&!1===t.fixed&&e.push(Dc.of(!0)),e}const qc=mn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(Yc).map((e=>new jc(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(Dc),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Dc)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=xe.iter(this.view.state.facet(_c),this.view.viewport.from),n=[],s=this.gutters.map((t=>new Gc(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks){let e;if(Array.isArray(t.type)){for(let i of t.type)if(i.type==Vi.Text){e=i;break}}else e=t.type==Vi.Text?t:void 0;if(e){n.length&&(n=[]),Mc(i,n,t.from);for(let t of s)t.line(this.view,e,n)}}for(let t of s)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Yc),i=t.state.facet(Yc),n=t.docChanged||t.heightChanged||t.viewportChanged||!xe.eq(t.startState.facet(_c),t.state.facet(_c),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(n=!0);else{n=!0;let s=[];for(let n of i){let i=e.indexOf(n);i<0?s.push(new jc(this.view,n)):(this.gutters[i].update(t),s.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove();for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){this.dom.remove()}},{provide:fn.scrollMargins.from((t=>0!=t.gutters.length&&t.fixed?t.view.textDirection==Rn.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}:null))});function Ec(t){return Array.isArray(t)?t:[t]}function Mc(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class Gc{constructor(t,e,i){this.gutter=t,this.height=i,this.localMarkers=[],this.i=0,this.cursor=xe.iter(t.markers,e.from)}line(t,e,i){this.localMarkers.length&&(this.localMarkers=[]),Mc(this.cursor,this.localMarkers,e.from);let n=i.length?this.localMarkers.concat(i):this.localMarkers,s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let r=this.gutter;if(0==n.length&&!r.config.renderEmptyElements)return;let o=e.top-this.height;if(this.i==r.elements.length){let i=new Nc(t,e.height,o,n);r.elements.push(i),r.dom.appendChild(i.dom)}else{let i=r.elements[this.i];(function(t,e){if(t.length!=e.length)return!1;for(let i=0;ithis.i;)t.dom.removeChild(t.elements.pop().dom)}}class jc{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s=t.lineBlockAtHeight(n.clientY-t.documentTop);e.domEventHandlers[i](t,s,n)&&n.preventDefault()}));this.markers=Ec(e.markers(t)),e.initialSpacer&&(this.spacer=new Nc(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Ec(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!xe.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}}class Nc{constructor(t,e,i,n){this.height=-1,this.above=0,this.dom=document.createElement("div"),this.update(t,e,i,n)}update(t,e,i,n){if(this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),this.markers!=n){this.markers=n;for(let t;t=this.dom.lastChild;)t.remove();let e="cm-gutterElement";for(let i of n){i.toDOM&&this.dom.appendChild(i.toDOM(t));let n=i.elementClass;n&&(e+=" "+n)}this.dom.className=e}}}const Ic=Wt.define(),Bc=Wt.define({combine:t=>Qe(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class Hc extends Zc{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Fc(t,e){return t.state.facet(Bc).formatNumber(e,t.state)}const Kc=Yc.compute([Bc],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Ic),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new Hc(Fc(t,t.state.doc.lineAt(e.from).number)),lineMarkerChange:t=>t.startState.facet(Bc)!=t.state.facet(Bc),initialSpacer:t=>new Hc(Fc(t,tu(t.state.doc.lines))),updateSpacer(t,e){let i=Fc(e.view,tu(e.view.state.doc.lines));return i==t.number?t:new Hc(i)},domEventHandlers:t.facet(Bc).domEventHandlers})));function Jc(t={}){return[Bc.of(t),Vc(),Kc]}function tu(t){let e=9;for(;e=n?void 0:{from:i,to:n}}const iu=re.define({map:eu}),nu=re.define({map:eu});function su(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const ru=Zt.define({create:()=>qi.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)i.is(iu)&&!au(t,i.value.from,i.value.to)?t=t.update({add:[du.range(i.value.from,i.value.to)]}):i.is(nu)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>ur.decorations.from(t)});function ou(t,e,i){var n;let s=null;return null===(n=t.field(ru,!1))||void 0===n||n.between(e,i,((t,e)=>{(!s||s.from>t)&&(s={from:t,to:e})})),s}function au(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}function lu(t,e){return t.field(ru,!1)?e:e.concat(re.appendConfig.of(fu()))}function hu(t,e,i=!0){let n=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number;return ur.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${n} ${t.state.phrase("to")} ${s}.`)}const cu=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of su(t)){let i=_o(t.state,e.from,e.to);if(i)return t.dispatch({effects:lu(t.state,[iu.of(i),hu(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(ru,!1))return!1;let e=[];for(let i of su(t)){let n=ou(t.state,i.from,i.to);n&&e.push(nu.of(n),hu(t,n,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let n=0;n{let e=t.state.field(ru,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(nu.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],uu={placeholderDOM:null,placeholderText:"…"},Ou=Wt.define({combine:t=>Qe(t,uu)});function fu(t){let e=[ru,Qu];return t&&e.push(Ou.of(t)),e}const du=qi.replace({widget:new class extends Di{ignoreEvents(){return!1}toDOM(t){let{state:e}=t,i=e.facet(Ou),n=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=ou(t.state,i.from,i.to);n&&t.dispatch({effects:nu.of(n)}),e.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,n);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",e.phrase("folded code")),s.title=e.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=n,s}}}),pu={openText:"⌄",closedText:"›",markerDOM:null};class mu extends Zc{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function gu(t={}){let e=Object.assign(Object.assign({},pu),t),i=new mu(e,!0),n=new mu(e,!1),s=mn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(uo)!=t.state.facet(uo)||t.startState.field(ru,!1)!=t.state.field(ru,!1))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new $e;for(let s of t.viewportLineBlocks){let r=ou(t.state,s.from,s.to)?n:_o(t.state,s.from,s.to)?i:null;r&&e.add(s.from,s.from,r)}return e.finish()}});return[s,zc({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||xe.empty},initialSpacer:()=>new mu(e,!1),domEventHandlers:{click:(t,e)=>{let i=ou(t.state,e.from,e.to);if(i)return t.dispatch({effects:nu.of(i)}),!0;let n=_o(t.state,e.from,e.to);return!!n&&(t.dispatch({effects:iu.of(n)}),!0)}}}),fu()]}const Qu=ur.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"}}),bu=ie.define(),wu=ie.define(),yu=Wt.define(),vu=Wt.define({combine:t=>Qe(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}),xu=Zt.define({create:()=>zu.empty,update(t,e){let i=e.state.facet(vu),n=e.annotation(bu);if(n){let s=Ru.fromTransaction(e),r=n.side,o=0==r?t.undone:t.done;return o=s?Xu(o,o.length,i.minDepth,s):Zu(o,e.startState.selection),new zu(0==r?n.rest:o,0==r?o:n.rest)}let s=e.annotation(wu);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(oe.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Ru.fromTransaction(e),o=e.annotation(oe.time),a=e.annotation(oe.userEvent);return r?t=t.addChanges(r,o,a,i.newGroupDelay,i.minDepth):e.selection&&(t=t.addSelection(e.startState.selection,o,a,i.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new zu(t.done.map(Ru.fromJSON),t.undone.map(Ru.fromJSON))});function $u(t={}){return[xu,vu.of(t),ur.domEventHandlers({beforeinput:(t,e)=>"historyUndo"==t.inputType?Pu(e):"historyRedo"==t.inputType&&Su(e)})]}function ku(t,e){return function({state:i,dispatch:n}){let s=i.field(xu,!1);if(!s)return!1;let r=s.pop(t,i,e);return!!r&&(n(r),!0)}}const Pu=ku(0,!1),Su=ku(1,!1),Tu=ku(0,!0),Wu=ku(1,!0);class Ru{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new Ru(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new Ru(t.changes&>.fromJSON(t.changes),[],t.mapped&&mt.fromJSON(t.mapped),t.startSelection&&kt.fromJSON(t.startSelection),t.selectionsAfter.map(kt.fromJSON))}static fromTransaction(t){let e=Cu;for(let i of t.startState.facet(yu)){let n=i(t);n.length&&(e=e.concat(n))}return!e.length&&t.changes.empty?null:new Ru(t.changes.invert(t.startState.doc),e,void 0,t.startState.selection,Cu)}static selection(t){return new Ru(void 0,Cu,void 0,void 0,t)}}function Xu(t,e,i,n){let s=e+1>i+20?e-i-1:0,r=t.slice(s,e);return r.push(n),r}function Au(t,e){return t.length?e.length?t.concat(e):t:e}const Cu=[];function Zu(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),Xu(t,t.length-1,1e9,i.setSelAfter(n)))}return[Ru.selection([e])]}function _u(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Uu(t,e){if(!t.length)return t;let i=t.length,n=Cu;for(;i;){let s=Yu(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[Ru.selection(n)]:Cu}function Yu(t,e,i){let n=Au(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Cu,i);if(!t.changes)return Ru.selection(n);let s=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new Ru(s,re.mapEffects(t.effects,e),o,t.startSelection.map(r),n)}class zu{constructor(t,e,i=0,n){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new zu(this.done,this.undone):this}addChanges(t,e,i,n,s){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!o.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,r)=>{for(let t=0;t=e&&s<=o&&(n=!0)}})),n}(o.changes,t.changes)||"input.type.compose"==i)?Xu(r,r.length-1,s,new Ru(t.changes.compose(o.changes),Au(t.effects,o.effects),o.mapped,o.startSelection,Cu)):Xu(r,r.length,s,t),new zu(r,Cu,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Cu;return s.length>0&&e-this.prevTimet.empty!=o.ranges[e].empty)).length)?this:new zu(Zu(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new zu(Uu(this.done,t),Uu(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1];if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:bu.of({side:t,rest:_u(n)}),userEvent:0==t?"select.undo":"select.redo"});if(s.changes){let i=1==n.length?Cu:n.slice(0,n.length-1);return s.mapped&&(i=Uu(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:bu.of({side:t,rest:i}),filter:!1,userEvent:0==t?"undo":"redo"})}return null}}zu.empty=new zu(Cu,Cu);const Lu=[{key:"Mod-z",run:Pu,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Su,preventDefault:!0},{key:"Mod-u",run:Tu,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Wu,preventDefault:!0}];class Du{constructor(t,e,i,n,s,r,o,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=n,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let n=t.parser.context;return new Du(t,[],e,i,i,0,[],0,n?new Vu(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){let e=t>>19,i=65535&t,{parser:n}=this.p,s=n.dynamicPrecedence(i);if(s&&(this.score+=s),0==e)return ir;)this.stack.pop();this.reduceContext(i,o)}storeNode(t,e,i,n=4,s=!1){if(0==t){let t=this,n=this.buffer.length;if(0==n&&t.parent&&(n=t.bufferBase-t.parent.bufferBase,t=t.parent),n>0&&0==t.buffer[n-4]&&t.buffer[n-1]>-1){if(e==i)return;if(t.buffer[n-2]>=e)return void(t.buffer[n-2]=i)}}if(s&&this.pos!=i){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,n>4&&(n-=4);this.buffer[s]=t,this.buffer[s+1]=e,this.buffer[s+2]=i,this.buffer[s+3]=n}else this.buffer.push(t,e,i,n)}shift(t,e,i){let n=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if(0==(262144&t)){let s=t,{parser:r}=this.p;(i>this.pos||e<=r.maxNode)&&(this.pos=i,r.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(e,n),e<=r.maxNode&&this.buffer.push(e,n,i,4)}else this.pos=i,this.shiftContext(e,n),e<=this.p.parser.maxNode&&this.buffer.push(e,n,i,4)}apply(t,e,i){65536&t?this.reduce(t):this.shift(t,e,i)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let n=this.pos;this.reducePos=this.pos=n+t.length,this.pushState(e,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),n=t.bufferBase+e;for(;t&&n==t.bufferBase;)t=t.parent;return new Du(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new Eu(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let n,s=0;s1&e&&t==n))||i.push(e[t],n)}e=i}let i=[];for(let t=0;t>19,n=65535&t,s=this.stack.length-3*i;if(s<0||e.getGoto(this.stack[s],n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reduce(t),!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:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Vu{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}var qu;!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(qu||(qu={}));class Eu{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=n}}class Mu{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new Mu(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 Mu(this.stack,this.pos,this.index)}}class Gu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const ju=new Gu;class Nu{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ju,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,n=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(n==this.ranges.length-1)return null;let t=this.ranges[++n];s+=t.from-i.to,i=t}return s}peek(t){let e,i,n=this.chunkOff+t;if(n>=0&&n=this.chunk2Pos&&en.to&&(this.chunk2=this.chunk2.slice(0,n.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=ju,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let n of this.ranges){if(n.from>=e)break;n.to>t&&(i+=this.input.read(Math.max(n.from,t),Math.min(n.to,e)))}return i}}class Iu{constructor(t,e){this.data=t,this.id=e}token(t,e){!function(t,e,i,n){let s=0,r=1<0){let i=t[n];if(a.allows(i)&&(-1==e.token.value||e.token.value==i||o.overrides(i,e.token.value))){e.acceptToken(i);break}}for(let n=e.next,r=0,o=t[s+2];r>1,l=i+a+(a<<1),h=t[l],c=t[l+1];if(n=c)){s=t[l+2],e.advance();continue t}r=a+1}}break}}(this.data,t,e,this.id)}}Iu.prototype.contextual=Iu.prototype.fallback=Iu.prototype.extend=!1;class Bu{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Hu(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let n=0,s=0;n=92&&e--,e>=34&&e--;let s=e-32;if(s>=46&&(s-=46,i=!0),r+=s,i)break;r*=46}i?i[s++]=r:i=new e(r)}return i}const Fu="undefined"!=typeof process&&/\bparse\b/.test(process.env.LOG);let Ku=null;var Ju,tO;function eO(t,e,i){let n=t.fullCursor();for(n.moveTo(e);;)if(!(i<0?n.childBefore(e):n.childAfter(e)))for(;;){if((i<0?n.toe)&&!n.type.isError)return i<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(i<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return i<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Ju||(Ju={}));class iO{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?eO(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?eO(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=o,null;if(r instanceof c){if(o==t){if(o=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+r.length}}}class nO{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new Gu))}getActions(t){let e=0,i=null,{parser:n}=t.p,{tokenizers:s}=n,r=n.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,a=0;for(let n=0;nh.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let n=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!l.extend&&(i=h,e>n))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new Gu,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new Gu,{pos:i,p:n}=t;return e.start=i,e.end=Math.min(i+1,n.stream.end),e.value=i==n.stream.end?n.parser.eofTerm:0,e}updateCachedToken(t,e,i){if(e.token(this.stream.reset(i.pos,t),i),t.value>-1){let{parser:e}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(s>>1)){0==(1&s)?t.value=s>>1:t.extended=s>>1;break}}}else t.value=0,t.end=Math.min(i.p.stream.end,i.pos+1)}putAction(t,e,i,n){for(let e=0;e4*t.bufferLength?new iO(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,n=this.minStackPos,s=this.stacks=[];for(let r=0;rn)s.push(o);else{if(this.advanceStack(o,s,i))continue;{t||(t=[],e=[]),t.push(o);let i=this.tokens.getMainToken(o);e.push(i.value,i.end)}}break}}if(!s.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,s);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(s.length>t)for(s.sort(((t,e)=>e.score-t.score));s.length>t;)s.pop();s.some((t=>t.reducePos>n))&&this.recovering--}else if(s.length>1)t:for(let t=0;t200&&n.buffer.length>200){if(!((e.score-n.score||e.buffer.length-n.buffer.length)>0)){s.splice(t--,1);continue t}s.splice(i--,1)}}}this.minStackPos=s[0].pos;for(let t=1;t ":"";if(null!=this.stoppedAt&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(s);a;){let s=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(s>-1&&a.length&&(!e||(a.prop(n.contextHash)||0)==i))return t.useNode(a,s),Fu&&console.log(o+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof c)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof c&&0==a.positions[0]))break;a=l}}let a=r.stateSlot(t.state,4);if(a>0)return t.reduce(a),Fu&&console.log(o+this.stackID(t)+` (via always-reduce ${r.getName(65535&a)})`),!0;let l=this.tokens.getActions(t);for(let n=0;ns?e.push(O):i.push(O)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return rO(t,e),!0}}runRecovery(t,e,i){let n=null,s=!1;for(let r=0;r ":"";if(o.deadEnd){if(s)continue;if(s=!0,o.restart(),Fu&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let t=0;c.forceReduce()&&t<10;t++){if(Fu&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,i))break;Fu&&(u=this.stackID(c)+" -> ")}for(let t of o.recoverByInsert(a))Fu&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),Fu&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),rO(o,i)):(!n||n.scoret;class lO{constructor(t){this.start=t.start,this.shift=t.shift||aO,this.reduce=t.reduce||aO,this.reuse=t.reuse||aO,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class hO extends P{constructor(e){if(super(),this.wrappers=[],13!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (13)`);let i=e.nodeNames.split(" ");this.minRepeatTerm=i.length;for(let t=0;te.topRules[t][1])),s=[];for(let t=0;t=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 a(i.map(((t,i)=>o.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:s[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1})))),this.strict=!1,this.bufferLength=t;let l=Hu(e.tokenData);if(this.context=e.context,this.specialized=new Uint16Array(e.specialized?e.specialized.length:0),this.specializers=[],e.specialized)for(let t=0;t"number"==typeof t?new Iu(l,t):t)),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(t,e,i){let n=new sO(this,t,e,i);for(let s of this.wrappers)n=s(n,t,e,i);return n}getGoto(t,e,i=!1){let n=this.goto;if(e>=n[0])return-1;for(let s=n[e+1];;){let e=n[s++],r=1&e,o=n[s++];if(r&&i)return o;for(let i=s+(e>>1);s0}validAction(t,e){if(e==this.stateSlot(t,4))return!0;for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])return!1;i=cO(this.data,i+2)}if(e==cO(this.data,i+1))return!0}}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=cO(this.data,i+2)}if(0==(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}overrides(t,e){let i=uO(this.data,this.tokenPrecTable,e);return i<0||uO(this.data,this.tokenPrecTable,t){let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let n of t.split(" ")){let t=e.indexOf(n);t>=0&&(i[t]=!0)}let n=null;for(let t=0;t=65&&t<=90||t>=97&&t<=122||t>=161}const dO=new Bu(((t,e)=>{for(let n=!1,s=0,r=0;;r++){let{next:o}=t;if(!(fO(o)||45==o||95==o||n&&(i=o,i>=48&&i<=57))){n&&t.acceptToken(40==o?94:2==s&&e.canShift(2)?2:95);break}!n&&(45!=o||r>0)&&(n=!0),s===r&&45==o&&s++,t.advance()}var i})),pO=new Bu((t=>{if(OO.includes(t.peek(-1))){let{next:e}=t;(fO(e)||95==e||35==e||46==e||91==e||58==e||45==e)&&t.acceptToken(93)}})),mO=new Bu((t=>{if(!OO.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),fO(e)){do{t.advance()}while(fO(t.next));t.acceptToken(1)}}})),gO={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,dir:32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},QO={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},bO={__proto__:null,not:128,only:128,from:158,to:160},wO=hO.deserialize({version:13,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'iQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QO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o~%QX?aQxPOy%Qz~%Q^?lQvUOy%Qz~%QX?uSOy%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[pO,mO,dO,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:t=>gO[t]||-1},{term:56,get:t=>QO[t]||-1},{term:95,get:t=>bO[t]||-1}],tokenPrec:1078});let yO=null;function vO(){if(!yO&&"object"==typeof document&&document.body){let t=[];for(let e in document.body.style)/[A-Z]|^-|^(item|length)$/.test(e)||t.push(e);yO=t.sort().map((t=>({type:"property",label:t})))}return yO||[]}const xO=["active","after","before","checked","default","disabled","empty","enabled","first-child","first-letter","first-line","first-of-type","focus","hover","in-range","indeterminate","invalid","lang","last-child","last-of-type","link","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-of-type","only-child","optional","out-of-range","placeholder","read-only","read-write","required","root","selection","target","valid","visited"].map((t=>({type:"class",label:t}))),$O=["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((t=>({type:"keyword",label:t}))).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((t=>({type:"constant",label:t})))),kO=["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((t=>({type:"type",label:t}))),PO=/^[\w-]*/,SO=t=>{let{state:e,pos:i}=t,n=io(e).resolveInner(i,-1);if("PropertyName"==n.name)return{from:n.from,options:vO(),span:PO};if("ValueName"==n.name)return{from:n.from,options:$O,span:PO};if("PseudoClassName"==n.name)return{from:n.from,options:xO,span:PO};if("TagName"==n.name){for(let{parent:t}=n;t;t=t.parent)if("Block"==t.name)return{from:n.from,options:vO(),span:PO};return{from:n.from,options:kO,span:PO}}if(!t.explicit)return null;let s=n.resolve(i),r=s.childBefore(i);return r&&":"==r.name&&"PseudoClassSelector"==s.name?{from:i,options:xO,span:PO}:r&&":"==r.name&&"Declaration"==s.name||"ArgList"==s.name?{from:i,options:$O,span:PO}:"Block"==s.name?{from:i,options:vO(),span:PO}:null},TO=eo.define({parser:wO.configure({props:[yo.add({Declaration:Ro()}),Co.add({Block:Zo}),Vo({"import charset namespace keyframes":ma.definitionKeyword,"media supports":ma.controlKeyword,"from to selector":ma.keyword,NamespaceName:ma.namespace,KeyframeName:ma.labelName,TagName:ma.tagName,ClassName:ma.className,PseudoClassName:ma.constant(ma.className),IdName:ma.labelName,"FeatureName PropertyName":ma.propertyName,AttributeName:ma.attributeName,NumberLiteral:ma.number,KeywordQuery:ma.keyword,UnaryQueryOp:ma.operatorKeyword,"CallTag ValueName":ma.atom,VariableName:ma.variableName,Callee:ma.operatorKeyword,Unit:ma.unit,"UniversalSelector NestingSelector":ma.definitionOperator,AtKeyword:ma.keyword,MatchOp:ma.compareOperator,"ChildOp SiblingOp, LogicOp":ma.logicOperator,BinOp:ma.arithmeticOperator,Important:ma.modifier,Comment:ma.blockComment,ParenthesizedContent:ma.special(ma.name),ColorLiteral:ma.color,StringLiteral:ma.string,":":ma.punctuation,"PseudoOp #":ma.derefOperator,"; ,":ma.separator,"( )":ma.paren,"[ ]":ma.squareBracket,"{ }":ma.brace})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}}),WO=TO.data.of({autocomplete:SO});function RO(){return new Oo(TO,WO)}var XO=Object.freeze({__proto__:null,css:RO,cssCompletion:WO,cssCompletionSource:SO,cssLanguage:TO});const AO={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},CO={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},ZO={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}};function _O(t){return 9==t||10==t||13==t||32==t}let UO=null,YO=null,zO=0;function LO(t,e){let i=t.pos+e;if(zO==i&&YO==t)return UO;let n=t.peek(e);for(;_O(n);)n=t.peek(++e);let s="";for(;45==(r=n)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)s+=String.fromCharCode(n),n=t.peek(++e);var r;return YO=t,zO=i,UO=s||(n==DO||n==VO?void 0:null)}const DO=63,VO=33;function qO(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let e=0;eEO.indexOf(e)>-1?new qO(LO(n,1)||"",t):t,reduce:(t,e)=>18==e&&t?t.parent:t,reuse(t,e,i,n){let s=e.type.id;return 4==s||35==s?new qO(LO(n,1)||"",t):t},hash:t=>t?t.hash:0,strict:!1}),GO=new Bu(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(56));t.advance();let i=47==t.next;i&&t.advance();let n=LO(t,0);if(void 0===n)return;if(!n)return t.acceptToken(i?11:4);let s=e.context?e.context.name:null;if(i){if(n==s)return t.acceptToken(8);if(s&&CO[s])return t.acceptToken(56,-2);if(e.dialectEnabled(0))return t.acceptToken(9);for(let t=e.context;t;t=t.parent)if(t.name==n)return;t.acceptToken(10)}else{if("script"==n)return t.acceptToken(5);if("style"==n)return t.acceptToken(6);if("textarea"==n)return t.acceptToken(7);s&&ZO[s]&&ZO[s][n]?t.acceptToken(56,-1):t.acceptToken(4)}}),{contextual:!0}),jO=new Bu(((t,e)=>{let i=1;if(47==t.next){if(62!=t.peek(1))return;i=2}else if(62!=t.next)return;e.context&&AO[e.context.name]&&t.acceptToken(12,i)})),NO=new Bu((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(57);break}if(t.next=="--\x3e".charCodeAt(e)){if(e++,3==e){i>3&&t.acceptToken(57,-2);break}}else e=0;t.advance()}}));function IO(t,e,i){let n=2+t.length;return new Bu((s=>{for(let r=0,o=0,a=0;;a++){if(s.next<0){a&&s.acceptToken(e);break}if(0==r&&60==s.next||1==r&&47==s.next||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(i,-(o-2));break}if((10==s.next||13==s.next)&&a){s.acceptToken(e,1);break}r=o=0}else o++;s.advance()}}))}const BO=IO("script",53,1),HO=IO("style",54,2),FO=IO("textarea",55,3),KO=hO.deserialize({version:13,states:",fOVO!jOOO!TQ#tO'#CoO!YQ#tO'#CyO!_Q#tO'#C|O!dQ#tO'#DPO!iOXO'#CnO!tOYO'#CnO#PO[O'#CnO$YO!jO'#CnOOOW'#Cn'#CnO$aO$fO'#DSO$iQ#tO'#DUO$nQ#tO'#DVOOOW'#Dj'#DjOOOW'#DX'#DXQVO!jOOO$sQ&jO,59ZO${Q&jO,59eO%TQ&jO,59hO%]Q&zO,59kOOOX'#D]'#D]O%hOXO'#CwO%sOXO,59YOOOY'#D^'#D^O%{OYO'#CzO&WOYO,59YOOO['#D_'#D_O&`O[O'#C}O&kO[O,59YOOOW'#D`'#D`O&sO!jO,59YO&zQ#tO'#DQOOOW,59Y,59YOOOp'#Da'#DaO'PO$fO,59nOOOW,59n,59nO'XQ#tO,59pO'^Q#tO,59qOOOW-E7V-E7VO'cQ&zO'#CqOOQ`'#DY'#DYO'qQ&jO1G.uOOOX1G.u1G.uO'yQ&jO1G/POOOY1G/P1G/PO(RQ&jO1G/SOOO[1G/S1G/SO(ZQ&zO1G/VOOOW1G/V1G/VOOOW1G/X1G/XOOOX-E7Z-E7ZO(fQ#tO'#CxOOOW1G.t1G.tOOOY-E7[-E7[O(kQ#tO'#C{OOO[-E7]-E7]O(pQ#tO'#DOOOOW-E7^-E7^O(uQ#tO,59lOOOp-E7_-E7_OOOW1G/Y1G/YOOOW1G/[1G/[OOOW1G/]1G/]O(zQ,UO,59]OOQ`-E7W-E7WOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$q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R!VhQkVR!XkQnWR!ZnQrYR!]rS^O_TmWn",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag SelfCloseEndTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:66,context:MO,nodeProps:[[n.closedBy,-9,1,2,3,5,6,7,8,9,10,"EndTag",4,"EndTag SelfCloseEndTag",-4,19,29,32,35,"CloseTag"],[n.group,-9,11,15,16,17,18,38,39,40,41,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],[n.openedBy,12,"StartTag",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag"]],skippedNodes:[0],repeatNodeCount:9,tokenData:"!#b!aR!WOX$kXY)sYZ)sZ]$k]^)s^p$kpq)sqr$krs*zsv$kvw+dwx2yx}$k}!O3f!O!P$k!P!Q7_!Q![$k![!]8u!]!^$k!^!_>b!_!`!!p!`!a8T!a!c$k!c!}8u!}#R$k#R#S8u#S#T$k#T#o8u#o$f$k$f$g&R$g%W$k%W%o8u%o%p$k%p&a8u&a&b$k&b1p8u1p4U$k4U4d8u4d4e$k4e$IS8u$IS$I`$k$I`$Ib8u$Ib$Kh$k$Kh%#t8u%#t&/x$k&/x&Et8u&Et&FV$k&FV;'S8u;'S;:jiW!``!bpOq(kqr?Rrs'gsv(kwx(]x!a(k!a!bKj!b~(k!R?YZ!``!bpOr(krs'gsv(kwx(]x}(k}!O?{!O!f(k!f!gAR!g#W(k#W#XGz#X~(k!R@SV!``!bpOr(krs'gsv(kwx(]x}(k}!O@i!O~(k!R@rT!``!bp!cPOr(krs'gsv(kwx(]x~(k!RAYV!``!bpOr(krs'gsv(kwx(]x!q(k!q!rAo!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gS^P!``!bpOr&Rrs&qsv&Rwx'rx!^&R!^!_(k!_~&R",tokenizers:[BO,HO,FO,GO,jO,NO,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0},tokenPrec:446});function JO(t,e){let i=Object.create(null);for(let n of t.firstChild.getChildren("Attribute")){let t=n.getChild("AttributeName"),s=n.getChild("AttributeValue")||n.getChild("UnquotedAttributeValue");t&&(i[e.read(t.from,t.to)]=s?"AttributeValue"==s.name?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return i}function tf(t,e,i){let n;for(let s of i)if(!s.attrs||s.attrs(n||(n=JO(t.node.parent,e))))return{parser:s.parser};return null}function ef(t){let e=[],i=[],n=[];for(let s of t){let t="script"==s.tag?e:"style"==s.tag?i:"textarea"==s.tag?n:null;if(!t)throw new RangeError("Only script, style, and textarea tags can host nested parsers");t.push(s)}return T(((t,s)=>{let r=t.type.id;return 27==r?tf(t,s,e):30==r?tf(t,s,i):33==r?tf(t,s,n):null}))}const nf=[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],sf=new lO({start:!1,shift:(t,e)=>4==e||5==e||280==e?t:281==e,strict:!1}),rf=new Bu(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&e.canShift(278)&&t.acceptToken(278)}),{contextual:!0,fallback:!0}),of=new Bu(((t,e)=>{let i,{next:n}=t;nf.indexOf(n)>-1||(47!=n||47!=(i=t.peek(1))&&42!=i)&&125!=n&&59!=n&&-1!=n&&!e.context&&e.canShift(274)&&t.acceptToken(274)}),{contextual:!0}),af=new Bu(((t,e)=>{let{next:i}=t;if((43==i||45==i)&&(t.advance(),i==t.next)){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}),{contextual:!0}),lf=new Bu((t=>{for(let e=!1,i=0;;i++){let{next:n}=t;if(n<0){i&&t.acceptToken(275);break}if(96==n){i?t.acceptToken(275):t.acceptToken(277,1);break}if(123==n&&e){1==i?t.acceptToken(276,1):t.acceptToken(275,-1);break}if(10==n&&i){t.advance(),t.acceptToken(275);break}92==n&&t.advance(),e=36==n,t.advance()}}));const hf={__proto__:null,export:16,as:21,from:25,default:30,async:35,function:36,this:46,true:54,false:54,void:60,typeof:64,null:78,super:80,new:114,await:131,yield:133,delete:134,class:144,extends:146,public:187,private:187,protected:187,readonly:189,in:210,instanceof:212,const:214,import:246,keyof:297,unique:301,infer:307,is:341,abstract:361,implements:363,type:365,let:368,var:370,interface:377,enum:381,namespace:387,module:389,declare:393,global:397,for:418,of:427,while:430,with:434,do:438,if:442,else:444,switch:448,case:454,try:460,catch:462,finally:464,return:468,throw:472,break:476,continue:480,debugger:484},cf={__proto__:null,async:101,get:103,set:105,public:153,private:153,protected:153,static:155,abstract:157,override:159,readonly:165,new:345},uf={__proto__:null,"<":121},Of=hO.deserialize({version:13,states:"$0nO`QYOOO&}Q!LdO'#CgO'UOSO'#DSO)^QYO'#DXO)nQYO'#DdO)uQYO'#DnO-lQYO'#DtOOQO'#EW'#EWO.PQWO'#EVO.UQWO'#EVO0TQ!LdO'#IpO2kQ!LdO'#IqO3XQWO'#EuO3^QpO'#F[OOQ!LS'#E}'#E}O3fO!bO'#E}O3tQWO'#FcO5RQWO'#FbOOQ!LS'#Iq'#IqOOQ!LQ'#Ip'#IpOOQQ'#JZ'#JZO5WQWO'#HiO5]Q!LYO'#HjOOQQ'#Ib'#IbOOQQ'#Hk'#HkQ`QYOOO)uQYO'#DfO5eQWO'#GVO5jQ#tO'#ClO5xQWO'#EUO6TQ#tO'#E|O6oQWO'#GVO6tQWO'#GZO7PQWO'#GZO7_QWO'#G^O7_QWO'#G_O7_QWO'#GaO5eQWO'#GdO8OQWO'#GgO9^QWO'#CcO9nQWO'#GtO9vQWO'#GzO9vQWO'#G|O`QYO'#HOO9vQWO'#HQO9vQWO'#HTO9{QWO'#HZO:QQ!LZO'#H_O)uQYO'#HaO:]Q!LZO'#HcO:hQ!LZO'#HeO5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d$hT%]x%`T%^x%`T/]*m/^",nodeNames:"⚠ ArithOp ArithOp extends LineComment BlockComment Script ExportDeclaration export Star as VariableName from String ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp in instanceof const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplatExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try catch finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:329,context:sf,nodeProps:[[n.group,-26,7,14,16,54,179,183,186,187,189,192,195,206,208,214,216,218,220,223,229,233,235,237,239,241,243,244,"Statement",-30,11,13,23,26,27,38,39,40,41,43,48,56,64,70,71,86,87,96,98,114,117,119,120,121,122,124,125,143,144,146,"Expression",-22,22,24,28,29,31,147,149,151,152,154,155,156,158,159,160,162,163,164,173,175,177,178,"Type",-2,75,81,"ClassItem"],[n.closedBy,37,"]",47,"}",62,")",127,"JSXSelfCloseEndTag JSXEndTag",141,"JSXEndTag"],[n.openedBy,42,"[",46,"{",61,"(",126,"JSXStartTag",136,"JSXStartTag JSXStartCloseTag"]],skippedNodes:[0,4,5],repeatNodeCount:28,tokenData:"!Ck~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxyk|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7a!]!^!7s!^!_!8T!_!`!9Q!`!a!9x!a!b!;o!b!c%T!c!}2`!}#O!=Q#O#P%T#P#Q!=b#Q#R!=r#R#S2`#S#T!>V#T#o2`#o#p!>g#p#q!>l#q#r!?S#r#s!?f#s$f%T$f$g%c$g#BY2`#BY#BZ!?v#BZ$IS2`$IS$I_!?v$I_$I|2`$I|$I}!B_$I}$JO!B_$JO$JT2`$JT$JU!?v$JU$KV2`$KV$KW!?v$KW&FU2`&FU&FV!?v&FV?HT2`?HT?HU!?v?HU~2`W%YR$PWO!^%T!_#o%T#p~%T,T%jg$PW'S+{OX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_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#o%T#p~%T%w!7jR!XV$PW#h%hO!^%T!_#o%T#p~%T!P!7zR^w$PWO!^%T!_#o%T#p~%T+c!8`R'[d!]%Y#s&s'yP!P!Q!8i!^!_!8n!_!`!8{W!8nO$RW#v!8sP#Z#v!_!`!8v#v!8{O#j#v#v!9QO#[#v%w!9XT!w%o$PWO!^%T!_!`'v!`!a!9h!a#o%T#p~%T$P!9oR#R#w$PWO!^%T!_#o%T#p~%T%w!:TT'Z!s#[#v#|S$PWO!^%T!_!`!:d!`!a!:t!a#o%T#p~%T$O!:kR#[#v$PWO!^%T!_#o%T#p~%T$O!:{T#Z#v$PWO!^%T!_!`5T!`!a!;[!a#o%T#p~%T$O!;cS#Z#v$PWO!^%T!_!`5T!`#o%T#p~%T%w!;vV'm%o$PWO!O%T!O!P!<]!P!^%T!_!a%T!a!b!^R$PW'`#wO!^%T!_#o%T#p~%T~!>lO!P~%r!>sT't%j$PWO!^%T!_!`5T!`#o%T#p#q!function(t,e){return"extends"==t&&e.dialectEnabled(1)?3:-1}(t,e)<<1},{term:283,get:t=>hf[t]||-1},{term:295,get:t=>cf[t]||-1},{term:59,get:t=>uf[t]||-1}],tokenPrec:11253}),ff=[Ll("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ll("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ll("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ll("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"block",type:"keyword"}),Ll("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),Ll('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ll('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],df=eo.define({parser:Of.configure({props:[yo.add({IfStatement:Ro({except:/^\s*({|else\b)/}),TryStatement:Ro({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Wo,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:n?1:2)*t.unit},Block:So({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>-1,"Statement Property":Ro({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Co.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":Zo,BlockComment:t=>({from:t.from+2,to:t.to-2})}),Vo({"get set async static":ma.modifier,"for while do if else switch try catch finally return throw break continue default case":ma.controlKeyword,"in of await yield void typeof delete instanceof":ma.operatorKeyword,"export import let var const function class extends":ma.definitionKeyword,"with debugger from as new":ma.keyword,TemplateString:ma.special(ma.string),Super:ma.atom,BooleanLiteral:ma.bool,this:ma.self,null:ma.null,Star:ma.modifier,VariableName:ma.variableName,"CallExpression/VariableName":ma.function(ma.variableName),VariableDefinition:ma.definition(ma.variableName),Label:ma.labelName,PropertyName:ma.propertyName,PrivatePropertyName:ma.special(ma.propertyName),"CallExpression/MemberExpression/PropertyName":ma.function(ma.propertyName),"FunctionDeclaration/VariableDefinition":ma.function(ma.definition(ma.variableName)),"ClassDeclaration/VariableDefinition":ma.definition(ma.className),PropertyDefinition:ma.definition(ma.propertyName),PrivatePropertyDefinition:ma.definition(ma.special(ma.propertyName)),UpdateOp:ma.updateOperator,LineComment:ma.lineComment,BlockComment:ma.blockComment,Number:ma.number,String:ma.string,ArithOp:ma.arithmeticOperator,LogicOp:ma.logicOperator,BitOp:ma.bitwiseOperator,CompareOp:ma.compareOperator,RegExp:ma.regexp,Equals:ma.definitionOperator,"Arrow : Spread":ma.punctuation,"( )":ma.paren,"[ ]":ma.squareBracket,"{ }":ma.brace,".":ma.derefOperator,", ;":ma.separator,TypeName:ma.typeName,TypeDefinition:ma.definition(ma.typeName),"type enum interface implements namespace module declare":ma.definitionKeyword,"abstract global privacy readonly override":ma.modifier,"is keyof unique infer":ma.operatorKeyword,JSXAttributeValue:ma.attributeValue,JSXText:ma.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ma.angleBracket,"JSXIdentifier JSXNameSpacedName":ma.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ma.attributeName})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),pf=df.configure({dialect:"ts"}),mf=df.configure({dialect:"jsx"}),gf=df.configure({dialect:"jsx ts"});function Qf(t={}){let e=t.jsx?t.typescript?gf:mf:t.typescript?pf:df;return new Oo(e,df.data.of({autocomplete:Ma(["LineComment","BlockComment","String"],Ea(ff))}))}function bf(t,e,i,n){return i.line(t+n.line).from+e+(1==t?n.col-1:-1)}function wf(t,e,i){let n=bf(t.line,t.column,e,i),s={from:n,to:null!=t.endLine&&1!=t.endColumn?bf(t.endLine,t.endColumn,e,i):n,message:t.message,source:t.ruleId?"jshint:"+t.ruleId:"jshint",severity:1==t.severity?"warning":"error"};if(t.fix){let{range:e,text:r}=t.fix,o=e[0]+i.pos-n,a=e[1]+i.pos-n;s.actions=[{name:"fix",apply(t,e){t.dispatch({changes:{from:e+o,to:e+a,insert:r},scrollIntoView:!0})}}]}return s}var yf=Object.freeze({__proto__:null,esLint:function(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach(((t,i)=>{t.meta.docs.recommended&&(e.rules[i]=2)}))),i=>{let{state:n}=i,s=[];for(let{from:i,to:r}of df.findRegions(n)){let o=n.doc.lineAt(i),a={line:o.number-1,col:i-o.from,pos:i};for(let o of t.verify(n.sliceDoc(i,r),e))s.push(wf(o,n.doc,a))}return s}},javascript:Qf,javascriptLanguage:df,jsxLanguage:mf,snippets:ff,tsxLanguage:gf,typescriptLanguage:pf});const vf=["_blank","_self","_top","_parent"],xf=["ascii","utf-8","utf-16","latin1","latin1"],$f=["get","post","put","delete"],kf=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Pf=["true","false"],Sf={},Tf={a:{attrs:{href:null,ping:null,type:null,media:null,target:vf,hreflang:null}},abbr:Sf,acronym:Sf,address:Sf,applet:Sf,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Sf,aside:Sf,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Sf,base:{attrs:{href:null,target:vf}},basefont:Sf,bdi:Sf,bdo:Sf,big:Sf,blockquote:{attrs:{cite:null}},body:Sf,br:Sf,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:kf,formmethod:$f,formnovalidate:["novalidate"],formtarget:vf,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Sf,center:Sf,cite:Sf,code:Sf,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:Sf,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Sf,dir:Sf,div:Sf,dl:Sf,dt:Sf,em:Sf,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Sf,figure:Sf,font:Sf,footer:Sf,form:{attrs:{action:null,name:null,"accept-charset":xf,autocomplete:["on","off"],enctype:kf,method:$f,novalidate:["novalidate"],target:vf}},frame:Sf,frameset:Sf,h1:Sf,h2:Sf,h3:Sf,h4:Sf,h5:Sf,h6:Sf,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Sf,hgroup:Sf,hr:Sf,html:{attrs:{manifest:null}},i:Sf,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:kf,formmethod:$f,formnovalidate:["novalidate"],formtarget:vf,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:Sf,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Sf,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:Sf,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:xf,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:Sf,noframes:Sf,noscript:Sf,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:Sf,param:{attrs:{name:null,value:null}},pre:Sf,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Sf,rt:Sf,ruby:Sf,s:Sf,samp:Sf,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:xf}},section:Sf,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},small:Sf,source:{attrs:{src:null,type:null,media:null}},span:Sf,strike:Sf,strong:Sf,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Sf,summary:Sf,sup:Sf,table:Sf,tbody:Sf,td:{attrs:{colspan:null,rowspan:null,headers:null}},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:Sf,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Sf,time:{attrs:{datetime:null}},title:Sf,tr:Sf,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},tt:Sf,u:Sf,ul:{children:["li","script","template","ul","ol"]},var:Sf,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:Sf},Wf={accesskey:null,class:null,contenteditable:Pf,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:Pf,autocorrect:Pf,autocapitalize:Pf,style:null,tabindex:null,title:null,translate:["yes","no"],onclick:null,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":Pf,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Pf,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Pf,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Pf,"aria-hidden":Pf,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Pf,"aria-multiselectable":Pf,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Pf,"aria-relevant":null,"aria-required":Pf,"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},Rf=Object.keys(Tf),Xf=Object.keys(Wf);function Af(t,e,i=t.length){if(!e)return"";let n=e.firstChild,s=n&&n.getChild("TagName");return s?t.sliceString(s.from,Math.min(s.to,i)):""}function Cf(t,e=!1){for(let i=t.parent;i;i=i.parent)if("Element"==i.name){if(!e)return i;e=!1}return null}function Zf(t,e){let i=Tf[Af(t,Cf(e,!0))];return(null==i?void 0:i.children)||Rf}function _f(t,e){let i=[];for(let n=e;n=Cf(n);){let s=Af(t,n);if(s&&"CloseTag"==n.lastChild.name)break;s&&i.indexOf(s)<0&&("EndTag"==e.name||e.from>=n.firstChild.to)&&i.push(s)}return i}const Uf=/^[:\-\.\w\u00b7-\uffff]+$/;function Yf(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:Zf(t.doc,e).map((t=>({label:t,type:"type"}))).concat(_f(t.doc,e).map(((t,e)=>({label:"/"+t,apply:"/"+t+s,type:"type",boost:99-e})))),span:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function zf(t,e,i,n){let s=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:i,to:n,options:_f(t.doc,e).map(((t,e)=>({label:t,apply:t+s,type:"type",boost:99-e}))),span:Uf}}function Lf(t){let{state:e,pos:i}=t,n=io(e).resolveInner(i),s=n.resolve(i,-1);for(let t,e=i;n==s&&(t=s.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from({label:t,type:"property"}))),span:Uf}}(e,s,"AttributeName"==s.name?s.from:i,i):"Is"==s.name||"AttributeValue"==s.name||"UnquotedAttributeValue"==s.name?function(t,e,i,n){var s;let r,o=null===(s=e.parent)||void 0===s?void 0:s.getChild("AttributeName"),a=[];if(o){let s=t.sliceDoc(o.from,o.to),l=Wf[s];if(!l){let i=Cf(e),n=i?Tf[Af(t.doc,i)]:null;l=(null==n?void 0:n.attrs)&&n.attrs[s]}if(l){let e=t.sliceDoc(i,n).toLowerCase(),s='"',o='"';/^['"]/.test(e)?(r='"'==e[0]?/^[^"]*$/:/^[^']*$/,s="",o=t.sliceDoc(n,n+1)==e[0]?"":e[0],e=e.slice(1),i++):r=/^[^\s<>='"]*$/;for(let t of l)a.push({label:t,apply:s+t+o,type:"constant"})}}return{from:i,to:n,options:a,span:r}}(e,s,"Is"==s.name?i:s.from,i):!t.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,i){let n=[],s=0;for(let i of Zf(t.doc,e))n.push({label:"<"+i,type:"type"});for(let i of _f(t.doc,e))n.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:n,span:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(e,s,i)}const Df=eo.define({parser:KO.configure({props:[yo.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:df.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:TO.parser}])}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Vf=Df.data.of({autocomplete:Lf});function qf(t={}){let e=Df;return!1===t.matchClosingTags&&(e=e.configure({dialect:"noMatch"})),new Oo(e,[Vf,!1!==t.autoCloseTags?Ef:[],Qf().support,RO().support])}const Ef=ur.inputHandler.of(((t,e,i,n)=>{if(t.composing||t.state.readOnly||e!=i||">"!=n&&"/"!=n||!Df.isActiveAt(t.state,e,-1))return!1;let{state:s}=t,r=s.changeByRange((t=>{var e,i,r;let o,{head:a}=t,l=io(s).resolveInner(a,-1);if("TagName"!=l.name&&"StartTag"!=l.name||(l=l.parent),">"==n&&"OpenTag"==l.name){if("CloseTag"!=(null===(i=null===(e=l.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(o=Af(s.doc,l.parent,a)))return{range:kt.cursor(a+1),changes:{from:a,insert:`>`}}}else if("/"==n&&"OpenTag"==l.name){let t=l.parent,e=null==t?void 0:t.parent;if(t.from==a-1&&"CloseTag"!=(null===(r=e.lastChild)||void 0===r?void 0:r.name)&&(o=Af(s.doc,e,a))){let t=`/${o}>`;return{range:kt.cursor(a+t.length),changes:{from:a,insert:t}}}}return{range:t}}));return!r.changes.empty&&(t.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}));var Mf=Object.freeze({__proto__:null,autoCloseTags:Ef,html:qf,htmlCompletion:Vf,htmlCompletionSource:Lf,htmlLanguage:Df});const Gf=Wt.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}}),jf=mn.fromClass(class{constructor(t){this.input=t.state.facet(Hf),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Gf);this.top=new Nf(t,!0,e.topContainer),this.bottom=new Nf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Gf);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Nf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Nf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(Hf);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],r=[],o=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),o.push(e)):(e=this.panels[a],e.update&&e.update(t)),n.push(e),(e.top?s:r).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:fn.scrollMargins.from((t=>({top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()})))});class Nf{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=If(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=If(t)}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 t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function If(t){let e=t.nextSibling;return t.remove(),e}const Bf=ur.baseTheme({".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"}}),Hf=Wt.define({enables:[jf,Bf]}),Ff="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Kf{constructor(t,e,i=0,n=t.length,s){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(Ff(t)):Ff,this.query=this.normalize(e)}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 et(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=it(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=nt(t);let n=this.normalize(e);for(let t=0,s=i;;t++){let r=n.charCodeAt(t),o=this.match(r,s);if(o)return this.value=o,this;if(t==n.length-1)break;s==i&&t=i||n.to<=e){let n=new id(e,t.sliceString(e,i));return ed.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:r}=n;return r>e&&(s=t.sliceString(e,r)+s,r=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e&&this.flat.tothis.flat.text.length-10&&(e=null),e){let t=this.flat.from+e.index,i=t+e[0].length;return this.value={from:t,to:i,match:e},this.matchPos=i+(t==i?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=id.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}"undefined"!=typeof Symbol&&(class{constructor(t,e,i,n=0,s=t.length){if(this.to=s,this.curLine="",this.done=!1,this.value=Jf,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new nd(t,e,i,n,s);this.re=new RegExp(e,td+((null==i?void 0:i.ignoreCase)?"i":"")),this.iter=t.iter();let r=t.lineAt(n);this.curLineStart=r.from,this.matchPos=n,this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),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 t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=n+(i==n?1:0),i==this.curLine.length&&this.nextLine(),ithis.value.to)return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=kt.create(i.ranges.map((e=>t.wordAt(e.head)||kt.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let n=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=n)))return!1;let s=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),r=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new Kf(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(r){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new Kf(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,n);return!!s&&(e(t.update({selection:t.selection.addRange(kt.range(s.from,s.to),!1),scrollIntoView:!0})),!0)};async function rd(){return wa.define((await import("./legacy.js").then((function(t){return t.c}))).clojure)}async function od(){return wa.define((await import("./legacy.js").then((function(t){return t.a}))).coffeeScript)}function ad(){return import("./cpp.js")}function ld(){return import("./java.js")}function hd(){return import("./json.js")}function cd(){return import("./markdown.js")}function ud(){return import("./php.js")}function Od(){return import("./python.js")}async function fd(){return wa.define((await import("./legacy.js").then((function(t){return t.s}))).shell)}function dd(){return import("./wast.js")}function pd(){return import("./xml.js")}export{Ch as $,ld as A,hd as B,lO as C,cd as D,Bu as E,ud as F,Od as G,fd as H,dd as I,pd as J,Ql as K,hO as L,jl as M,n as N,wl as O,P,Gl as Q,Va as R,Bl as S,c as T,Ma as U,Hl as V,bl as W,ih as X,oh as Y,Gh as Z,Zh as _,eo as a,mn as a$,kc as a0,$c as a1,yc as a2,jh as a3,tc as a4,Jh as a5,Pc as a6,Sc as a7,fu as a8,gu as a9,sd as aA,ie as aB,ne as aC,mt as aD,gt as aE,Et as aF,ge as aG,Wt as aH,$t as aI,re as aJ,se as aK,Zt as aL,oe as aM,wa as aN,Qa as aO,ft as aP,rt as aQ,Da as aR,La as aS,Ca as aT,qi as aU,Sr as aV,ur as aW,Er as aX,Yr as aY,Hr as aZ,Ir as a_,cu as aa,zc as ab,Zc as ac,Vc as ad,Ic as ae,Jc as af,No as ag,Io as ah,Yo as ai,$u as aj,Lu as ak,Su as al,Wu as am,Pu as an,Tu as ao,XO as ap,Mf as aq,yf as ar,no as as,Xo as at,mo as au,bh as av,Hf as aw,we as ax,xe as ay,$e as az,Co as b,$n as b0,Di as b1,w as b2,M as b3,Ro as c,Zo as d,Oo as e,Wo as f,o as g,a as h,yo as i,Jr as j,io as k,Fr as l,kt as m,Vt as n,vr as o,T as p,Kr as q,qf as r,Vo as s,ma as t,fo as u,oo as v,So as w,rd as x,od as y,ad as z}; diff --git a/front_end/third_party/codemirror.next/codemirror.next.d.ts b/front_end/third_party/codemirror.next/codemirror.next.d.ts index e482878d04..d3c1d7a349 100644 --- a/front_end/third_party/codemirror.next/codemirror.next.d.ts +++ b/front_end/third_party/codemirror.next/codemirror.next.d.ts @@ -2276,6 +2276,7 @@ interface MeasureRequest { */ key?: any; } +declare type AttrSource = Attrs | ((view: EditorView) => Attrs | null); /** View [plugins](https://codemirror.net/6/docs/ref/#view.ViewPlugin) are given instances of this class, which describe what happened, whenever the view is updated. @@ -2539,6 +2540,7 @@ declare class EditorView { readonly contentDOM: HTMLElement; private announceDOM; private plugins; + private pluginMap; private editorAttrs; private contentAttrs; private styleModules; @@ -2960,12 +2962,12 @@ declare class EditorView { Facet that provides additional DOM attributes for the editor's editable DOM element. */ - static contentAttributes: Facet; + static contentAttributes: Facet; /** Facet that provides DOM attributes for the editor's outer element. */ - static editorAttributes: Facet; + static editorAttributes: Facet; /** An extension that enables line wrapping in the editor (by setting CSS `white-space` to `pre-wrap` in the content). @@ -3157,10 +3159,10 @@ Configuration options. config?: SpecialCharConfig): Extension; /** -Returns a plugin that makes sure the content has a bottom margin -equivalent to the height of the editor, minus one line height, so -that every line in the document can be scrolled to the top of the -editor. +Returns an extension that makes sure the content has a bottom +margin equivalent to the height of the editor, minus one line +height, so that every line in the document can be scrolled to the +top of the editor. This is only meaningful when the editor is scrollable, and should not be enabled in editors that take the size of their content. diff --git a/front_end/third_party/codemirror.next/package.json b/front_end/third_party/codemirror.next/package.json index 7a2be6ddcc..52cd73f68a 100644 --- a/front_end/third_party/codemirror.next/package.json +++ b/front_end/third_party/codemirror.next/package.json @@ -8,7 +8,7 @@ "@codemirror/commands": "0.19.5", "@codemirror/comment": "0.19.0", "@codemirror/fold": "0.19.2", - "@codemirror/gutter": "0.19.7", + "@codemirror/gutter": "0.19.8", "@codemirror/highlight": "0.19.6", "@codemirror/history": "0.19.0", "@codemirror/lang-cpp": "0.19.1", @@ -22,7 +22,7 @@ "@codemirror/lang-python": "0.19.2", "@codemirror/lang-wast": "0.19.0", "@codemirror/lang-xml": "0.19.2", - "@codemirror/language": "0.19.6", + "@codemirror/language": "0.19.7", "@codemirror/legacy-modes": "0.19.0", "@codemirror/matchbrackets": "0.19.3", "@codemirror/panel": "0.19.0", @@ -32,7 +32,7 @@ "@codemirror/stream-parser": "0.19.2", "@codemirror/text": "0.19.5", "@codemirror/tooltip": "0.19.10", - "@codemirror/view": "0.19.23", + "@codemirror/view": "0.19.25", "@lezer/common": "0.15.10", "@lezer/lr": "0.15.5", "@rollup/plugin-node-resolve": "^13.0.4", diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test-expected.txt b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test-expected.txt index ec00ddb08e..e2a9bdd855 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test-expected.txt +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test-expected.txt @@ -4,25 +4,6 @@ Script snippet #1 Script snippet #2 -aXe violations: [ - { - "ruleDescription": "Ensures ARIA attributes are allowed for an element's role", - "helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-allowed-attr?application=axeAPI", - "ruleId": "aria-allowed-attr", - "impact": "critical", - "failedNodes": [ - { - "target": [ - [ - "devtools-text-editor", - ".cm-content" - ] - ], - "html": "

", - "failureSummary": "Fix any of the following:\n ARIA attribute is not allowed: aria-expanded=\"false\"" - } - ] - } -] +aXe violations: [] diff --git a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js index 25ee2f9b7b..94776020d1 100644 --- a/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js +++ b/test/webtests/http/tests/devtools/a11y-axe-core/sources/sources-editor-pane-a11y-test.js @@ -13,6 +13,10 @@ enabled: false, selector: ':not(.tabbed-pane-header-tabs)' }, + 'aria-allowed-attr': { + enabled: false, + selector: '.cm-content' + } }; await TestRunner.loadTestModule('axe_core_test_runner');