Liferay.Loader.define("portal-search-web$codemirror@5.62.0/addon/selection/active-line",["module","exports","require","../../lib/codemirror"],(function(e,t,i){window,function(e){"use strict";var t="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function r(e){for(var r=0;r<e.state.activeLines.length;r++)e.removeLineClass(e.state.activeLines[r],"wrap",t),e.removeLineClass(e.state.activeLines[r],"background",i),e.removeLineClass(e.state.activeLines[r],"gutter",n)}function o(e,o){for(var a=[],s=0;s<o.length;s++){var c=o[s],l=e.getOption("styleActiveLine");if("object"==typeof l&&l.nonEmpty?c.anchor.line==c.head.line:c.empty()){var d=e.getLineHandleVisualStart(c.head.line);a[a.length-1]!=d&&a.push(d)}}(function(e,t){if(e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!=t[i])return!1;return!0})(e.state.activeLines,a)||e.operation((function(){r(e);for(var o=0;o<a.length;o++)e.addLineClass(a[o],"wrap",t),e.addLineClass(a[o],"background",i),e.addLineClass(a[o],"gutter",n);e.state.activeLines=a}))}function a(e,t){o(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,i,n){var s=n!=e.Init&&n;i!=s&&(s&&(t.off("beforeSelectionChange",a),r(t),delete t.state.activeLines),i&&(t.state.activeLines=[],o(t,t.listSelections()),t.on("beforeSelectionChange",a)))}))}("object"==typeof t&&"object"==typeof e?i("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=active-line.js.map