You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
187 KiB
JavaScript
1 line
187 KiB
JavaScript
6 years ago
|
(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define("codemirror.js",a):(b.CodeMirror=a())}(this,(function(){var ez=navigator.userAgent;var eK=navigator.platform;var cP=/gecko\/\d/i.test(ez);var fs=/MSIE \d/.test(ez);var b3=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ez);var c3=/Edge\/(\d+)/.exec(ez);var ef=fs||b3||c3;var n=ef&&(fs?document.documentMode||6:+(c3||b3)[1]);var dt=!c3&&/WebKit\//.test(ez);var ei=dt&&/Qt\/\d+\.\d+/.test(ez);var dJ=!c3&&/Chrome\//.test(ez);var eB=/Opera\//.test(ez);var aM=/Apple Computer/.test(navigator.vendor);var dB=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ez);var ge=/PhantomJS/.test(ez);var fM=!c3&&/AppleWebKit/.test(ez)&&/Mobile\/\w+/.test(ez);var aX=/Android/.test(ez);var eQ=fM||aX||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ez);var ct=fM||/Mac/.test(eK);var gx=/\bCrOS\b/.test(ez);var a0=/win/i.test(eK);var ba=eB&&ez.match(/Version\/(\d*\.\d*)/);if(ba){ba=Number(ba[1])}if(ba&&ba>=15){eB=false;dt=true}var cb=ct&&(ei||eB&&(ba==null||ba<12.11));var g9=cP||(ef&&n>=9);function X(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(hl,i){var hm=hl.className;var hk=X(i).exec(hm);if(hk){var hn=hm.slice(hk.index+hk[0].length);hl.className=hm.slice(0,hk.index)+(hn?hk[1]+hn:"")}};function eA(hk){for(var i=hk.childNodes.length;i>0;--i){hk.removeChild(hk.firstChild)}return hk}function cd(i,hk){return eA(i).appendChild(hk)}function g0(hk,ho,hn,hm){var hp=document.createElement(hk);if(hn){hp.className=hn}if(hm){hp.style.cssText=hm}if(typeof ho=="string"){hp.appendChild(document.createTextNode(ho))}else{if(ho){for(var hl=0;hl<ho.length;++hl){hp.appendChild(ho[hl])}}}return hp}function g6(i,hm,hl,hk){var hn=g0(i,hm,hl,hk);hn.setAttribute("role","presentation");return hn}var cM;if(document.createRange){cM=function(hm,hn,hk,i){var hl=document.createRange();hl.setEnd(i||hm,hk);hl.setStart(hm,hn);return hl}}else{cM=function(hl,hn,i){var hk=document.body.createTextRange();try{hk.moveToElementText(hl.parentNode)}catch(hm){return hk}hk.collapse(true);hk.moveEnd("character",i);hk.moveStart("character",hn);return hk}}function ha(i,hk){if(hk.nodeType==3){hk=hk.parentNode}if(i.contains){return i.contains(hk)}do{if(hk.nodeType==11){hk=hk.host}if(hk==i){return true}}while(hk=hk.parentNode)}function ej(){var i;try{i=document.activeElement}catch(hk){i=document.body||null}while(i&&i.shadowRoot&&i.shadowRoot.activeElement){i=i.shadowRoot.activeElement}return i}function gn(hk,i){var hl=hk.className;if(!X(i).test(hl)){hk.className+=(hl?" ":"")+i}}function gN(hm,hk){var hl=hm.split(" ");for(var hn=0;hn<hl.length;hn++){if(hl[hn]&&!X(hl[hn]).test(hk)){hk+=" "+hl[hn]}}return hk}var eg=function(i){i.select()};if(fM){eg=function(i){i.selectionStart=0;i.selectionEnd=i.value.length}}else{if(ef){eg=function(hk){try{hk.select()}catch(i){}}}}function cW(hk){var i=Array.prototype.slice.call(arguments,1);return function(){return hk.apply(null,i)}}function aY(hl,hk,i){if(!hk){hk={}}for(var hm in hl){if(hl.hasOwnProperty(hm)&&(i!==false||!hk.hasOwnProperty(hm))){hk[hm]=hl[hm]}}return hk}function cc(hn,hl,hp,hq,hm){if(hl==null){hl=hn.search(/[^\s\u00a0]/);if(hl==-1){hl=hn.length}}for(var ho=hq||0,hr=hm||0;;){var hk=hn.indexOf("\t",ho);if(hk<0||hk>=hl){return hr+(hl-ho)}hr+=hk-ho;hr+=hp-(hr%hp);ho=hk+1}}var hj=function(){this.id=null};hj.prototype.set=function(i,hk){clearTimeout(this.id);this.id=setTimeout(hk,i)};function dP(hm,hk){for(var hl=0;hl<hm.length;++hl){if(hm[hl]==hk){return hl}}return -1}var ed=30;var cy={toString:function(){return"CodeMirror.Pass"}};var ag={scroll:false},R={origin:"*mouse"},dp={origin:"+move"};function e2(hn,hm,ho){for(var hp=0,hl=0;;){var hk=hn.indexOf("\t",hp);if(hk==-1){hk=hn.length}var i=hk-hp;if(hk==hn.length||hl+i>=hm){return hp+Math.min(i,hm-hl)}hl+=hk-hp;hl+=ho-(hl%ho);hp=hk+1;if(hl>=hm){return hp}}}var bb=[""];function cQ(i){while(bb.length<=i){bb.push(gt(bb)+" ")}return bb[i]}function gt(i){return i[i.length-1]}function ce(hn,hm){var hk=[];for(var hl=0;hl<hn.length;hl++){hk[hl]=hm(hn[hl],hl)}return h
|