(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(a,c,b,e){var d=a.getLineHandle(c.line),h=c.ch-1,d=0<=h&&r[d.text.charAt(h)]||r[d.text.charAt(++h)];if(!d)return null;var g=">"==d.charAt(1)?1:-1;if(b&&0h))for(k==c.line&&(m=c.ch-(0>b?1:0));m!=n;m+=b){var q=p.charAt(m);if(d.test(q)&&(void 0===e||a.getTokenTypeAt(l(k,m+1))==e))if(">"==r[q].charAt(1)== 0document.documentMode),l=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},n=null;e.defineOption("matchBrackets", !1,function(a,c,b){b&&b!=e.Init&&a.off("cursorActivity",w);c&&(a.state.matchBrackets="object"==typeof c?c:{},a.on("cursorActivity",w))});e.defineExtension("matchBrackets",function(){v(this,!0)});e.defineExtension("findMatchingBracket",function(a,c,b){return t(this,a,c,b)});e.defineExtension("scanForBracket",function(a,c,b,e){return u(this,a,c,b,e)})});