|
|
|
|
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,s=navigator.platform,m=/gecko\/\d/i.test(e),t=/MSIE \d/.test(e),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),u=/Edge\/(\d+)/.exec(e),w=t||a||u,v=w&&(t?document.documentMode||6:+(u||a)[1]),x=!u&&/WebKit\//.test(e),t=x&&/Qt\/\d+\.\d+/.test(e),c=!u&&/Chrome\//.test(e),U=/Opera\//.test(e),V=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),K=/PhantomJS/.test(e),j=V&&(/Mobile\/\w+/.test(e)||2<navigator.maxTouchPoints),X=/Android/.test(e),Y=j||X||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),C=j||/Mac/.test(s),$=/\bCrOS\b/.test(e),a=/win/i.test(s),u=U&&e.match(/Version\/(\d*\.\d*)/),_=((u=u&&Number(u[1]))&&15<=u&&(x=!(U=!1)),C&&(t||U&&(null==u||u<12.11))),q=m||w&&9<=v;function Z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var n,r=e.className,t=Z(t).exec(r);t&&(n=r.slice(t.index+t[0].length),e.className=r.slice(0,t.index)+(n?t[1]+n:""))};function J(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function y(e,t){return J(e).appendChild(t)}function M(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function ee(e,t,n,r){e=M(e,t,n,r);return e.setAttribute("role","presentation"),e}function te(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if((t=11==t.nodeType?t.host:t)==e)return!0}while(t=t.parentNode)}function N(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ne(e,t){var n=e.className;Z(t).test(n)||(e.className+=(n?" ":"")+t)}function re(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Z(n[r]).test(t)&&(t+=" "+n[r]);return t}var ie=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r},oe=function(e){e.select()};function le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function se(e,t,n){for(var r in t=t||{},e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function ae(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||t<=s)return l+(t-o);l=(l+=s-o)+(n-l%n),o=s+1}}j?oe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(oe=function(e){try{e.select()}catch(e){}});function ue(){this.id=null,this.f=null,this.time=0,this.handler=le(this.onTimeout,this)}function S(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)};var ce=50,he={toString:function(){return"CodeMirror.Pass"}},de={scroll:!(ue.prototype.set=function(e,t){this.f=t;t=+new Date+e;(!this.id||t<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=t)})},fe={origin:"*mouse"},pe={origin:"+move"};function ge(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r),l=(o=-1==o?e.length:o)-r;if(o==e.length||t<=i+l)return r+Math.min(l,t-i);if(i+=o-r,r=o+1,t<=(i+=n-i%n))return r}}var me=[""];function ve(e){for(;me.length<=e;)me.push(z(me)+" ");return me[e]}function z(e){return e[e.length-1]}function ye(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function be(){}function we(e,t){e=Object.create?Object.create(e):(be.prototype=e,new be);return t&&se(t,e),e}var xe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ce(e){return/\w/.test(e)||""<e&&(e.toUpperCase(
|