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