2014-06-18 23:27:05 +02:00
ace . define ( "ace/ext/old_ie" , [ "require" , "exports" , "module" , "ace/lib/useragent" , "ace/tokenizer" , "ace/ext/searchbox" , "ace/mode/text" ] , function ( require , exports , module ) { function patch ( obj , name , regexp , replacement ) { eval ( "obj['" + name + "']=" + obj [ name ] . toString ( ) . replace ( regexp , replacement ) ) } var MAX _TOKEN _COUNT = 1e3 , useragent = require ( "../lib/useragent" ) , TokenizerModule = require ( "../tokenizer" ) ; useragent . isIE && useragent . isIE < 10 && window . top . document . compatMode === "BackCompat" && ( useragent . isOldIE = ! 0 ) ; if ( typeof document != "undefined" && ! document . documentElement . querySelector ) { useragent . isOldIE = ! 0 ; var qs = function ( e , t ) { if ( t . charAt ( 0 ) == "." ) var n = t . slice ( 1 ) ; else var r = t . match ( /(\w+)=(\w+)/ ) , i = r && r [ 1 ] , s = r && r [ 2 ] ; for ( var o = 0 ; o < e . all . length ; o ++ ) { var u = e . all [ o ] ; if ( n ) { if ( u . className . indexOf ( n ) != - 1 ) return u } else if ( i && u . getAttribute ( i ) == s ) return u } } , sb = require ( "./searchbox" ) . SearchBox . prototype ; patch ( sb , "$initElements" , /([^\s=]*).querySelector\((".*?")\)/g , "qs($1, $2)" ) } var compliantExecNpcg = /()??/ . exec ( "" ) [ 1 ] === undefined ; if ( compliantExecNpcg ) return ; var proto = TokenizerModule . Tokenizer . prototype ; TokenizerModule . Tokenizer _orig = TokenizerModule . Tokenizer , proto . getLineTokens _orig = proto . getLineTokens , patch ( TokenizerModule , "Tokenizer" , "ruleRegExps.push(adjustedregex);\n" , function ( e ) { return e + ' if (state[i].next && RegExp(adjustedregex).test(""))\n rule._qre = RegExp(adjustedregex, "g");\n ' } ) , TokenizerModule . Tokenizer . prototype = proto , patch ( proto , "getLineTokens" , /if \(match\[i \+ 1\] === undefined\)\s*continue;/ , "if (!match[i + 1]) {\n if (value)continue;\n var qre = state[mapping[i]]._qre;\n if (!qre) continue;\n qre.lastIndex = lastIndex;\n if (!qre.exec(line) || qre.lastIndex != lastIndex)\n continue;\n }" ) , patch ( require ( "../mode/text" ) . Mode . prototype , "getTokenizer" , /Tokenizer/ , "TokenizerModule.Tokenizer" ) , useragent . isOldIE = ! 0 } ) , ace . define ( "ace/ext/searchbox" , [ "require" , "exports" , "module" , "ace/lib/dom" , "ace/lib/lang" , "ace/lib/event" , "ace/keyboard/hash_handler" , "ace/lib/keys" ] , function ( e , t , n ) { var r = e ( "../lib/dom" ) , i = e ( "../lib/lang" ) , s = e ( "../lib/event" ) , o = " /* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */ . ace _search { background - color : # ddd ; border : 1 px solid # cbcbcb ; border - top : 0 none ; max - width : 297 px ; overflow : hidden ; margin : 0 ; padding : 4 px ; padding - right : 6 px ; padding - bottom : 0 ; position : absolute ; top : 0 px ; z - index : 99 ; white - space : normal ; } . ace _search . left { border - left : 0 none ; border - radius : 0 px 0 px 5 px 0 px ; left : 0 ; } . ace _search . right { border - radius : 0 px 0 px 0 px 5 px ; border - right : 0 none ; right : 0 ; } . ace _search _form , . ace _replace _form { border - radius : 3 px ; border : 1 px solid # cbcbcb ; float : left ; margin - bottom : 4 px ; overflow : hidden ; } . ace _search _form . ace _nomatch { outline : 1 px solid red ; } . ace _search _field { background - color : white ; border - right : 1 px solid # cbcbcb ; border : 0 none ; - webkit - box - sizing : border - box ; - moz - box - sizing : border - box ; box - sizing : border - box ; display : block ; float : left ; height : 22 px ; outline : 0 ; padding : 0 7 px ; width : 214 px ; margin : 0 ; } . ace _searchbtn , . ace _replacebtn { background : # fff ; border : 0 none ; border - left : 1 px solid # dcdcdc ; cursor : pointer ; display : block ; float : left ; height : 22 px ; margin : 0 ; padding : 0 ; position : relative ; } . ace _searchbtn : last - child , . ace _replacebtn : last - child { border - top - right - radius : 3 px ; border - bottom - right - radius : 3 px ; } . ace _searchbtn : disabled { background : none ; cursor : default ; } . ace _searchbtn { background - position : 50 % 50 % ; background - repeat : no - repeat ; width : 27 px ; } . ace _searchbtn . prev { background - image : url ( data : image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC / 6E0 I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE + qfkAAAAASUVORK5CYII = ) ; } . ace _searchbtn . next { background - image : url ( data : image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC / 0 DMyIAKwGJMUAYDEo3M