(function(){function t(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n])}function n(e,t){if(!Array.prototype.indexOf){var n=e.length;while(n--)if(e[n]===t)return!0;return!1}return e.indexOf(t)!=-1}function r(t,n,r,i){var s=t.getCursor(),o=r(t,s),u=o;o.state=CodeMirror.innerMode(t.getMode(),o.state).state,/^[\w$_]*$/.test(o.string)||(o=u={start:s.ch,end:s.ch,string:"",state:o.state,type:o.string=="."?"property":null});while(u.type=="property"){u=r(t,e(s.line,u.start));if(u.string!=".")return;u=r(t,e(s.line,u.start));if(u.string==")"){var a=1;do{u=r(t,e(s.line,u.start));switch(u.string){case")":a++;break;case"(":a--;break;default:}}while(a>0);u=r(t,e(s.line,u.start));if(u.type.indexOf("variable")!==0)return;u.type="function"}if(!f)var f=[];f.push(u)}return{list:h(o,f,n,i),from:e(s.line,o.start),to:e(s.line,o.end)}}function i(e,t){return r(e,l,function(e,t){return e.getTokenAt(t)},t)}function s(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&n.string.charAt(0)=="."?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function o(e,t){return r(e,c,s,t)}function h(e,r,i,s){function c(e){e.indexOf(l)==0&&!n(o,e)&&o.push(e)}function h(e){typeof e=="string"?t(u,c):e instanceof Array?t(a,c):e instanceof Function&&t(f,c);for(var n in e)c(n)}var o=[],l=e.string;if(r){var p=r.pop(),d;p.type.indexOf("variable")===0?(s&&s.additionalContext&&(d=s.additionalContext[p.string]),d=d||window[p.string]):p.type=="string"?d="":p.type=="atom"?d=1:p.type=="function"&&(window.jQuery==null||p.string!="$"&&p.string!="jQuery"||typeof window.jQuery!="function"?window._!=null&&p.string=="_"&&typeof window._=="function"&&(d=window._()):d=window.jQuery());while(d!=null&&r.length)d=d[r.pop().string];d!=null&&h(d)}else{for(var v=e.state.localVars;v;v=v.next)c(v.name);for(var v=e.state.globalVars;v;v=v.next)c(v.name);h(window),t(i,c)}return o}var e=CodeMirror.Pos;CodeMirror.javascriptHint=i,CodeMirror.registerHelper("hint","javascript",i),CodeMirror.coffeescriptHint=o,CodeMirror.registerHelper("hint","coffeescript",o);var u="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),a="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),f="prototype apply call bind".split(" "),l="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),c="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")})();