Liferay.Loader.define("liferay!layout-content-page-editor-web$codemirror@5.65.2/addon/fold/comment-fold",["module","exports","require","../../lib/codemirror"],(function(e,t,o){window,function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,o){var r=t.getModeAt(o),n=r.blockCommentStart,i=r.blockCommentEnd;if(n&&i){for(var l,f=o.line,a=t.getLine(f),c=o.ch,m=0;;){var d=c<=0?-1:a.lastIndexOf(n,c-1);if(-1!=d){if(1==m&&d<o.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(f,d+1)))&&(0==d||a.slice(d-i.length,d)==i||!/comment/.test(t.getTokenTypeAt(e.Pos(f,d))))){l=d+n.length;break}c=d-1}else{if(1==m)return;m=1,c=a.length}}var s,b,g=1,u=t.lastLine();e:for(var h=f;h<=u;++h)for(var k=t.getLine(h),p=h==f?l:0;;){var v=k.indexOf(n,p),y=k.indexOf(i,p);if(v<0&&(v=k.length),y<0&&(y=k.length),(p=Math.min(v,y))==k.length)break;if(p==v)++g;else if(!--g){s=h,b=p;break e}++p}if(null!=s&&(f!=s||b!=l))return{from:e.Pos(f,l),to:e.Pos(s,b)}}}))}("object"==typeof t&&"object"==typeof e?o("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=comment-fold.js.map