(self.webpackChunk=self.webpackChunk||[]).push([[613],{613:function(e,n,t){!function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos,l=e.cmpPos;function o(e){var n=e.search(t);return-1==n?0:n}function a(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=n);for(var t=this,l=1/0,o=this.listSelections(),a=null,r=o.length-1;r>=0;r--){var m=o[r].from(),c=o[r].to();m.line>=l||(c.line>=l&&(c=i(l,0)),l=m.line,null==a?t.uncomment(m,c,e)?a="un":(t.lineComment(m,c,e),a="line"):"un"==a?t.uncomment(m,c,e):t.lineComment(m,c,e))}})),e.defineExtension("lineComment",(function(e,l,r){r||(r=n);var m,c,s=this,g=a(s,e),f=s.getLine(e.line);if(null!=f&&(m=e,c=f,!/\bstring\b/.test(s.getTokenTypeAt(i(m.line,0)))||/^[\'\"\`]/.test(c))){var u=r.lineComment||g.lineComment;if(u){var h=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,s.lastLine()+1),d=null==r.padding?" ":r.padding,C=r.commentBlankLines||e.line==l.line;s.operation((function(){if(r.indent){for(var n=null,l=e.line;l<h;++l){var a=-1===(m=s.getLine(l)).search(t)?m:m.slice(0,o(m));(null==n||n.length>a.length)&&(n=a)}for(l=e.line;l<h;++l){var m=s.getLine(l),c=n.length;(C||t.test(m))&&(m.slice(0,c)!=n&&(c=o(m)),s.replaceRange(n+u+d,i(l,0),i(l,c)))}}else for(l=e.line;l<h;++l)(C||t.test(s.getLine(l)))&&s.replaceRange(u+d,i(l,0))}))}else(r.blockCommentStart||g.blockCommentStart)&&(r.fullLines=!0,s.blockComment(e,l,r))}})),e.defineExtension("blockComment",(function(e,o,r){r||(r=n);var m=this,c=a(m,e),s=r.blockCommentStart||c.blockCommentStart,g=r.blockCommentEnd||c.blockCommentEnd;if(s&&g){if(!/\bcomment\b/.test(m.getTokenTypeAt(i(e.line,0)))){var f=Math.min(o.line,m.lastLine());f!=e.line&&0==o.ch&&t.test(m.getLine(f))&&--f;var u=null==r.padding?" ":r.padding;e.line>f||m.operation((function(){if(0!=r.fullLines){var n=t.test(m.getLine(f));m.replaceRange(u+g,i(f)),m.replaceRange(s+u,i(e.line,0));var a=r.blockCommentLead||c.blockCommentLead;if(null!=a)for(var h=e.line+1;h<=f;++h)(h!=f||n)&&m.replaceRange(a+u,i(h,0))}else{var d=0==l(m.getCursor("to"),o),C=!m.somethingSelected();m.replaceRange(g,o),d&&m.setSelection(C?o:m.getCursor("from"),o),m.replaceRange(s,e)}}))}}else(r.lineComment||c.lineComment)&&0!=r.fullLines&&m.lineComment(e,o,r)})),e.defineExtension("uncomment",(function(e,l,o){o||(o=n);var r,m=this,c=a(m,e),s=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),g=Math.min(e.line,s),f=o.lineComment||c.lineComment,u=[],h=null==o.padding?" ":o.padding;e:if(f){for(var d=g;d<=s;++d){var C=m.getLine(d),v=C.indexOf(f);if(v>-1&&!/comment/.test(m.getTokenTypeAt(i(d,v+1)))&&(v=-1),-1==v&&t.test(C))break e;if(v>-1&&t.test(C.slice(0,v)))break e;u.push(C)}if(m.operation((function(){for(var e=g;e<=s;++e){var n=u[e-g],t=n.indexOf(f),l=t+f.length;t<0||(n.slice(l,l+h.length)==h&&(l+=h.length),r=!0,m.replaceRange("",i(e,t),i(e,l)))}})),r)return!0}var p=o.blockCommentStart||c.blockCommentStart,k=o.blockCommentEnd||c.blockCommentEnd;if(!p||!k)return!1;var b=o.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(p);if(-1==x)return!1;var R=s==g?L:m.getLine(s),O=R.indexOf(k,s==g?x+p.length:0),T=i(g,x+1),S=i(s,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(S))||m.getRange(T,S,"\n").indexOf(k)>-1)return!1;var E=L.lastIndexOf(p,e.ch),M=-1==E?-1:L.slice(0,e.ch).indexOf(k,E+p.length);if(-1!=E&&-1!=M&&M+k.length!=e.ch)return!1;M=R.indexOf(k,l.ch);var A=R.slice(l.ch).lastIndexOf(p,M-l.ch);return E=-1==M||-1==A?-1:l.ch+A,(-1==M||-1==E||E==l.ch)&&(m.operation((function(){m.replaceRange("",i(s,O-(h&&R.slice(O-h.length,O)==h?h.length:0)),i(s,O+k.length));var e=x+p.length;if(h&&L.slice(e,e+h.length)==h&&(e+=h.length),m.replaceRange("",i(g,x),i(g,e)),b)for(var n=g+1;n<=s;++n){var l=m.getLine(n),o=l.indexOf(b);if(-1!=o&&!t.test(l.slice(0,o))){var a=o+b.length;h&&l.slice(a,a+h.length)==h&&(a+=h.length),m.replaceRange("",i(n,o),i(n,a))}}})),!0)}))}(t(709))}}]);
//# sourceMappingURL=613.js.map