mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-10-23 01:41:15 +00:00
Add constraints on bot code editor window size
This commit is contained in:
1 parent
6ef6ca4553
commit
ccafd70388
8 files changed
+45
-34
No files matched your search
Vendored
+13
-13
@@ -1,15 +1,15 @@
|
||||
import{r as be,j as uh}from"./index-LNhn5rJq.js";function vr(){return vr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},vr.apply(null,arguments)}function Tu(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let wr=[],dh=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?dh:wr).push(t=t+n[e])})();function Cu(n){if(n<768)return!1;for(let e=0,t=wr.length;;){let i=e+t>>1;if(n<wr[i])t=i;else if(n>=dh[i])e=i+1;else return!0;if(e==t)return!1}}function al(n){return n>=127462&&n<=127487}const hl=8205;function Qu(n,e,t=!0,i=!0){return(t?ph:Au)(n,e,i)}function ph(n,e,t){if(e==n.length)return e;e&&mh(n.charCodeAt(e))&&gh(n.charCodeAt(e-1))&&e--;let i=Ls(n,e);for(e+=cl(i);e<n.length;){let s=Ls(n,e);if(i==hl||s==hl||t&&Cu(s))e+=cl(s),i=s;else if(al(s)){let r=0,o=e-2;for(;o>=0&&al(Ls(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Au(n,e,t){for(;e>0;){let i=ph(n,e-2,t);if(i<e)return i;e--}return 0}function Ls(n,e){let t=n.charCodeAt(e);if(!gh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return mh(i)?(t-55296<<10)+(i-56320)+65536:t}function mh(n){return n>=56320&&n<57344}function gh(n){return n>=55296&&n<56320}function cl(n){return n<65536?1:2}class V{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=oi(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ye.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=oi(this,e,t);let i=[];return this.decompose(e,t,i,0),Ye.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Qi(this),r=new Qi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Qi(this,e)}iterRange(e,t=this.length){return new Oh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new yh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?V.empty:e.length<=32?new Y(e):Ye.from(Y.split(e,[]))}}class Y extends V{constructor(e,t=Pu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Mu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Y(fl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$n(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Y(l,o.length+r.length));else{let a=l.length>>1;i.push(new Y(l.slice(0,a)),new Y(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Y))return super.replace(e,t,i);[e,t]=oi(this,e,t);let s=$n(this.text,$n(i.text,fl(this.text,0,e)),t),r=this.length+i.length-(t-e);return sLine truncated
|
||||
import{r as be,j as vr}from"./index-BtBXI4sW.js";function wr(){return wr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},wr.apply(null,arguments)}function Tu(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let Tr=[],dh=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,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tr.length;;){let i=e+t>>1;if(n<Tr[i])t=i;else if(n>=dh[i])e=i+1;else return!0;if(e==t)return!1}}function hl(n){return n>=127462&&n<=127487}const cl=8205;function Qu(n,e,t=!0,i=!0){return(t?ph:Au)(n,e,i)}function ph(n,e,t){if(e==n.length)return e;e&&mh(n.charCodeAt(e))&&gh(n.charCodeAt(e-1))&&e--;let i=Ls(n,e);for(e+=fl(i);e<n.length;){let s=Ls(n,e);if(i==cl||s==cl||t&&Cu(s))e+=fl(s),i=s;else if(hl(s)){let r=0,o=e-2;for(;o>=0&&hl(Ls(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Au(n,e,t){for(;e>0;){let i=ph(n,e-2,t);if(i<e)return i;e--}return 0}function Ls(n,e){let t=n.charCodeAt(e);if(!gh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return mh(i)?(t-55296<<10)+(i-56320)+65536:t}function mh(n){return n>=56320&&n<57344}function gh(n){return n>=55296&&n<56320}function fl(n){return n<65536?1:2}class V{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=oi(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ye.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=oi(this,e,t);let i=[];return this.decompose(e,t,i,0),Ye.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Qi(this),r=new Qi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Qi(this,e)}iterRange(e,t=this.length){return new Oh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new yh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?V.empty:e.length<=32?new Y(e):Ye.from(Y.split(e,[]))}}class Y extends V{constructor(e,t=Pu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Mu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Y(ul(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$n(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Y(l,o.length+r.length));else{let a=l.length>>1;i.push(new Y(l.slice(0,a)),new Y(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Y))return super.replace(e,t,i);[e,t]=oi(this,e,t);let s=$n(this.text,$n(i.text,ul(this.text,0,e)),t),r=this.length+i.length-(t-e);return sLine truncated
|
||||
`){[e,t]=oi(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(s+=i),e<a&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Y(i,s)),i=[],s=-1);return s>-1&&t.push(new Y(i,s)),t}}class Ye extends V{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=oi(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new Ye(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
||||
`){[e,t]=oi(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ye))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Y(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ye)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof Y&&a&&(p=c[c.length-1])instanceof Y&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new Y(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:Ye.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ye(l,t)}}V.empty=new Y([""],0);function Pu(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $n(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function fl(n,e,t){return $n(n,[""],e,t)}class Qi{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Y?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Y?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(s instanceof Y){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Y?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Oh{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Qi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class yh{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(V.prototype[Symbol.iterator]=function(){return this.iter()},Qi.prototype[Symbol.iterator]=Oh.prototype[Symbol.iterator]=yh.prototype[Symbol.iterator]=function(){return this});class Mu{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function oi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function re(n,e,t=!0,i=!0){return Qu(n,e,t,i)}function Ru(n){return n>=56320&&n<57344}function Eu(n){return n>=55296&&n<56320}function ke(n,e){let t=n.charCodeAt(e);if(!Eu(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ru(i)?(t-55296<<10)+(i-56320)+65536:t}function bo(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ke(n){return n<65536?1:2}const Tr=/\r\n?|\n/;var de=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(de||(de={}));class nt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Cr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new nt(e)}composeDesc(e){return this.empty?e:e.empty?this:bh(this,e)}mapDesc(e,t=!1){return e.empty?this:Qr(this,e,t)}mapPos(e,t=-1,i=de.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=de.Simple&&h>=e&&(i==de.TrackDel&&s<e&&h>e||i==de.TrackBefore&&s<e||i==de.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nt(e)}static create(e){return new nt(e)}}class se extends nt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Cr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Qr(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(V.empty);i.push(o?e.slice(r,r+o):V.empty)}r+=o}return new se(t,i)}compose(e){return this.empty?e:e.empty?this:bh(this,e,!0)}map(e,t=!1){return e.empty?this:Qr(this,e,t,!0)}iterChanges(e,t=!1){Cr(this,e,t)}get desc(){return nt.crea
Line truncated
|
||||
`}get readOnly(){return this.facet(Qh)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(kh))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return Xu(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=re(t,o,!1);if(r(t.slice(a,o))!=G.Word)break;o=a}for(;l<s;){let a=re(t,l);if(r(t.slice(l,a))!=G.Word)break;l=a}return o==l?null:b.range(o+i,l+i)}}N.allowMultipleSelections=Mr;N.tabSize=A.define({combine:n=>n.length?n[0]:4});N.lineSeparator=vh;N.readOnly=Qh;N.phrases=A.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=kh;N.changeFilter=wh;N.transactionFilter=Th;N.transactionExtender=Ch;ks.reconfigure=D.define();function rt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class vt{eq(e){return this==e}range(e,t=e){return Dr.create(e,t,this)}}vt.prototype.startSide=vt.prototype.endSide=0;vt.prototype.point=!1;vt.prototype.mapMode=de.TrackDel;function ko(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Dr=class Mh{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Mh(e,t,i)}};function qr(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class vo{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let h=this.value[a],c=this.from[a]+e,f=this.to[a]+e,u,d;if(c==f){let p=t.mapPos(c,h.startSide,h.mapMode);if(p==null||(u=d=p,h.startSide!=h.endSide&&(d=t.mapPos(c,h.endSide),d<u)))continue}else if(u=t.mapPos(c,h.startSide),d=t.mapPos(f,h.endSide),u>d||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new vo(s,r,i,l):null,pos:o}}}class z{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new z(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(qr)),this.isEmpty)return t.length?z.of(t):this;let l=new Rh(this,null,-1).goto(0),a=0,h=[],c=new pt;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||h.push(Dr.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!h.length?z.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],h=e.touchesRange(l,l+a.length);if(h===!1)s=Math.max(s,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(h===!0){let{mapped:c,pos:f}=a.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new z(i,t,r||z.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Bi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Bi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.f
Line truncated
|
||||
`)}static newName(){let e=Ol[gl]||1;return Ol[gl]=e+1,$r+e.toString(36)}static mount(e,t,i){let s=e[Lr],r=i&&i.nonce;s?r&&s.setNonce(r):s=new _u(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let yl=new Map;class _u{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=yl.get(i);if(r)return e[Lr]=r;this.sheet=new s.CSSStyleSheet,yl.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Lr]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h<l.rules.length;h++)i.insertRule(l.rules[h],s++)}else{for(;r<a;)s+=this.modules[r++].rules.length;s+=l.rules.length,r++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
|
||||
`;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Tt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},$i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Uu=typeof navigator<"u"&&/Mac/.test(navigator.platform),Hu=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ue=0;ue<10;ue++)Tt[48+ue]=Tt[96+ue]=String(ue);for(var ue=1;ue<=24;ue++)Tt[ue+111]="F"+ue;for(var ue=65;ue<=90;ue++)Tt[ue]=String.fromCharCode(ue+32),$i[ue]=String.fromCharCode(ue);for(var Is in Tt)$i.hasOwnProperty(Is)||($i[Is]=Tt[Is]);function ju(n){var e=Uu&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Hu&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?$i:Tt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function _(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;e<arguments.length;e++)Eh(n,arguments[e]);return n}function Eh(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Eh(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let xe=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},zr=typeof document<"u"?document:{documentElement:{style:{}}};const Ir=/Edge\/(\d+)/.exec(xe.userAgent),Dh=/MSIE \d/.test(xe.userAgent),Nr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe.userAgent),vs=!!(Dh||Nr||Ir),bl=!vs&&/gecko\/(\d+)/i.test(xe.userAgent),Ns=!vs&&/Chrome\/(\d+)/.exec(xe.userAgent),Gu="webkitFontSmoothing"in zr.documentElement.style,Vr=!vs&&/Apple Computer/.test(xe.vendor),xl=Vr&&(/Mobile\/\w+/.test(xe.userAgent)||xe.maxTouchPoints>2);var P={mac:xl||/Mac/.test(xe.platform),windows:/Win/.test(xe.platform),linux:/Linux|X11/.test(xe.platform),ie:vs,ie_version:Dh?zr.documentMode||6:Nr?+Nr[1]:Ir?+Ir[1]:0,gecko:bl,gecko_version:bl?+(/Firefox\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,chrome:!!Ns,chrome_version:Ns?+Ns[1]:0,ios:xl,android:/Android\b/.test(xe.userAgent),webkit_version:Gu?+(/\bAppleWebKit\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,safari:Vr,safari_version:Vr?+(/\bVersion\/(\d+(\.\d+)?)/.exec(xe.userAgent)||[0,0])[1]:0,tabSize:zr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function wo(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Zn=Object.create(null);function To(n,e,t){if(n==e)return!0;n||(n=Zn),e||(e=Zn);let i=Object.keys(n),s=Object.keys(e);if(i.length-0!=s.length-0)return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function Zu(n,e){for(let t=n.attributes.length-1;t>=0;t--){let i=n.attributes[t].name;e[i]==null&&n.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?n.style.cssText=i:n.getAttribute(t)!=i&&n.setAttribute(t,i)}}function Sl(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function Yu(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let i=n.attributes[t];e[i.name]=i.value}return e}class Xe{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var pe=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(pe||(pe={}));class M extends vt{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Ji(e)}staLine truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function zd(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==G.Space&&(s=o),s==o}}function Id(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let p=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-p.from))),l=(r<0?p.top:p.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1,d=Zr(n,{x:f,y:l+u*r},!1,r);return b.cursor(d.pos,d.assoc,void 0,o)}function Ei(n,e,t){for(;;){let i=0;for(let s of n)s.between(e-1,e+1,(r,o,l)=>{if(e>r&&e<o){let a=i||t||(e-r<o-e?-1:1);e=a<0?r:o,i=a}});if(!i)return e}}function lc(n,e){let t=null;for(let i=0;i<e.ranges.length;i++){let s=e.ranges[i],r=null;if(s.empty){let o=Ei(n,s.from,0);o!=s.from&&(r=b.cursor(o,-1))}else{let o=Ei(n,s.from,-1),l=Ei(n,s.to,1);(o!=s.from||l!=s.to)&&(r=b.range(s.from==s.anchor?o:l,s.from==s.head?o:l))}r&&(t||(t=e.ranges.slice()),t[i]=r)}return t?b.create(t,e.mainIndex):e}function Us(n,e,t){let i=Ei(n.state.facet(tn).map(s=>s(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:b.cursor(i,i<t.from?1:-1)}class Je{constructor(e,t){this.pos=e,this.assoc=t}}function Zr(n,e,t,i){let s=n.contentDOM.getBoundingClientRect(),r=s.top+n.viewState.paddingTop,{x:o,y:l}=e,a=l-r,h;for(;;){if(a<0)return new Je(0,1);if(a>n.viewState.docHeight)return new Je(n.state.doc.length,-1);if(h=n.elementAtHeight(a),i==null)break;if(h.type==pe.Text){let u=n.docView.coordsAt(i<0?h.from:h.to,i);if(u&&(i<0?u.top<=a+r:u.bottom>=a+r))break}let f=n.viewState.heightOracle.textHeight/2;a=i>0?h.bottom+f:h.top-f}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==pe.Text){let f=$d(n,s,h,o,l);return new Je(f,f==h.from?1:-1)}}if(h.type!=pe.Text)return a<(h.top+h.bottom)/2?new Je(h.from,1):new Je(h.to,-1);let c=n.docView.lineAt(h.from,2);return(!c||c.length!=h.length)&&(c=n.docView.lineAt(h.from,-2)),ac(n,c,h.from,o,l)}function ac(n,e,t,i,s){let r=-1,o=null,l=1e9,a=1e9,h=s,c=s,f=(u,d)=>{for(let p=0;p<u.length;p++){let m=u[p];if(m.top==m.bottom)continue;let g=m.left>i?m.left-i:m.right<i?i-m.right:0,y=m.top>s?m.top-s:m.bottom<s?s-m.bottom:0;m.top<=c&&m.bottom>=h&&(h=Math.min(m.top,h),c=Math.max(m.bottom,c),y=0),(r<0||(y-a||g-l)<0)&&(r>=0&&a&&l<g&&o.top<=c-2&&o.bottom>=h+2?a=0:(r=d,l=g,a=y,o=m))}};if(e.isText()){for(let d=0;d<e.length;){let p=re(e.text,d);if(f(Ii(e.dom,d,p).getClientRects(),d),!l&&!a)break;d=p}return i>(o.left+o.right)/2==(Pl(n,r+t)==H.LTR)?new Je(t+re(e.text,r),-1):new Je(t+r,1)}else{if(!e.length)return new Je(t,1);for(let m=0;m<e.children.length;m++){let g=e.children[m];if(g.flags&48)continue;let y=(g.dom.nodeType==1?g.dom:Ii(g.dom,0,g.length)).getClientRects();if(f(y,m),!l&&!a)break}let u=e.children[r],d=e.posBefore(u,t);return u.isComposite()||u.isText()?ac(n,u,d,Math.max(o.left,Math.min(o.right,i)),s):i>(o.left+o.right)/2==(Pl(n,r+t)==H.LTR)?new Je(d+u.length,-1):new Je(d,1)}}function Pl(n,e){let t=n.state.doc.lineAt(e);return n.bidiSpans(t)[dt.find(n.bidiSpans(t),e-t.from,-1,1)].dir}const wi="";class Nd{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(N.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=wi}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let r=this.text.length;this.readNode(s);let o=ie.get(s),l=s.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let a=ie.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:Yn(s))||Yn(l)&&(s.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>r)&&!Xd(l,t)&&this.lineBreak(),s=l}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){let t=ie.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Vd(e,i.node,i.offset)?t:0))}}function Vd(n
Line truncated
|
||||
`&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:V.of([" "])}),t)return Eo(n,t,i,r);if(i&&!ts(i,s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=lc(n.state.facet(tn).map(a=>a(n)),i))),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function Eo(n,e,t,i=-1){if(P.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(P.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ti(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&ti(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&ti(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=_d(n,e,t));return n.state.facet(Gh).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function _d(n,e,t){let i,s=n.state,r=s.selection.main,o=-1;if(e.from==e.to&&e.from<r.from||e.from>r.to){let a=e.from<r.from?-1:1,h=a<0?r.from:r.to,c=Ei(s.facet(tn).map(f=>f(n)),h,a);e.from==c&&(o=c)}if(o>-1)i={changes:e,selection:b.cursor(e.from+e.insert.length,-1)};else if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",h=r.to>e.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let a=s.changes(e),h=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=r.to+10&&e.to>=r.to-10){let c=n.state.sliceDoc(e.from,e.to),f,u=t&&oc(n,t.main.head);if(u){let p=e.insert.length-(e.to-e.from);f={from:u.from,to:u.to-p}}else f=n.state.doc.lineAt(r.head);let d=r.to-e.to;i=s.changeByRange(p=>{if(p.from==r.from&&p.to==r.to)return{changes:a,range:h||p.map(a)};let m=p.to-d,g=m-c.length;if(n.state.sliceDoc(g,m)!=c||m>=f.from&&g<=f.to)return{range:p};let y=s.changes({from:g,to:m,insert:e.insert}),k=p.to-r.to;return{changes:y,range:h?b.range(Math.max(0,h.anchor+k),Math.max(0,h.head+k)):p.map(y)}})}else i={changes:a,selection:h&&s.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:l,scrollIntoView:!0})}function fc(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r<s&&n.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o<r&&n.length<e.length){let a=t<=r&&t>=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l<r){let a=t<=r&&t>=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Ud(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Ml(t,i)),(s!=t||r!=i)&&e.push(new Ml(s,r))),e}function Hd(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}function ts(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class jd{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,P.safari&&e.contentDOM.addEventListener("input",()=>null),P.gecko&&hp(e.contentDOM.ownerDocument)}handleEvent(e){!ip(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Gd(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.
Line truncated
|
||||
`))};if((P.mac||P.android)&&f.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:a,insert:V.of([i.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let u=this.to-this.from+(f.to-f.from+f.insert.length);Eo(e,f,b.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let a=e.coordsForChar(o);r=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(a<h){let c=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;s.push(M.mark({attributes:{style:c}}).range(a,h))}}}e.dispatch({effects:ec.of(M.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=li(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class C{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureReque
Line truncated
|
||||
--\u2028\u2029\uFEFF-]`,io),Hp={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",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Gs=null;function jp(){var n;if(Gs==null&&typeof document<"u"&&document.body){let e=document.body.style;Gs=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Gs||!1}const Nn=A.define({combine(n){let e=rt(n,{render:null,specialChars:Up,addSpecialChars:null});return(e.replaceTabs=!jp())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,io)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,io)),e}});function Gp(n={}){return[Nn.of(n),Zp()]}let Kl=null;function Zp(){return Kl||(Kl=J.fromClass(class{constructor(n){this.view=n,this.decorations=M.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Nn)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new _p({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ke(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=pi(o.text,l,i-o.from);return M.replace({widget:new em((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=M.replace({widget:new Jp(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Nn);n.startState.facet(Nn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Yp="•";function Kp(n){return n>=32?Yp:n==10?"":String.fromCharCode(9216+n)}class Jp extends Xe{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Kp(this.code),i=e.state.phrase("Control character")+" "+(Hp[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class em extends Xe{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function tm(){return nm}const im=M.line({class:"cm-activeLine"}),nm=J.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(im.range(s.from)),e=s.from)}return M.set(t)}},{decorations:n=>n.decorations});class sm extends Xe{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Mi(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),s=zi(t[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function rm(n){let e=J.fromClass(class{constructor(t){this.view=t,this.placeholder=n?M.set([M.widget({widget:new sm(n),side:1}).range(0)]):M.none}get decorations(){return this.view.state.doc.length?M.none:this.placeholder}},{decorations:t=>t.decorations});return typeof n=="string"?[e,C.contentAttributes.of({"aria-placeholder":n})]:e}const no=2e3;function om(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>no||t.off>no||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(b.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=Br(h.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(h.to));else{let f=Br(h.text,l,n.tabSize);r.push(b.range(h.from+c,h.from+f))}}}return r}function lm(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function Jl(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>no?-1:s==i.length?lm(n,e.clientX):pi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function am(n,e){let t=Jl(n,e),i=n.stat
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new S0(this):new y0(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?jt(this,s,t,i):Ht(this,s,t,i)}}class Uf{constructor(e){this.spec=e}}function g0(n,e,t){return(i,s,r,o)=>{if(t&&!t(i,s,r,o))return!1;let l=i>=o&&s<=o+r.length?r.slice(i-o,s-o):e.doc.sliceString(i,s);return n(l,e,i,s)}}function Ht(n,e,t,i){let s;return n.wholeWord&&(s=O0(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(s=g0(n.test,e,s)),new ui(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),s)}function O0(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),(e(ds(s,t-r))!=G.Word||e(ps(s,t-r))!=G.Word)&&(e(ps(s,i-r))!=G.Word||e(ds(s,i-r))!=G.Word))}class y0 extends Uf{constructor(e){super(e)}nextMatch(e,t,i){let s=Ht(this.spec,e,i,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Ht(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==i?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Ht(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=i)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Ht(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ht(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function b0(n,e,t){return(i,s,r)=>(!t||t(i,s,r))&&n(r[0],e,i,s)}function jt(n,e,t,i){let s;return n.wholeWord&&(s=x0(e.charCategorizer(e.selection.main.head))),n.test&&(s=b0(n.test,e,s)),new Xf(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:s},t,i)}function ds(n,e){return n.slice(re(n,e,!1),e)}function ps(n,e){return n.slice(e,re(n,e))}function x0(n){return(e,t,i)=>!i[0].length||(n(ds(i.input,i.index))!=G.Word||n(ps(i.input,i.index))!=G.Word)&&(n(ps(i.input,i.index+i[0].length))!=G.Word||n(ds(i.input,i.index+i[0].length))!=G.Word)}class S0 extends Uf{nextMatch(e,t,i){let s=jt(this.spec,e,i,e.doc.length).next();return s.done&&(s=jt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=jt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r<e.match.length)return e.match[r]+i.slice(s)}return t})}matchAll(e,t){let i=jt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=jt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Ui=D.define(),jo=D.define(),kt=he.define({create(n){return new cr(go(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Ui)?n=new cr(t.value.create(),n.panel):t.is(jo)&&(n=new cr(n.query,t.value?Go:null));return n},provide:n=>Vi.from(n,e=>e.panel)});class cr{constructor(e,t){this.query=e,this.panel=t}}const k0=M.mark({class:"cm-searchMatch"}),v0=M.mark({class:"cm-searchMatch cm-searchMatch-selected"}),w0=J.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(kt))}update(n){let e=n.state.field(kt);(e!=n.startState.field(kt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return M.none;let{view:t}=this,i=new pt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:a}=r[s];for(;s<o-1&&a>r[s+1].from-500;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?v0:k0)})}return i.finish()}},{decorations:n=>n.decorations});function hn(n){return e=>{let t=e.state.field(kt,!1);return t&&t.query.spec.valid?n(e,t):Gf(e)}}const ms=hn((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=b.single(i.from,i.to),r=n.state.facet(gi);return n.dispatch({selection:s,effects:[Zo(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),jf(n),!0}),gs=hn((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=
Line truncated
|
||||
`){[e,t]=oi(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ye))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Y(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ye)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof Y&&a&&(p=c[c.length-1])instanceof Y&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new Y(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:Ye.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ye(l,t)}}V.empty=new Y([""],0);function Pu(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $n(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function ul(n,e,t){return $n(n,[""],e,t)}class Qi{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Y?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Y?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(s instanceof Y){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Y?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Oh{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Qi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class yh{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(V.prototype[Symbol.iterator]=function(){return this.iter()},Qi.prototype[Symbol.iterator]=Oh.prototype[Symbol.iterator]=yh.prototype[Symbol.iterator]=function(){return this});class Mu{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function oi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function re(n,e,t=!0,i=!0){return Qu(n,e,t,i)}function Ru(n){return n>=56320&&n<57344}function Eu(n){return n>=55296&&n<56320}function ke(n,e){let t=n.charCodeAt(e);if(!Eu(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ru(i)?(t-55296<<10)+(i-56320)+65536:t}function xo(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ke(n){return n<65536?1:2}const Cr=/\r\n?|\n/;var de=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(de||(de={}));class nt{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Qr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new nt(e)}composeDesc(e){return this.empty?e:e.empty?this:bh(this,e)}mapDesc(e,t=!1){return e.empty?this:Ar(this,e,t)}mapPos(e,t=-1,i=de.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=de.Simple&&h>=e&&(i==de.TrackDel&&s<e&&h>e||i==de.TrackBefore&&s<e||i==de.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new nt(e)}static create(e){return new nt(e)}}class se extends nt{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Qr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Ar(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(V.empty);i.push(o?e.slice(r,r+o):V.empty)}r+=o}return new se(t,i)}compose(e){return this.empty?e:e.empty?this:bh(this,e,!0)}map(e,t=!1){return e.empty?this:Ar(this,e,t,!0)}iterChanges(e,t=!1){Qr(this,e,t)}get desc(){return nt.crea
Line truncated
|
||||
`}get readOnly(){return this.facet(Qh)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(kh))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return Xu(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=re(t,o,!1);if(r(t.slice(a,o))!=G.Word)break;o=a}for(;l<s;){let a=re(t,l);if(r(t.slice(l,a))!=G.Word)break;l=a}return o==l?null:b.range(o+i,l+i)}}N.allowMultipleSelections=Rr;N.tabSize=A.define({combine:n=>n.length?n[0]:4});N.lineSeparator=vh;N.readOnly=Qh;N.phrases=A.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=kh;N.changeFilter=wh;N.transactionFilter=Th;N.transactionExtender=Ch;ks.reconfigure=D.define();function rt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class vt{eq(e){return this==e}range(e,t=e){return qr.create(e,t,this)}}vt.prototype.startSide=vt.prototype.endSide=0;vt.prototype.point=!1;vt.prototype.mapMode=de.TrackDel;function vo(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let qr=class Mh{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Mh(e,t,i)}};function Wr(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class wo{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let h=this.value[a],c=this.from[a]+e,f=this.to[a]+e,u,d;if(c==f){let p=t.mapPos(c,h.startSide,h.mapMode);if(p==null||(u=d=p,h.startSide!=h.endSide&&(d=t.mapPos(c,h.endSide),d<u)))continue}else if(u=t.mapPos(c,h.startSide),d=t.mapPos(f,h.endSide),u>d||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new wo(s,r,i,l):null,pos:o}}}class z{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new z(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Wr)),this.isEmpty)return t.length?z.of(t):this;let l=new Rh(this,null,-1).goto(0),a=0,h=[],c=new pt;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||h.push(qr.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!h.length?z.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],h=e.touchesRange(l,l+a.length);if(h===!1)s=Math.max(s,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(h===!0){let{mapped:c,pos:f}=a.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new z(i,t,r||z.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Bi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Bi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.f
Line truncated
|
||||
`)}static newName(){let e=yl[Ol]||1;return yl[Ol]=e+1,Lr+e.toString(36)}static mount(e,t,i){let s=e[zr],r=i&&i.nonce;s?r&&s.setNonce(r):s=new _u(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let bl=new Map;class _u{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=bl.get(i);if(r)return e[zr]=r;this.sheet=new s.CSSStyleSheet,bl.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[zr]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h<l.rules.length;h++)i.insertRule(l.rules[h],s++)}else{for(;r<a;)s+=this.modules[r++].rules.length;s+=l.rules.length,r++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
|
||||
`;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Tt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},$i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Uu=typeof navigator<"u"&&/Mac/.test(navigator.platform),Hu=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ue=0;ue<10;ue++)Tt[48+ue]=Tt[96+ue]=String(ue);for(var ue=1;ue<=24;ue++)Tt[ue+111]="F"+ue;for(var ue=65;ue<=90;ue++)Tt[ue]=String.fromCharCode(ue+32),$i[ue]=String.fromCharCode(ue);for(var Is in Tt)$i.hasOwnProperty(Is)||($i[Is]=Tt[Is]);function ju(n){var e=Uu&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Hu&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?$i:Tt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function _(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;e<arguments.length;e++)Eh(n,arguments[e]);return n}function Eh(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Eh(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let xe=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Ir=typeof document<"u"?document:{documentElement:{style:{}}};const Nr=/Edge\/(\d+)/.exec(xe.userAgent),Dh=/MSIE \d/.test(xe.userAgent),Vr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe.userAgent),vs=!!(Dh||Vr||Nr),xl=!vs&&/gecko\/(\d+)/i.test(xe.userAgent),Ns=!vs&&/Chrome\/(\d+)/.exec(xe.userAgent),Gu="webkitFontSmoothing"in Ir.documentElement.style,Xr=!vs&&/Apple Computer/.test(xe.vendor),Sl=Xr&&(/Mobile\/\w+/.test(xe.userAgent)||xe.maxTouchPoints>2);var P={mac:Sl||/Mac/.test(xe.platform),windows:/Win/.test(xe.platform),linux:/Linux|X11/.test(xe.platform),ie:vs,ie_version:Dh?Ir.documentMode||6:Vr?+Vr[1]:Nr?+Nr[1]:0,gecko:xl,gecko_version:xl?+(/Firefox\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,chrome:!!Ns,chrome_version:Ns?+Ns[1]:0,ios:Sl,android:/Android\b/.test(xe.userAgent),webkit_version:Gu?+(/\bAppleWebKit\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,safari:Xr,safari_version:Xr?+(/\bVersion\/(\d+(\.\d+)?)/.exec(xe.userAgent)||[0,0])[1]:0,tabSize:Ir.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function To(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Zn=Object.create(null);function Co(n,e,t){if(n==e)return!0;n||(n=Zn),e||(e=Zn);let i=Object.keys(n),s=Object.keys(e);if(i.length-0!=s.length-0)return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function Zu(n,e){for(let t=n.attributes.length-1;t>=0;t--){let i=n.attributes[t].name;e[i]==null&&n.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?n.style.cssText=i:n.getAttribute(t)!=i&&n.setAttribute(t,i)}}function kl(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function Yu(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let i=n.attributes[t];e[i.name]=i.value}return e}class Xe{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var pe=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(pe||(pe={}));class M extends vt{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Ji(e)}staLine truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function zd(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==G.Space&&(s=o),s==o}}function Id(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let p=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-p.from))),l=(r<0?p.top:p.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1,d=Yr(n,{x:f,y:l+u*r},!1,r);return b.cursor(d.pos,d.assoc,void 0,o)}function Ei(n,e,t){for(;;){let i=0;for(let s of n)s.between(e-1,e+1,(r,o,l)=>{if(e>r&&e<o){let a=i||t||(e-r<o-e?-1:1);e=a<0?r:o,i=a}});if(!i)return e}}function lc(n,e){let t=null;for(let i=0;i<e.ranges.length;i++){let s=e.ranges[i],r=null;if(s.empty){let o=Ei(n,s.from,0);o!=s.from&&(r=b.cursor(o,-1))}else{let o=Ei(n,s.from,-1),l=Ei(n,s.to,1);(o!=s.from||l!=s.to)&&(r=b.range(s.from==s.anchor?o:l,s.from==s.head?o:l))}r&&(t||(t=e.ranges.slice()),t[i]=r)}return t?b.create(t,e.mainIndex):e}function Us(n,e,t){let i=Ei(n.state.facet(tn).map(s=>s(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:b.cursor(i,i<t.from?1:-1)}class Je{constructor(e,t){this.pos=e,this.assoc=t}}function Yr(n,e,t,i){let s=n.contentDOM.getBoundingClientRect(),r=s.top+n.viewState.paddingTop,{x:o,y:l}=e,a=l-r,h;for(;;){if(a<0)return new Je(0,1);if(a>n.viewState.docHeight)return new Je(n.state.doc.length,-1);if(h=n.elementAtHeight(a),i==null)break;if(h.type==pe.Text){let u=n.docView.coordsAt(i<0?h.from:h.to,i);if(u&&(i<0?u.top<=a+r:u.bottom>=a+r))break}let f=n.viewState.heightOracle.textHeight/2;a=i>0?h.bottom+f:h.top-f}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==pe.Text){let f=$d(n,s,h,o,l);return new Je(f,f==h.from?1:-1)}}if(h.type!=pe.Text)return a<(h.top+h.bottom)/2?new Je(h.from,1):new Je(h.to,-1);let c=n.docView.lineAt(h.from,2);return(!c||c.length!=h.length)&&(c=n.docView.lineAt(h.from,-2)),ac(n,c,h.from,o,l)}function ac(n,e,t,i,s){let r=-1,o=null,l=1e9,a=1e9,h=s,c=s,f=(u,d)=>{for(let p=0;p<u.length;p++){let m=u[p];if(m.top==m.bottom)continue;let g=m.left>i?m.left-i:m.right<i?i-m.right:0,y=m.top>s?m.top-s:m.bottom<s?s-m.bottom:0;m.top<=c&&m.bottom>=h&&(h=Math.min(m.top,h),c=Math.max(m.bottom,c),y=0),(r<0||(y-a||g-l)<0)&&(r>=0&&a&&l<g&&o.top<=c-2&&o.bottom>=h+2?a=0:(r=d,l=g,a=y,o=m))}};if(e.isText()){for(let d=0;d<e.length;){let p=re(e.text,d);if(f(Ii(e.dom,d,p).getClientRects(),d),!l&&!a)break;d=p}return i>(o.left+o.right)/2==(Ml(n,r+t)==H.LTR)?new Je(t+re(e.text,r),-1):new Je(t+r,1)}else{if(!e.length)return new Je(t,1);for(let m=0;m<e.children.length;m++){let g=e.children[m];if(g.flags&48)continue;let y=(g.dom.nodeType==1?g.dom:Ii(g.dom,0,g.length)).getClientRects();if(f(y,m),!l&&!a)break}let u=e.children[r],d=e.posBefore(u,t);return u.isComposite()||u.isText()?ac(n,u,d,Math.max(o.left,Math.min(o.right,i)),s):i>(o.left+o.right)/2==(Ml(n,r+t)==H.LTR)?new Je(d+u.length,-1):new Je(d,1)}}function Ml(n,e){let t=n.state.doc.lineAt(e);return n.bidiSpans(t)[dt.find(n.bidiSpans(t),e-t.from,-1,1)].dir}const wi="";class Nd{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(N.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=wi}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let r=this.text.length;this.readNode(s);let o=ie.get(s),l=s.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let a=ie.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:Yn(s))||Yn(l)&&(s.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>r)&&!Xd(l,t)&&this.lineBreak(),s=l}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){let t=ie.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Vd(e,i.node,i.offset)?t:0))}}function Vd(n
Line truncated
|
||||
`&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:V.of([" "])}),t)return Do(n,t,i,r);if(i&&!ts(i,s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=lc(n.state.facet(tn).map(a=>a(n)),i))),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function Do(n,e,t,i=-1){if(P.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(P.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ti(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&ti(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&ti(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=_d(n,e,t));return n.state.facet(Gh).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function _d(n,e,t){let i,s=n.state,r=s.selection.main,o=-1;if(e.from==e.to&&e.from<r.from||e.from>r.to){let a=e.from<r.from?-1:1,h=a<0?r.from:r.to,c=Ei(s.facet(tn).map(f=>f(n)),h,a);e.from==c&&(o=c)}if(o>-1)i={changes:e,selection:b.cursor(e.from+e.insert.length,-1)};else if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",h=r.to>e.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let a=s.changes(e),h=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=r.to+10&&e.to>=r.to-10){let c=n.state.sliceDoc(e.from,e.to),f,u=t&&oc(n,t.main.head);if(u){let p=e.insert.length-(e.to-e.from);f={from:u.from,to:u.to-p}}else f=n.state.doc.lineAt(r.head);let d=r.to-e.to;i=s.changeByRange(p=>{if(p.from==r.from&&p.to==r.to)return{changes:a,range:h||p.map(a)};let m=p.to-d,g=m-c.length;if(n.state.sliceDoc(g,m)!=c||m>=f.from&&g<=f.to)return{range:p};let y=s.changes({from:g,to:m,insert:e.insert}),k=p.to-r.to;return{changes:y,range:h?b.range(Math.max(0,h.anchor+k),Math.max(0,h.head+k)):p.map(y)}})}else i={changes:a,selection:h&&s.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:l,scrollIntoView:!0})}function fc(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r<s&&n.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o<r&&n.length<e.length){let a=t<=r&&t>=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l<r){let a=t<=r&&t>=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Ud(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Rl(t,i)),(s!=t||r!=i)&&e.push(new Rl(s,r))),e}function Hd(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}function ts(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class jd{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,P.safari&&e.contentDOM.addEventListener("input",()=>null),P.gecko&&hp(e.contentDOM.ownerDocument)}handleEvent(e){!ip(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Gd(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.
Line truncated
|
||||
`))};if((P.mac||P.android)&&f.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:a,insert:V.of([i.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let u=this.to-this.from+(f.to-f.from+f.insert.length);Do(e,f,b.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let a=e.coordsForChar(o);r=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(a<h){let c=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;s.push(M.mark({attributes:{style:c}}).range(a,h))}}}e.dispatch({effects:ec.of(M.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=li(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class C{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureReque
Line truncated
|
||||
--\u2028\u2029\uFEFF-]`,no),Hp={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",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Gs=null;function jp(){var n;if(Gs==null&&typeof document<"u"&&document.body){let e=document.body.style;Gs=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Gs||!1}const Nn=A.define({combine(n){let e=rt(n,{render:null,specialChars:Up,addSpecialChars:null});return(e.replaceTabs=!jp())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,no)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,no)),e}});function Gp(n={}){return[Nn.of(n),Zp()]}let Jl=null;function Zp(){return Jl||(Jl=J.fromClass(class{constructor(n){this.view=n,this.decorations=M.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Nn)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new _p({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ke(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=pi(o.text,l,i-o.from);return M.replace({widget:new em((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=M.replace({widget:new Jp(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Nn);n.startState.facet(Nn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Yp="•";function Kp(n){return n>=32?Yp:n==10?"":String.fromCharCode(9216+n)}class Jp extends Xe{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Kp(this.code),i=e.state.phrase("Control character")+" "+(Hp[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class em extends Xe{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function tm(){return nm}const im=M.line({class:"cm-activeLine"}),nm=J.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(im.range(s.from)),e=s.from)}return M.set(t)}},{decorations:n=>n.decorations});class sm extends Xe{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Mi(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),s=zi(t[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function rm(n){let e=J.fromClass(class{constructor(t){this.view=t,this.placeholder=n?M.set([M.widget({widget:new sm(n),side:1}).range(0)]):M.none}get decorations(){return this.view.state.doc.length?M.none:this.placeholder}},{decorations:t=>t.decorations});return typeof n=="string"?[e,C.contentAttributes.of({"aria-placeholder":n})]:e}const so=2e3;function om(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>so||t.off>so||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(b.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=$r(h.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(h.to));else{let f=$r(h.text,l,n.tabSize);r.push(b.range(h.from+c,h.from+f))}}}return r}function lm(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function ea(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>so?-1:s==i.length?lm(n,e.clientX):pi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function am(n,e){let t=ea(n,e),i=n.stat
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new S0(this):new y0(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?jt(this,s,t,i):Ht(this,s,t,i)}}class Uf{constructor(e){this.spec=e}}function g0(n,e,t){return(i,s,r,o)=>{if(t&&!t(i,s,r,o))return!1;let l=i>=o&&s<=o+r.length?r.slice(i-o,s-o):e.doc.sliceString(i,s);return n(l,e,i,s)}}function Ht(n,e,t,i){let s;return n.wholeWord&&(s=O0(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(s=g0(n.test,e,s)),new ui(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),s)}function O0(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),(e(ds(s,t-r))!=G.Word||e(ps(s,t-r))!=G.Word)&&(e(ps(s,i-r))!=G.Word||e(ds(s,i-r))!=G.Word))}class y0 extends Uf{constructor(e){super(e)}nextMatch(e,t,i){let s=Ht(this.spec,e,i,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Ht(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==i?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Ht(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=i)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Ht(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ht(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function b0(n,e,t){return(i,s,r)=>(!t||t(i,s,r))&&n(r[0],e,i,s)}function jt(n,e,t,i){let s;return n.wholeWord&&(s=x0(e.charCategorizer(e.selection.main.head))),n.test&&(s=b0(n.test,e,s)),new Xf(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:s},t,i)}function ds(n,e){return n.slice(re(n,e,!1),e)}function ps(n,e){return n.slice(e,re(n,e))}function x0(n){return(e,t,i)=>!i[0].length||(n(ds(i.input,i.index))!=G.Word||n(ps(i.input,i.index))!=G.Word)&&(n(ps(i.input,i.index+i[0].length))!=G.Word||n(ds(i.input,i.index+i[0].length))!=G.Word)}class S0 extends Uf{nextMatch(e,t,i){let s=jt(this.spec,e,i,e.doc.length).next();return s.done&&(s=jt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=jt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r<e.match.length)return e.match[r]+i.slice(s)}return t})}matchAll(e,t){let i=jt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=jt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Ui=D.define(),Go=D.define(),kt=he.define({create(n){return new cr(Oo(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Ui)?n=new cr(t.value.create(),n.panel):t.is(Go)&&(n=new cr(n.query,t.value?Zo:null));return n},provide:n=>Vi.from(n,e=>e.panel)});class cr{constructor(e,t){this.query=e,this.panel=t}}const k0=M.mark({class:"cm-searchMatch"}),v0=M.mark({class:"cm-searchMatch cm-searchMatch-selected"}),w0=J.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(kt))}update(n){let e=n.state.field(kt);(e!=n.startState.field(kt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return M.none;let{view:t}=this,i=new pt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:a}=r[s];for(;s<o-1&&a>r[s+1].from-500;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?v0:k0)})}return i.finish()}},{decorations:n=>n.decorations});function hn(n){return e=>{let t=e.state.field(kt,!1);return t&&t.query.spec.valid?n(e,t):Gf(e)}}const ms=hn((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=b.single(i.from,i.to),r=n.state.facet(gi);return n.dispatch({selection:s,effects:[Yo(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),jf(n),!0}),gs=hn((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=
Line truncated
|
||||
|
||||
`,{label:"if",detail:"block",type:"keyword"}),ot("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),ot("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),ot("import ${module}",{label:"import",detail:"statement",type:"keyword"}),ot("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Rb=D0(wu,Kf(Pb.concat(Mb)));function xr(n){let{node:e,pos:t}=n,i=n.lineIndent(t,-1),s=null;for(;;){let r=e.childBefore(t);if(r)if(r.name=="Comment")t=r.from;else if(r.name=="Body"||r.name=="MatchBody")n.baseIndentFor(r)+n.unit<=i&&(s=r),e=r;else if(r.name=="MatchClause")e=r;else if(r.type.is("Statement"))e=r;else break;else break}return s}function Sr(n,e){let t=n.baseIndentFor(e),i=n.lineAt(n.pos,-1),s=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&n.node.to<s+100&&!/\S/.test(n.state.sliceDoc(s,n.node.to))&&n.lineIndent(n.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(n.textAfter)&&n.lineIndent(n.pos,-1)>t?null:t+n.unit}const kr=os.define({name:"python",parser:Cb.configure({props:[Uc.add({Body:n=>{var e;let t=/^\s*(#|$)/.test(n.textAfter)&&xr(n)||n.node;return(e=Sr(n,t))!==null&&e!==void 0?e:n.continue()},MatchBody:n=>{var e;let t=xr(n);return(e=Sr(n,t||n.node))!==null&&e!==void 0?e:n.continue()},IfStatement:n=>/^\s*(else:|elif )/.test(n.textAfter)?n.baseIndent:n.continue(),"ForStatement WhileStatement":n=>/^\s*else:/.test(n.textAfter)?n.baseIndent:n.continue(),TryStatement:n=>/^\s*(except[ :]|finally:|else:)/.test(n.textAfter)?n.baseIndent:n.continue(),MatchStatement:n=>/^\s*case /.test(n.textAfter)?n.baseIndent+n.unit:n.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":sr({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":sr({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":sr({closing:"]"}),MemberExpression:n=>n.baseIndent+n.unit,"String FormatString":()=>null,Script:n=>{var e;let t=xr(n);return(e=t&&Sr(n,t))!==null&&e!==void 0?e:n.continue()}}),Gc.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":pg,Body:(n,e)=>({from:n.from+1,to:n.to-(n.to==e.doc.length?0:1)}),"String FormatString":(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Eb(){return new ng(kr,[kr.data.of({autocomplete:Ab}),kr.data.of({autocomplete:Rb})])}function Bb({value:n,onChange:e,id:t}){return uh.jsx(pu,{value:n,onChange:e,extensions:[Eb()],theme:du,height:"256px",basicSetup:{lineNumbers:!0,foldGutter:!1,highlightActiveLine:!0},className:"rounded-md border border-input overflow-hidden text-sm",id:t})}export{Bb as BotCodeEditor};
|
||||
//# sourceMappingURL=BotCodeEditor-BIWI6rgj.js.map
|
||||
`,{label:"if",detail:"block",type:"keyword"}),ot("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),ot("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),ot("import ${module}",{label:"import",detail:"statement",type:"keyword"}),ot("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Rb=D0(wu,Kf(Pb.concat(Mb)));function xr(n){let{node:e,pos:t}=n,i=n.lineIndent(t,-1),s=null;for(;;){let r=e.childBefore(t);if(r)if(r.name=="Comment")t=r.from;else if(r.name=="Body"||r.name=="MatchBody")n.baseIndentFor(r)+n.unit<=i&&(s=r),e=r;else if(r.name=="MatchClause")e=r;else if(r.type.is("Statement"))e=r;else break;else break}return s}function Sr(n,e){let t=n.baseIndentFor(e),i=n.lineAt(n.pos,-1),s=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&n.node.to<s+100&&!/\S/.test(n.state.sliceDoc(s,n.node.to))&&n.lineIndent(n.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(n.textAfter)&&n.lineIndent(n.pos,-1)>t?null:t+n.unit}const kr=os.define({name:"python",parser:Cb.configure({props:[Uc.add({Body:n=>{var e;let t=/^\s*(#|$)/.test(n.textAfter)&&xr(n)||n.node;return(e=Sr(n,t))!==null&&e!==void 0?e:n.continue()},MatchBody:n=>{var e;let t=xr(n);return(e=Sr(n,t||n.node))!==null&&e!==void 0?e:n.continue()},IfStatement:n=>/^\s*(else:|elif )/.test(n.textAfter)?n.baseIndent:n.continue(),"ForStatement WhileStatement":n=>/^\s*else:/.test(n.textAfter)?n.baseIndent:n.continue(),TryStatement:n=>/^\s*(except[ :]|finally:|else:)/.test(n.textAfter)?n.baseIndent:n.continue(),MatchStatement:n=>/^\s*case /.test(n.textAfter)?n.baseIndent+n.unit:n.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":sr({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":sr({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":sr({closing:"]"}),MemberExpression:n=>n.baseIndent+n.unit,"String FormatString":()=>null,Script:n=>{var e;let t=xr(n);return(e=t&&Sr(n,t))!==null&&e!==void 0?e:n.continue()}}),Gc.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":pg,Body:(n,e)=>({from:n.from+1,to:n.to-(n.to==e.doc.length?0:1)}),"String FormatString":(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Eb(){return new ng(kr,[kr.data.of({autocomplete:Ab}),kr.data.of({autocomplete:Rb})])}function Bb({value:n,onChange:e,id:t}){return vr.jsx("div",{className:"w-full overflow-hidden rounded-md border border-input",children:vr.jsx(pu,{value:n,onChange:e,extensions:[Eb()],theme:du,height:"256px",basicSetup:{lineNumbers:!0,foldGutter:!1,highlightActiveLine:!0},className:"text-sm",id:t})})}export{Bb as BotCodeEditor};
|
||||
//# sourceMappingURL=BotCodeEditor-DAhWP4wk.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"BotCodeEditor-BIWI6rgj.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@marijn/find-cluster-break/src/index.js","../../node_modules/@codemirror/state/dist/index.js","../../node_modules/style-mod/src/style-mod.js","../../node_modules/w3c-keyname/index.js","../../node_modules/crelt/index.js","../../node_modules/@codemirror/view/dist/index.js","../../node_modules/@lezer/common/dist/index.js","../../node_modules/@lezer/highlight/dist/index.js","../../node_modules/@codemirror/language/dist/index.js","../../node_modules/@codemirror/commands/dist/index.js","../../node_modules/@codemirror/search/dist/index.js","../../node_modules/@codemirror/autocomplete/dist/index.js","../../node_modules/@codemirror/lint/dist/index.js","../../node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js","../../node_modules/@codemirror/theme-one-dark/dist/index.js","../../node_modules/@uiw/react-codemirror/esm/theme/light.js","../../node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js","../../node_modules/@uiw/react-codemirror/esm/utils.js","../../node_modules/@uiw/react-codemirror/esm/timeoutLatch.js","../../node_modules/@uiw/react-codemirror/esm/useCodeMirror.js","../../node_modules/@uiw/react-codemirror/esm/index.js","../../node_modules/@lezer/lr/dist/index.js","../../node_modules/@lezer/python/dist/index.js","../../node_modules/@codemirror/lang-python/dist/index.js","../../src/components/BotCodeEditor.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","// These are filled with ranges (rangeFrom[i] up to but not including\n// rangeTo[i]) of code points that count as extending characters.\nlet rangeFrom = [], rangeTo = []\n\n;(() => {\n // Compressed representation of the Grapheme_Cluster_Break=Extend\n // information from\n // http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n // Each pair of elements represents a range, as an offet from the\n // previous range and a length. Numbers are in base-36, with the empty\n // string being a shorthand for 1.\n let numbers = \"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4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0; i < numbers.length; i++)\n (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i])\n})()\n\nexport function isExtendingChar(code) {\n if (code < 768) return false\n for (let from = 0, to = rangeFrom.length;;) {\n let mid = (from + to) >> 1\n if (code < rangeFrom[mid]) to = mid\n else if (code >= rangeTo[mid]) from = mid + 1\n else return true\n if (from == to) return false\n }\n}\n\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF\n}\n\nfunction check(code) {\n for (let i = 0; i < rangeFrom.length; i++) {\n if (rangeTo[i] > code) return rangeFrom[i] <= code\n }\n return false\n}\n\nconst ZWJ = 0x200d\n\nexport function findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(strLine truncated
|
||||
{"version":3,"file":"BotCodeEditor-DAhWP4wk.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@marijn/find-cluster-break/src/index.js","../../node_modules/@codemirror/state/dist/index.js","../../node_modules/style-mod/src/style-mod.js","../../node_modules/w3c-keyname/index.js","../../node_modules/crelt/index.js","../../node_modules/@codemirror/view/dist/index.js","../../node_modules/@lezer/common/dist/index.js","../../node_modules/@lezer/highlight/dist/index.js","../../node_modules/@codemirror/language/dist/index.js","../../node_modules/@codemirror/commands/dist/index.js","../../node_modules/@codemirror/search/dist/index.js","../../node_modules/@codemirror/autocomplete/dist/index.js","../../node_modules/@codemirror/lint/dist/index.js","../../node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js","../../node_modules/@codemirror/theme-one-dark/dist/index.js","../../node_modules/@uiw/react-codemirror/esm/theme/light.js","../../node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js","../../node_modules/@uiw/react-codemirror/esm/utils.js","../../node_modules/@uiw/react-codemirror/esm/timeoutLatch.js","../../node_modules/@uiw/react-codemirror/esm/useCodeMirror.js","../../node_modules/@uiw/react-codemirror/esm/index.js","../../node_modules/@lezer/lr/dist/index.js","../../node_modules/@lezer/python/dist/index.js","../../node_modules/@codemirror/lang-python/dist/index.js","../../src/components/BotCodeEditor.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","// These are filled with ranges (rangeFrom[i] up to but not including\n// rangeTo[i]) of code points that count as extending characters.\nlet rangeFrom = [], rangeTo = []\n\n;(() => {\n // Compressed representation of the Grapheme_Cluster_Break=Extend\n // information from\n // http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n // Each pair of elements represents a range, as an offet from the\n // previous range and a length. Numbers are in base-36, with the empty\n // string being a shorthand for 1.\n let numbers = \"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1)\n for (let i = 0, n = 0; i < numbers.length; i++)\n (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i])\n})()\n\nexport function isExtendingChar(code) {\n if (code < 768) return false\n for (let from = 0, to = rangeFrom.length;;) {\n let mid = (from + to) >> 1\n if (code < rangeFrom[mid]) to = mid\n else if (code >= rangeTo[mid]) from = mid + 1\n else return true\n if (from == to) return false\n }\n}\n\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF\n}\n\nfunction check(code) {\n for (let i = 0; i < rangeFrom.length; i++) {\n if (rangeTo[i] > code) return rangeFrom[i] <= code\n }\n return false\n}\n\nconst ZWJ = 0x200d\n\nexport function findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(strLine truncated
|
||||
+2
-2
@@ -123,7 +123,7 @@ No ACL entries`;const s=[`ACL (${n.length})`];for(const i of n){const l=i.name||
|
||||
If you want to hide the \`${s.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${s.docsSlug}`;return R.useEffect(()=>{n&&(document.getElementById(n)||console.error(i))},[i,n]),null},E2="DialogDescriptionWarning",k2=({contentRef:n,descriptionId:s})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mA(E2).contentName}}.`;return R.useEffect(()=>{var u;const c=(u=n.current)==null?void 0:u.getAttribute("aria-describedby");s&&c&&(document.getElementById(s)||console.warn(l))},[l,n,s]),null},gA=nA,xA=oA,ld=sA,cd=aA,ud=cA,dd=dA,AA=hA;const $0=gA,S2=xA,vA=R.forwardRef(({className:n,...s},i)=>_.jsx(ld,{ref:i,className:dt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...s}));vA.displayName=ld.displayName;const fd=R.forwardRef(({className:n,children:s,...i},l)=>_.jsxs(S2,{children:[_.jsx(vA,{}),_.jsxs(cd,{ref:l,className:dt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),...i,children:[s,_.jsxs(AA,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[_.jsx(bx,{className:"h-4 w-4"}),_.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fd.displayName=cd.displayName;const hd=({className:n,...s})=>_.jsx("div",{className:dt("flex flex-col space-y-1.5 text-center sm:text-left",n),...s});hd.displayName="DialogHeader";const K0=({className:n,...s})=>_.jsx("div",{className:dt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...s});K0.displayName="DialogFooter";const pd=R.forwardRef(({className:n,...s},i)=>_.jsx(ud,{ref:i,className:dt("text-lg font-semibold leading-none tracking-tight",n),...s}));pd.displayName=ud.displayName;const md=R.forwardRef(({className:n,...s},i)=>_.jsx(dd,{ref:i,className:dt("text-sm text-muted-foreground",n),...s}));md.displayName=dd.displayName;function B2(){const n=window.location.hash.slice(1);if(!n)return null;if(n==="raw")return{type:"raw",name:"raw"};if(n==="map")return{type:"map",name:"map"};if(n==="visualizer")return{type:"visualizer",name:"visualizer"};if(n.startsWith("map/focus/")){const c=n.slice(10);return c?{type:"map",name:"map",mapFocusKey:decodeURIComponent(c)}:{type:"map",name:"map"}}const s=n.indexOf("/");if(s===-1)return null;const i=n.slice(0,s),l=decodeURIComponent(n.slice(s+1));return(i==="channel"||i==="contact")&&l?{type:i,name:l}:null}function yA(n){return`#map/focus/${encodeURIComponent(n)}`}function P2(n){if(!n)return"";if(n.type==="raw")return"#raw";if(n.type==="map")return"#map";if(n.type==="visualizer")return"#visualizer";const s=n.type==="channel"&&n.name.startsWith("#")?n.name.slice(1):n.name;return`#${n.type}/${encodeURIComponent(s)}`}function T2(n){const s=P2(n);s!==window.location.hash&&window.history.replaceState(null,"",s||window.location.pathname)}function D2({open:n,onClose:s,paths:i,senderInfo:l,contacts:c,config:u}){const p=i.map(g=>({...g,resolved:V1(g.path,l,c,u)})),d=i.length===1;return _.jsx($0,{open:n,onOpenChange:g=>!g&&s(),children:_.jsxs(fd,{className:"max-w-md max-h-[80vh] flex flex-col",children:[_.jsxs(hd,{children:[_.jsxs(pd,{children:["Message Path",!d&&`s (${i.length})`]}),_.jsx(md,{children:d?_.jsxs(_.Fragment,{children:["This shows ",_.jsx("em",{children:"one route"})," that this message traveled through the mesh network. Routers may be incorrectly identified due to prefix collisions between heard and non-heard router advertisements."]}):_.jsxs(_.Fragment,{children:["This message was received via ",_.jsxs("strong",{children:[i.length," different routes"]}),". Routers may be incorrectly identified due to prefix collisions."]})})]}),_.jsxs("div",{className:"flex-1 overflow-y-auto py-2 space-y-4",children:[p.map((g,m)=>_.jsxs("div",{children:[!d&&_.jsxs("div",{className:"text-xs text-muted-foreground font-medium mb-2 pb-1 border-b border-border",children:["Path ",m+1," — received ",ra(g.received_at)]}),_.jsx(R2,{resolved:g.resolved,senderInfo:l,hideStraightLine:!d})]},m)),!d&&p.length>0&&(()=>{const g=p[0].resolved;return Bt(g.sender.lat,g.sender.lon)&&Bt(g.receiver.lat,g.receiver.lon)?_.jsxs("div",{className:"pt-3 mt-1 border-t border-border",children:[_.jsx("span",{className:"text-sm text-muted-foreground",children:"Straight-line distance: "}),_.jsx("span",{className:"text-sm font-medium",c
Line truncated
|
||||
`).map((K,ue,pe)=>_.jsxs("span",{children:[L2(K,d),ue<pe.length-1&&_.jsx("br",{})]},ue)),!ne&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:ra(j.sender_timestamp||j.received_at)}),!j.outgoing&&j.paths&&j.paths.length>0&&_.jsx(Lm,{paths:j.paths,variant:"inline",onClick:()=>C({paths:j.paths,senderInfo:M(j,Z,J)})})]}),j.outgoing&&(j.acked>0?` ✓${j.acked>1?j.acked:""}`:" ?")]})]})]},j.id)})]}),w&&_.jsx("button",{onClick:S,className:"absolute bottom-4 right-4 w-10 h-10 rounded-full bg-muted hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-opacity",title:"Scroll to bottom",children:_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:_.jsx("polyline",{points:"6 9 12 15 18 9"})})}),N&&_.jsx(D2,{open:!0,onClose:()=>C(null),paths:N.paths,senderInfo:N.senderInfo,contacts:s,config:g??null})]})}const Mm=156,I2=140,O2=156,j2=120,z2=8,H2=R.forwardRef(function({onSend:s,disabled:i,placeholder:l,isRepeaterMode:c,conversationType:u,senderName:p},d){const[g,m]=R.useState(""),[x,A]=R.useState(!1),w=R.useRef(null);R.useImperativeHandle(d,()=>({appendText:M=>{var H;m(V=>V+M),(H=w.current)==null||H.focus()}}));const k=R.useMemo(()=>{if(u==="contact")return{warningAt:I2,dangerAt:Mm,hardLimit:Mm};if(u==="channel"){const M=(p==null?void 0:p.length)??10,H=Math.max(1,O2-M-2);return{warningAt:j2,dangerAt:Math.max(1,H-z2),hardLimit:H}}return null},[u,p]),{limitState:N,warningMessage:C}=R.useMemo(()=>{if(!k)return{limitState:"normal",warningMessage:null};const M=g.length;return M>=k.hardLimit?{limitState:"error",warningMessage:"likely truncated by radio"}:M>=k.dangerAt?{limitState:"danger",warningMessage:"may impact multi-repeater hop delivery"}:M>=k.warningAt?{limitState:"warning",warningMessage:"may impact multi-repeater hop delivery"}:{limitState:"normal",warningMessage:null}},[g.length,k]),b=k?k.hardLimit-g.length:0,B=R.useCallback(async M=>{M.preventDefault();const H=g.trim();if(c){if(x||i)return;A(!0);try{await s(H),m("")}catch(V){console.error("Failed to request telemetry:",V),xt.error("Failed to request telemetry",{description:V instanceof Error?V.message:"Check radio connection"});return}finally{A(!1)}setTimeout(()=>{var V;return(V=w.current)==null?void 0:V.focus()},0)}else{if(!H||x||i)return;A(!0);try{await s(H),m("")}catch(V){console.error("Failed to send message:",V),xt.error("Failed to send message",{description:V instanceof Error?V.message:"Check radio connection"});return}finally{A(!1)}setTimeout(()=>{var V;return(V=w.current)==null?void 0:V.focus()},0)}},[g,x,i,s,c]),S=R.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),B(M))},[B]),T=c?!0:g.trim().length>0,F=!c&&k!==null;return _.jsxs("form",{className:"px-4 py-3 border-t border-border flex flex-col gap-1",onSubmit:B,children:[_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Xt,{ref:w,type:c?"password":"text",autoComplete:c?"off":void 0,value:g,onChange:M=>m(M.target.value),onKeyDown:S,placeholder:l||(c?"Enter password for admin login...":"Type a message..."),disabled:i||x,className:"flex-1 min-w-0"}),_.jsx(Jt,{type:"submit",disabled:i||x||!T,className:"flex-shrink-0",children:x?c?"Logging in...":"Sending...":c?g.trim()?"Log in with password":"Log in as guest/use repeater ACLs":"Send"})]}),F&&_.jsxs("div",{className:"flex items-center justify-end gap-2 text-xs",children:[_.jsxs("span",{className:dt("tabular-nums",N==="error"||N==="danger"?"text-red-500 font-medium":N==="warning"?"text-yellow-500":"text-muted-foreground"),children:[g.length,"/",k.hardLimit,b<0&&` (${b})`]}),C&&_.jsxs("span",{className:dt(N==="error"?"text-red-500":"text-yellow-500"),children:["— ",C]})]})]})});function Im(n){const s=V2(n),i=R.forwardRef((l,c)=>{const{children:u,...p}=l,d=R.Children.toArray(u),g=d.find(Z2);if(g){const m=g.props.children,x=d.map(A=>A===g?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:A);return _.jsx(s,{...p,ref:c,children:R.isValidElement(m)?R.cloneElement(m,void 0,x):null})}return _.jsx(s,{...p,ref:c,children:u})});return i.displayName=`${n}.Slot`,i}function V2(n){const s=R.forwardRef((i,l)=>{const{children:c,...u}=i;if(R.isValidElement(c)){const p=q2(c),d=W2(u,c.props);return c.type!==R.Fragment&&(d.ref=l?El(l,p):p),R.cloneElement(c,d)}return R.Children.count(c)>1?R.Children.only(null):null});return s.displayName=`${n}.SlotClone`,s}var U2=Symbol("radix.slottable");function Z2(n){return R.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===U2}function W2(n,s){const i={...s};for(const l in s){const c=n[l],u=s[l];/^on[A-Z]/.test(l)?c&&u?i[l]=(...d)=>{const g=u(...d);return c(...d),g}:c&&(i[l]=c):l==="style"?i[l]={...c,...u}:l==="className"&&(i[l]=[c,u].filter(Boolean).join(" "))}return{...n,...i}}function
Line truncated
|
||||
`).map((K,ue,pe)=>_.jsxs("span",{children:[L2(K,d),ue<pe.length-1&&_.jsx("br",{})]},ue)),!ne&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:ra(j.sender_timestamp||j.received_at)}),!j.outgoing&&j.paths&&j.paths.length>0&&_.jsx(Lm,{paths:j.paths,variant:"inline",onClick:()=>C({paths:j.paths,senderInfo:M(j,Z,J)})})]}),j.outgoing&&(j.acked>0?` ✓${j.acked>1?j.acked:""}`:" ?")]})]})]},j.id)})]}),w&&_.jsx("button",{onClick:S,className:"absolute bottom-4 right-4 w-10 h-10 rounded-full bg-muted hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-opacity",title:"Scroll to bottom",children:_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:_.jsx("polyline",{points:"6 9 12 15 18 9"})})}),N&&_.jsx(D2,{open:!0,onClose:()=>C(null),paths:N.paths,senderInfo:N.senderInfo,contacts:s,config:g??null})]})}const Mm=156,I2=140,O2=156,j2=120,z2=8,H2=R.forwardRef(function({onSend:s,disabled:i,placeholder:l,isRepeaterMode:c,conversationType:u,senderName:p},d){const[g,m]=R.useState(""),[x,A]=R.useState(!1),w=R.useRef(null);R.useImperativeHandle(d,()=>({appendText:M=>{var H;m(V=>V+M),(H=w.current)==null||H.focus()}}));const k=R.useMemo(()=>{if(u==="contact")return{warningAt:I2,dangerAt:Mm,hardLimit:Mm};if(u==="channel"){const M=(p==null?void 0:p.length)??10,H=Math.max(1,O2-M-2);return{warningAt:j2,dangerAt:Math.max(1,H-z2),hardLimit:H}}return null},[u,p]),{limitState:N,warningMessage:C}=R.useMemo(()=>{if(!k)return{limitState:"normal",warningMessage:null};const M=g.length;return M>=k.hardLimit?{limitState:"error",warningMessage:"likely truncated by radio"}:M>=k.dangerAt?{limitState:"danger",warningMessage:"may impact multi-repeater hop delivery"}:M>=k.warningAt?{limitState:"warning",warningMessage:"may impact multi-repeater hop delivery"}:{limitState:"normal",warningMessage:null}},[g.length,k]),b=k?k.hardLimit-g.length:0,B=R.useCallback(async M=>{M.preventDefault();const H=g.trim();if(c){if(x||i)return;A(!0);try{await s(H),m("")}catch(V){console.error("Failed to request telemetry:",V),xt.error("Failed to request telemetry",{description:V instanceof Error?V.message:"Check radio connection"});return}finally{A(!1)}setTimeout(()=>{var V;return(V=w.current)==null?void 0:V.focus()},0)}else{if(!H||x||i)return;A(!0);try{await s(H),m("")}catch(V){console.error("Failed to send message:",V),xt.error("Failed to send message",{description:V instanceof Error?V.message:"Check radio connection"});return}finally{A(!1)}setTimeout(()=>{var V;return(V=w.current)==null?void 0:V.focus()},0)}},[g,x,i,s,c]),S=R.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),B(M))},[B]),T=c?!0:g.trim().length>0,F=!c&&k!==null;return _.jsxs("form",{className:"px-4 py-3 border-t border-border flex flex-col gap-1",onSubmit:B,children:[_.jsxs("div",{className:"flex gap-2",children:[_.jsx(Xt,{ref:w,type:c?"password":"text",autoComplete:c?"off":void 0,value:g,onChange:M=>m(M.target.value),onKeyDown:S,placeholder:l||(c?"Enter password for admin login...":"Type a message..."),disabled:i||x,className:"flex-1 min-w-0"}),_.jsx(Jt,{type:"submit",disabled:i||x||!T,className:"flex-shrink-0",children:x?c?"Logging in...":"Sending...":c?g.trim()?"Log in with password":"Log in as guest/use repeater ACLs":"Send"})]}),F&&_.jsxs("div",{className:"flex items-center justify-end gap-2 text-xs",children:[_.jsxs("span",{className:dt("tabular-nums",N==="error"||N==="danger"?"text-red-500 font-medium":N==="warning"?"text-yellow-500":"text-muted-foreground"),children:[g.length,"/",k.hardLimit,b<0&&` (${b})`]}),C&&_.jsxs("span",{className:dt(N==="error"?"text-red-500":"text-yellow-500"),children:["— ",C]})]})]})});function Im(n){const s=V2(n),i=R.forwardRef((l,c)=>{const{children:u,...p}=l,d=R.Children.toArray(u),g=d.find(Z2);if(g){const m=g.props.children,x=d.map(A=>A===g?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:A);return _.jsx(s,{...p,ref:c,children:R.isValidElement(m)?R.cloneElement(m,void 0,x):null})}return _.jsx(s,{...p,ref:c,children:u})});return i.displayName=`${n}.Slot`,i}function V2(n){const s=R.forwardRef((i,l)=>{const{children:c,...u}=i;if(R.isValidElement(c)){const p=q2(c),d=W2(u,c.props);return c.type!==R.Fragment&&(d.ref=l?El(l,p):p),R.cloneElement(c,d)}return R.Children.count(c)>1?R.Children.only(null):null});return s.displayName=`${n}.SlotClone`,s}var U2=Symbol("radix.slottable");function Z2(n){return R.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===U2}function W2(n,s){const i={...s};for(const l in s){const c=n[l],u=s[l];/^on[A-Z]/.test(l)?c&&u?i[l]=(...d)=>{const g=u(...d);return c(...d),g}:c&&(i[l]=c):l==="style"?i[l]={...c,...u}:l==="className"&&(i[l]=[c,u].filter(Boolean).join(" "))}return{...n,...i}}function
Line truncated
|
||||
sender_name: str | None,
|
||||
sender_key: str | None,
|
||||
message_text: str,
|
||||
@@ -569,4 +569,4 @@ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
|
||||
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(d=>(this.enabled=!0,d)).catch(d=>{throw this.enabled=!1,d})}disable(){l()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):i()?this.noSleepTimer&&(console.warn(`
|
||||
NoSleep now disabled for older iOS devices.
|
||||
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}return A0=c,A0}var hS=fS();const pS=aa(hS);function mS(n){if(n.length<4)return null;try{const i=parseInt(n.slice(0,2),16)&3;let l=2;if(i===0||i===3){if(n.length<l+8)return null;l+=8}if(n.length<l+2)return null;const c=parseInt(n.slice(l,l+2),16);l+=2;const u=c*2;return n.length<l+u?null:(l+=u,n.slice(l))}catch{return null}}function gS({packets:n,channels:s,onChannelCreate:i,onRunningChange:l,visible:c=!1}){const[u,p]=R.useState(!1),[d,g]=R.useState(6),[m,x]=R.useState(!1),[A,w]=R.useState(!0),[k,N]=R.useState(!1),[C,b]=R.useState(null),[B,S]=R.useState(new Map),[T,F]=R.useState([]),[M,H]=R.useState(!1),[V,j]=R.useState(null),[ee,Z]=R.useState(null),[Q,J]=R.useState(0),$=R.useRef(null),oe=R.useRef(null),ge=R.useRef(!1),G=R.useRef(!1),ae=R.useRef(!1),W=R.useRef(new Map),ne=R.useRef(!1),U=R.useRef(6),D=R.useRef(!0),z=R.useRef(!1),q=R.useRef(new Set),K=R.useRef(new Set);R.useEffect(()=>{const Ee=new uS;$.current=Ee,j(Ee.isGpuAvailable());const Ue=new pS;return oe.current=Ue,()=>{Ee.destroy(),$.current=null,Ue.disable(),oe.current=null}},[]),R.useEffect(()=>{!c||M||QA(async()=>{const{ENGLISH_WORDLIST:Ee}=await import("./wordlist-BtmChKSf.js");return{ENGLISH_WORDLIST:Ee}},[]).then(({ENGLISH_WORDLIST:Ee})=>{$.current&&($.current.setWordlist(Ee),H(!0))}).catch(Ee=>{console.error("Failed to load wordlist:",Ee),xt.error("Failed to load wordlist",{description:"Cracking will not be available"})})},[c,M]),R.useEffect(()=>{const Ee=()=>{ot.getUndecryptedPacketCount().then(({count:st})=>Z(st)).catch(()=>Z(null))};Ee();const Ue=setInterval(Ee,36e5);return()=>clearInterval(Ue)},[]);const ue=R.useMemo(()=>new Set(s.map(Ee=>Ee.key.toUpperCase())),[s]),pe=n.filter(Ee=>Ee.payload_type==="GROUP_TEXT"&&!Ee.decrypted);R.useEffect(()=>{let Ee=0;S(Ue=>{const st=new Map(Ue);let ht=!1;for(const Je of pe)if(!st.has(Je.id)){const at=mS(Je.data);if(at&&K.current.has(at)){Ee++;continue}at&&K.current.add(at),st.set(Je.id,{packet:Je,attempts:0,lastAttemptLength:0,status:"pending"}),ht=!0}return ht?(W.current=st,st):Ue}),Ee>0&&J(Ue=>Ue+Ee)},[pe.length]),R.useEffect(()=>{W.current=B},[B]),R.useEffect(()=>{ne.current=m},[m]),R.useEffect(()=>{U.current=d},[d]),R.useEffect(()=>{D.current=A},[A]),R.useEffect(()=>{z.current=k},[k]),R.useEffect(()=>{q.current=new Set(pe.map(Ee=>Ee.id))},[pe]),R.useEffect(()=>{l==null||l(u)},[u,l]);const Ae=Array.from(B.values()).filter(Ee=>Ee.status==="pending").length,me=Array.from(B.values()).filter(Ee=>Ee.status==="cracked").length,xe=Array.from(B.values()).filter(Ee=>Ee.status==="failed").length,Be=R.useCallback(async()=>{if(ae.current||!$.current||!ge.current)return;const Ee=W.current;let Ue=null,st=null;for(const[Ge,$e]of Ee.entries())if($e.status==="pending"){Ue=$e,st=Ge;break}if(!Ue&&ne.current){const Ge=Array.from(Ee.entries()).filter(([,$e])=>$e.status==="failed"&&$e.lastAttemptLength<10);Ge.length>0&&(Ge.sort(($e,et)=>$e[1].lastAttemptLength-et[1].lastAttemptLength),[st,Ue]=Ge[0])}if(!Ue||st===null){ge.current&&setTimeout(()=>Be(),1e3);return}if(!q.current.has(st)){S(Ge=>{const $e=new Map(Ge);return $e.delete(st),$e}),ge.current&&setTimeout(()=>Be(),10);return}ae.current=!0;const ht=U.current,Je=Ue.lastAttemptLength>0,at=Je?Ue.lastAttemptLength+1:ht;try{const Ge=await $.current.crack(Ue.packet.data,{maxLength:at,useSenderFilter:!0,useTimestampFilter:!0,useUtf8Filter:!0,...z.current&&{gpuDispatchMs:1e4},...Je&&{useDictionary:!1,startingLength:at}},$e=>{b($e)});if(G.current){G.current=!1,ae.current=!1,b(null);return}if(Ge.found&&Ge.roomName&&Ge.key){S(Oe=>{const wt=new Map(Oe),It=wt.get(st);return It&&wt.set(st,{...It,status:"cracked",attempts:It.attempts+1,lastAttemptLength:at}),wt});const $e={roomName:Ge.roomName,key:Ge.key,packetId:st,message:Ge.decryptedMessage||"",crackedAt:Date.now()};F(Oe=>[...Oe,$e]);const et=Ge.key.toUpperCase();if(!ue.has(et))try{const Oe="#"+Ge.roomName;await i(Oe,Ge.key),D.current&&await ot.decryptHistoricalPackets({key_type:"channel",channel_name:Oe})}catch(Oe){console.error("Failed to create channel or decrypt historical:",Oe),xt.error("Failed to save cracked channel",{description:Oe instanceof Error?Oe.message:"Channel discovered but could not be saved"})}}else S($e=>{const et=new Map($e),Oe=et.get(st);return Oe&&et.set(st,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:at}),et})}catch(Ge){console.error("Cracking error:",Ge),S($e=>{const et=new Map($e),Oe=et.get(st);return Oe&&et.set(st,{...Oe,status:"failed",attempts:Oe.attempts+1,lastAttemptLength:at}),et})}ae.current=!1,b(null),ge.current&&setTimeout(()=>Be(),100)},[ue,i]),We=()=>{var Ee;if(!V){xt.error("WebGPU not available",{description:"Cracking requires Chrome 113+ or Edge 113+ with WebGPU support."});return}p(!0),ge.current=!0,G.current=!1,(Ee=oe.current)==null||Ee.enable(),Be()},Ke=()=>{var Ee,Ue;p(!1),ge.current=!1,G.current=!0,(Ee=$.current)==null||Ee.abort(),(Ue=oe.current)==null|
Line truncated
|
||||
//# sourceMappingURL=index-LNhn5rJq.js.map
|
||||
//# sourceMappingURL=index-BtBXI4sW.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"mappings":";;;;;;;;6CASa,IAAIA,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,cAAc,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,SAAS,SAASC,EAAEC,EAAE,CAAC,OAAUA,IAAP,MAAqB,OAAOA,GAAlB,SAA2B,MAAKA,EAAEF,GAAGE,EAAEF,CAAC,GAAGE,EAAE,YAAY,EAAqB,OAAOA,GAApB,WAAsBA,EAAE,KAAI,CAC1e,IAAIC,EAAE,CAAC,UAAU,UAAU,CAAC,MAAM,EAAE,EAAE,mBAAmB,UAAU,GAAG,oBAAoB,UAAU,GAAG,gBAAgB,UAAU,EAAE,EAAEC,EAAE,OAAO,OAAOC,EAAE,GAAG,SAASC,EAAEJ,EAAEK,EAAEC,EAAE,CAAC,KAAK,MAAMN,EAAE,KAAK,QAAQK,EAAE,KAAK,KAAKF,EAAE,KAAK,QAAQG,GAAGL,CAAC,CAACG,EAAE,UAAU,iBAAiB,GACnQA,EAAE,UAAU,SAAS,SAASJ,EAAEK,EAAE,CAAC,GAAc,OAAOL,GAAlB,UAAkC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aflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottLine truncated
|
||||
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottLine truncated
|
||||
Vendored
+2
-2
@@ -13,8 +13,8 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<script type="module" crossorigin src="/assets/index-LNhn5rJq.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-9kq4Muxx.css">
|
||||
<script type="module" crossorigin src="/assets/index-BtBXI4sW.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DiCOP9Mw.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -10,19 +10,21 @@ interface BotCodeEditorProps {
|
||||
|
||||
export function BotCodeEditor({ value, onChange, id }: BotCodeEditorProps) {
|
||||
return (
|
||||
<CodeMirror
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
extensions={[python()]}
|
||||
theme={oneDark}
|
||||
height="256px"
|
||||
basicSetup={{
|
||||
lineNumbers: true,
|
||||
foldGutter: false,
|
||||
highlightActiveLine: true,
|
||||
}}
|
||||
className="rounded-md border border-input overflow-hidden text-sm"
|
||||
id={id}
|
||||
/>
|
||||
<div className="w-full overflow-hidden rounded-md border border-input">
|
||||
<CodeMirror
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
extensions={[python()]}
|
||||
theme={oneDark}
|
||||
height="256px"
|
||||
basicSetup={{
|
||||
lineNumbers: true,
|
||||
foldGutter: false,
|
||||
highlightActiveLine: true,
|
||||
}}
|
||||
className="text-sm"
|
||||
id={id}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -37,3 +37,12 @@
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Constrain CodeMirror editor width */
|
||||
.cm-editor {
|
||||
max-width: 100% !important;
|
||||
contain: inline-size;
|
||||
}
|
||||
.cm-editor .cm-scroller {
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
Reference in new issue
Block a user