[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/vendor/codemirror/lib/ -> addons.min.js (source)

   1  !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,c=new t(this,e,i,l);return o.panels.push(c),this.setSize(),i.stable&&n(this,e)&&this.scrollTo(null,this.getScrollInfo().top+l),c})),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<a.length;l++){if(!a[l].empty())return e.Pass;var c=m(t,a[l].head);if(!c||r.indexOf(c)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var f=a[l].head;t.replaceRange("",n(f.line,f.ch-1),n(f.line,f.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<r.length;a++){if(!r[a].empty())return e.Pass;var c=m(t,r[a].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),l(t,-1),r=t.listSelections();for(var n=0;n<r.length;n++){var i=r[n].head.line;t.indentLine(i,null,!0),t.indentLine(i+1,null,!0)}}))}};function r(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),i="'"+n+"'";o[i]||(o[i]=a(n))}}function a(t){return function(o){return function(t,o){var r=s(t);if(!r||t.getOption("disableInput"))return e.Pass;var a=i(r,"pairs"),m=a.indexOf(o);if(-1==m)return e.Pass;for(var d,u=i(r,"closeBefore"),h=i(r,"triples"),p=a.charAt(m+1)==o,g=t.listSelections(),x=m%2==0,v=0;v<g.length;v++){var y,b=g[v],C=b.head,S=t.getRange(C,n(C.line,C.ch+1));if(x&&!b.empty())y="surround";else if(!p&&x||S!=o)if(p&&C.ch>1&&h.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(p){var w=0==C.ch?" ":t.getRange(n(C.line,C.ch-1),C);if(e.isWordChar(S)||w==o||e.isWordChar(w))return e.Pass;y="both"}else{if(!x||!(0===S.length||/\s/.test(S)||u.indexOf(S)>-1))return e.Pass;y="both"}else y=p&&f(t,C)?"both":h.indexOf(o)>=0&&t.getRange(C,n(C.line,C.ch+3))==o+o+o?"skipThree":"skip";if(d){if(d!=y)return e.Pass}else d=y}var k=m%2?a.charAt(m-1):o,M=m%2?o:a.charAt(m+1);t.operation((function(){if("skip"==d)l(t,1);else if("skipThree"==d)l(t,3);else if("surround"==d){for(var e=t.getSelections(),n=0;n<e.length;n++)e[n]=k+e[n]+M;t.replaceSelections(e,"around"),e=t.listSelections().slice();for(n=0;n<e.length;n++)e[n]=c(e[n]);t.setSelections(e)}else"both"==d?(t.replaceSelection(k+M,null),t.triggerElectric(k+M),l(t,-1)):"addFour"==d&&(t.replaceSelection(k+k+k+k,"before"),l(t,1))}))}(o,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){for(var n=[],i=e.listSelections(),o=0,r=0;r<i.length;r++){var a=i[r];a.head==e.getCursor()&&(o=r);var s=a.head.ch||t>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 c(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 m(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 f(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 c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:i(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(i){return function(i){if(i.getOption("disableInput"))return e.Pass;for(var a=i.listSelections(),s=[],l=i.getOption("autoCloseTags"),c=0;c<a.length;c++){if(!a[c].empty())return e.Pass;var m=a[c].head,f=i.getTokenAt(m),d=e.innerMode(i.getMode(),f.state),u=d.state,h=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(u),p=h&&h.name;if(!p)return e.Pass;var g="html"==d.mode.configuration,x="object"==typeof l&&l.dontCloseTags||g&&t,v="object"==typeof l&&l.indentTags||g&&n;f.end>m.ch&&(p=p.slice(0,p.length-f.end+m.ch));var y=p.toLowerCase();if(!p||"string"==f.type&&(f.end!=m.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&h.close||f.string.indexOf("/")==m.ch-f.start-1||x&&o(x,y)>-1||r(i,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(u)||[],p,m,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&o(b,p)>-1)s[c]={text:"/>",newPos:e.Pos(m.line,m.ch+2)};else{var C=v&&o(v,y)>-1;s[c]={indent:C,text:">"+(C?"\n\n":"")+"</"+p+">",newPos:C?e.Pos(m.line+1,0):e.Pos(m.line,m.ch+1)}}}var S="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var w=s[c];i.replaceRange(w.text,a[c].head,a[c].anchor,"+insert");var k=i.listSelections().slice(0);k[c]={head:w.newPos,anchor:w.newPos},i.setSelections(k),!S&&w.indent&&(i.indentLine(w.newPos.line,null,!0),i.indentLine(w.newPos.line+1,null,!0))}}(i)}),a.addKeyMap(c)}}));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,c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var m=i[c].head,f=t.getTokenAt(m),d=e.innerMode(t.getMode(),f.state),u=d.state;if(n&&("string"==f.type||"<"!=f.string.charAt(0)||f.start!=m.ch-1))return e.Pass;var h,p="xml"!=d.mode.name&&"htmlmixed"==t.getMode().name;if(p&&"javascript"==d.mode.name)h=a+"script";else if(p&&"css"==d.mode.name)h=a+"style";else{var g=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(u),x=g.length?g[g.length-1]:"";if(!g||g.length&&r(t,g,x,m))return e.Pass;h=a+x}">"!=t.getLine(m.line).charAt(f.end)&&(h+=">"),o[c]=h}if(t.replaceSelections(o),i=t.listSelections(),!l)for(c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function o(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function r(t,n,i,o,r){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,o.line+500),s=e.scanForClosingTag(t,o,null,a);if(!s||s.tag!=i)return!1;for(var l=r?1:0,c=n.length-1;c>=0&&n[c]==i;c--)++l;o=s.to;for(c=1;c<l;c++){var m=e.scanForClosingTag(t,o,null,a);if(!m||m.tag!=i)return!1;o=m.to}return!0}e.commands.closeTag=function(e){return i(e)}})),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=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,i={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function r(e,t,r){var s=e.getLineHandle(t.line),l=t.ch-1,c=r&&r.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var m=o(r),f=!c&&l>=0&&m.test(s.text.charAt(l))&&i[s.text.charAt(l)]||m.test(s.text.charAt(l+1))&&i[s.text.charAt(++l)];if(!f)return null;var d=">"==f.charAt(1)?1:-1;if(r&&r.strict&&d>0!=(l==t.ch))return null;var u=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(d>0?1:0)),d,u,r);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:d>0}}function a(e,t,r,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,m=[],f=o(s),d=r>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),u=t.line;u!=d;u+=r){var h=e.getLine(u);if(h){var p=r>0?0:h.length-1,g=r>0?h.length:-1;if(!(h.length>l))for(u==t.line&&(p=t.ch-(r<0?1:0));p!=g;p+=r){var x=h.charAt(p);if(f.test(x)&&(void 0===a||(e.getTokenTypeAt(n(u,p+1))||"")==(a||""))){var v=i[x];if(v&&">"==v.charAt(1)==r>0)m.push(x);else{if(!m.length)return{pos:n(u,p),ch:x};m.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=[],c=e.listSelections(),m=0;m<c.length;m++){var f=c[m].empty()&&r(e,c[m].head,o);if(f&&(f.match||!1!==s)&&e.getLine(f.from.line).length<=a){var d=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(f.from,n(f.from.line,f.from.ch+1),{className:d})),f.to&&e.getLine(f.to.line).length<=a&&l.push(e.markText(f.to,n(f.to.line,f.to.ch+1),{className:d}))}}if(l.length){t&&e.state.focused&&e.focus();var u=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!i)return u;setTimeout(u,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),r(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,i){return a(this,e,t,n,i)}))})),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){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation((function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,i.line),o.to=Math.max(i.line+1,o.to);var r=e.findMatchingTag(n,i,o);if(r){if(n.state.matchBothTags){var a="open"==r.at?r.open:r.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==r.at?r.open:r.close;s?n.state.tagOther=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}}))}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,(function(o,r,a){a&&a!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",i),t(o)),r&&(o.state.matchBothTags="object"==typeof r&&r.bothTags,o.on("cursorActivity",n),o.on("viewportChange",i),n(o))})),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}})),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){return function(n,i){var o=i.line,r=n.getLine(o);function a(t){for(var a,s=i.ch,l=0;;){var c=s<=0?-1:r.lastIndexOf(t[0],s-1);if(-1!=c){if(1==l&&c<i.ch)break;if(a=n.getTokenTypeAt(e.Pos(o,c+1)),!/^(comment|string)/.test(a))return{ch:c+1,tokenType:a,pair:t};s=c-1}else{if(1==l)break;l=1,s=r.length}}}function s(t){var i,r,a=1,s=n.lastLine(),l=t.ch;e:for(var c=o;c<=s;++c)for(var m=n.getLine(c),f=c==o?l:0;;){var d=m.indexOf(t.pair[0],f),u=m.indexOf(t.pair[1],f);if(d<0&&(d=m.length),u<0&&(u=m.length),(f=Math.min(d,u))==m.length)break;if(n.getTokenTypeAt(e.Pos(c,f+1))==t.tokenType)if(f==d)++a;else if(!--a){i=c,r=f;break e}++f}return null==i||o==i?null:{from:e.Pos(o,l),to:e.Pos(i,r)}}for(var l=[],c=0;c<t.length;c++){var m=a(t[c]);m&&l.push(m)}l.sort((function(e,t){return e.ch-t.ch}));for(c=0;c<l.length;c++){var f=s(l[c]);if(f)return f}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,n){function i(n){if(n<t.firstLine()||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.firstLine()||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<s)return null;if("fold"===r)return i;for(var o=t.findMarksAt(i.from),l=0;l<o.length;++l)if(o[l].__isFold){if(!e)return null;i.cleared=!0,o[l].clear()}return i}var c=l(!0);if(i(t,o,"scanUp"))for(;!c&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),c=l(!1);if(c&&!c.cleared&&"unfold"!==r){var m=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,c);e.on(m,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(c.from,c.to,{replacedWith:m,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,i){e.signal(t,"unfold",t,n,i)})),e.signal(t,"fold",t,c.from,c.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<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var o=e[i](t,n);if(o)return o}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var o=n[i](e,t);if(o)return o}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,i){if(t&&void 0!==t[i])return t[i];var o=e.options.foldOptions;return o&&void 0!==o[i]?o[i]:n[i]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}((function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",l),t.off("changes",c),t.off("viewportChange",m),t.off("fold",f),t.off("unfold",f),t.off("swapDoc",c)),i&&(t.state.foldGutter=new n(function(e){!0===e&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}(i)),s(t),t.on("gutterClick",l),t.on("changes",c),t.on("viewportChange",m),t.on("fold",f),t.on("unfold",f),t.on("swapDoc",c))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function i(e,n){for(var i=e.findMarks(t(n,0),t(n+1,0)),o=0;o<i.length;++o)if(i[o].__isFold){var r=i[o].find(-1);if(r&&r.line===n)return i[o]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function r(e,n,r){var s=e.state.foldGutter.options,l=n-1,c=e.foldOption(s,"minFoldSize"),m=e.foldOption(s,"rangeFinder"),f="string"==typeof s.indicatorFolded&&a(s.indicatorFolded),d="string"==typeof s.indicatorOpen&&a(s.indicatorOpen);e.eachLine(n,r,(function(n){++l;var r=null,a=n.gutterMarkers;if(a&&(a=a[s.gutter]),i(e,l)){if(f&&a&&f.test(a.className))return;r=o(s.indicatorFolded)}else{var u=t(l,0),h=m&&m(e,u);if(h&&h.to.line-h.from.line>=c){if(d&&a&&d.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 c(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 m(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.from&&(r(e,n.from,t.from),t.from=n.from),n.to>t.to&&(r(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i<n.to&&r(e,i,i+1)}}})),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=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("<(/?)(["+i+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function r(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function a(e,n){var i=e.cm.getTokenTypeAt(t(e.line,n));return i&&/\btag\b/.test(i)}function s(e){if(!(e.line>=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 c(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 m(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 f(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 d(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=f(e),a=e.line,s=e.ch-(r?r[0].length:0);if(!r||!(o=c(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 h(e,n){for(var i=[];;){var o=d(e);if(!o)return;if("selfClose"!=o){var r=e.line,a=e.ch,s=m(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 m(e)}}e.registerHelper("fold","xml",(function(e,i){for(var o=new r(e,i.line,0);;){var a=f(o);if(!a||o.line!=i.line)return;var s=c(o);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(o.line,o.ch),m=u(o,a[2]);return m&&n(m.from,l)>0?{from:l,to:m.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=c(a),l=s&&t(a.line,a.ch),f=s&&m(a);if(s&&f&&!(n(a,i)>0)){var d={from:t(a.line,a.ch),to:l,tag:f[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:f[1]?{open:h(a,f[2]),close:d,at:"close"}:{open:d,close:u(a=new r(e,l.line,l.ch,o),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,i){for(var o=new r(e,t.line,t.ch,n);;){var a=h(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<r.length;++s)e.modes.hasOwnProperty(r[s])||a.push(r[s]);if(!a.length)return n();var l=function(e,t){var n=t;return function(){0==--n&&e()}}(n,a.length);for(s=0;s<a.length;++s)e.requireMode(a[s],l,i)}e.requireMode=function(o,r,a){if("string"!=typeof o&&(o=o.name),e.modes.hasOwnProperty(o))return i(o,r,a);if(n.hasOwnProperty(o))return n[o].push(r);var s=a&&a.path?a.path(o):e.modeURL.replace(/%N/g,o);if(a&&a.loadMode)a.loadMode(s,(function(){i(o,r,a)}));else if("plain"==t){var l=document.createElement("script");l.src=s;var c=document.getElementsByTagName("script")[0],m=n[o]=[r];e.on(l,"load",(function(){i(o,(function(){for(var e=0;e<m.length;++e)m[e]()}),a)})),c.parentNode.insertBefore(l,c)}else"cjs"==t?(require(s),r()):"amd"==t&&requirejs([s],r)},e.autoLoadMode=function(t,n,i){e.modes.hasOwnProperty(n)||e.requireMode(n,(function(){t.setOption("mode",t.getOption("mode"))}),i)}})),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.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function i(e,t,n,i){if("string"==typeof t){var o=e.indexOf(t,n);return i&&o>-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;c=o.string;if(!a.close&&o.sol())return r.innerActive=r.inner=null,this.token(o,r);if((f=a.close&&!r.startingInner?i(c,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";f>-1&&(o.string=c.slice(0,f));var s=a.mode.token(o,r.inner);return f>-1?o.string=c:o.pos>o.start&&(r.startingInner=!1),f==o.pos&&a.parseDelimiters&&(r.innerActive=r.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,c=o.string,m=0;m<n.length;++m){var f,d=n[m];if((f=i(c,d.open,o.pos))==o.pos){d.parseDelimiters||o.match(d.open),r.startingInner=!!d.parseDelimiters,r.innerActive=d;var u=0;if(t.indent){var h=t.indent(r.outer,"","");h!==e.Pass&&(u=h)}return r.inner=e.startState(d.mode,u),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=f&&f<l&&(l=f)}l!=1/0&&(o.string=c.slice(0,l));var p=t.token(o,r.outer);return l!=1/0&&(o.string=c),p},indent:function(n,i,o){var r=n.innerActive?n.innerActive.mode:t;return r.indent?r.indent(n.innerActive?n.inner:n.outer,i,o):e.Pass},blankLine:function(i){var o=i.innerActive?i.innerActive.mode:t;if(o.blankLine&&o.blankLine(i.innerActive?i.inner:i.outer),i.innerActive)"\n"===i.innerActive.close&&(i.innerActive=i.inner=null);else for(var r=0;r<n.length;++r){var a=n[r];"\n"===a.open&&(i.innerActive=a,i.inner=e.startState(a.mode,o.indent?o.indent(i.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode: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";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout((function(){i.redraw()}),e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout((function(){i.computeScale()&&n(20)}),100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("changes",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",(function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)})),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){!1!==e&&this.computeScale();var t=this.cm,n=this.hScale,i=document.createDocumentFragment(),o=this.annotations,r=t.getOption("lineWrapping"),a=r&&1.5*t.defaultTextHeight(),s=null,l=null;function c(e,n){if(s!=e.line){s=e.line,l=t.getLineHandle(e.line);var i=t.getLineHandleVisualStart(l);i!=l&&(s=t.getLineNumber(i),l=i)}return l.widgets&&l.widgets.length||r&&l.height>a?t.charCoords(e,"local")[n?"top":"bottom"]:t.heightAtLine(l,"local")+(n?0:l.height)}var m=t.lastLine();if(t.display.barWidth)for(var f,d=0;d<o.length;d++){var u=o[d];if(!(u.to.line>m)){for(var h=f||c(u.from,!0)*n,p=c(u.to,!1)*n;d<o.length-1&&!(o[d+1].to.line>m)&&!((f=c(o[d+1].from,!0)*n)>p+.9);)p=c((u=o[++d]).to,!1)*n;if(p!=h){var g=Math.max(p-h,3),x=i.appendChild(document.createElement("div"));x.style.cssText="position: absolute; right: 0px; width: "+Math.max(t.display.barWidth-1,2)+"px; top: "+(h+this.buttonHeight)+"px; height: "+g+"px",x.className=this.options.className,u.id&&x.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.left?-1:t.clientX>i.right?1:0:t.clientY<i.top?-1: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"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}((function(e){"use strict";var t={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function n(e){for(var n in this.options={},t)this.options[n]=(e&&e.hasOwnProperty(n)?e:t)[n];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function i(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&r(e,t)}function o(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,r(e,t))}function r(e,t){clearTimeout(t.timeout),t.timeout=setTimeout((function(){l(e)}),t.options.delay)}function a(e,t,n,i){var o=e.state.matchHighlighter;if(e.addOverlay(o.overlay=function(e,t,n){return{token:function(i){if(i.match(e)&&(!t||function(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}(i,t)))return n;i.next(),i.skipTo(e.charAt(0))||i.skipToEnd()}}}(t,n,i)),o.options.annotateScrollbar&&e.showMatchesOnScrollbar){var r=n?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t;o.matchesonscroll=e.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function s(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation((function(){var t=e.state.matchHighlighter;if(s(e),e.somethingSelected()||!t.options.showToken){var n=e.getCursor("from"),i=e.getCursor("to");if(n.line==i.line&&(!t.options.wordsOnly||function(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1};if(null===e.getRange(i,t).match(/\W/))return!1}if(n.ch<e.getLine(t.line).length){i={line:n.line,ch:n.ch+1};if(null===e.getRange(n,i).match(/\W/))return!1}return!0}return!1}(e,n,i))){var o=e.getRange(n,i);t.options.trim&&(o=o.replace(/^\s+|\s+$/g,"")),o.length>=t.options.minChars&&a(e,o,!1,t.options.style)}}else{for(var r=!0===t.options.showToken?/[\w$]/:t.options.showToken,l=e.getCursor(),c=e.getLine(l.line),m=l.ch,f=m;m&&r.test(c.charAt(m-1));)--m;for(;f<c.length&&r.test(c.charAt(f));)++f;m<f&&a(e,c.slice(m,f),r,t.options.style)}}))}e.defineOption("highlightSelectionMatches",!1,(function(t,r,a){if(a&&a!=e.Init&&(s(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",i),t.off("focus",o)),r){var c=t.state.matchHighlighter=new n(r);t.hasFocus()?(c.active=!0,l(t)):t.on("focus",o),t.on("cursorActivity",i)}}))})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}((function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var o={listenForChanges:!1};for(var r in i)o[r]=i[r];o.className||(o.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(o),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}e.defineExtension("showMatchesOnScrollbar",(function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)}));function n(e,t,n){return e<=t?e:Math.max(t,e+n)}t.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){if((o=this.matches[t]).from.line>=this.gap.to)break;o.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var n=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||1e3;n.findNext();){var o;if((o={from:n.from(),to:n.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,o),this.matches.length>i)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,o=e.changeEnd(t).line,r=o-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,r),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,r),t.from.line)):this.gap={from:t.from.line,to:o+1},r)for(var a=0;a<this.matches.length;a++){var s=this.matches[a],l=n(s.from.line,i,r);l!=s.from.line&&(s.from=e.Pos(l,s.from.ch));var c=n(s.to.line,i,r);c!=s.to.line&&(s.to=e.Pos(c,s.to.ch))}clearTimeout(this.update);var m=this;this.update=setTimeout((function(){m.updateAfterChange()}),250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}((function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function i(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function r(e,t,n,i,o){e.openDialog?e.openDialog(t,o,{value:i,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(n,i))}function a(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function s(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function l(e,t,n){t.queryText=n,t.query=s(n),e.removeOverlay(t.overlay,i(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(t.query,i(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,i(t.query)))}function c(t,i,o,a){var s=n(t);if(s.query)return m(t,i);var c=t.getSelection()||s.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),o&&t.openDialog){var d=null,h=function(n,i){e.e_stop(i),n&&(n!=s.queryText&&(l(t,s,n),s.posFrom=s.posTo=t.getCursor()),d&&(d.style.opacity=1),m(t,i.shiftKey,(function(e,n){var i;n.line<3&&document.querySelector&&(i=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&i.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((d=i).style.opacity=.4)})))};!function(e,t,n,i,o){e.openDialog(t,i,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){f(e)},onKeyDown:o,bottom:e.options.search.bottom})}(t,u(t),c,h,(function(i,o){var r=e.keyName(i),a=t.getOption("extraKeys"),s=a&&a[r]||e.keyMap[t.getOption("keyMap")][r];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(i),l(t,n(t),o),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(i),h(o,i))})),a&&c&&(l(t,s,c),m(t,i))}else r(t,u(t),"Search for:",c,(function(e){e&&!s.query&&t.operation((function(){l(t,s,e),s.posFrom=s.posTo=t.getCursor(),m(t,i)}))}))}function m(t,i,r){t.operation((function(){var a=n(t),s=o(t,a.query,i?a.posFrom:a.posTo);(s.find(i)||(s=o(t,a.query,i?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(i))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),r&&r(s.from(),s.to()))}))}function f(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function d(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var i in t)n[i]=t[i];for(var o=2;o<arguments.length;o++){var r=arguments[o];n.appendChild("string"==typeof r?document.createTextNode(r):r)}return n}function u(e){var t=d("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),d("",null,t," ",d("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function h(e,t,n){e.operation((function(){for(var i=o(e,t);i.findNext();)if("string"!=typeof t){var r=e.getRange(i.from(),i.to()).match(t);i.replace(n.replace(/\$(\d)/g,(function(e,t){return r[t]})))}else i.replace(n)}))}function p(e,t){if(!e.getOption("readOnly")){var i=e.getSelection()||n(e).lastQuery,l=t?e.phrase("Replace all:"):e.phrase("Replace:"),c=d("",null,d("span",{className:"CodeMirror-search-label"},l),function(e){return d("",null," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",d("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}(e));r(e,c,l,i,(function(n){n&&(n=s(n),r(e,function(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",d("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}(e),e.phrase("Replace with:"),"",(function(i){if(i=a(i),t)h(e,n,i);else{f(e);var r=o(e,n,e.getCursor("from")),s=function(){var t,a=r.from();!(t=r.findNext())&&(r=o(e,n),!(t=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),function(e,t,n,i){e.openConfirm?e.openConfirm(t,i):confirm(n)&&i[0]()}(e,function(e){return d("",null,d("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",d("button",{},e.phrase("Yes"))," ",d("button",{},e.phrase("No"))," ",d("button",{},e.phrase("All"))," ",d("button",{},e.phrase("Stop")))}(e),e.phrase("Replace?"),[function(){l(t)},s,function(){h(e,n,i)}]))},l=function(e){r.replace("string"==typeof n?i:i.replace(/\$(\d)/g,(function(t,n){return e[n]}))),s()};s()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){f(e),c(e)},e.commands.findPersistent=function(e){f(e),c(e,!1,!0)},e.commands.findPersistentNext=function(e){c(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){c(e,!0,!0,!0)},e.commands.findNext=c,e.commands.findPrev=function(e){c(e,!0)},e.commands.clearSearch=f,e.commands.replace=p,e.commands.replaceAll=function(e){p(e,!0)}})),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,n,i=e.Pos;function o(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),i=n,o=0;o<t.length;o++)-1==i.indexOf(t.charAt(o))&&(i+=t.charAt(o));return n==i?e:new RegExp(e.source,i)}function r(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,t,n){t=o(t,"g");for(var r=n.line,a=n.ch,s=e.lastLine();r<=s;r++,a=0){t.lastIndex=a;var l=e.getLine(r),c=t.exec(l);if(c)return{from:i(r,c.index),to:i(r,c.index+c[0].length),match:c}}}function s(e,t,n){if(!r(t))return a(e,t,n);t=o(t,"gm");for(var s,l=1,c=n.line,m=e.lastLine();c<=m;){for(var f=0;f<l&&!(c>m);f++){var d=e.getLine(c++);s=null==s?d:s+"\n"+d}l*=2,t.lastIndex=n.ch;var u=t.exec(s);if(u){var h=s.slice(0,u.index).split("\n"),p=u[0].split("\n"),g=n.line+h.length-1,x=h[h.length-1].length;return{from:i(g,x),to:i(g+p.length-1,1==p.length?x+p[0].length:p[p.length-1].length),match:u}}}}function l(e,t,n){for(var i,o=0;o<=e.length;){t.lastIndex=o;var r=t.exec(e);if(!r)break;var a=r.index+r[0].length;if(a>e.length-n)break;(!i||a>i.index+i[0].length)&&(i=r),o=r.index+1}return i}function c(e,t,n){t=o(t,"g");for(var r=n.line,a=n.ch,s=e.firstLine();r>=s;r--,a=-1){var c=e.getLine(r),m=l(c,t,a<0?0:c.length-a);if(m)return{from:i(r,m.index),to:i(r,m.index+m[0].length),match:m}}}function m(e,t,n){if(!r(t))return c(e,t,n);t=o(t,"gm");for(var a,s=1,m=e.getLine(n.line).length-n.ch,f=n.line,d=e.firstLine();f>=d;){for(var u=0;u<s&&f>=d;u++){var h=e.getLine(f--);a=null==a?h:h+"\n"+a}s*=2;var p=l(a,t,m);if(p){var g=a.slice(0,p.index).split("\n"),x=p[0].split("\n"),v=f+g.length,y=g[g.length-1].length;return{from:i(v,y),to:i(v+x.length-1,1==x.length?y+x[0].length:x[x.length-1].length),match:p}}}}function f(e,t,n,i){if(e.length==t.length)return n;for(var o=0,r=n+Math.max(0,e.length-t.length);;){if(o==r)return o;var a=o+r>>1,s=i(e.slice(0,a)).length;if(s==n)return a;s>n?r=a:o=a+1}}function d(e,o,r,a){if(!o.length)return null;var s=a?t:n,l=s(o).split(/\r|\n\r?/);e:for(var c=r.line,m=r.ch,d=e.lastLine()+1-l.length;c<=d;c++,m=0){var u=e.getLine(c).slice(m),h=s(u);if(1==l.length){var p=h.indexOf(l[0]);if(-1==p)continue e;r=f(u,h,p,s)+m;return{from:i(c,f(u,h,p,s)+m),to:i(c,f(u,h,p+l[0].length,s)+m)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var x=1;x<l.length-1;x++)if(s(e.getLine(c+x))!=l[x])continue e;var v=e.getLine(c+l.length-1),y=s(v),b=l[l.length-1];if(y.slice(0,b.length)==b)return{from:i(c,f(u,h,g,s)+m),to:i(c+l.length-1,f(v,y,b.length,s))}}}}function u(e,o,r,a){if(!o.length)return null;var s=a?t:n,l=s(o).split(/\r|\n\r?/);e:for(var c=r.line,m=r.ch,d=e.firstLine()-1+l.length;c>=d;c--,m=-1){var u=e.getLine(c);m>-1&&(u=u.slice(0,m));var h=s(u);if(1==l.length){var p=h.lastIndexOf(l[0]);if(-1==p)continue e;return{from:i(c,f(u,h,p,s)),to:i(c,f(u,h,p+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var x=1;for(r=c-l.length+1;x<l.length-1;x++)if(s(e.getLine(r+x))!=l[x])continue e;var v=e.getLine(c+1-l.length),y=s(v);if(y.slice(y.length-l[0].length)==l[0])return{from:i(c+1-l.length,f(v,y,v.length-l[0].length,s)),to:i(c,f(u,h,g.length,s))}}}}function h(e,t,n,r){var l;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):i(0,0),this.pos={from:n,to:n},"object"==typeof r?l=r.caseFold:(l=r,r=null),"string"==typeof t?(null==l&&(l=!1),this.matches=function(n,i){return(n?u:d)(e,t,i,l)}):(t=o(t,"gm"),r&&!1===r.multiline?this.matches=function(n,i){return(n?c:a)(e,t,i)}:this.matches=function(n,i){return(n?m:s)(e,t,i)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=i(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var o=this.matches(t,n);if(this.afterEmptyMatch=o&&0==e.cmpPos(o.from,o.to),o)return this.pos=o,this.atOccurrence=!0,this.pos.match||!0;var r=i(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new h(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new h(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var i=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)}))})),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<e.state.activeLines.length;o++)e.removeLineClass(e.state.activeLines[o],"wrap",t),e.removeLineClass(e.state.activeLines[o],"background",n),e.removeLineClass(e.state.activeLines[o],"gutter",i)}function r(e,r){for(var a=[],s=0;s<r.length;s++){var l=r[s],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?l.anchor.line==l.head.line:l.empty()){var m=e.getLineHandleVisualStart(l.head.line);a[a.length-1]!=m&&a.push(m)}}(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0})(e.state.activeLines,a)||e.operation((function(){o(e);for(var r=0;r<a.length;r++)e.addLineClass(a[r],"wrap",t),e.addLineClass(a[r],"background",n),e.addLineClass(a[r],"gutter",i);e.state.activeLines=a}))}function a(e,t){r(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,n,i){var s=i!=e.Init&&i;n!=s&&(s&&(t.off("beforeSelectionChange",a),o(t),delete t.state.activeLines),n&&(t.state.activeLines=[],r(t,t.listSelections()),t.on("beforeSelectionChange",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";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.mime==t)return i;if(i.mimes)for(var o=0;o<i.mimes.length;o++)if(i.mimes[o]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.ext)for(var o=0;o<i.ext.length;o++)if(i.ext[o]==t)return i}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.file&&i.file.test(t))return i}var o=t.lastIndexOf("."),r=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<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var o=0;o<i.alias.length;o++)if(i.alias[o].toLowerCase()==t)return i}}}));


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer