Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/addon/edit/continuelist",["module","exports","require","../../lib/codemirror"],(function(e,n,t){var i,r=void 0;window;i=function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function incrementRemainingMarkdownListNumbers(e,t){var i=t.line,r=0,o=0,a=n.exec(e.getLine(i)),d=a[1];do{var l=i+(r+=1),s=e.getLine(l),c=n.exec(s);if(c){var m=c[1],f=parseInt(a[3],10)+r-o,u=parseInt(c[3],10),p=u;if(d!==m||isNaN(u)){if(d.length>m.length)return;if(d.length<m.length&&1===r)return;o+=1}else f===u&&(p=u+1),f>u&&(p=f+1),e.replaceRange(s.replace(n,m+p+c[4]+c[5]),{line:l,ch:0},{line:l,ch:s.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),a=[],d=0;d<o.length;d++){var l=o[d].head,s=r.getStateAfter(l.line),c=e.innerMode(r.getMode(),s);if("markdown"!==c.mode.name&&"markdown"!==c.mode.helperType)return void r.execCommand("newlineAndIndent");var m=!1!==(s=c.state).list,f=0!==s.quote,u=r.getLine(l.line),p=n.exec(u),g=/^\s*$/.test(u.slice(0,l.ch));if(!o[d].empty()||!m&&!f||!p||g)return void r.execCommand("newlineAndIndent");if(t.test(u)){var h=f&&/>\s*$/.test(u),v=!/>\s*$/.test(u);(h||v)&&r.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),a[d]="\n"}else{var w=p[1],x=p[5],b=!(i.test(p[2])||p[2].indexOf(">")>=0),L=b?parseInt(p[3],10)+1+p[4]:p[2].replace("x"," ");a[d]="\n"+w+L+x,b&&incrementRemainingMarkdownListNumbers(r,l)}}r.replaceSelections(a)}},"object"==typeof n&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=continuelist.js.map