"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[9311],{79311:(e,t,n)=>{n.r(t);n.d(t,{commonmarkLanguage:()=>Je,deleteMarkupBackward:()=>ut,insertNewlineContinueMarkup:()=>lt,markdown:()=>pt,markdownKeymap:()=>ct,markdownLanguage:()=>Ye});var r=n(71674);var s=n(22819);var i=n(4452);var l=n(75128);var o=n(66575);var a=n(45145);class h{static create(e,t,n,r,s){let i=r+(r<<8)+e+(t<<4)|0;return new h(e,t,n,i,s,[],[])}constructor(e,t,n,r,s,i,l){this.type=e;this.value=t;this.from=n;this.hash=r;this.end=s;this.children=i;this.positions=l;this.hashProp=[[o.NodeProp.contextHash,r]]}addChild(e,t){if(e.prop(o.NodeProp.contextHash)!=this.hash)e=new o.Tree(e.type,e.children,e.positions,e.length,this.hashProp);this.children.push(e);this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;if(n>=0)t=Math.max(t,this.positions[n]+this.children[n].length+this.from);return new o.Tree(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new o.Tree(o.NodeType.none,e,t,n,this.hashProp)})}}var f;(function(e){e[e["Document"]=1]="Document";e[e["CodeBlock"]=2]="CodeBlock";e[e["FencedCode"]=3]="FencedCode";e[e["Blockquote"]=4]="Blockquote";e[e["HorizontalRule"]=5]="HorizontalRule";e[e["BulletList"]=6]="BulletList";e[e["OrderedList"]=7]="OrderedList";e[e["ListItem"]=8]="ListItem";e[e["ATXHeading1"]=9]="ATXHeading1";e[e["ATXHeading2"]=10]="ATXHeading2";e[e["ATXHeading3"]=11]="ATXHeading3";e[e["ATXHeading4"]=12]="ATXHeading4";e[e["ATXHeading5"]=13]="ATXHeading5";e[e["ATXHeading6"]=14]="ATXHeading6";e[e["SetextHeading1"]=15]="SetextHeading1";e[e["SetextHeading2"]=16]="SetextHeading2";e[e["HTMLBlock"]=17]="HTMLBlock";e[e["LinkReference"]=18]="LinkReference";e[e["Paragraph"]=19]="Paragraph";e[e["CommentBlock"]=20]="CommentBlock";e[e["ProcessingInstructionBlock"]=21]="ProcessingInstructionBlock";e[e["Escape"]=22]="Escape";e[e["Entity"]=23]="Entity";e[e["HardBreak"]=24]="HardBreak";e[e["Emphasis"]=25]="Emphasis";e[e["StrongEmphasis"]=26]="StrongEmphasis";e[e["Link"]=27]="Link";e[e["Image"]=28]="Image";e[e["InlineCode"]=29]="InlineCode";e[e["HTMLTag"]=30]="HTMLTag";e[e["Comment"]=31]="Comment";e[e["ProcessingInstruction"]=32]="ProcessingInstruction";e[e["Autolink"]=33]="Autolink";e[e["HeaderMark"]=34]="HeaderMark";e[e["QuoteMark"]=35]="QuoteMark";e[e["ListMark"]=36]="ListMark";e[e["LinkMark"]=37]="LinkMark";e[e["EmphasisMark"]=38]="EmphasisMark";e[e["CodeMark"]=39]="CodeMark";e[e["CodeText"]=40]="CodeText";e[e["CodeInfo"]=41]="CodeInfo";e[e["LinkTitle"]=42]="LinkTitle";e[e["LinkLabel"]=43]="LinkLabel";e[e["URL"]=44]="URL"})(f||(f={}));class u{constructor(e,t){this.start=e;this.content=t;this.marks=[];this.parsers=[]}}class c{constructor(){this.text="";this.baseIndent=0;this.basePos=0;this.depth=0;this.markers=[];this.pos=0;this.indent=0;this.next=-1}forward(){if(this.basePos>this.pos)this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent);this.pos=e;this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return m(this.text,e)}reset(e){this.text=e;this.baseIndent=this.basePos=this.pos=this.indent=0;this.forwardInner();this.depth=1;while(this.markers.length)this.markers.pop()}moveBase(e){this.basePos=e;this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e;this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r=t.stack[n.depth+1].value+n.baseIndent)return true;if(n.indent>=n.baseIndent+4)return false;let r=(e.type==f.OrderedList?C:S)(n,t,false);return r>0&&(e.type!=f.BulletList||b(n,t,false)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}const p={[f.Blockquote](e,t,n){if(n.next!=62)return false;n.markers.push(J(f.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1));n.moveBase(n.pos+(g(n.text.charCodeAt(n.pos+1))?2:1));e.end=t.lineStart+n.text.length;return true},[f.ListItem](e,t,n){if(n.indent-1)return false;n.moveBaseColumn(n.baseIndent+e.value);return true},[f.OrderedList]:d,[f.BulletList]:d,[f.Document](){return true}};function g(e){return e==32||e==9||e==10||e==13}function m(e,t=0){while(tn&&g(e.charCodeAt(t-1)))t--;return t}function x(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;while(t-1&&e.depth==t.stack.length)return-1;return r<3?-1:1}function w(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return true;return false}function S(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||g(e.text.charCodeAt(e.pos+1)))&&(!n||w(t,f.BulletList)||e.skipSpace(e.pos+2)=48&&s<=57)r++;else break;if(r==e.text.length)return-1;s=e.text.charCodeAt(r)}if(r==e.pos||r>e.pos+9||s!=46&&s!=41||re.pos+1||e.next!=49))return-1;return r+1-e.pos}function y(e){if(e.next!=35)return-1;let t=e.pos+1;while(t6?-1:n}function T(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;while(t/,B=/\?>/;const E=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(r);if(i)return e.append(J(f.Comment,n,n+1+i[0].length));let l=/^\?[^]*?\?>/.exec(r);if(l)return e.append(J(f.ProcessingInstruction,n,n+1+l[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);if(!o)return-1;return e.append(J(f.HTMLTag,n,n+1+o[0].length))},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;while(e.char(r)==t)r++;let s=e.slice(n-1,n),i=e.slice(r,r+1);let l=se.test(s),o=se.test(i);let a=/\s|^$/.test(s),h=/\s|^$/.test(i);let f=!h&&(!o||a||l);let u=!a&&(!l||h||o);let c=f&&(t==42||!u||l);let d=u&&(t==42||!f||o);return e.append(new ne(t==95?W:Y,n,r,(c?1:0)|(d?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(J(f.HardBreak,n,n+2));if(t==32){let t=n+1;while(e.char(t)==32)t++;if(e.char(t)==10&&t>=n+2)return e.append(J(f.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new ne(ee,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new ne(te,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let t=e.parts[r];if(t instanceof ne&&(t.type==ee||t.type==te)){if(!t.side||e.skipSpace(t.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2))){e.parts[r]=null;return-1}let s=e.takeContent(r);let i=e.parts[r]=le(e,s,t.type==ee?f.Link:f.Image,t.from,n+1);if(t.type==ee)for(let t=0;tt?J(f.URL,t+n,s+n):s==e.length?null:false}}function ae(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return false;let s=r==40?41:r;for(let i=t+1,l=false;i=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){this.parts.push(e);return e.to}addDelimiter(e,t,n,r,s){return this.append(new ne(e,t,n,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof ne&&(t.type==ee||t.type==te))return true}return false}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n=e;l--){let e=this.parts[l];if(e instanceof ne&&e.side&1&&e.type==t.type&&!(r&&(t.side&1||e.side&2)&&(e.to-e.from+s)%3==0&&((e.to-e.from)%3||s%3))){i=e;break}}if(!i)continue;let o=t.type.resolve,a=[];let h=i.from,f=t.to;if(r){let e=Math.min(2,i.to-i.from,s);h=i.to-e;f=t.from+e;o=e==1?"Emphasis":"StrongEmphasis"}if(i.type.mark)a.push(this.elt(i.type.mark,h,i.to));for(let e=l+1;e=0;t--){let n=this.parts[t];if(n instanceof ne&&n.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);this.parts.length=e;return t}skipSpace(e){return m(this.text,e-this.offset)+this.offset}elt(e,t,n,r){if(typeof e=="string")return J(this.parser.getNodeType(e),t,n,r);return new K(e,t)}}function ue(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let s of t){while(r(e?e-1:0))return false;if(this.fragmentEnd<0){let e=this.fragment.to;while(e>0&&this.input.read(e-1,e)!="\n")e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;if(!n){n=this.cursor=this.fragment.tree.cursor();n.firstChild()}let r=e+this.fragment.offset;while(n.to<=r)if(!n.parent())return false;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return false}}matches(e){let t=this.cursor.tree;return t&&t.prop(o.NodeProp.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0);let s=e.absoluteLineStart,i=s,l=e.block.children.length;let a=i,h=l;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let s=pe(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to){e.addNode(t.tree,s)}else{let n=new o.Tree(e.parser.nodeSet.types[f.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree);e.addNode(n,s)}if(t.type.is("Block")){if(ce.indexOf(t.type.id)<0){i=t.to-n;l=e.block.children.length}else{i=a;l=h;a=t.to-n;h=e.block.children.length}}if(!t.nextSibling())break}while(e.block.children.length>l){e.block.children.pop();e.block.positions.pop()}return i-s}}function pe(e,t){let n=e;for(let r=1;rv[e])),Object.keys(v).map((e=>X[e])),Object.keys(v),z,p,Object.keys(ie).map((e=>ie[e])),Object.keys(ie),[]);function ke(e,t,n){let r=[];for(let s=e.firstChild,i=t;;s=s.nextSibling){let e=s?s.from:n;if(e>i)r.push({from:i,to:e});if(!s)break;i=s.to}return r}function xe(e){let{codeParser:t,htmlParser:n}=e;let r=(0,o.parseMixed)(((e,r)=>{let s=e.type.id;if(t&&(s==f.CodeBlock||s==f.FencedCode)){let n="";if(s==f.FencedCode){let t=e.node.getChild(f.CodeInfo);if(t)n=r.read(t.from,t.to)}let i=t(n);if(i)return{parser:i,overlay:e=>e.type.id==f.CodeText}}else if(n&&(s==f.HTMLBlock||s==f.HTMLTag)){return{parser:n,overlay:ke(e.node,e.from,e.to)}}return null}));return{wrap:r}}const Le={resolve:"Strikethrough",mark:"StrikethroughMark"};const be={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":a.tags.strikethrough}},{name:"StrikethroughMark",style:a.tags.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),s=e.slice(n+2,n+3);let i=/\s|^$/.test(r),l=/\s|^$/.test(s);let o=se.test(r),a=se.test(s);return e.addDelimiter(Le,n,n+2,!l&&(!a||i||o),!i&&(!o||l||a))},after:"Emphasis"}]};function we(e,t,n=0,r,s=0){let i=0,l=true,o=-1,a=-1,h=false;let f=()=>{r.push(e.elt("TableCell",s+o,s+a,e.parser.parseInline(t.slice(o,a),s+o)))};for(let u=n;u-1)i++;l=false;if(r){if(o>-1)f();r.push(e.elt("TableDelimiter",u+s,u+s+1))}o=a=-1}else if(h||n!=32&&n!=9){if(o<0)o=u;a=u+1}h=!h&&n==92}if(o>-1){i++;if(r)f()}return i}function Se(e,t){for(let n=t;ne instanceof ye))||!Se(t.text,t.basePos))return false;let r=e.scanLine(e.absoluteLineEnd+1).text;return Ce.test(r)&&we(e,t.text,t.basePos)==we(e,r,t.basePos)},before:"SetextHeading"}]};class Ae{nextLine(){return false}finish(e,t){e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)]));return true}}const Ie={defineNodes:[{name:"Task",block:true,style:a.tags.list},{name:"TaskMarker",style:a.tags.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new Ae:null},after:"SetextHeading"}]};const Be=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy;const Ee=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy;const Me=/[\w-]+\.[\w-]+($|\/)/;const Pe=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy;const He=/\/[a-zA-Z\d@.]+/gy;function ve(e,t,n,r){let s=0;for(let i=t;i-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],s;if(/[?!.,:*_~]/.test(n)||n==")"&&ve(e,t,r,")")>ve(e,t,r,"("))r--;else if(n==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+s.index;else break}return r}function Oe(e,t){Pe.lastIndex=t;let n=Pe.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}const Re={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;Be.lastIndex=r;let s=Be.exec(e.text),i=-1;if(!s)return-1;if(s[1]||s[2]){i=Ne(e.text,r+s[0].length);if(i>-1&&e.hasOpenLink){let t=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,i));i=r+t[0].length}}else if(s[3]){i=Oe(e.text,r)}else{i=Oe(e.text,r+s[0].length);if(i>-1&&s[0]=="xmpp:"){He.lastIndex=i;s=He.exec(e.text);if(s)i=s.index+s[0].length}}if(i<0)return-1;e.addElement(e.elt("URL",n,i+e.offset));return i+e.offset}}]};const Xe=[Te,Ie,be,Re];function ze(e,t,n){return(r,s,i)=>{if(s!=e||r.char(i+1)==e)return-1;let l=[r.elt(n,i,i+1)];for(let o=i+1;o!e.is("Block")||e.is("Document")||Qe(e)!=null||Ze(e)?undefined:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to}))),qe.add(Qe),i.indentNodeProp.add({Document:()=>null}),i.languageDataProp.add({Document:je})]});function Qe(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:undefined}function Ze(e){return e.name=="OrderedList"||e.name=="BulletList"}function Ve(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Qe(e.type))!=null&&r<=t)break;n=e}return n.to}const Ge=i.foldService.of(((e,t,n)=>{for(let r=(0,i.syntaxTree)(e).resolveInner(n,-1);r;r=r.parent){if(r.fromn)return{from:n,to:s}}return null}));function Ke(e){return new i.Language(je,e,[Ge],"markdown")}const Je=Ke(Ue);const We=Ue.configure([Xe,$e,De,_e,{props:[i.foldNodeProp.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]);const Ye=Ke(We);function et(e,t){return n=>{if(n&&e){let t=null;n=/\S*/.exec(n)[0];if(typeof e=="function")t=e(n);else t=i.LanguageDescription.matchLanguageName(e,n,true);if(t instanceof i.LanguageDescription)return t.support?t.support.language.parser:i.ParseContext.getSkippingParser(t.load());else if(t)return t.parser}return t?t.parser:null}}class tt{constructor(e,t,n,r,s,i,l){this.node=e;this.from=t;this.to=n;this.spaceBefore=r;this.spaceAfter=s;this.type=i;this.item=l}blank(e,t=true){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){while(n.length0;e--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+rt(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function nt(e,t){let n=[],r=[];for(let s=e;s;s=s.parent){if(s.name=="FencedCode")return r;if(s.name=="ListItem"||s.name=="Blockquote")n.push(s)}for(let s=n.length-1;s>=0;s--){let e=n[s],i;let l=t.lineAt(e.from),o=e.from-l.from;if(e.name=="Blockquote"&&(i=/^ *>( ?)/.exec(l.text.slice(o)))){r.push(new tt(e,o,o+i[0].length,"",i[1],">",null))}else if(e.name=="ListItem"&&e.parent.name=="OrderedList"&&(i=/^( *)\d+([.)])( *)/.exec(l.text.slice(o)))){let t=i[3],n=i[0].length;if(t.length>=4){t=t.slice(0,t.length-4);n-=4}r.push(new tt(e.parent,o,o+n,i[1],t,i[2],e))}else if(e.name=="ListItem"&&e.parent.name=="BulletList"&&(i=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(o)))){let t=i[4],n=i[0].length;if(t.length>4){t=t.slice(0,t.length-4);n-=4}let s=i[2];if(i[3])s+=i[3].replace(/[xX]/," ");r.push(new tt(e.parent,o,o+n,i[1],t,s,e))}}return r}function rt(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function st(e,t,n,r=0){for(let s=-1,i=e;;){if(i.name=="ListItem"){let e=rt(i,t);let l=+e[2];if(s>=0){if(l!=s+1)return;n.push({from:i.from+e[1].length,to:i.from+e[0].length,insert:String(s+2+r)})}s=l}let e=i.nextSibling;if(!e)break;i=e}}function it(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i.indentUnit)!="\t")return e;let s=(0,r.countColumn)(e,4,n);let l="";for(let r=s;r>0;){if(r>=4){l+="\t";r-=4}else{l+=" ";r--}}return l+e.slice(n)}const lt=({state:e,dispatch:t})=>{let n=(0,i.syntaxTree)(e),{doc:s}=e;let l=null,o=e.changeByRange((t=>{if(!t.empty||!Ye.isActiveAt(e,t.from,0))return l={range:t};let i=t.from,o=s.lineAt(i);let a=nt(n.resolveInner(i,-1),s);while(a.length&&a[a.length-1].from>i-o.from)a.pop();if(!a.length)return l={range:t};let h=a[a.length-1];if(h.to-h.spaceAfter.length>i-o.from)return l={range:t};let f=i>=h.to-h.spaceAfter.length&&!/\S/.test(o.text.slice(h.to));if(h.item&&f){let t=h.node.firstChild,n=h.node.getChild("ListItem","ListItem");if(t.to>=i||n&&n.to0&&!/[^\s>]/.test(s.lineAt(o.from-1).text)){let e=a.length>1?a[a.length-2]:null;let t,n="";if(e&&e.item){t=o.from+e.from;n=e.marker(s,1)}else{t=o.from+(e?e.to:0)}let l=[{from:t,to:i,insert:n}];if(h.node.name=="OrderedList")st(h.item,s,l,-2);if(e&&e.node.name=="OrderedList")st(e.item,s,l);return{range:r.EditorSelection.cursor(t+n.length),changes:l}}else{let t=ht(a,e,o);return{range:r.EditorSelection.cursor(i+t.length+1),changes:{from:o.from,insert:t+e.lineBreak}}}}if(h.node.name=="Blockquote"&&f&&o.from){let n=s.lineAt(o.from-1),r=/>\s*$/.exec(n.text);if(r&&r.index==h.from){let s=e.changes([{from:n.from+r.index,to:n.to},{from:o.from+h.from,to:o.to}]);return{range:t.map(s),changes:s}}}let u=[];if(h.node.name=="OrderedList")st(h.item,s,u);let c=h.item&&h.item.from]*/.exec(o.text)[0].length>=h.to){for(let e=0,t=a.length-1;e<=t;e++){d+=e==t&&!c?a[e].marker(s,1):a[e].blank(eo.from&&/\s/.test(o.text.charAt(p-o.from-1)))p--;d=it(d,e);if(at(h.node,e.doc))d=ht(a,e,o)+e.lineBreak+d;u.push({from:p,to:i,insert:e.lineBreak+d});return{range:r.EditorSelection.cursor(p+d.length+1),changes:u}}));if(l)return false;t(e.update(o,{scrollIntoView:true,userEvent:"input"}));return true};function ot(e){return e.name=="QuoteMark"||e.name=="ListMark"}function at(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return false;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return false;let s=t.lineAt(n.to),i=t.lineAt(r.from);let l=/^[\s>]*$/.test(s.text);return s.number+(l?0:1){let n=(0,i.syntaxTree)(e);let s=null,l=e.changeByRange((t=>{let i=t.from,{doc:l}=e;if(t.empty&&Ye.isActiveAt(e,t.from)){let t=l.lineAt(i);let s=nt(ft(n,i),l);if(s.length){let n=s[s.length-1];let l=n.to-n.spaceAfter.length+(n.spaceAfter?1:0);if(i-t.from>l&&!/\S/.test(t.text.slice(l,i-t.from)))return{range:r.EditorSelection.cursor(t.from+l),changes:{from:t.from+l,to:i}};if(i-t.from==l&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let s=t.from+n.from;if(n.item&&n.node.from