芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.2/vendor/codemirror/lib/addons.min.js
!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){"use strict";e.defineOption("fullScreen",!1,(function(t,n,i){i==e.Init&&(i=!1),!i!=!n&&(n?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}(t))}))})),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(e,t,n,i){this.cm=e,this.node=t,this.options=n,this.height=i,this.cleared=!1}function n(e,t){for(var n=t.nextSibling;n;n=n.nextSibling)if(n==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",(function(e,i){i=i||{},this.state.panels||function(e){var t=e.getWrapperElement(),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i=parseInt(n.height),o=e.state.panels={setHeight:t.style.height,panels:[],wrapper:document.createElement("div")},r=e.hasFocus(),a=e.getScrollInfo();t.parentNode.insertBefore(o.wrapper,t),o.wrapper.appendChild(t),e.scrollTo(a.left,a.top),r&&e.focus();e._setSize=e.setSize,null!=i&&(e.setSize=function(t,n){if(n||(n=o.wrapper.offsetHeight),o.setHeight=n,"number"!=typeof n){var r=/^(\d+\.?\d*)px$/.exec(n);r?n=Number(r[1]):(o.wrapper.style.height=n,n=o.wrapper.offsetHeight)}var a=n-o.panels.map((function(e){return e.node.getBoundingClientRect().height})).reduce((function(e,t){return e+t}),0);e._setSize(t,a),i=n})}(this);var o=this.state.panels,r=o.wrapper,a=this.getWrapperElement(),s=i.replace instanceof t&&!i.replace.cleared;i.after instanceof t&&!i.after.cleared?r.insertBefore(e,i.before.node.nextSibling):i.before instanceof t&&!i.before.cleared?r.insertBefore(e,i.before.node):s?(r.insertBefore(e,i.replace.node),i.replace.clear(!0)):"bottom"==i.position?r.appendChild(e):"before-bottom"==i.position?r.insertBefore(e,a.nextSibling):"after-top"==i.position?r.insertBefore(e,a):r.insertBefore(e,r.firstChild);var l=i&&i.height||e.offsetHeight,m=new t(this,e,i,l);return o.panels.push(m),this.setSize(),i.stable&&n(this,e)&&this.scrollTo(null,this.getScrollInfo().top+l),m})),t.prototype.clear=function(e){if(!this.cleared){this.cleared=!0;var t=this.cm.state.panels;t.panels.splice(t.panels.indexOf(this),1),this.cm.setSize(),this.options.stable&&n(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),t.wrapper.removeChild(this.node),0!=t.panels.length||e||function(e){var t=e.state.panels;e.state.panels=null;var n=e.getWrapperElement(),i=e.hasFocus(),o=e.getScrollInfo();t.wrapper.parentNode.replaceChild(n,t.wrapper),e.scrollTo(o.left,o.top),i&&e.focus();n.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}(this.cm)}},t.prototype.changed=function(){this.height=this.node.getBoundingClientRect().height,this.cm.setSize()}})),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){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function i(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(r(i(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(o))}));var o={Backspace:function(t){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;for(var r=i(o,"pairs"),a=t.listSelections(),l=0;l
=0;l--){var d=a[l].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),o=n&&i(n,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),a=0;a
1&&p.indexOf(o)>=0&&t.getRange(n(C.line,C.ch-2),C)==o+o){if(C.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(C.line,C.ch-2))))return e.Pass;y="addFour"}else if(h){var k=0==C.ch?" ":t.getRange(n(C.line,C.ch-1),C);if(e.isWordChar(S)||k==o||e.isWordChar(k))return e.Pass;y="both"}else{if(!g||!(0===S.length||/\s/.test(S)||u.indexOf(S)>-1))return e.Pass;y="both"}else y=h&&d(t,C)?"both":p.indexOf(o)>=0&&t.getRange(C,n(C.line,C.ch+3))==o+o+o?"skipThree":"skip";if(f){if(f!=y)return e.Pass}else f=y}var w=c%2?a.charAt(c-1):o,j=c%2?o:a.charAt(c+1);t.operation((function(){if("skip"==f)l(t,1);else if("skipThree"==f)l(t,3);else if("surround"==f){for(var e=t.getSelections(),n=0;n
0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,o)}function m(t){var i=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(i?-1:1)),head:new n(t.head.line,t.head.ch+(i?1:-1))}}function c(e,t){var i=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==i.length?i:null}function d(e,t){var i=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(i.type)&&i.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}r(t.pairs+"`")})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}((function(e){e.defineOption("autoCloseTags",!1,(function(a,s,l){if(l!=e.Init&&l&&a.removeKeyMap("autoCloseTags"),s){var m={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(m["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:i(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(m["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return e.Pass;for(var a=i.listSelections(),s=[],l=i.getOption("autoCloseTags"),m=0;m
c.ch&&(h=h.slice(0,h.length-d.end+c.ch));var y=h.toLowerCase();if(!h||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==c.ch-d.start-1||g&&o(g,y)>-1||r(i,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(u)||[],h,c,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&o(b,h)>-1)s[m]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var C=v&&o(v,y)>-1;s[m]={indent:C,text:">"+(C?"\n\n":"")+""+h+">",newPos:C?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var S="object"==typeof l&&l.dontIndentOnAutoClose;for(m=a.length-1;m>=0;m--){var k=s[m];i.replaceRange(k.text,a[m].head,a[m].anchor,"+insert");var w=i.listSelections().slice(0);w[m]={head:k.newPos,anchor:k.newPos},i.setSelections(w),!S&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}(i)}),a.addKeyMap(m)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(t,n){for(var i=t.listSelections(),o=[],a=n?"/":"",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,m=0;m
"!=t.getLine(c.line).charAt(d.end)&&(p+=">"),o[m]=p}if(t.replaceSelections(o),i=t.listSelections(),!l)for(m=0;m
=0&&n[m]==i;m--)++l;o=s.to;for(m=1;m
",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function r(e,t,r){var s=e.getLineHandle(t.line),l=t.ch-1,m=r&&r.afterCursor;null==m&&(m=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=o(r),d=!m&&l>=0&&c.test(s.text.charAt(l))&&i[s.text.charAt(l)]||c.test(s.text.charAt(l+1))&&i[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(r&&r.strict&&f>0!=(l==t.ch))return null;var u=e.getTokenTypeAt(n(t.line,l+1)),p=a(e,n(t.line,l+(f>0?1:0)),f,u,r);return null==p?null:{from:n(t.line,l),to:p&&p.pos,match:p&&p.ch==d.charAt(0),forward:f>0}}function a(e,t,r,a,s){for(var l=s&&s.maxScanLineLength||1e4,m=s&&s.maxScanLines||1e3,c=[],d=o(s),f=r>0?Math.min(t.line+m,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-m),u=t.line;u!=f;u+=r){var p=e.getLine(u);if(p){var h=r>0?0:p.length-1,x=r>0?p.length:-1;if(!(p.length>l))for(u==t.line&&(h=t.ch-(r<0?1:0));h!=x;h+=r){var g=p.charAt(h);if(d.test(g)&&(void 0===a||(e.getTokenTypeAt(n(u,h+1))||"")==(a||""))){var v=i[g];if(v&&">"==v.charAt(1)==r>0)c.push(g);else{if(!c.length)return{pos:n(u,h),ch:g};c.pop()}}}}}return u-r!=(r>0?e.lastLine():e.firstLine())&&null}function s(e,i,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=o&&o.highlightNonMatching,l=[],m=e.listSelections(),c=0;c
c))m=c,s="{",l="}";else{if(null==d)return;m=d,s="[",l="]"}var f,u,p=1,h=t.lastLine();e:for(var x=o;x<=h;++x)for(var g=t.getLine(x),v=x==o?m:0;;){var y=g.indexOf(s,v),b=g.indexOf(l,v);if(y<0&&(y=g.length),b<0&&(b=g.length),(v=Math.min(y,b))==g.length)break;if(t.getTokenTypeAt(e.Pos(x,v+1))==i)if(v==y)++p;else if(!--p){f=x,u=v;break e}++v}if(null!=f&&o!=f)return{from:e.Pos(o,m),to:e.Pos(f,u)}})),e.registerHelper("fold","import",(function(t,n){function i(n){if(n
t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var o=n,r=Math.min(t.lastLine(),n+10);o<=r;++o){var a=t.getLine(o).indexOf(";");if(-1!=a)return{startCh:i.end,end:e.Pos(o,a)}}}var o,r=n.line,a=i(r);if(!a||i(r-1)||(o=i(r-2))&&o.end.line==r-1)return null;for(var s=a.end;;){var l=i(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(r,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function i(n){if(n
t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var o=n.line,r=i(o);if(null==r||null!=i(o-1))return null;for(var a=o;;){if(null==i(a+1))break;++a}return{from:e.Pos(o,r+1),to:t.clipPos(e.Pos(a))}}))})),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){"use strict";function t(t,n,o,r){if(o&&o.call){var a=o;o=null}else a=i(t,o,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var s=i(t,o,"minFoldSize");function l(e){var i=a(t,n);if(!i||i.to.line-i.from.line
t.firstLine();)n=e.Pos(n.line-1,0),m=l(!1);if(m&&!m.cleared&&"unfold"!==r){var c=function(e,t,n){var o=i(e,t,"widget");"function"==typeof o&&(o=o(n.from,n.to));if("string"==typeof o){var r=document.createTextNode(o);(o=document.createElement("span")).appendChild(r),o.className="CodeMirror-foldmarker"}else o&&(o=o.cloneNode(!0));return o}(t,o,m);e.on(c,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(m.from,m.to,{replacedWith:c,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(n,i){e.signal(t,"unfold",t,n,i)})),e.signal(t,"fold",t,m.from,m.to)}}e.newFoldFunction=function(e,n){return function(i,o){t(i,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,i){t(this,e,n,i)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n
=m){if(f&&a&&f.test(a.className))return;r=o(s.indicatorOpen)}}(r||a)&&e.setGutterMarker(n,s.gutter,r)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){r(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function l(e,n,o){var r=e.state.foldGutter;if(r){var a=r.options;if(o==a.gutter){var s=i(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function m(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation((function(){n.from
t.to&&(r(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function d(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i
=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function m(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){o.lastIndex=t,e.ch=t;var n=o.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}function u(e,n){for(var i=[];;){var o,r=d(e),a=e.line,s=e.ch-(r?r[0].length:0);if(!r||!(o=m(e)))return;if("selfClose"!=o)if(r[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==r[2]){i.length=l;break}if(l<0&&(!n||n==r[2]))return{tag:r[2],from:t(a,s),to:t(e.line,e.ch)}}else i.push(r[2])}}function p(e,n){for(var i=[];;){var o=f(e);if(!o)return;if("selfClose"!=o){var r=e.line,a=e.ch,s=c(e);if(!s)return;if(s[1])i.push(s[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(r,a)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,i){for(var o=new r(e,i.line,0);;){var a=d(o);if(!a||o.line!=i.line)return;var s=m(o);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(o.line,o.ch),c=u(o,a[2]);return c&&n(c.from,l)>0?{from:l,to:c.from}:null}}})),e.findMatchingTag=function(e,i,o){var a=new r(e,i.line,i.ch,o);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=m(a),l=s&&t(a.line,a.ch),d=s&&c(a);if(s&&d&&!(n(a,i)>0)){var f={from:t(a.line,a.ch),to:l,tag:d[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:d[1]?{open:p(a,d[2]),close:f,at:"close"}:{open:f,close:u(a=new r(e,l.line,l.ch,o),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,i){for(var o=new r(e,t.line,t.ch,n);;){var a=p(o,i);if(!a)break;var s=u(new r(e,t.line,t.ch,n),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,i){return u(new r(e,t.line,t.ch,i?{from:0,to:i}:null),n)}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],(function(t){e(t,"amd")})):e(CodeMirror,"plain")}((function(e,t){e.modeURL||(e.modeURL="../mode/%N/%N.js");var n={};function i(t,n,i){var o=e.modes[t],r=o&&o.dependencies;if(!r)return n();for(var a=[],s=0;s
-1?o+t.length:o}var r=t.exec(n?e.slice(n):e);return r?r.index+n+(i?r[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(o,r){if(r.innerActive){var a=r.innerActive;m=o.string;if(!a.close&&o.sol())return r.innerActive=r.inner=null,this.token(o,r);if((d=a.close&&!r.startingInner?i(m,a.close,o.pos,a.parseDelimiters):-1)==o.pos&&!a.parseDelimiters)return o.match(a.close),r.innerActive=r.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(o.string=m.slice(0,d));var s=a.mode.token(o,r.inner);return d>-1?o.string=m:o.pos>o.start&&(r.startingInner=!1),d==o.pos&&a.parseDelimiters&&(r.innerActive=r.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,m=o.string,c=0;c
a?t.charCoords(e,"local")[n?"top":"bottom"]:t.heightAtLine(l,"local")+(n?0:l.height)}var c=t.lastLine();if(t.display.barWidth)for(var d,f=0;f
c)){for(var p=d||m(u.from,!0)*n,h=m(u.to,!1)*n;f
c)&&!((d=m(o[f+1].from,!0)*n)>h+.9);)h=m((u=o[++f]).to,!1)*n;if(h!=p){var x=Math.max(h-p,3),g=i.appendChild(document.createElement("div"));g.style.cssText="position: absolute; right: 0px; width: "+Math.max(t.display.barWidth-1,2)+"px; top: "+(p+this.buttonHeight)+"px; height: "+x+"px",g.className=this.options.className,u.id&&g.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(i)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}})),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){"use strict";function t(t,n,i){this.orientation=n,this.scroll=i,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+n,this.inner=this.node.appendChild(document.createElement("div"));var o=this;function r(t){var n=e.wheelEventPixels(t)["horizontal"==o.orientation?"x":"y"],i=o.pos;o.moveTo(o.pos+n),o.pos!=i&&e.e_preventDefault(t)}e.on(this.inner,"mousedown",(function(t){if(1==t.which){e.e_preventDefault(t);var n="horizontal"==o.orientation?"pageX":"pageY",i=t[n],r=o.pos;e.on(document,"mousemove",s),e.on(document,"mouseup",a)}function a(){e.off(document,"mousemove",s),e.off(document,"mouseup",a)}function s(e){if(1!=e.which)return a();o.moveTo(r+(e[n]-i)*(o.total/o.size))}})),e.on(this.node,"click",(function(t){e.e_preventDefault(t);var n,i=o.inner.getBoundingClientRect();n="horizontal"==o.orientation?t.clientX
i.right?1:0:t.clientY
i.bottom?1:0,o.moveTo(o.pos+n*o.screen)})),e.on(this.node,"mousewheel",r),e.on(this.node,"DOMMouseScroll",r)}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos)&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",!0)},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};function n(e,n,i){this.addClass=e,this.horiz=new t(e,"horizontal",i),n(this.horiz.node),this.vert=new t(e,"vertical",i),n(this.vert.node),this.width=null}t.prototype.update=function(e,t,n){var i=this.screen!=t||this.total!=e||this.size!=n;i&&(this.screen=t,this.total=e,this.size=n);var o=this.screen*(this.size/this.total);o<10&&(this.size-=10-o,o=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=o+"px",this.setPos(this.pos,i)},n.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,i=e.scrollWidth>e.clientWidth+1,o=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=o?"block":"none",this.horiz.node.style.display=i?"block":"none",o&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(i?n:0)),this.vert.node.style.bottom=i?n+"px":"0"),i&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(o?n:0)-e.barLeft),this.horiz.node.style.right=o?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:o?n:0,bottom:i?n:0}},n.prototype.setScrollTop=function(e){this.vert.setPos(e)},n.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},n.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new n("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new n("CodeMirror-overlayscroll",e,t)}})),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){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",i="CodeMirror-activeline-gutter";function o(e){for(var o=0;o
-1&&t.substring(o+1,t.length);if(r)return e.findModeByExtension(r)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n