CasaOS/web/js/6.js

245 lines
1.0 MiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[6],{"./node_modules/codemirror/addon/comment/comment.js":
/*!**********************************************************!*\
!*** ./node_modules/codemirror/addon/comment/comment.js ***!
\**********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var noOptions = {};\n var nonWS = /[^\\s\\u00a0]/;\n var Pos = CodeMirror.Pos, cmp = CodeMirror.cmpPos;\n\n function firstNonWS(str) {\n var found = str.search(nonWS);\n return found == -1 ? 0 : found;\n }\n\n CodeMirror.commands.toggleComment = function(cm) {\n cm.toggleComment();\n };\n\n CodeMirror.defineExtension("toggleComment", function(options) {\n if (!options) options = noOptions;\n var cm = this;\n var minLine = Infinity, ranges = this.listSelections(), mode = null;\n for (var i = ranges.length - 1; i >= 0; i--) {\n var from = ranges[i].from(), to = ranges[i].to();\n if (from.line >= minLine) continue;\n if (to.line >= minLine) to = Pos(minLine, 0);\n minLine = from.line;\n if (mode == null) {\n if (cm.uncomment(from, to, options)) mode = "un";\n else { cm.lineComment(from, to, options); mode = "line"; }\n } else if (mode == "un") {\n cm.uncomment(from, to, options);\n } else {\n cm.lineComment(from, to, options);\n }\n }\n });\n\n // Rough heuristic to try and detect lines that are part of multi-line string\n function probablyInsideString(cm, pos, line) {\n return /\\bstring\\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\\\'\\"\\`]/.test(line)\n }\n\n function getMode(cm, pos) {\n var mode = cm.getMode()\n return mode.useInnerComments === false || !mode.innerMode ? mode : cm.getModeAt(pos)\n }\n\n CodeMirror.defineExtension("lineComment", function(from, to, options) {\n if (!options) options = noOptions;\n var self = this, mode = getMode(self, from);\n var firstLine = self.getLine(from.line);\n if (firstLine == null || probablyInsideString(self, from, firstLine)) return;\n\n var commentString = options.lineComment || mode.lineComment;\n if (!commentString) {\n if (options.blockCommentStart || mode.blockCommentStart) {\n options.fullLines = true;\n self.blockComment(from, to, options);\n }\n return;\n }\n\n var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);\n var pad = options.padding == null ? " " : options.padding;\n var blankLines = options.commentBlankLines || from.line == to.line;\n\n self.operation(function() {\n if (options.indent) {\n var baseString = null;\n for (var i = from.line; i < end; ++i) {\n var line = self.getLine(i);\n var whitespace = line.slice(0, firstNonWS(line));\n if (baseString == null || baseString.length > whitespace.length) {\n baseString = whitespace;\n }\n }\n for (var i = from.line; i < end; ++i) {\n var line = self.getLine(i), cut = baseString.length;\n if (!blankLines && !nonWS.test(line)) continue;\n if (line.slice(0, cut) != baseString) cut = firstNonWS(line);\n self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));\n }\n } else {\n for (var i = from.line; i < end; ++i) {\n if (blankLines || nonWS.test(self.getLine(i)))\n self.replaceRange(commentString + pad, Pos(i, 0));\n }\n }\n });\n });\n\n CodeMirror.defineExtension("blockComment", function(from, to, options) {\n if (!options) options = noOptions;\n var self = this, mode = getMode(self, from);\n var startString = options.blockCommentStart || mode.blockCommentStart;\n var endString = options.blockCommentEnd || mode.blockCommentEnd;\n if (!startString || !endString) {\n if ((options.lineComment || mode.lineComment) && options.fullLines != false)\n self.lineComment(from, to, options);\n return;\n }\n if (/\\bcomment\\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return\n\n var end = Math.min(to.line, self.lastLine());\n if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;\n\n var pad = options.padding == null ? " " : options.padding;\n if (from.line > end) return;\n\n self.operation(function() {\n if (options.fullLines != false) {\n var lastLineHasText = nonWS.test(self.getLine(end));\n self.replaceRange(pad + endString, Pos(end));\n self.replaceRange(startString + pad, Pos(from.line, 0));\n var lead = options.blockCommentLead || mode.blockCommentLead;\n if (lead != null) for (var i = from.line + 1; i <= end; ++i)\n if (i != end || lastLineHasText)\n self.replaceRange(lead + pad, Pos(i, 0));\n } else {\n var atCursor = cmp(self.getCursor("to"), to) == 0, empty = !self.somethingSelected()\n self.replaceRange(endString, to);\n if (atCursor) self.setSelection(empty ? to : self.getCursor("from"), to)\n self.replaceRange(startString, from);\n }\n });\n });\n\n CodeMirror.defineExtension("uncomment", function(from, to, options) {\n if (!options) options = noOptions;\n var self = this, mode = getMode(self, from);\n var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);\n\n // Try finding line comments\n var lineString = options.lineComment || mode.lineComment, lines = [];\n var pad = options.padding == null ? " " : options.padding, didSomething;\n lineComment: {\n if (!lineString) break lineComment;\n for (var i = start; i <= end; ++i) {\n var line = self.getLine(i);\n var found = line.indexOf(lineString);\n if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;\n if (found == -1 && nonWS.test(line)) break lineComment;\n if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;\n lines.push(line);\n }\n self.operation(function() {\n for (var i = start; i <= end; ++i) {\n var line = lines[i - start];\n var pos = line.indexOf(lineString), endPos = pos + lineString.length;\n if (pos < 0) continue;\n if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;\n didSomething = true;\n self.replaceRange("", Pos(i, pos), Pos(i, endPos));\n }\n });\n if (didSomething) return true;\n }\n\n // Try block comments\n var startString = options.blockCommentStart || mode.blockCommentStart;\n var endString = options.blockCommentEnd || mode.blockCommentEnd;\n if (!startString || !endString) return false;\n var lead = options.blockCommentLead || mode.blockCommentLead;\n var startLine = self.getLine(start), open = startLine.indexOf(startString)\n if (open == -1) return false\n var endLine = end == start ? startLine : self.getLine(end)\n var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);\n var insideStart = Pos(start, open + 1), insideEnd = Pos(end, close + 1)\n if (close == -1 ||\n !/comment/.test(self.getTokenTypeAt(insideStart)) ||\n !/comment/.test(self.getTokenTypeAt(insideEnd)) ||\n self.getRange(insideStart, insideEnd, "\\n").indexOf(endString) > -1)\n return false;\n\n // Avoid killing block comments completely outside the selection.\n // Positions of the last startString before the start of the selection, and the first endString after it.\n var lastStart = startLine.lastIndexOf(startString, from.ch);\n var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);\n if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;\n // Positions of the first endString after the end of the selection, and the last startString before it.\n firstEnd = endLine.indexOf(endString, to.ch);\n var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);\n lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;\n if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;\n\n self.operation(function() {\n self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n Pos(end, close + endString.length));\n var openEnd = open + startString.length;\n if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;\n self.replaceRange("", Pos(start, open), Pos(start, openEnd));\n if (lead) for (var i = start + 1; i <= end; ++i) {\n var line = self.getLine(i), found = line.indexOf(lead);\n if (found == -1 || nonWS.test(line.slice(0, found))) continue;\n var foundEnd = found + lead.length;\n if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;\n self.replaceRange("", Pos(i, found), Pos(i, foundEnd));\n }\n });\n return true;\n });\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/comment/comment.js?')},"./node_modules/codemirror/addon/dialog/dialog.css":
/*!*********************************************************!*\
!*** ./node_modules/codemirror/addon/dialog/dialog.css ***!
\*********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/dialog/dialog.css?")},"./node_modules/codemirror/addon/dialog/dialog.js":
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/dialog/dialog.js ***!
\********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Open simple dialogs on top of an editor. Relies on dialog.css.\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n function dialogDiv(cm, template, bottom) {\n var wrap = cm.getWrapperElement();\n var dialog;\n dialog = wrap.appendChild(document.createElement("div"));\n if (bottom)\n dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";\n else\n dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";\n\n if (typeof template == "string") {\n dialog.innerHTML = template;\n } else { // Assuming it\'s a detached DOM element.\n dialog.appendChild(template);\n }\n CodeMirror.addClass(wrap, \'dialog-opened\');\n return dialog;\n }\n\n function closeNotification(cm, newVal) {\n if (cm.state.currentNotificationClose)\n cm.state.currentNotificationClose();\n cm.state.currentNotificationClose = newVal;\n }\n\n CodeMirror.defineExtension("openDialog", function(template, callback, options) {\n if (!options) options = {};\n\n closeNotification(this, null);\n\n var dialog = dialogDiv(this, template, options.bottom);\n var closed = false, me = this;\n function close(newVal) {\n if (typeof newVal == \'string\') {\n inp.value = newVal;\n } else {\n if (closed) return;\n closed = true;\n CodeMirror.rmClass(dialog.parentNode, \'dialog-opened\');\n dialog.parentNode.removeChild(dialog);\n me.focus();\n\n if (options.onClose) options.onClose(dialog);\n }\n }\n\n var inp = dialog.getElementsByTagName("input")[0], button;\n if (inp) {\n inp.focus();\n\n if (options.value) {\n inp.value = options.value;\n if (options.selectValueOnOpen !== false) {\n inp.select();\n }\n }\n\n if (options.onInput)\n CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});\n if (options.onKeyUp)\n CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});\n\n CodeMirror.on(inp, "keydown", function(e) {\n if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {\n inp.blur();\n CodeMirror.e_stop(e);\n close();\n }\n if (e.keyCode == 13) callback(inp.value, e);\n });\n\n if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function (evt) {\n if (evt.relatedTarget !== null) close();\n });\n } else if (button = dialog.getElementsByTagName("button")[0]) {\n CodeMirror.on(button, "click", function() {\n close();\n me.focus();\n });\n\n if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);\n\n button.focus();\n }\n return close;\n });\n\n CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {\n closeNotification(this, null);\n var dialog = dialogDiv(this, template, options && options.bottom);\n var buttons = dialog.getElementsByTagName("button");\n var closed = false, me = this, blurring = 1;\n function close() {\n if (closed) return;\n closed = true;\n CodeMirror.rmClass(dialog.parentNode, \'dialog-opened\');\n dialog.parentNode.removeChild(dialog);\n me.focus();\n }\n buttons[0].focus();\n for (var i = 0; i < buttons.length; ++i) {\n var b = buttons[i];\n (function(callback) {\n CodeMirror.on(b, "click", function(e) {\n CodeMirror.e_preventDefault(e);\n close();\n if (callback) callback(me);\n });\n })(callbacks[i]);\n CodeMirror.on(b, "blur", function() {\n --blurring;\n setTimeout(function() { if (blurring <= 0) close(); }, 200);\n });\n CodeMirror.on(b, "focus", function() { ++blurring; });\n }\n });\n\n /*\n * openNotification\n * Opens a notification, that can be closed with an optional timer\n * (default 5000ms timer) and always closes on click.\n *\n * If a notification is opened while another is opened, it will close the\n * currently opened one and open the new one immediately.\n */\n CodeMirror.defineExtension("openNotification", function(template, options) {\n closeNotification(this, close);\n var dialog = dialogDiv(this, template, options && options.bottom);\n var closed = false, doneTimer;\n var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;\n\n function close() {\n if (closed) return;\n closed = true;\n clearTimeout(doneTimer);\n CodeMirror.rmClass(dialog.parentNode, \'dialog-opened\');\n dialog.parentNode.removeChild(dialog);\n }\n\n CodeMirror.on(dialog, \'click\', function(e) {\n CodeMirror.e_preventDefault(e);\n close();\n });\n\n if (duration)\n doneTimer = setTimeout(close, duration);\n\n return close;\n });\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/dialog/dialog.js?')},"./node_modules/codemirror/addon/edit/matchbrackets.js":
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/matchbrackets.js ***!
\*************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n (document.documentMode == null || document.documentMode < 8);\n\n var Pos = CodeMirror.Pos;\n\n var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<"};\n\n function bracketRegex(config) {\n return config && config.bracketRegex || /[(){}[\\]]/\n }\n\n function findMatchingBracket(cm, where, config) {\n var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n var afterCursor = config && config.afterCursor\n if (afterCursor == null)\n afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)\n var re = bracketRegex(config)\n\n // A cursor is defined as between two characters, but in in vim command mode\n // (i.e. not insert mode), the cursor is visually represented as a\n // highlighted box on top of the 2nd character. Otherwise, we allow matches\n // from before or after the cursor.\n var match = (!afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)]) ||\n re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];\n if (!match) return null;\n var dir = match.charAt(1) == ">" ? 1 : -1;\n if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;\n var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style, config);\n if (found == null) return null;\n return {from: Pos(where.line, pos), to: found && found.pos,\n match: found && found.ch == match.charAt(0), forward: dir > 0};\n }\n\n // bracketRegex is used to specify which type of bracket to scan\n // should be a regexp, e.g. /[[\\]]/\n //\n // Note: If "where" is on an open bracket, then this bracket is ignored.\n //\n // Returns false when no bracket was found, null when it reached\n // maxScanLines and gave up\n function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = bracketRegex(config)\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined ||\n (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || "") == (style || ""))) {\n var match = matching[ch];\n if (match && (match.charAt(1) == ">") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }\n\n function matchBrackets(cm, autoclear, config) {\n // Disable brace matching in long lines, since it\'ll cause hugely slow updates\n var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000,\n highlightNonMatching = config && config.highlightNonMatching;\n var marks = [], ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);\n if (match && (match.match || highlightNonMatching !== false) && cm.getLine(match.from.line).length <= maxHighlightLen) {\n var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";\n marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n }\n }\n\n if (marks.length) {\n // Kludge to work around the IE bug from issue #1193, where text\n // input stops going to the textarea whenever this fires.\n if (ie_lt8 && cm.state.focused) cm.focus();\n\n var clear = function() {\n cm.operation(function() {\n for (var i = 0; i < marks.length; i++) marks[i].clear();\n });\n };\n if (autoclear) setTimeout(clear, 800);\n else return clear;\n }\n }\n\n function doMatchBrackets(cm) {\n cm.operation(function() {\n if (cm.state.matchBrackets.currentlyHighlighted) {\n cm.state.matchBrackets.currentlyHighlighted();\n cm.state.matchBrackets.currentlyHighlighted = null;\n }\n cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n });\n }\n\n function clearHighlighted(cm) {\n if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {\n cm.state.matchBrackets.currentlyHighlighted();\n cm.state.matchBrackets.currentlyHighlighted = null;\n }\n }\n\n CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.off("cursorActivity", doMatchBrackets);\n cm.off("focus", doMatchBrackets)\n cm.off("blur", clearHighlighted)\n clearHighlighted(cm);\n }\n if (val) {\n cm.state.matchBrackets = typeof val == "object" ? val : {};\n cm.on("cursorActivity", doMatchBrackets);\n cm.on("focus", doMatchBrackets)\n cm.on("blur", clearHighlighted)\n }\n });\n\n CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});\n CodeMirror.defineExtension("findMatchingBracket", function(pos, config, oldConfig){\n // Backwards-compatibility kludge\n if (oldConfig || typeof config == "boolean") {\n if (!oldConfig) {\n config = config ? {strict: true} : null\n } else {\n oldConfig.strict = config\n config = oldConfig\n }\n }\n return findMatchingBracket(this, pos, config)\n });\n CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){\n return scanForBracket(this, pos, dir, style, config);\n });\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/edit/matchbrackets.js?')},"./node_modules/codemirror/addon/fold/brace-fold.js":
/*!**********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/brace-fold.js ***!
\**********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nfunction bracketFolding(pairs) {\n return function(cm, start) {\n var line = start.line, lineText = cm.getLine(line);\n\n function findOpening(pair) {\n var tokenType;\n for (var at = start.ch, pass = 0;;) {\n var found = at <= 0 ? -1 : lineText.lastIndexOf(pair[0], at - 1);\n if (found == -1) {\n if (pass == 1) break;\n pass = 1;\n at = lineText.length;\n continue;\n }\n if (pass == 1 && found < start.ch) break;\n tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));\n if (!/^(comment|string)/.test(tokenType)) return {ch: found + 1, tokenType: tokenType, pair: pair};\n at = found - 1;\n }\n }\n\n function findRange(found) {\n var count = 1, lastLine = cm.lastLine(), end, startCh = found.ch, endCh\n outer: for (var i = line; i <= lastLine; ++i) {\n var text = cm.getLine(i), pos = i == line ? startCh : 0;\n for (;;) {\n var nextOpen = text.indexOf(found.pair[0], pos), nextClose = text.indexOf(found.pair[1], pos);\n if (nextOpen < 0) nextOpen = text.length;\n if (nextClose < 0) nextClose = text.length;\n pos = Math.min(nextOpen, nextClose);\n if (pos == text.length) break;\n if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == found.tokenType) {\n if (pos == nextOpen) ++count;\n else if (!--count) { end = i; endCh = pos; break outer; }\n }\n ++pos;\n }\n }\n\n if (end == null || line == end) return null\n return {from: CodeMirror.Pos(line, startCh),\n to: CodeMirror.Pos(end, endCh)};\n }\n\n var found = []\n for (var i = 0; i < pairs.length; i++) {\n var open = findOpening(pairs[i])\n if (open) found.push(open)\n }\n found.sort(function(a, b) { return a.ch - b.ch })\n for (var i = 0; i < found.length; i++) {\n var range = findRange(found[i])\n if (range) return range\n }\n return null\n }\n}\n\nCodeMirror.registerHelper("fold", "brace", bracketFolding([["{", "}"], ["[", "]"]]));\n\nCodeMirror.registerHelper("fold", "brace-paren", bracketFolding([["{", "}"], ["[", "]"], ["(", ")"]]));\n\nCodeMirror.registerHelper("fold", "import", function(cm, start) {\n function hasImport(line) {\n if (line < cm.firstLine() || line > cm.lastLine()) return null;\n var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n if (start.type != "keyword" || start.string != "import") return null;\n // Now find closing semicolon, return its position\n for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {\n var text = cm.getLine(i), semi = text.indexOf(";");\n if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};\n }\n }\n\n var startLine = start.line, has = hasImport(startLine), prev;\n if (!has || hasImport(startLine - 1) || ((prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1))\n return null;\n for (var end = has.end;;) {\n var next = hasImport(end.line + 1);\n if (next == null) break;\n end = next.end;\n }\n return {from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)), to: end};\n});\n\nCodeMirror.registerHelper("fold", "include", function(cm, start) {\n function hasInclude(line) {\n if (line < cm.firstLine() || line > cm.lastLine()) return null;\n var start = cm.getTokenAt(CodeMirror.Pos(line, 1));\n if (!/\\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));\n if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;\n }\n\n var startLine = start.line, has = hasInclude(startLine);\n if (has == null || hasInclude(startLine - 1) != null) return null;\n for (var end = startLine;;) {\n var next = hasInclude(end + 1);\n if (next == null) break;\n ++end;\n }\n return {from: CodeMirror.Pos(startLine, has + 1),\n to: cm.clipPos(CodeMirror.Pos(end))};\n});\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/brace-fold.js?')},"./node_modules/codemirror/addon/fold/comment-fold.js":
/*!************************************************************!*\
!*** ./node_modules/codemirror/addon/fold/comment-fold.js ***!
\************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n return mode.blockCommentStart && mode.blockCommentEnd;\n}, function(cm, start) {\n var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;\n if (!startToken || !endToken) return;\n var line = start.line, lineText = cm.getLine(line);\n\n var startCh;\n for (var at = start.ch, pass = 0;;) {\n var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);\n if (found == -1) {\n if (pass == 1) return;\n pass = 1;\n at = lineText.length;\n continue;\n }\n if (pass == 1 && found < start.ch) return;\n if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) &&\n (found == 0 || lineText.slice(found - endToken.length, found) == endToken ||\n !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) {\n startCh = found + startToken.length;\n break;\n }\n at = found - 1;\n }\n\n var depth = 1, lastLine = cm.lastLine(), end, endCh;\n outer: for (var i = line; i <= lastLine; ++i) {\n var text = cm.getLine(i), pos = i == line ? startCh : 0;\n for (;;) {\n var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);\n if (nextOpen < 0) nextOpen = text.length;\n if (nextClose < 0) nextClose = text.length;\n pos = Math.min(nextOpen, nextClose);\n if (pos == text.length) break;\n if (pos == nextOpen) ++depth;\n else if (!--depth) { end = i; endCh = pos; break outer; }\n ++pos;\n }\n }\n if (end == null || line == end && endCh == startCh) return;\n return {from: CodeMirror.Pos(line, startCh),\n to: CodeMirror.Pos(end, endCh)};\n});\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/comment-fold.js?')},"./node_modules/codemirror/addon/fold/foldcode.js":
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/foldcode.js ***!
\********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n function doFold(cm, pos, options, force) {\n if (options && options.call) {\n var finder = options;\n options = null;\n } else {\n var finder = getOption(cm, options, "rangeFinder");\n }\n if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);\n var minSize = getOption(cm, options, "minFoldSize");\n\n function getRange(allowFolded) {\n var range = finder(cm, pos);\n if (!range || range.to.line - range.from.line < minSize) return null;\n if (force === "fold") return range;\n\n var marks = cm.findMarksAt(range.from);\n for (var i = 0; i < marks.length; ++i) {\n if (marks[i].__isFold) {\n if (!allowFolded) return null;\n range.cleared = true;\n marks[i].clear();\n }\n }\n return range;\n }\n\n var range = getRange(true);\n if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) {\n pos = CodeMirror.Pos(pos.line - 1, 0);\n range = getRange(false);\n }\n if (!range || range.cleared || force === "unfold") return;\n\n var myWidget = makeWidget(cm, options, range);\n CodeMirror.on(myWidget, "mousedown", function(e) {\n myRange.clear();\n CodeMirror.e_preventDefault(e);\n });\n var myRange = cm.markText(range.from, range.to, {\n replacedWith: myWidget,\n clearOnEnter: getOption(cm, options, "clearOnEnter"),\n __isFold: true\n });\n myRange.on("clear", function(from, to) {\n CodeMirror.signal(cm, "unfold", cm, from, to);\n });\n CodeMirror.signal(cm, "fold", cm, range.from, range.to);\n }\n\n function makeWidget(cm, options, range) {\n var widget = getOption(cm, options, "widget");\n\n if (typeof widget == "function") {\n widget = widget(range.from, range.to);\n }\n\n if (typeof widget == "string") {\n var text = document.createTextNode(widget);\n widget = document.createElement("span");\n widget.appendChild(text);\n widget.className = "CodeMirror-foldmarker";\n } else if (widget) {\n widget = widget.cloneNode(true)\n }\n return widget;\n }\n\n // Clumsy backwards-compatible interface\n CodeMirror.newFoldFunction = function(rangeFinder, widget) {\n return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };\n };\n\n // New-style interface\n CodeMirror.defineExtension("foldCode", function(pos, options, force) {\n doFold(this, pos, options, force);\n });\n\n CodeMirror.defineExtension("isFolded", function(pos) {\n var marks = this.findMarksAt(pos);\n for (var i = 0; i < marks.length; ++i)\n if (marks[i].__isFold) return true;\n });\n\n CodeMirror.commands.toggleFold = function(cm) {\n cm.foldCode(cm.getCursor());\n };\n CodeMirror.commands.fold = function(cm) {\n cm.foldCode(cm.getCursor(), null, "fold");\n };\n CodeMirror.commands.unfold = function(cm) {\n cm.foldCode(cm.getCursor(), { scanUp: false }, "unfold");\n };\n CodeMirror.commands.foldAll = function(cm) {\n cm.operation(function() {\n for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "fold");\n });\n };\n CodeMirror.commands.unfoldAll = function(cm) {\n cm.operation(function() {\n for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n cm.foldCode(CodeMirror.Pos(i, 0), { scanUp: false }, "unfold");\n });\n };\n\n CodeMirror.registerHelper("fold", "combine", function() {\n var funcs = Array.prototype.slice.call(arguments, 0);\n return function(cm, start) {\n for (var i = 0; i < funcs.length; ++i) {\n var found = funcs[i](cm, start);\n if (found) return found;\n }\n };\n });\n\n CodeMirror.registerHelper("fold", "auto", function(cm, start) {\n var helpers = cm.getHelpers(start, "fold");\n for (var i = 0; i < helpers.length; i++) {\n var cur = helpers[i](cm, start);\n if (cur) return cur;\n }\n });\n\n var defaultOptions = {\n rangeFinder: CodeMirror.fold.auto,\n widget: "\\u2194",\n minFoldSize: 0,\n scanUp: false,\n clearOnEnter: true\n };\n\n CodeMirror.defineOption("foldOptions", null);\n\n function getOption(cm, options, name) {\n if (options && options[name] !== undefined)\n return options[name];\n var editorOptions = cm.options.foldOptions;\n if (editorOptions && editorOptions[name] !== undefined)\n return editorOptions[name];\n return defaultOptions[name];\n }\n\n CodeMirror.defineExtension("foldOption", function(options, name) {\n return getOption(this, options, name);\n });\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/foldcode.js?')},"./node_modules/codemirror/addon/fold/foldgutter.css":
/*!***********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/foldgutter.css ***!
\***********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/foldgutter.css?")},"./node_modules/codemirror/addon/fold/foldgutter.js":
/*!**********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/foldgutter.js ***!
\**********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./foldcode */ "./node_modules/codemirror/addon/fold/foldcode.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.clearGutter(cm.state.foldGutter.options.gutter);\n cm.state.foldGutter = null;\n cm.off("gutterClick", onGutterClick);\n cm.off("changes", onChange);\n cm.off("viewportChange", onViewportChange);\n cm.off("fold", onFold);\n cm.off("unfold", onFold);\n cm.off("swapDoc", onChange);\n }\n if (val) {\n cm.state.foldGutter = new State(parseOptions(val));\n updateInViewport(cm);\n cm.on("gutterClick", onGutterClick);\n cm.on("changes", onChange);\n cm.on("viewportChange", onViewportChange);\n cm.on("fold", onFold);\n cm.on("unfold", onFold);\n cm.on("swapDoc", onChange);\n }\n });\n\n var Pos = CodeMirror.Pos;\n\n function State(options) {\n this.options = options;\n this.from = this.to = 0;\n }\n\n function parseOptions(opts) {\n if (opts === true) opts = {};\n if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";\n if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";\n if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";\n return opts;\n }\n\n function isFolded(cm, line) {\n var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0));\n for (var i = 0; i < marks.length; ++i) {\n if (marks[i].__isFold) {\n var fromPos = marks[i].find(-1);\n if (fromPos && fromPos.line === line)\n return marks[i];\n }\n }\n }\n\n function marker(spec) {\n if (typeof spec == "string") {\n var elt = document.createElement("div");\n elt.className = spec + " CodeMirror-guttermarker-subtle";\n return elt;\n } else {\n return spec.cloneNode(true);\n }\n }\n\n function updateFoldInfo(cm, from, to) {\n var opts = cm.state.foldGutter.options, cur = from - 1;\n var minSize = cm.foldOption(opts, "minFoldSize");\n var func = cm.foldOption(opts, "rangeFinder");\n // we can reuse the built-in indicator element if its className matches the new state\n var clsFolded = typeof opts.indicatorFolded == "string" && classTest(opts.indicatorFolded);\n var clsOpen = typeof opts.indicatorOpen == "string" && classTest(opts.indicatorOpen);\n cm.eachLine(from, to, function(line) {\n ++cur;\n var mark = null;\n var old = line.gutterMarkers;\n if (old) old = old[opts.gutter];\n if (isFolded(cm, cur)) {\n if (clsFolded && old && clsFolded.test(old.className)) return;\n mark = marker(opts.indicatorFolded);\n } else {\n var pos = Pos(cur, 0);\n var range = func && func(cm, pos);\n if (range && range.to.line - range.from.line >= minSize) {\n if (clsOpen && old && clsOpen.test(old.className)) return;\n mark = marker(opts.indicatorOpen);\n }\n }\n if (!mark && !old) return;\n cm.setGutterMarker(line, opts.gutter, mark);\n });\n }\n\n // copied from CodeMirror/src/util/dom.js\n function classTest(cls) { return new RegExp("(^|\\\\s)" + cls + "(?:$|\\\\s)\\\\s*") }\n\n function updateInViewport(cm) {\n var vp = cm.getViewport(), state = cm.state.foldGutter;\n if (!state) return;\n cm.operation(function() {\n updateFoldInfo(cm, vp.from, vp.to);\n });\n state.from = vp.from; state.to = vp.to;\n }\n\n function onGutterClick(cm, line, gutter) {\n var state = cm.state.foldGutter;\n if (!state) return;\n var opts = state.options;\n if (gutter != opts.gutter) return;\n var folded = isFolded(cm, line);\n if (folded) folded.clear();\n else cm.foldCode(Pos(line, 0), opts);\n }\n\n function onChange(cm) {\n var state = cm.state.foldGutter;\n if (!state) return;\n var opts = state.options;\n state.from = state.to = 0;\n clearTimeout(state.changeUpdate);\n state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);\n }\n\n function onViewportChange(cm) {\n var state = cm.state.foldGutter;\n if (!state) return;\n var opts = state.options;\n clearTimeout(state.changeUpdate);\n state.changeUpdate = setTimeout(function() {\n var vp = cm.getViewport();\n if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {\n updateInViewport(cm);\n } else {\n cm.operation(function() {\n if (vp.from < state.from) {\n updateFoldInfo(cm, vp.from, state.from);\n state.from = vp.from;\n }\n if (vp.to > state.to) {\n updateFoldInfo(cm, state.to, vp.to);\n state.to = vp.to;\n }\n });\n }\n }, opts.updateViewportTimeSpan || 400);\n }\n\n function onFold(cm, from) {\n var state = cm.state.foldGutter;\n if (!state) return;\n var line = from.line;\n if (line >= state.from && line < state.to)\n updateFoldInfo(cm, line, line + 1);\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/foldgutter.js?')},"./node_modules/codemirror/addon/fold/indent-fold.js":
/*!***********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/indent-fold.js ***!
\***********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nfunction lineIndent(cm, lineNo) {\n var text = cm.getLine(lineNo)\n var spaceTo = text.search(/\\S/)\n if (spaceTo == -1 || /\\bcomment\\b/.test(cm.getTokenTypeAt(CodeMirror.Pos(lineNo, spaceTo + 1))))\n return -1\n return CodeMirror.countColumn(text, null, cm.getOption("tabSize"))\n}\n\nCodeMirror.registerHelper("fold", "indent", function(cm, start) {\n var myIndent = lineIndent(cm, start.line)\n if (myIndent < 0) return\n var lastLineInFold = null\n\n // Go through lines until we find a line that definitely doesn\'t belong in\n // the block we\'re folding, or to the end.\n for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {\n var indent = lineIndent(cm, i)\n if (indent == -1) {\n } else if (indent > myIndent) {\n // Lines with a greater indent are considered part of the block.\n lastLineInFold = i;\n } else {\n // If this line has non-space, non-comment content, and is\n // indented less or equal to the start line, it is the start of\n // another block.\n break;\n }\n }\n if (lastLineInFold) return {\n from: CodeMirror.Pos(start.line, cm.getLine(start.line).length),\n to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n };\n});\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/indent-fold.js?')},"./node_modules/codemirror/addon/fold/markdown-fold.js":
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/fold/markdown-fold.js ***!
\*************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n var maxDepth = 100;\n\n function isHeader(lineNo) {\n var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));\n return tokentype && /\\bheader\\b/.test(tokentype);\n }\n\n function headerLevel(lineNo, line, nextLine) {\n var match = line && line.match(/^#+/);\n if (match && isHeader(lineNo)) return match[0].length;\n match = nextLine && nextLine.match(/^[=\\-]+\\s*$/);\n if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2;\n return maxDepth;\n }\n\n var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1);\n var level = headerLevel(start.line, firstLine, nextLine);\n if (level === maxDepth) return undefined;\n\n var lastLineNo = cm.lastLine();\n var end = start.line, nextNextLine = cm.getLine(end + 2);\n while (end < lastLineNo) {\n if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break;\n ++end;\n nextLine = nextNextLine;\n nextNextLine = cm.getLine(end + 2);\n }\n\n return {\n from: CodeMirror.Pos(start.line, firstLine.length),\n to: CodeMirror.Pos(end, cm.getLine(end).length)\n };\n});\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/markdown-fold.js?')},"./node_modules/codemirror/addon/fold/xml-fold.js":
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/xml-fold.js ***!
\********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var Pos = CodeMirror.Pos;\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }\n\n var nameStartChar = "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";\n var nameChar = nameStartChar + "\\-\\:\\.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040";\n var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");\n\n function Iter(cm, line, ch, range) {\n this.line = line; this.ch = ch;\n this.cm = cm; this.text = cm.getLine(line);\n this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();\n this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();\n }\n\n function tagAt(iter, ch) {\n var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));\n return type && /\\btag\\b/.test(type);\n }\n\n function nextLine(iter) {\n if (iter.line >= iter.max) return;\n iter.ch = 0;\n iter.text = iter.cm.getLine(++iter.line);\n return true;\n }\n function prevLine(iter) {\n if (iter.line <= iter.min) return;\n iter.text = iter.cm.getLine(--iter.line);\n iter.ch = iter.text.length;\n return true;\n }\n\n function toTagEnd(iter) {\n for (;;) {\n var gt = iter.text.indexOf(">", iter.ch);\n if (gt == -1) { if (nextLine(iter)) continue; else return; }\n if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }\n var lastSlash = iter.text.lastIndexOf("/", gt);\n var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n iter.ch = gt + 1;\n return selfClose ? "selfClose" : "regular";\n }\n }\n function toTagStart(iter) {\n for (;;) {\n var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;\n if (lt == -1) { if (prevLine(iter)) continue; else return; }\n if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }\n xmlTagStart.lastIndex = lt;\n iter.ch = lt;\n var match = xmlTagStart.exec(iter.text);\n if (match && match.index == lt) return match;\n }\n }\n\n function toNextTag(iter) {\n for (;;) {\n xmlTagStart.lastIndex = iter.ch;\n var found = xmlTagStart.exec(iter.text);\n if (!found) { if (nextLine(iter)) continue; else return; }\n if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }\n iter.ch = found.index + found[0].length;\n return found;\n }\n }\n function toPrevTag(iter) {\n for (;;) {\n var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;\n if (gt == -1) { if (prevLine(iter)) continue; else return; }\n if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }\n var lastSlash = iter.text.lastIndexOf("/", gt);\n var selfClose = lastSlash > -1 && !/\\S/.test(iter.text.slice(lastSlash + 1, gt));\n iter.ch = gt + 1;\n return selfClose ? "selfClose" : "regular";\n }\n }\n\n function findMatchingClose(iter, tag) {\n var stack = [];\n for (;;) {\n var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);\n if (!next || !(end = toTagEnd(iter))) return;\n if (end == "selfClose") continue;\n if (next[1]) { // closing tag\n for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {\n stack.length = i;\n break;\n }\n if (i < 0 && (!tag || tag == next[2])) return {\n tag: next[2],\n from: Pos(startLine, startCh),\n to: Pos(iter.line, iter.ch)\n };\n } else { // opening tag\n stack.push(next[2]);\n }\n }\n }\n function findMatchingOpen(iter, tag) {\n var stack = [];\n for (;;) {\n var prev = toPrevTag(iter);\n if (!prev) return;\n if (prev == "selfClose") { toTagStart(iter); continue; }\n var endLine = iter.line, endCh = iter.ch;\n var start = toTagStart(iter);\n if (!start) return;\n if (start[1]) { // closing tag\n stack.push(start[2]);\n } else { // opening tag\n for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {\n stack.length = i;\n break;\n }\n if (i < 0 && (!tag || tag == start[2])) return {\n tag: start[2],\n from: Pos(iter.line, iter.ch),\n to: Pos(endLine, endCh)\n };\n }\n }\n }\n\n CodeMirror.registerHelper("fold", "xml", function(cm, start) {\n var iter = new Iter(cm, start.line, 0);\n for (;;) {\n var openTag = toNextTag(iter)\n if (!openTag || iter.line != start.line) return\n var end = toTagEnd(iter)\n if (!end) return\n if (!openTag[1] && end != "selfClose") {\n var startPos = Pos(iter.line, iter.ch);\n var endPos = findMatchingClose(iter, openTag[2]);\n return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null\n }\n }\n });\n CodeMirror.findMatchingTag = function(cm, pos, range) {\n var iter = new Iter(cm, pos.line, pos.ch, range);\n if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;\n var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n var start = end && toTagStart(iter);\n if (!end || !start || cmp(iter, pos) > 0) return;\n var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n if (end == "selfClose") return {open: here, close: null, at: "open"};\n\n if (start[1]) { // closing tag\n return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};\n } else { // opening tag\n iter = new Iter(cm, to.line, to.ch, range);\n return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};\n }\n };\n\n CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {\n var iter = new Iter(cm, pos.line, pos.ch, range);\n for (;;) {\n var open = findMatchingOpen(iter, tag);\n if (!open) break;\n var forward = new Iter(cm, pos.line, pos.ch, range);\n var close = findMatchingClose(forward, open.tag);\n if (close) return {open: open, close: close};\n }\n };\n\n // Used by addon/edit/closetag.js\n CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n return findMatchingClose(iter, name);\n };\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/fold/xml-fold.js?')},"./node_modules/codemirror/addon/hint/javascript-hint.js":
/*!***************************************************************!*\
!*** ./node_modules/codemirror/addon/hint/javascript-hint.js ***!
\***************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n var Pos = CodeMirror.Pos;\n\n function forEach(arr, f) {\n for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n }\n\n function arrayContains(arr, item) {\n if (!Array.prototype.indexOf) {\n var i = arr.length;\n while (i--) {\n if (arr[i] === item) {\n return true;\n }\n }\n return false;\n }\n return arr.indexOf(item) != -1;\n }\n\n function scriptHint(editor, keywords, getToken, options) {\n // Find the token at the cursor\n var cur = editor.getCursor(), token = getToken(editor, cur);\n if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n var innerMode = CodeMirror.innerMode(editor.getMode(), token.state);\n if (innerMode.mode.helperType === "json") return;\n token.state = innerMode.state;\n\n // If it\'s not a \'word-style\' token, ignore the token.\n if (!/^[\\w$_]*$/.test(token.string)) {\n token = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n type: token.string == "." ? "property" : null};\n } else if (token.end > cur.ch) {\n token.end = cur.ch;\n token.string = token.string.slice(0, cur.ch - token.start);\n }\n\n var tprop = token;\n // If it is a property, find out what it is a property of.\n while (tprop.type == "property") {\n tprop = getToken(editor, Pos(cur.line, tprop.start));\n if (tprop.string != ".") return;\n tprop = getToken(editor, Pos(cur.line, tprop.start));\n if (!context) var context = [];\n context.push(tprop);\n }\n return {list: getCompletions(token, context, keywords, options),\n from: Pos(cur.line, token.start),\n to: Pos(cur.line, token.end)};\n }\n\n function javascriptHint(editor, options) {\n return scriptHint(editor, javascriptKeywords,\n function (e, cur) {return e.getTokenAt(cur);},\n options);\n };\n CodeMirror.registerHelper("hint", "javascript", javascriptHint);\n\n function getCoffeeScriptToken(editor, cur) {\n // This getToken, it is for coffeescript, imitates the behavior of\n // getTokenAt method in javascript.js, that is, returning "property"\n // type and treat "." as independent token.\n var token = editor.getTokenAt(cur);\n if (cur.ch == token.start + 1 && token.string.charAt(0) == \'.\') {\n token.end = token.start;\n token.string = \'.\';\n token.type = "property";\n }\n else if (/^\\.[\\w$_]*$/.test(token.string)) {\n token.type = "property";\n token.start++;\n token.string = token.string.replace(/\\./, \'\');\n }\n return token;\n }\n\n function coffeescriptHint(editor, options) {\n return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n }\n CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);\n\n var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +\n "toUpperCase toLowerCase split concat match replace search").split(" ");\n var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +\n "lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");\n var funcProps = "prototype apply call bind".split(" ");\n var javascriptKeywords = ("break case catch class const continue debugger default delete do else export extends false finally for function " +\n "if in import instanceof new null return super switch this throw true try typeof var void while with yield").split(" ");\n var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +\n "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");\n\n function forAllProps(obj, callback) {\n if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {\n for (var name in obj) callback(name)\n } else {\n for (var o = obj; o; o = Object.getPrototypeOf(o))\n Object.getOwnPropertyNames(o).forEach(callback)\n }\n }\n\n function getCompletions(token, context, keywords, options) {\n var found = [], start = token.string, global = options && options.globalScope || window;\n function maybeAdd(str) {\n if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n }\n function gatherCompletions(obj) {\n if (typeof obj == "string") forEach(stringProps, maybeAdd);\n else if (obj instanceof Array) forEach(arrayProps, maybeAdd);\n else if (obj instanceof Function) forEach(funcProps, maybeAdd);\n forAllProps(obj, maybeAdd)\n }\n\n if (context && context.length) {\n // If this is a property, see if it belongs to some object we can\n // find in the current environment.\n var obj = context.pop(), base;\n if (obj.type && obj.type.indexOf("variable") === 0) {\n if (options && options.additionalContext)\n base = options.additionalContext[obj.string];\n if (!options || options.useGlobalScope !== false)\n base = base || global[obj.string];\n } else if (obj.type == "string") {\n base = "";\n } else if (obj.type == "atom") {\n base = 1;\n } else if (obj.type == "function") {\n if (global.jQuery != null && (obj.string == \'$\' || obj.string == \'jQuery\') &&\n (typeof global.jQuery == \'function\'))\n base = global.jQuery();\n else if (global._ != null && (obj.string == \'_\') && (typeof global._ == \'function\'))\n base = global._();\n }\n while (base != null && context.length)\n base = base[context.pop().string];\n if (base != null) gatherCompletions(base);\n } else {\n // If not, just look in the global object, any local scope, and optional additional-context\n // (reading into JS mode internals to get at the local and global variables)\n for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n for (var c = token.state.context; c; c = c.prev)\n for (var v = c.vars; v; v = v.next) maybeAdd(v.name)\n for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n if (options && options.additionalContext != null)\n for (var key in options.additionalContext)\n maybeAdd(key);\n if (!options || options.useGlobalScope !== false)\n gatherCompletions(global);\n forEach(keywords, maybeAdd);\n }\n return found;\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/hint/javascript-hint.js?')},"./node_modules/codemirror/addon/hint/show-hint.css":
/*!**********************************************************!*\
!*** ./node_modules/codemirror/addon/hint/show-hint.css ***!
\**********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/hint/show-hint.css?")},"./node_modules/codemirror/addon/hint/show-hint.js":
/*!*********************************************************!*\
!*** ./node_modules/codemirror/addon/hint/show-hint.js ***!
\*********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// declare global: DOMRect\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var HINT_ELEMENT_CLASS = "CodeMirror-hint";\n var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";\n\n // This is the old interface, kept around for now to stay\n // backwards-compatible.\n CodeMirror.showHint = function(cm, getHints, options) {\n if (!getHints) return cm.showHint(options);\n if (options && options.async) getHints.async = true;\n var newOpts = {hint: getHints};\n if (options) for (var prop in options) newOpts[prop] = options[prop];\n return cm.showHint(newOpts);\n };\n\n CodeMirror.defineExtension("showHint", function(options) {\n options = parseOptions(this, this.getCursor("start"), options);\n var selections = this.listSelections()\n if (selections.length > 1) return;\n // By default, don\'t allow completion when something is selected.\n // A hint function can have a `supportsSelection` property to\n // indicate that it can handle selections.\n if (this.somethingSelected()) {\n if (!options.hint.supportsSelection) return;\n // Don\'t try with cross-line selections\n for (var i = 0; i < selections.length; i++)\n if (selections[i].head.line != selections[i].anchor.line) return;\n }\n\n if (this.state.completionActive) this.state.completionActive.close();\n var completion = this.state.completionActive = new Completion(this, options);\n if (!completion.options.hint) return;\n\n CodeMirror.signal(this, "startCompletion", this);\n completion.update(true);\n });\n\n CodeMirror.defineExtension("closeHint", function() {\n if (this.state.completionActive) this.state.completionActive.close()\n })\n\n function Completion(cm, options) {\n this.cm = cm;\n this.options = options;\n this.widget = null;\n this.debounce = 0;\n this.tick = 0;\n this.startPos = this.cm.getCursor("start");\n this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;\n\n if (this.options.updateOnCursorActivity) {\n var self = this;\n cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });\n }\n }\n\n var requestAnimationFrame = window.requestAnimationFrame || function(fn) {\n return setTimeout(fn, 1000/60);\n };\n var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;\n\n Completion.prototype = {\n close: function() {\n if (!this.active()) return;\n this.cm.state.completionActive = null;\n this.tick = null;\n if (this.options.updateOnCursorActivity) {\n this.cm.off("cursorActivity", this.activityFunc);\n }\n\n if (this.widget && this.data) CodeMirror.signal(this.data, "close");\n if (this.widget) this.widget.close();\n CodeMirror.signal(this.cm, "endCompletion", this.cm);\n },\n\n active: function() {\n return this.cm.state.completionActive == this;\n },\n\n pick: function(data, i) {\n var completion = data.list[i], self = this;\n this.cm.operation(function() {\n if (completion.hint)\n completion.hint(self.cm, data, completion);\n else\n self.cm.replaceRange(getText(completion), completion.from || data.from,\n completion.to || data.to, "complete");\n CodeMirror.signal(data, "pick", completion);\n self.cm.scrollIntoView();\n });\n if (this.options.closeOnPick) {\n this.close();\n }\n },\n\n cursorActivity: function() {\n if (this.debounce) {\n cancelAnimationFrame(this.debounce);\n this.debounce = 0;\n }\n\n var identStart = this.startPos;\n if(this.data) {\n identStart = this.data.from;\n }\n\n var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);\n if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||\n pos.ch < identStart.ch || this.cm.somethingSelected() ||\n (!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {\n this.close();\n } else {\n var self = this;\n this.debounce = requestAnimationFrame(function() {self.update();});\n if (this.widget) this.widget.disable();\n }\n },\n\n update: function(first) {\n if (this.tick == null) return\n var self = this, myTick = ++this.tick\n fetchHints(this.options.hint, this.cm, this.options, function(data) {\n if (self.tick == myTick) self.finishUpdate(data, first)\n })\n },\n\n finishUpdate: function(data, first) {\n if (this.data) CodeMirror.signal(this.data, "update");\n\n var picked = (this.widget && this.widget.picked) || (first && this.options.completeSingle);\n if (this.widget) this.widget.close();\n\n this.data = data;\n\n if (data && data.list.length) {\n if (picked && data.list.length == 1) {\n this.pick(data, 0);\n } else {\n this.widget = new Widget(this, data);\n CodeMirror.signal(data, "shown");\n }\n }\n }\n };\n\n function parseOptions(cm, pos, options) {\n var editor = cm.options.hintOptions;\n var out = {};\n for (var prop in defaultOptions) out[prop] = defaultOptions[prop];\n if (editor) for (var prop in editor)\n if (editor[prop] !== undefined) out[prop] = editor[prop];\n if (options) for (var prop in options)\n if (options[prop] !== undefined) out[prop] = options[prop];\n if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)\n return out;\n }\n\n function getText(completion) {\n if (typeof completion == "string") return completion;\n else return completion.text;\n }\n\n function buildKeyMap(completion, handle) {\n var baseMap = {\n Up: function() {handle.moveFocus(-1);},\n Down: function() {handle.moveFocus(1);},\n PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},\n PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},\n Home: function() {handle.setFocus(0);},\n End: function() {handle.setFocus(handle.length - 1);},\n Enter: handle.pick,\n Tab: handle.pick,\n Esc: handle.close\n };\n\n var mac = /Mac/.test(navigator.platform);\n\n if (mac) {\n baseMap["Ctrl-P"] = function() {handle.moveFocus(-1);};\n baseMap["Ctrl-N"] = function() {handle.moveFocus(1);};\n }\n\n var custom = completion.options.customKeys;\n var ourMap = custom ? {} : baseMap;\n function addBinding(key, val) {\n var bound;\n if (typeof val != "string")\n bound = function(cm) { return val(cm, handle); };\n // This mechanism is deprecated\n else if (baseMap.hasOwnProperty(val))\n bound = baseMap[val];\n else\n bound = val;\n ourMap[key] = bound;\n }\n if (custom)\n for (var key in custom) if (custom.hasOwnProperty(key))\n addBinding(key, custom[key]);\n var extra = completion.options.extraKeys;\n if (extra)\n for (var key in extra) if (extra.hasOwnProperty(key))\n addBinding(key, extra[key]);\n return ourMap;\n }\n\n function getHintElement(hintsElement, el) {\n while (el && el != hintsElement) {\n if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;\n el = el.parentNode;\n }\n }\n\n function Widget(completion, data) {\n this.id = "cm-complete-" + Math.floor(Math.random(1e6))\n this.completion = completion;\n this.data = data;\n this.picked = false;\n var widget = this, cm = completion.cm;\n var ownerDocument = cm.getInputField().ownerDocument;\n var parentWindow = ownerDocument.defaultView || ownerDocument.parentWindow;\n\n var hints = this.hints = ownerDocument.createElement("ul");\n hints.setAttribute("role", "listbox")\n hints.setAttribute("aria-expanded", "true")\n hints.id = this.id\n var theme = completion.cm.options.theme;\n hints.className = "CodeMirror-hints " + theme;\n this.selectedHint = data.selectedHint || 0;\n\n var completions = data.list;\n for (var i = 0; i < completions.length; ++i) {\n var elt = hints.appendChild(ownerDocument.createElement("li")), cur = completions[i];\n var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);\n if (cur.className != null) className = cur.className + " " + className;\n elt.className = className;\n if (i == this.selectedHint) elt.setAttribute("aria-selected", "true")\n elt.id = this.id + "-" + i\n elt.setAttribute("role", "option")\n if (cur.render) cur.render(elt, data, cur);\n else elt.appendChild(ownerDocument.createTextNode(cur.displayText || getText(cur)));\n elt.hintId = i;\n }\n\n var container = completion.options.container || ownerDocument.body;\n var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);\n var left = pos.left, top = pos.bottom, below = true;\n var offsetLeft = 0, offsetTop = 0;\n if (container !== ownerDocument.body) {\n // We offset the cursor position because left and top are relative to the offsetParent\'s top left corner.\n var isContainerPositioned = [\'absolute\', \'relative\', \'fixed\'].indexOf(parentWindow.getComputedStyle(container).position) !== -1;\n var offsetParent = isContainerPositioned ? container : container.offsetParent;\n var offsetParentPosition = offsetParent.getBoundingClientRect();\n var bodyPosition = ownerDocument.body.getBoundingClientRect();\n offsetLeft = (offsetParentPosition.left - bodyPosition.left - offsetParent.scrollLeft);\n offsetTop = (offsetParentPosition.top - bodyPosition.top - offsetParent.scrollTop);\n }\n hints.style.left = (left - offsetLeft) + "px";\n hints.style.top = (top - offsetTop) + "px";\n\n // If we\'re at the edge of the screen, then we want the menu to appear on the left of the cursor.\n var winW = parentWindow.innerWidth || Math.max(ownerDocument.body.offsetWidth, ownerDocument.documentElement.offsetWidth);\n var winH = parentWindow.innerHeight || Math.max(ownerDocument.body.offsetHeight, ownerDocument.documentElement.offsetHeight);\n container.appendChild(hints);\n cm.getInputField().setAttribute("aria-autocomplete", "list")\n cm.getInputField().setAttribute("aria-owns", this.id)\n cm.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint)\n\n var box = completion.options.moveOnOverlap ? hints.getBoundingClientRect() : new DOMRect();\n var scrolls = completion.options.paddingForScrollbar ? hints.scrollHeight > hints.clientHeight + 1 : false;\n\n // Compute in the timeout to avoid reflow on init\n var startScroll;\n setTimeout(function() { startScroll = cm.getScrollInfo(); });\n\n var overlapY = box.bottom - winH;\n if (overlapY > 0) {\n var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);\n if (curTop - height > 0) { // Fits above cursor\n hints.style.top = (top = pos.top - height - offsetTop) + "px";\n below = false;\n } else if (height > winH) {\n hints.style.height = (winH - 5) + "px";\n hints.style.top = (top = pos.bottom - box.top - offsetTop) + "px";\n var cursor = cm.getCursor();\n if (data.from.ch != cursor.ch) {\n pos = cm.cursorCoords(cursor);\n hints.style.left = (left = pos.left - offsetLeft) + "px";\n box = hints.getBoundingClientRect();\n }\n }\n }\n var overlapX = box.right - winW;\n if (scrolls) overlapX += cm.display.nativeBarWidth;\n if (overlapX > 0) {\n if (box.right - box.left > winW) {\n hints.style.width = (winW - 5) + "px";\n overlapX -= (box.right - box.left) - winW;\n }\n hints.style.left = (left = pos.left - overlapX - offsetLeft) + "px";\n }\n if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)\n node.style.paddingRight = cm.display.nativeBarWidth + "px"\n\n cm.addKeyMap(this.keyMap = buildKeyMap(completion, {\n moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },\n setFocus: function(n) { widget.changeActive(n); },\n menuSize: function() { return widget.screenAmount(); },\n length: completions.length,\n close: function() { completion.close(); },\n pick: function() { widget.pick(); },\n data: data\n }));\n\n if (completion.options.closeOnUnfocus) {\n var closingOnBlur;\n cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });\n cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });\n }\n\n cm.on("scroll", this.onScroll = function() {\n var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();\n if (!startScroll) startScroll = cm.getScrollInfo();\n var newTop = top + startScroll.top - curScroll.top;\n var point = newTop - (parentWindow.pageYOffset || (ownerDocument.documentElement || ownerDocument.body).scrollTop);\n if (!below) point += hints.offsetHeight;\n if (point <= editor.top || point >= editor.bottom) return completion.close();\n hints.style.top = newTop + "px";\n hints.style.left = (left + startScroll.left - curScroll.left) + "px";\n });\n\n CodeMirror.on(hints, "dblclick", function(e) {\n var t = getHintElement(hints, e.target || e.srcElement);\n if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}\n });\n\n CodeMirror.on(hints, "click", function(e) {\n var t = getHintElement(hints, e.target || e.srcElement);\n if (t && t.hintId != null) {\n widget.changeActive(t.hintId);\n if (completion.options.completeOnSingleClick) widget.pick();\n }\n });\n\n CodeMirror.on(hints, "mousedown", function() {\n setTimeout(function(){cm.focus();}, 20);\n });\n\n // The first hint doesn\'t need to be scrolled to on init\n var selectedHintRange = this.getSelectedHintRange();\n if (selectedHintRange.from !== 0 || selectedHintRange.to !== 0) {\n this.scrollToActive();\n }\n\n CodeMirror.signal(data, "select", completions[this.selectedHint], hints.childNodes[this.selectedHint]);\n return true;\n }\n\n Widget.prototype = {\n close: function() {\n if (this.completion.widget != this) return;\n this.completion.widget = null;\n if (this.hints.parentNode) this.hints.parentNode.removeChild(this.hints);\n this.completion.cm.removeKeyMap(this.keyMap);\n var input = this.completion.cm.getInputField()\n input.removeAttribute("aria-activedescendant")\n input.removeAttribute("aria-owns")\n\n var cm = this.completion.cm;\n if (this.completion.options.closeOnUnfocus) {\n cm.off("blur", this.onBlur);\n cm.off("focus", this.onFocus);\n }\n cm.off("scroll", this.onScroll);\n },\n\n disable: function() {\n this.completion.cm.removeKeyMap(this.keyMap);\n var widget = this;\n this.keyMap = {Enter: function() { widget.picked = true; }};\n this.completion.cm.addKeyMap(this.keyMap);\n },\n\n pick: function() {\n this.completion.pick(this.data, this.selectedHint);\n },\n\n changeActive: function(i, avoidWrap) {\n if (i >= this.data.list.length)\n i = avoidWrap ? this.data.list.length - 1 : 0;\n else if (i < 0)\n i = avoidWrap ? 0 : this.data.list.length - 1;\n if (this.selectedHint == i) return;\n var node = this.hints.childNodes[this.selectedHint];\n if (node) {\n node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");\n node.removeAttribute("aria-selected")\n }\n node = this.hints.childNodes[this.selectedHint = i];\n node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;\n node.setAttribute("aria-selected", "true")\n this.completion.cm.getInputField().setAttribute("aria-activedescendant", node.id)\n this.scrollToActive()\n CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);\n },\n\n scrollToActive: function() {\n var selectedHintRange = this.getSelectedHintRange();\n var node1 = this.hints.childNodes[selectedHintRange.from];\n var node2 = this.hints.childNodes[selectedHintRange.to];\n var firstNode = this.hints.firstChild;\n if (node1.offsetTop < this.hints.scrollTop)\n this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;\n else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)\n this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;\n },\n\n screenAmount: function() {\n return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;\n },\n\n getSelectedHintRange: function() {\n var margin = this.completion.options.scrollMargin || 0;\n return {\n from: Math.max(0, this.selectedHint - margin),\n to: Math.min(this.data.list.length - 1, this.selectedHint + margin),\n };\n }\n };\n\n function applicableHelpers(cm, helpers) {\n if (!cm.somethingSelected()) return helpers\n var result = []\n for (var i = 0; i < helpers.length; i++)\n if (helpers[i].supportsSelection) result.push(helpers[i])\n return result\n }\n\n function fetchHints(hint, cm, options, callback) {\n if (hint.async) {\n hint(cm, callback, options)\n } else {\n var result = hint(cm, options)\n if (result && result.then) result.then(callback)\n else callback(result)\n }\n }\n\n function resolveAutoHints(cm, pos) {\n var helpers = cm.getHelpers(pos, "hint"), words\n if (helpers.length) {\n var resolved = function(cm, callback, options) {\n var app = applicableHelpers(cm, helpers);\n function run(i) {\n if (i == app.length) return callback(null)\n fetchHints(app[i], cm, options, function(result) {\n if (result && result.list.length > 0) callback(result)\n else run(i + 1)\n })\n }\n run(0)\n }\n resolved.async = true\n resolved.supportsSelection = true\n return resolved\n } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {\n return function(cm) { return CodeMirror.hint.fromList(cm, {words: words}) }\n } else if (CodeMirror.hint.anyword) {\n return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }\n } else {\n return function() {}\n }\n }\n\n CodeMirror.registerHelper("hint", "auto", {\n resolve: resolveAutoHints\n });\n\n CodeMirror.registerHelper("hint", "fromList", function(cm, options) {\n var cur = cm.getCursor(), token = cm.getTokenAt(cur)\n var term, from = CodeMirror.Pos(cur.line, token.start), to = cur\n if (token.start < cur.ch && /\\w/.test(token.string.charAt(cur.ch - token.start - 1))) {\n term = token.string.substr(0, cur.ch - token.start)\n } else {\n term = ""\n from = cur\n }\n var found = [];\n for (var i = 0; i < options.words.length; i++) {\n var word = options.words[i];\n if (word.slice(0, term.length) == term)\n found.push(word);\n }\n\n if (found.length) return {list: found, from: from, to: to};\n });\n\n CodeMirror.commands.autocomplete = CodeMirror.showHint;\n\n var defaultOptions = {\n hint: CodeMirror.hint.auto,\n completeSingle: true,\n alignWithWord: true,\n closeCharacters: /[\\s()\\[\\]{};:>,]/,\n closeOnPick: true,\n closeOnUnfocus: true,\n updateOnCursorActivity: true,\n completeOnSingleClick: true,\n container: null,\n customKeys: null,\n extraKeys: null,\n paddingForScrollbar: true,\n moveOnOverlap: true,\n };\n\n CodeMirror.defineOption("hintOptions", null);\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/hint/show-hint.js?')},"./node_modules/codemirror/addon/mode/multiplex.js":
/*!*********************************************************!*\
!*** ./node_modules/codemirror/addon/mode/multiplex.js ***!
\*********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.multiplexingMode = function(outer /*, others */) {\n // Others should be {open, close, mode [, delimStyle] [, innerStyle] [, parseDelimiters]} objects\n var others = Array.prototype.slice.call(arguments, 1);\n\n function indexOf(string, pattern, from, returnEnd) {\n if (typeof pattern == "string") {\n var found = string.indexOf(pattern, from);\n return returnEnd && found > -1 ? found + pattern.length : found;\n }\n var m = pattern.exec(from ? string.slice(from) : string);\n return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;\n }\n\n return {\n startState: function() {\n return {\n outer: CodeMirror.startState(outer),\n innerActive: null,\n inner: null,\n startingInner: false\n };\n },\n\n copyState: function(state) {\n return {\n outer: CodeMirror.copyState(outer, state.outer),\n innerActive: state.innerActive,\n inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner),\n startingInner: state.startingInner\n };\n },\n\n token: function(stream, state) {\n if (!state.innerActive) {\n var cutOff = Infinity, oldContent = stream.string;\n for (var i = 0; i < others.length; ++i) {\n var other = others[i];\n var found = indexOf(oldContent, other.open, stream.pos);\n if (found == stream.pos) {\n if (!other.parseDelimiters) stream.match(other.open);\n state.startingInner = !!other.parseDelimiters\n state.innerActive = other;\n\n // Get the outer indent, making sure to handle CodeMirror.Pass\n var outerIndent = 0;\n if (outer.indent) {\n var possibleOuterIndent = outer.indent(state.outer, "", "");\n if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;\n }\n\n state.inner = CodeMirror.startState(other.mode, outerIndent);\n return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");\n } else if (found != -1 && found < cutOff) {\n cutOff = found;\n }\n }\n if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);\n var outerToken = outer.token(stream, state.outer);\n if (cutOff != Infinity) stream.string = oldContent;\n return outerToken;\n } else {\n var curInner = state.innerActive, oldContent = stream.string;\n if (!curInner.close && stream.sol()) {\n state.innerActive = state.inner = null;\n return this.token(stream, state);\n }\n var found = curInner.close && !state.startingInner ?\n indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;\n if (found == stream.pos && !curInner.parseDelimiters) {\n stream.match(curInner.close);\n state.innerActive = state.inner = null;\n return curInner.delimStyle && (curInner.delimStyle + " " + curInner.delimStyle + "-close");\n }\n if (found > -1) stream.string = oldContent.slice(0, found);\n var innerToken = curInner.mode.token(stream, state.inner);\n if (found > -1) stream.string = oldContent;\n else if (stream.pos > stream.start) state.startingInner = false\n\n if (found == stream.pos && curInner.parseDelimiters)\n state.innerActive = state.inner = null;\n\n if (curInner.innerStyle) {\n if (innerToken) innerToken = innerToken + " " + curInner.innerStyle;\n else innerToken = curInner.innerStyle;\n }\n\n return innerToken;\n }\n },\n\n indent: function(state, textAfter, line) {\n var mode = state.innerActive ? state.innerActive.mode : outer;\n if (!mode.indent) return CodeMirror.Pass;\n return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);\n },\n\n blankLine: function(state) {\n var mode = state.innerActive ? state.innerActive.mode : outer;\n if (mode.blankLine) {\n mode.blankLine(state.innerActive ? state.inner : state.outer);\n }\n if (!state.innerActive) {\n for (var i = 0; i < others.length; ++i) {\n var other = others[i];\n if (other.open === "\\n") {\n state.innerActive = other;\n state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);\n }\n }\n } else if (state.innerActive.close === "\\n") {\n state.innerActive = state.inner = null;\n }\n },\n\n electricChars: outer.electricChars,\n\n innerMode: function(state) {\n return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};\n }\n };\n};\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/mode/multiplex.js?')},"./node_modules/codemirror/addon/mode/overlay.js":
/*!*******************************************************!*\
!*** ./node_modules/codemirror/addon/mode/overlay.js ***!
\*******************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Utility function that allows modes to be combined. The mode given\n// as the base argument takes care of most of the normal mode\n// functionality, but a second (typically simple) mode is used, which\n// can override the style of text. Both modes get to parse all of the\n// text, but when both assign a non-null style to a piece of code, the\n// overlay wins, unless the combine argument was true and not overridden,\n// or state.overlay.combineTokens was true, in which case the styles are\n// combined.\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.overlayMode = function(base, overlay, combine) {\n return {\n startState: function() {\n return {\n base: CodeMirror.startState(base),\n overlay: CodeMirror.startState(overlay),\n basePos: 0, baseCur: null,\n overlayPos: 0, overlayCur: null,\n streamSeen: null\n };\n },\n copyState: function(state) {\n return {\n base: CodeMirror.copyState(base, state.base),\n overlay: CodeMirror.copyState(overlay, state.overlay),\n basePos: state.basePos, baseCur: null,\n overlayPos: state.overlayPos, overlayCur: null\n };\n },\n\n token: function(stream, state) {\n if (stream != state.streamSeen ||\n Math.min(state.basePos, state.overlayPos) < stream.start) {\n state.streamSeen = stream;\n state.basePos = state.overlayPos = stream.start;\n }\n\n if (stream.start == state.basePos) {\n state.baseCur = base.token(stream, state.base);\n state.basePos = stream.pos;\n }\n if (stream.start == state.overlayPos) {\n stream.pos = stream.start;\n state.overlayCur = overlay.token(stream, state.overlay);\n state.overlayPos = stream.pos;\n }\n stream.pos = Math.min(state.basePos, state.overlayPos);\n\n // state.overlay.combineTokens always takes precedence over combine,\n // unless set to null\n if (state.overlayCur == null) return state.baseCur;\n else if (state.baseCur != null &&\n state.overlay.combineTokens ||\n combine && state.overlay.combineTokens == null)\n return state.baseCur + " " + state.overlayCur;\n else return state.overlayCur;\n },\n\n indent: base.indent && function(state, textAfter, line) {\n return base.indent(state.base, textAfter, line);\n },\n electricChars: base.electricChars,\n\n innerMode: function(state) { return {state: state.base, mode: base}; },\n\n blankLine: function(state) {\n var baseToken, overlayToken;\n if (base.blankLine) baseToken = base.blankLine(state.base);\n if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);\n\n return overlayToken == null ?\n baseToken :\n (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);\n }\n };\n};\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/mode/overlay.js?')},"./node_modules/codemirror/addon/mode/simple.js":
/*!******************************************************!*\
!*** ./node_modules/codemirror/addon/mode/simple.js ***!
\******************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineSimpleMode = function(name, states) {\n CodeMirror.defineMode(name, function(config) {\n return CodeMirror.simpleMode(config, states);\n });\n };\n\n CodeMirror.simpleMode = function(config, states) {\n ensureState(states, "start");\n var states_ = {}, meta = states.meta || {}, hasIndentation = false;\n for (var state in states) if (state != meta && states.hasOwnProperty(state)) {\n var list = states_[state] = [], orig = states[state];\n for (var i = 0; i < orig.length; i++) {\n var data = orig[i];\n list.push(new Rule(data, states));\n if (data.indent || data.dedent) hasIndentation = true;\n }\n }\n var mode = {\n startState: function() {\n return {state: "start", pending: null,\n local: null, localState: null,\n indent: hasIndentation ? [] : null};\n },\n copyState: function(state) {\n var s = {state: state.state, pending: state.pending,\n local: state.local, localState: null,\n indent: state.indent && state.indent.slice(0)};\n if (state.localState)\n s.localState = CodeMirror.copyState(state.local.mode, state.localState);\n if (state.stack)\n s.stack = state.stack.slice(0);\n for (var pers = state.persistentStates; pers; pers = pers.next)\n s.persistentStates = {mode: pers.mode,\n spec: pers.spec,\n state: pers.state == state.localState ? s.localState : CodeMirror.copyState(pers.mode, pers.state),\n next: s.persistentStates};\n return s;\n },\n token: tokenFunction(states_, config),\n innerMode: function(state) { return state.local && {mode: state.local.mode, state: state.localState}; },\n indent: indentFunction(states_, meta)\n };\n if (meta) for (var prop in meta) if (meta.hasOwnProperty(prop))\n mode[prop] = meta[prop];\n return mode;\n };\n\n function ensureState(states, name) {\n if (!states.hasOwnProperty(name))\n throw new Error("Undefined state " + name + " in simple mode");\n }\n\n function toRegex(val, caret) {\n if (!val) return /(?:)/;\n var flags = "";\n if (val instanceof RegExp) {\n if (val.ignoreCase) flags = "i";\n if (val.unicode) flags += "u"\n val = val.source;\n } else {\n val = String(val);\n }\n return new RegExp((caret === false ? "" : "^") + "(?:" + val + ")", flags);\n }\n\n function asToken(val) {\n if (!val) return null;\n if (val.apply) return val\n if (typeof val == "string") return val.replace(/\\./g, " ");\n var result = [];\n for (var i = 0; i < val.length; i++)\n result.push(val[i] && val[i].replace(/\\./g, " "));\n return result;\n }\n\n function Rule(data, states) {\n if (data.next || data.push) ensureState(states, data.next || data.push);\n this.regex = toRegex(data.regex);\n this.token = asToken(data.token);\n this.data = data;\n }\n\n function tokenFunction(states, config) {\n return function(stream, state) {\n if (state.pending) {\n var pend = state.pending.shift();\n if (state.pending.length == 0) state.pending = null;\n stream.pos += pend.text.length;\n return pend.token;\n }\n\n if (state.local) {\n if (state.local.end && stream.match(state.local.end)) {\n var tok = state.local.endToken || null;\n state.local = state.localState = null;\n return tok;\n } else {\n var tok = state.local.mode.token(stream, state.localState), m;\n if (state.local.endScan && (m = state.local.endScan.exec(stream.current())))\n stream.pos = stream.start + m.index;\n return tok;\n }\n }\n\n var curState = states[state.state];\n for (var i = 0; i < curState.length; i++) {\n var rule = curState[i];\n var matches = (!rule.data.sol || stream.sol()) && stream.match(rule.regex);\n if (matches) {\n if (rule.data.next) {\n state.state = rule.data.next;\n } else if (rule.data.push) {\n (state.stack || (state.stack = [])).push(state.state);\n state.state = rule.data.push;\n } else if (rule.data.pop && state.stack && state.stack.length) {\n state.state = state.stack.pop();\n }\n\n if (rule.data.mode)\n enterLocalMode(config, state, rule.data.mode, rule.token);\n if (rule.data.indent)\n state.indent.push(stream.indentation() + config.indentUnit);\n if (rule.data.dedent)\n state.indent.pop();\n var token = rule.token\n if (token && token.apply) token = token(matches)\n if (matches.length > 2 && rule.token && typeof rule.token != "string") {\n for (var j = 2; j < matches.length; j++)\n if (matches[j])\n (state.pending || (state.pending = [])).push({text: matches[j], token: rule.token[j - 1]});\n stream.backUp(matches[0].length - (matches[1] ? matches[1].length : 0));\n return token[0];\n } else if (token && token.join) {\n return token[0];\n } else {\n return token;\n }\n }\n }\n stream.next();\n return null;\n };\n }\n\n function cmp(a, b) {\n if (a === b) return true;\n if (!a || typeof a != "object" || !b || typeof b != "object") return false;\n var props = 0;\n for (var prop in a) if (a.hasOwnProperty(prop)) {\n if (!b.hasOwnProperty(prop) || !cmp(a[prop], b[prop])) return false;\n props++;\n }\n for (var prop in b) if (b.hasOwnProperty(prop)) props--;\n return props == 0;\n }\n\n function enterLocalMode(config, state, spec, token) {\n var pers;\n if (spec.persistent) for (var p = state.persistentStates; p && !pers; p = p.next)\n if (spec.spec ? cmp(spec.spec, p.spec) : spec.mode == p.mode) pers = p;\n var mode = pers ? pers.mode : spec.mode || CodeMirror.getMode(config, spec.spec);\n var lState = pers ? pers.state : CodeMirror.startState(mode);\n if (spec.persistent && !pers)\n state.persistentStates = {mode: mode, spec: spec.spec, state: lState, next: state.persistentStates};\n\n state.localState = lState;\n state.local = {mode: mode,\n end: spec.end && toRegex(spec.end),\n endScan: spec.end && spec.forceEnd !== false && toRegex(spec.end, false),\n endToken: token && token.join ? token[token.length - 1] : token};\n }\n\n function indexOf(val, arr) {\n for (var i = 0; i < arr.length; i++) if (arr[i] === val) return true;\n }\n\n function indentFunction(states, meta) {\n return function(state, textAfter, line) {\n if (state.local && state.local.mode.indent)\n return state.local.mode.indent(state.localState, textAfter, line);\n if (state.indent == null || state.local || meta.dontIndentStates && indexOf(state.state, meta.dontIndentStates) > -1)\n return CodeMirror.Pass;\n\n var pos = state.indent.length - 1, rules = states[state.state];\n scan: for (;;) {\n for (var i = 0; i < rules.length; i++) {\n var rule = rules[i];\n if (rule.data.dedent && rule.data.dedentIfLineStart !== false) {\n var m = rule.regex.exec(textAfter);\n if (m && m[0]) {\n pos--;\n if (rule.next || rule.push) rules = states[rule.next || rule.push];\n textAfter = textAfter.slice(m[0].length);\n continue scan;\n }\n }\n }\n break;\n }\n return pos < 0 ? 0 : state.indent[pos];\n };\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/mode/simple.js?')},"./node_modules/codemirror/addon/scroll/annotatescrollbar.js":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/addon/scroll/annotatescrollbar.js ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineExtension("annotateScrollbar", function(options) {\n if (typeof options == "string") options = {className: options};\n return new Annotation(this, options);\n });\n\n CodeMirror.defineOption("scrollButtonHeight", 0);\n\n function Annotation(cm, options) {\n this.cm = cm;\n this.options = options;\n this.buttonHeight = options.scrollButtonHeight || cm.getOption("scrollButtonHeight");\n this.annotations = [];\n this.doRedraw = this.doUpdate = null;\n this.div = cm.getWrapperElement().appendChild(document.createElement("div"));\n this.div.style.cssText = "position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none";\n this.computeScale();\n\n function scheduleRedraw(delay) {\n clearTimeout(self.doRedraw);\n self.doRedraw = setTimeout(function() { self.redraw(); }, delay);\n }\n\n var self = this;\n cm.on("refresh", this.resizeHandler = function() {\n clearTimeout(self.doUpdate);\n self.doUpdate = setTimeout(function() {\n if (self.computeScale()) scheduleRedraw(20);\n }, 100);\n });\n cm.on("markerAdded", this.resizeHandler);\n cm.on("markerCleared", this.resizeHandler);\n if (options.listenForChanges !== false)\n cm.on("changes", this.changeHandler = function() {\n scheduleRedraw(250);\n });\n }\n\n Annotation.prototype.computeScale = function() {\n var cm = this.cm;\n var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight - this.buttonHeight * 2) /\n cm.getScrollerElement().scrollHeight\n if (hScale != this.hScale) {\n this.hScale = hScale;\n return true;\n }\n };\n\n Annotation.prototype.update = function(annotations) {\n this.annotations = annotations;\n this.redraw();\n };\n\n Annotation.prototype.redraw = function(compute) {\n if (compute !== false) this.computeScale();\n var cm = this.cm, hScale = this.hScale;\n\n var frag = document.createDocumentFragment(), anns = this.annotations;\n\n var wrapping = cm.getOption("lineWrapping");\n var singleLineH = wrapping && cm.defaultTextHeight() * 1.5;\n var curLine = null, curLineObj = null;\n\n function getY(pos, top) {\n if (curLine != pos.line) {\n curLine = pos.line\n curLineObj = cm.getLineHandle(pos.line)\n var visual = cm.getLineHandleVisualStart(curLineObj)\n if (visual != curLineObj) {\n curLine = cm.getLineNumber(visual)\n curLineObj = visual\n }\n }\n if ((curLineObj.widgets && curLineObj.widgets.length) ||\n (wrapping && curLineObj.height > singleLineH))\n return cm.charCoords(pos, "local")[top ? "top" : "bottom"];\n var topY = cm.heightAtLine(curLineObj, "local");\n return topY + (top ? 0 : curLineObj.height);\n }\n\n var lastLine = cm.lastLine()\n if (cm.display.barWidth) for (var i = 0, nextTop; i < anns.length; i++) {\n var ann = anns[i];\n if (ann.to.line > lastLine) continue;\n var top = nextTop || getY(ann.from, true) * hScale;\n var bottom = getY(ann.to, false) * hScale;\n while (i < anns.length - 1) {\n if (anns[i + 1].to.line > lastLine) break;\n nextTop = getY(anns[i + 1].from, true) * hScale;\n if (nextTop > bottom + .9) break;\n ann = anns[++i];\n bottom = getY(ann.to, false) * hScale;\n }\n if (bottom == top) continue;\n var height = Math.max(bottom - top, 3);\n\n var elt = frag.appendChild(document.createElement("div"));\n elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth - 1, 2) + "px; top: "\n + (top + this.buttonHeight) + "px; height: " + height + "px";\n elt.className = this.options.className;\n if (ann.id) {\n elt.setAttribute("annotation-id", ann.id);\n }\n }\n this.div.textContent = "";\n this.div.appendChild(frag);\n };\n\n Annotation.prototype.clear = function() {\n this.cm.off("refresh", this.resizeHandler);\n this.cm.off("markerAdded", this.resizeHandler);\n this.cm.off("markerCleared", this.resizeHandler);\n if (this.changeHandler) this.cm.off("changes", this.changeHandler);\n this.div.parentNode.removeChild(this.div);\n };\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/scroll/annotatescrollbar.js?')},"./node_modules/codemirror/addon/scroll/simplescrollbars.css":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/addon/scroll/simplescrollbars.css ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/scroll/simplescrollbars.css?")},"./node_modules/codemirror/addon/scroll/simplescrollbars.js":
/*!******************************************************************!*\
!*** ./node_modules/codemirror/addon/scroll/simplescrollbars.js ***!
\******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n function Bar(cls, orientation, scroll) {\n this.orientation = orientation;\n this.scroll = scroll;\n this.screen = this.total = this.size = 1;\n this.pos = 0;\n\n this.node = document.createElement("div");\n this.node.className = cls + "-" + orientation;\n this.inner = this.node.appendChild(document.createElement("div"));\n\n var self = this;\n CodeMirror.on(this.inner, "mousedown", function(e) {\n if (e.which != 1) return;\n CodeMirror.e_preventDefault(e);\n var axis = self.orientation == "horizontal" ? "pageX" : "pageY";\n var start = e[axis], startpos = self.pos;\n function done() {\n CodeMirror.off(document, "mousemove", move);\n CodeMirror.off(document, "mouseup", done);\n }\n function move(e) {\n if (e.which != 1) return done();\n self.moveTo(startpos + (e[axis] - start) * (self.total / self.size));\n }\n CodeMirror.on(document, "mousemove", move);\n CodeMirror.on(document, "mouseup", done);\n });\n\n CodeMirror.on(this.node, "click", function(e) {\n CodeMirror.e_preventDefault(e);\n var innerBox = self.inner.getBoundingClientRect(), where;\n if (self.orientation == "horizontal")\n where = e.clientX < innerBox.left ? -1 : e.clientX > innerBox.right ? 1 : 0;\n else\n where = e.clientY < innerBox.top ? -1 : e.clientY > innerBox.bottom ? 1 : 0;\n self.moveTo(self.pos + where * self.screen);\n });\n\n function onWheel(e) {\n var moved = CodeMirror.wheelEventPixels(e)[self.orientation == "horizontal" ? "x" : "y"];\n var oldPos = self.pos;\n self.moveTo(self.pos + moved);\n if (self.pos != oldPos) CodeMirror.e_preventDefault(e);\n }\n CodeMirror.on(this.node, "mousewheel", onWheel);\n CodeMirror.on(this.node, "DOMMouseScroll", onWheel);\n }\n\n Bar.prototype.setPos = function(pos, force) {\n if (pos < 0) pos = 0;\n if (pos > this.total - this.screen) pos = this.total - this.screen;\n if (!force && pos == this.pos) return false;\n this.pos = pos;\n this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =\n (pos * (this.size / this.total)) + "px";\n return true\n };\n\n Bar.prototype.moveTo = function(pos) {\n if (this.setPos(pos)) this.scroll(pos, this.orientation);\n }\n\n var minButtonSize = 10;\n\n Bar.prototype.update = function(scrollSize, clientSize, barSize) {\n var sizeChanged = this.screen != clientSize || this.total != scrollSize || this.size != barSize\n if (sizeChanged) {\n this.screen = clientSize;\n this.total = scrollSize;\n this.size = barSize;\n }\n\n var buttonSize = this.screen * (this.size / this.total);\n if (buttonSize < minButtonSize) {\n this.size -= minButtonSize - buttonSize;\n buttonSize = minButtonSize;\n }\n this.inner.style[this.orientation == "horizontal" ? "width" : "height"] =\n buttonSize + "px";\n this.setPos(this.pos, sizeChanged);\n };\n\n function SimpleScrollbars(cls, place, scroll) {\n this.addClass = cls;\n this.horiz = new Bar(cls, "horizontal", scroll);\n place(this.horiz.node);\n this.vert = new Bar(cls, "vertical", scroll);\n place(this.vert.node);\n this.width = null;\n }\n\n SimpleScrollbars.prototype.update = function(measure) {\n if (this.width == null) {\n var style = window.getComputedStyle ? window.getComputedStyle(this.horiz.node) : this.horiz.node.currentStyle;\n if (style) this.width = parseInt(style.height);\n }\n var width = this.width || 0;\n\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n this.vert.node.style.display = needsV ? "block" : "none";\n this.horiz.node.style.display = needsH ? "block" : "none";\n\n if (needsV) {\n this.vert.update(measure.scrollHeight, measure.clientHeight,\n measure.viewHeight - (needsH ? width : 0));\n this.vert.node.style.bottom = needsH ? width + "px" : "0";\n }\n if (needsH) {\n this.horiz.update(measure.scrollWidth, measure.clientWidth,\n measure.viewWidth - (needsV ? width : 0) - measure.barLeft);\n this.horiz.node.style.right = needsV ? width + "px" : "0";\n this.horiz.node.style.left = measure.barLeft + "px";\n }\n\n return {right: needsV ? width : 0, bottom: needsH ? width : 0};\n };\n\n SimpleScrollbars.prototype.setScrollTop = function(pos) {\n this.vert.setPos(pos);\n };\n\n SimpleScrollbars.prototype.setScrollLeft = function(pos) {\n this.horiz.setPos(pos);\n };\n\n SimpleScrollbars.prototype.clear = function() {\n var parent = this.horiz.node.parentNode;\n parent.removeChild(this.horiz.node);\n parent.removeChild(this.vert.node);\n };\n\n CodeMirror.scrollbarModel.simple = function(place, scroll) {\n return new SimpleScrollbars("CodeMirror-simplescroll", place, scroll);\n };\n CodeMirror.scrollbarModel.overlay = function(place, scroll) {\n return new SimpleScrollbars("CodeMirror-overlayscroll", place, scroll);\n };\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/scroll/simplescrollbars.js?')},"./node_modules/codemirror/addon/search/match-highlighter.js":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/addon/search/match-highlighter.js ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Highlighting text that matches the selection\n//\n// Defines an option highlightSelectionMatches, which, when enabled,\n// will style strings that match the selection throughout the\n// document.\n//\n// The option can be set to true to simply enable it, or to a\n// {minChars, style, wordsOnly, showToken, delay} object to explicitly\n// configure it. minChars is the minimum amount of characters that should be\n// selected for the behavior to occur, and style is the token style to\n// apply to the matches. This will be prefixed by "cm-" to create an\n// actual CSS class name. If wordsOnly is enabled, the matches will be\n// highlighted only if the selected text is a word. showToken, when enabled,\n// will cause the current token to be highlighted when nothing is selected.\n// delay is used to specify how much time to wait, in milliseconds, before\n// highlighting the matches. If annotateScrollbar is enabled, the occurrences\n// will be highlighted on the scrollbar via the matchesonscrollbar addon.\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./matchesonscrollbar */ "./node_modules/codemirror/addon/search/matchesonscrollbar.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var defaults = {\n style: "matchhighlight",\n minChars: 2,\n delay: 100,\n wordsOnly: false,\n annotateScrollbar: false,\n showToken: false,\n trim: true\n }\n\n function State(options) {\n this.options = {}\n for (var name in defaults)\n this.options[name] = (options && options.hasOwnProperty(name) ? options : defaults)[name]\n this.overlay = this.timeout = null;\n this.matchesonscroll = null;\n this.active = false;\n }\n\n CodeMirror.defineOption("highlightSelectionMatches", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n removeOverlay(cm);\n clearTimeout(cm.state.matchHighlighter.timeout);\n cm.state.matchHighlighter = null;\n cm.off("cursorActivity", cursorActivity);\n cm.off("focus", onFocus)\n }\n if (val) {\n var state = cm.state.matchHighlighter = new State(val);\n if (cm.hasFocus()) {\n state.active = true\n highlightMatches(cm)\n } else {\n cm.on("focus", onFocus)\n }\n cm.on("cursorActivity", cursorActivity);\n }\n });\n\n function cursorActivity(cm) {\n var state = cm.state.matchHighlighter;\n if (state.active || cm.hasFocus()) scheduleHighlight(cm, state)\n }\n\n function onFocus(cm) {\n var state = cm.state.matchHighlighter\n if (!state.active) {\n state.active = true\n scheduleHighlight(cm, state)\n }\n }\n\n function scheduleHighlight(cm, state) {\n clearTimeout(state.timeout);\n state.timeout = setTimeout(function() {highlightMatches(cm);}, state.options.delay);\n }\n\n function addOverlay(cm, query, hasBoundary, style) {\n var state = cm.state.matchHighlighter;\n cm.addOverlay(state.overlay = makeOverlay(query, hasBoundary, style));\n if (state.options.annotateScrollbar && cm.showMatchesOnScrollbar) {\n var searchFor = hasBoundary ? new RegExp((/\\w/.test(query.charAt(0)) ? "\\\\b" : "") +\n query.replace(/[\\\\\\[.+*?(){|^$]/g, "\\\\$&") +\n (/\\w/.test(query.charAt(query.length - 1)) ? "\\\\b" : "")) : query;\n state.matchesonscroll = cm.showMatchesOnScrollbar(searchFor, false,\n {className: "CodeMirror-selection-highlight-scrollbar"});\n }\n }\n\n function removeOverlay(cm) {\n var state = cm.state.matchHighlighter;\n if (state.overlay) {\n cm.removeOverlay(state.overlay);\n state.overlay = null;\n if (state.matchesonscroll) {\n state.matchesonscroll.clear();\n state.matchesonscroll = null;\n }\n }\n }\n\n function highlightMatches(cm) {\n cm.operation(function() {\n var state = cm.state.matchHighlighter;\n removeOverlay(cm);\n if (!cm.somethingSelected() && state.options.showToken) {\n var re = state.options.showToken === true ? /[\\w$]/ : state.options.showToken;\n var cur = cm.getCursor(), line = cm.getLine(cur.line), start = cur.ch, end = start;\n while (start && re.test(line.charAt(start - 1))) --start;\n while (end < line.length && re.test(line.charAt(end))) ++end;\n if (start < end)\n addOverlay(cm, line.slice(start, end), re, state.options.style);\n return;\n }\n var from = cm.getCursor("from"), to = cm.getCursor("to");\n if (from.line != to.line) return;\n if (state.options.wordsOnly && !isWord(cm, from, to)) return;\n var selection = cm.getRange(from, to)\n if (state.options.trim) selection = selection.replace(/^\\s+|\\s+$/g, "")\n if (selection.length >= state.options.minChars)\n addOverlay(cm, selection, false, state.options.style);\n });\n }\n\n function isWord(cm, from, to) {\n var str = cm.getRange(from, to);\n if (str.match(/^\\w+$/) !== null) {\n if (from.ch > 0) {\n var pos = {line: from.line, ch: from.ch - 1};\n var chr = cm.getRange(pos, from);\n if (chr.match(/\\W/) === null) return false;\n }\n if (to.ch < cm.getLine(from.line).length) {\n var pos = {line: to.line, ch: to.ch + 1};\n var chr = cm.getRange(to, pos);\n if (chr.match(/\\W/) === null) return false;\n }\n return true;\n } else return false;\n }\n\n function boundariesAround(stream, re) {\n return (!stream.start || !re.test(stream.string.charAt(stream.start - 1))) &&\n (stream.pos == stream.string.length || !re.test(stream.string.charAt(stream.pos)));\n }\n\n function makeOverlay(query, hasBoundary, style) {\n return {token: function(stream) {\n if (stream.match(query) &&\n (!hasBoundary || boundariesAround(stream, hasBoundary)))\n return style;\n stream.next();\n stream.skipTo(query.charAt(0)) || stream.skipToEnd();\n }};\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/search/match-highlighter.js?')},"./node_modules/codemirror/addon/search/matchesonscrollbar.js":
/*!********************************************************************!*\
!*** ./node_modules/codemirror/addon/search/matchesonscrollbar.js ***!
\********************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./searchcursor */ "./node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__(/*! ../scroll/annotatescrollbar */ "./node_modules/codemirror/addon/scroll/annotatescrollbar.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineExtension("showMatchesOnScrollbar", function(query, caseFold, options) {\n if (typeof options == "string") options = {className: options};\n if (!options) options = {};\n return new SearchAnnotation(this, query, caseFold, options);\n });\n\n function SearchAnnotation(cm, query, caseFold, options) {\n this.cm = cm;\n this.options = options;\n var annotateOptions = {listenForChanges: false};\n for (var prop in options) annotateOptions[prop] = options[prop];\n if (!annotateOptions.className) annotateOptions.className = "CodeMirror-search-match";\n this.annotation = cm.annotateScrollbar(annotateOptions);\n this.query = query;\n this.caseFold = caseFold;\n this.gap = {from: cm.firstLine(), to: cm.lastLine() + 1};\n this.matches = [];\n this.update = null;\n\n this.findMatches();\n this.annotation.update(this.matches);\n\n var self = this;\n cm.on("change", this.changeHandler = function(_cm, change) { self.onChange(change); });\n }\n\n var MAX_MATCHES = 1000;\n\n SearchAnnotation.prototype.findMatches = function() {\n if (!this.gap) return;\n for (var i = 0; i < this.matches.length; i++) {\n var match = this.matches[i];\n if (match.from.line >= this.gap.to) break;\n if (match.to.line >= this.gap.from) this.matches.splice(i--, 1);\n }\n var cursor = this.cm.getSearchCursor(this.query, CodeMirror.Pos(this.gap.from, 0), {caseFold: this.caseFold, multiline: this.options.multiline});\n var maxMatches = this.options && this.options.maxMatches || MAX_MATCHES;\n while (cursor.findNext()) {\n var match = {from: cursor.from(), to: cursor.to()};\n if (match.from.line >= this.gap.to) break;\n this.matches.splice(i++, 0, match);\n if (this.matches.length > maxMatches) break;\n }\n this.gap = null;\n };\n\n function offsetLine(line, changeStart, sizeChange) {\n if (line <= changeStart) return line;\n return Math.max(changeStart, line + sizeChange);\n }\n\n SearchAnnotation.prototype.onChange = function(change) {\n var startLine = change.from.line;\n var endLine = CodeMirror.changeEnd(change).line;\n var sizeChange = endLine - change.to.line;\n if (this.gap) {\n this.gap.from = Math.min(offsetLine(this.gap.from, startLine, sizeChange), change.from.line);\n this.gap.to = Math.max(offsetLine(this.gap.to, startLine, sizeChange), change.from.line);\n } else {\n this.gap = {from: change.from.line, to: endLine + 1};\n }\n\n if (sizeChange) for (var i = 0; i < this.matches.length; i++) {\n var match = this.matches[i];\n var newFrom = offsetLine(match.from.line, startLine, sizeChange);\n if (newFrom != match.from.line) match.from = CodeMirror.Pos(newFrom, match.from.ch);\n var newTo = offsetLine(match.to.line, startLine, sizeChange);\n if (newTo != match.to.line) match.to = CodeMirror.Pos(newTo, match.to.ch);\n }\n clearTimeout(this.update);\n var self = this;\n this.update = setTimeout(function() { self.updateAfterChange(); }, 250);\n };\n\n SearchAnnotation.prototype.updateAfterChange = function() {\n this.findMatches();\n this.annotation.update(this.matches);\n };\n\n SearchAnnotation.prototype.clear = function() {\n this.cm.off("change", this.changeHandler);\n this.annotation.clear();\n };\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/search/matchesonscrollbar.js?')},"./node_modules/codemirror/addon/search/search.js":
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/search/search.js ***!
\********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Define search commands. Depends on dialog.js or another\n// implementation of the openDialog method.\n\n// Replace works a little oddly -- it will do the replace on the next\n// Ctrl-G (or whatever is bound to findNext) press. You prevent a\n// replace by making sure the match is no longer selected when hitting\n// Ctrl-G.\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ./searchcursor */ "./node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__(/*! ../dialog/dialog */ "./node_modules/codemirror/addon/dialog/dialog.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n // default search panel location\n CodeMirror.defineOption("search", {bottom: false});\n\n function searchOverlay(query, caseInsensitive) {\n if (typeof query == "string")\n query = new RegExp(query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, "\\\\$&"), caseInsensitive ? "gi" : "g");\n else if (!query.global)\n query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");\n\n return {token: function(stream) {\n query.lastIndex = stream.pos;\n var match = query.exec(stream.string);\n if (match && match.index == stream.pos) {\n stream.pos += match[0].length || 1;\n return "searching";\n } else if (match) {\n stream.pos = match.index;\n } else {\n stream.skipToEnd();\n }\n }};\n }\n\n function SearchState() {\n this.posFrom = this.posTo = this.lastQuery = this.query = null;\n this.overlay = null;\n }\n\n function getSearchState(cm) {\n return cm.state.search || (cm.state.search = new SearchState());\n }\n\n function queryCaseInsensitive(query) {\n return typeof query == "string" && query == query.toLowerCase();\n }\n\n function getSearchCursor(cm, query, pos) {\n // Heuristic: if the query string is all lowercase, do a case insensitive search.\n return cm.getSearchCursor(query, pos, {caseFold: queryCaseInsensitive(query), multiline: true});\n }\n\n function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {\n cm.openDialog(text, onEnter, {\n value: deflt,\n selectValueOnOpen: true,\n closeOnEnter: false,\n onClose: function() { clearSearch(cm); },\n onKeyDown: onKeyDown,\n bottom: cm.options.search.bottom\n });\n }\n\n function dialog(cm, text, shortText, deflt, f) {\n if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true, bottom: cm.options.search.bottom});\n else f(prompt(shortText, deflt));\n }\n\n function confirmDialog(cm, text, shortText, fs) {\n if (cm.openConfirm) cm.openConfirm(text, fs);\n else if (confirm(shortText)) fs[0]();\n }\n\n function parseString(string) {\n return string.replace(/\\\\([nrt\\\\])/g, function(match, ch) {\n if (ch == "n") return "\\n"\n if (ch == "r") return "\\r"\n if (ch == "t") return "\\t"\n if (ch == "\\\\") return "\\\\"\n return match\n })\n }\n\n function parseQuery(query) {\n var isRE = query.match(/^\\/(.*)\\/([a-z]*)$/);\n if (isRE) {\n try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }\n catch(e) {} // Not a regular expression after all, do a string search\n } else {\n query = parseString(query)\n }\n if (typeof query == "string" ? query == "" : query.test(""))\n query = /x^/;\n return query;\n }\n\n function startSearch(cm, state, query) {\n state.queryText = query;\n state.query = parseQuery(query);\n cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));\n state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));\n cm.addOverlay(state.overlay);\n if (cm.showMatchesOnScrollbar) {\n if (state.annotate) { state.annotate.clear(); state.annotate = null; }\n state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));\n }\n }\n\n function doSearch(cm, rev, persistent, immediate) {\n var state = getSearchState(cm);\n if (state.query) return findNext(cm, rev);\n var q = cm.getSelection() || state.lastQuery;\n if (q instanceof RegExp && q.source == "x^") q = null\n if (persistent && cm.openDialog) {\n var hiding = null\n var searchNext = function(query, event) {\n CodeMirror.e_stop(event);\n if (!query) return;\n if (query != state.queryText) {\n startSearch(cm, state, query);\n state.posFrom = state.posTo = cm.getCursor();\n }\n if (hiding) hiding.style.opacity = 1\n findNext(cm, event.shiftKey, function(_, to) {\n var dialog\n if (to.line < 3 && document.querySelector &&\n (dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) &&\n dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)\n (hiding = dialog).style.opacity = .4\n })\n };\n persistentDialog(cm, getQueryDialog(cm), q, searchNext, function(event, query) {\n var keyName = CodeMirror.keyName(event)\n var extra = cm.getOption(\'extraKeys\'), cmd = (extra && extra[keyName]) || CodeMirror.keyMap[cm.getOption("keyMap")][keyName]\n if (cmd == "findNext" || cmd == "findPrev" ||\n cmd == "findPersistentNext" || cmd == "findPersistentPrev") {\n CodeMirror.e_stop(event);\n startSearch(cm, getSearchState(cm), query);\n cm.execCommand(cmd);\n } else if (cmd == "find" || cmd == "findPersistent") {\n CodeMirror.e_stop(event);\n searchNext(query, event);\n }\n });\n if (immediate && q) {\n startSearch(cm, state, q);\n findNext(cm, rev);\n }\n } else {\n dialog(cm, getQueryDialog(cm), "Search for:", q, function(query) {\n if (query && !state.query) cm.operation(function() {\n startSearch(cm, state, query);\n state.posFrom = state.posTo = cm.getCursor();\n findNext(cm, rev);\n });\n });\n }\n }\n\n function findNext(cm, rev, callback) {cm.operation(function() {\n var state = getSearchState(cm);\n var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);\n if (!cursor.find(rev)) {\n cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));\n if (!cursor.find(rev)) return;\n }\n cm.setSelection(cursor.from(), cursor.to());\n cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);\n state.posFrom = cursor.from(); state.posTo = cursor.to();\n if (callback) callback(cursor.from(), cursor.to())\n });}\n\n function clearSearch(cm) {cm.operation(function() {\n var state = getSearchState(cm);\n state.lastQuery = state.query;\n if (!state.query) return;\n state.query = state.queryText = null;\n cm.removeOverlay(state.overlay);\n if (state.annotate) { state.annotate.clear(); state.annotate = null; }\n });}\n\n function el(tag, attrs) {\n var element = tag ? document.createElement(tag) : document.createDocumentFragment();\n for (var key in attrs) {\n element[key] = attrs[key];\n }\n for (var i = 2; i < arguments.length; i++) {\n var child = arguments[i]\n element.appendChild(typeof child == "string" ? document.createTextNode(child) : child);\n }\n return element;\n }\n\n function getQueryDialog(cm) {\n return el("", null,\n el("span", {className: "CodeMirror-search-label"}, cm.phrase("Search:")), " ",\n el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",\n el("span", {style: "color: #888", className: "CodeMirror-search-hint"},\n cm.phrase("(Use /re/ syntax for regexp search)")));\n }\n function getReplaceQueryDialog(cm) {\n return el("", null, " ",\n el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}), " ",\n el("span", {style: "color: #888", className: "CodeMirror-search-hint"},\n cm.phrase("(Use /re/ syntax for regexp search)")));\n }\n function getReplacementQueryDialog(cm) {\n return el("", null,\n el("span", {className: "CodeMirror-search-label"}, cm.phrase("With:")), " ",\n el("input", {type: "text", "style": "width: 10em", className: "CodeMirror-search-field"}));\n }\n function getDoReplaceConfirm(cm) {\n return el("", null,\n el("span", {className: "CodeMirror-search-label"}, cm.phrase("Replace?")), " ",\n el("button", {}, cm.phrase("Yes")), " ",\n el("button", {}, cm.phrase("No")), " ",\n el("button", {}, cm.phrase("All")), " ",\n el("button", {}, cm.phrase("Stop")));\n }\n\n function replaceAll(cm, query, text) {\n cm.operation(function() {\n for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {\n if (typeof query != "string") {\n var match = cm.getRange(cursor.from(), cursor.to()).match(query);\n cursor.replace(text.replace(/\\$(\\d)/g, function(_, i) {return match[i];}));\n } else cursor.replace(text);\n }\n });\n }\n\n function replace(cm, all) {\n if (cm.getOption("readOnly")) return;\n var query = cm.getSelection() || getSearchState(cm).lastQuery;\n var dialogText = all ? cm.phrase("Replace all:") : cm.phrase("Replace:")\n var fragment = el("", null,\n el("span", {className: "CodeMirror-search-label"}, dialogText),\n getReplaceQueryDialog(cm))\n dialog(cm, fragment, dialogText, query, function(query) {\n if (!query) return;\n query = parseQuery(query);\n dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function(text) {\n text = parseString(text)\n if (all) {\n replaceAll(cm, query, text)\n } else {\n clearSearch(cm);\n var cursor = getSearchCursor(cm, query, cm.getCursor("from"));\n var advance = function() {\n var start = cursor.from(), match;\n if (!(match = cursor.findNext())) {\n cursor = getSearchCursor(cm, query);\n if (!(match = cursor.findNext()) ||\n (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;\n }\n cm.setSelection(cursor.from(), cursor.to());\n cm.scrollIntoView({from: cursor.from(), to: cursor.to()});\n confirmDialog(cm, getDoReplaceConfirm(cm), cm.phrase("Replace?"),\n [function() {doReplace(match);}, advance,\n function() {replaceAll(cm, query, text)}]);\n };\n var doReplace = function(match) {\n cursor.replace(typeof query == "string" ? text :\n text.replace(/\\$(\\d)/g, function(_, i) {return match[i];}));\n advance();\n };\n advance();\n }\n });\n });\n }\n\n CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};\n CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);};\n CodeMirror.commands.findPersistentNext = function(cm) {doSearch(cm, false, true, true);};\n CodeMirror.commands.findPersistentPrev = function(cm) {doSearch(cm, true, true, true);};\n CodeMirror.commands.findNext = doSearch;\n CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};\n CodeMirror.commands.clearSearch = clearSearch;\n CodeMirror.commands.replace = replace;\n CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/search/search.js?')},"./node_modules/codemirror/addon/search/searchcursor.js":
/*!**************************************************************!*\
!*** ./node_modules/codemirror/addon/search/searchcursor.js ***!
\**************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"))\n else {}\n})(function(CodeMirror) {\n "use strict"\n var Pos = CodeMirror.Pos\n\n function regexpFlags(regexp) {\n var flags = regexp.flags\n return flags != null ? flags : (regexp.ignoreCase ? "i" : "")\n + (regexp.global ? "g" : "")\n + (regexp.multiline ? "m" : "")\n }\n\n function ensureFlags(regexp, flags) {\n var current = regexpFlags(regexp), target = current\n for (var i = 0; i < flags.length; i++) if (target.indexOf(flags.charAt(i)) == -1)\n target += flags.charAt(i)\n return current == target ? regexp : new RegExp(regexp.source, target)\n }\n\n function maybeMultiline(regexp) {\n return /\\\\s|\\\\n|\\n|\\\\W|\\\\D|\\[\\^/.test(regexp.source)\n }\n\n function searchRegexpForward(doc, regexp, start) {\n regexp = ensureFlags(regexp, "g")\n for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) {\n regexp.lastIndex = ch\n var string = doc.getLine(line), match = regexp.exec(string)\n if (match)\n return {from: Pos(line, match.index),\n to: Pos(line, match.index + match[0].length),\n match: match}\n }\n }\n\n function searchRegexpForwardMultiline(doc, regexp, start) {\n if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start)\n\n regexp = ensureFlags(regexp, "gm")\n var string, chunk = 1\n for (var line = start.line, last = doc.lastLine(); line <= last;) {\n // This grows the search buffer in exponentially-sized chunks\n // between matches, so that nearby matches are fast and don\'t\n // require concatenating the whole document (in case we\'re\n // searching for something that has tons of matches), but at the\n // same time, the amount of retries is limited.\n for (var i = 0; i < chunk; i++) {\n if (line > last) break\n var curLine = doc.getLine(line++)\n string = string == null ? curLine : string + "\\n" + curLine\n }\n chunk = chunk * 2\n regexp.lastIndex = start.ch\n var match = regexp.exec(string)\n if (match) {\n var before = string.slice(0, match.index).split("\\n"), inside = match[0].split("\\n")\n var startLine = start.line + before.length - 1, startCh = before[before.length - 1].length\n return {from: Pos(startLine, startCh),\n to: Pos(startLine + inside.length - 1,\n inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n match: match}\n }\n }\n }\n\n function lastMatchIn(string, regexp, endMargin) {\n var match, from = 0\n while (from <= string.length) {\n regexp.lastIndex = from\n var newMatch = regexp.exec(string)\n if (!newMatch) break\n var end = newMatch.index + newMatch[0].length\n if (end > string.length - endMargin) break\n if (!match || end > match.index + match[0].length)\n match = newMatch\n from = newMatch.index + 1\n }\n return match\n }\n\n function searchRegexpBackward(doc, regexp, start) {\n regexp = ensureFlags(regexp, "g")\n for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {\n var string = doc.getLine(line)\n var match = lastMatchIn(string, regexp, ch < 0 ? 0 : string.length - ch)\n if (match)\n return {from: Pos(line, match.index),\n to: Pos(line, match.index + match[0].length),\n match: match}\n }\n }\n\n function searchRegexpBackwardMultiline(doc, regexp, start) {\n if (!maybeMultiline(regexp)) return searchRegexpBackward(doc, regexp, start)\n regexp = ensureFlags(regexp, "gm")\n var string, chunkSize = 1, endMargin = doc.getLine(start.line).length - start.ch\n for (var line = start.line, first = doc.firstLine(); line >= first;) {\n for (var i = 0; i < chunkSize && line >= first; i++) {\n var curLine = doc.getLine(line--)\n string = string == null ? curLine : curLine + "\\n" + string\n }\n chunkSize *= 2\n\n var match = lastMatchIn(string, regexp, endMargin)\n if (match) {\n var before = string.slice(0, match.index).split("\\n"), inside = match[0].split("\\n")\n var startLine = line + before.length, startCh = before[before.length - 1].length\n return {from: Pos(startLine, startCh),\n to: Pos(startLine + inside.length - 1,\n inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),\n match: match}\n }\n }\n }\n\n var doFold, noFold\n if (String.prototype.normalize) {\n doFold = function(str) { return str.normalize("NFD").toLowerCase() }\n noFold = function(str) { return str.normalize("NFD") }\n } else {\n doFold = function(str) { return str.toLowerCase() }\n noFold = function(str) { return str }\n }\n\n // Maps a position in a case-folded line back to a position in the original line\n // (compensating for codepoints increasing in number during folding)\n function adjustPos(orig, folded, pos, foldFunc) {\n if (orig.length == folded.length) return pos\n for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) {\n if (min == max) return min\n var mid = (min + max) >> 1\n var len = foldFunc(orig.slice(0, mid)).length\n if (len == pos) return mid\n else if (len > pos) max = mid\n else min = mid + 1\n }\n }\n\n function searchStringForward(doc, query, start, caseFold) {\n // Empty string would match anything and never progress, so we\n // define it to match nothing instead.\n if (!query.length) return null\n var fold = caseFold ? doFold : noFold\n var lines = fold(query).split(/\\r|\\n\\r?/)\n\n search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) {\n var orig = doc.getLine(line).slice(ch), string = fold(orig)\n if (lines.length == 1) {\n var found = string.indexOf(lines[0])\n if (found == -1) continue search\n var start = adjustPos(orig, string, found, fold) + ch\n return {from: Pos(line, adjustPos(orig, string, found, fold) + ch),\n to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch)}\n } else {\n var cutFrom = string.length - lines[0].length\n if (string.slice(cutFrom) != lines[0]) continue search\n for (var i = 1; i < lines.length - 1; i++)\n if (fold(doc.getLine(line + i)) != lines[i]) continue search\n var end = doc.getLine(line + lines.length - 1), endString = fold(end), lastLine = lines[lines.length - 1]\n if (endString.slice(0, lastLine.length) != lastLine) continue search\n return {from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch),\n to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))}\n }\n }\n }\n\n function searchStringBackward(doc, query, start, caseFold) {\n if (!query.length) return null\n var fold = caseFold ? doFold : noFold\n var lines = fold(query).split(/\\r|\\n\\r?/)\n\n search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) {\n var orig = doc.getLine(line)\n if (ch > -1) orig = orig.slice(0, ch)\n var string = fold(orig)\n if (lines.length == 1) {\n var found = string.lastIndexOf(lines[0])\n if (found == -1) continue search\n return {from: Pos(line, adjustPos(orig, string, found, fold)),\n to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold))}\n } else {\n var lastLine = lines[lines.length - 1]\n if (string.slice(0, lastLine.length) != lastLine) continue search\n for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++)\n if (fold(doc.getLine(start + i)) != lines[i]) continue search\n var top = doc.getLine(line + 1 - lines.length), topString = fold(top)\n if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search\n return {from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)),\n to: Pos(line, adjustPos(orig, string, lastLine.length, fold))}\n }\n }\n }\n\n function SearchCursor(doc, query, pos, options) {\n this.atOccurrence = false\n this.afterEmptyMatch = false\n this.doc = doc\n pos = pos ? doc.clipPos(pos) : Pos(0, 0)\n this.pos = {from: pos, to: pos}\n\n var caseFold\n if (typeof options == "object") {\n caseFold = options.caseFold\n } else { // Backwards compat for when caseFold was the 4th argument\n caseFold = options\n options = null\n }\n\n if (typeof query == "string") {\n if (caseFold == null) caseFold = false\n this.matches = function(reverse, pos) {\n return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold)\n }\n } else {\n query = ensureFlags(query, "gm")\n if (!options || options.multiline !== false)\n this.matches = function(reverse, pos) {\n return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos)\n }\n else\n this.matches = function(reverse, pos) {\n return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos)\n }\n }\n }\n\n SearchCursor.prototype = {\n findNext: function() {return this.find(false)},\n findPrevious: function() {return this.find(true)},\n\n find: function(reverse) {\n var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);\n if (this.afterEmptyMatch && this.atOccurrence) {\n // do not return the same 0 width match twice\n head = Pos(head.line, head.ch)\n if (reverse) {\n head.ch--;\n if (head.ch < 0) {\n head.line--;\n head.ch = (this.doc.getLine(head.line) || "").length;\n }\n } else {\n head.ch++;\n if (head.ch > (this.doc.getLine(head.line) || "").length) {\n head.ch = 0;\n head.line++;\n }\n }\n if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) {\n return this.atOccurrence = false\n }\n }\n var result = this.matches(reverse, head)\n this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0\n\n if (result) {\n this.pos = result\n this.atOccurrence = true\n return this.pos.match || true\n } else {\n var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0)\n this.pos = {from: end, to: end}\n return this.atOccurrence = false\n }\n },\n\n from: function() {if (this.atOccurrence) return this.pos.from},\n to: function() {if (this.atOccurrence) return this.pos.to},\n\n replace: function(newText, origin) {\n if (!this.atOccurrence) return\n var lines = CodeMirror.splitLines(newText)\n this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin)\n this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0))\n }\n }\n\n CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) {\n return new SearchCursor(this.doc, query, pos, caseFold)\n })\n CodeMirror.defineDocExtension("getSearchCursor", function(query, pos, caseFold) {\n return new SearchCursor(this, query, pos, caseFold)\n })\n\n CodeMirror.defineExtension("selectMatches", function(query, caseFold) {\n var ranges = []\n var cur = this.getSearchCursor(query, this.getCursor("from"), caseFold)\n while (cur.findNext()) {\n if (CodeMirror.cmpPos(cur.to(), this.getCursor("to")) > 0) break\n ranges.push({anchor: cur.from(), head: cur.to()})\n }\n if (ranges.length)\n this.setSelections(ranges, 0)\n })\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/search/searchcursor.js?')},"./node_modules/codemirror/addon/selection/active-line.js":
/*!****************************************************************!*\
!*** ./node_modules/codemirror/addon/selection/active-line.js ***!
\****************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n var WRAP_CLASS = "CodeMirror-activeline";\n var BACK_CLASS = "CodeMirror-activeline-background";\n var GUTT_CLASS = "CodeMirror-activeline-gutter";\n\n CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {\n var prev = old == CodeMirror.Init ? false : old;\n if (val == prev) return\n if (prev) {\n cm.off("beforeSelectionChange", selectionChange);\n clearActiveLines(cm);\n delete cm.state.activeLines;\n }\n if (val) {\n cm.state.activeLines = [];\n updateActiveLines(cm, cm.listSelections());\n cm.on("beforeSelectionChange", selectionChange);\n }\n });\n\n function clearActiveLines(cm) {\n for (var i = 0; i < cm.state.activeLines.length; i++) {\n cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);\n cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);\n cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);\n }\n }\n\n function sameArray(a, b) {\n if (a.length != b.length) return false;\n for (var i = 0; i < a.length; i++)\n if (a[i] != b[i]) return false;\n return true;\n }\n\n function updateActiveLines(cm, ranges) {\n var active = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n var option = cm.getOption("styleActiveLine");\n if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())\n continue\n var line = cm.getLineHandleVisualStart(range.head.line);\n if (active[active.length - 1] != line) active.push(line);\n }\n if (sameArray(cm.state.activeLines, active)) return;\n cm.operation(function() {\n clearActiveLines(cm);\n for (var i = 0; i < active.length; i++) {\n cm.addLineClass(active[i], "wrap", WRAP_CLASS);\n cm.addLineClass(active[i], "background", BACK_CLASS);\n cm.addLineClass(active[i], "gutter", GUTT_CLASS);\n }\n cm.state.activeLines = active;\n });\n }\n\n function selectionChange(cm, sel) {\n updateActiveLines(cm, sel.ranges);\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/selection/active-line.js?')},"./node_modules/codemirror/addon/selection/mark-selection.js":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/addon/selection/mark-selection.js ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Because sometimes you need to mark the selected *text*.\n//\n// Adds an option \'styleSelectedText\' which, when enabled, gives\n// selected text the CSS class given as option value, or\n// "CodeMirror-selectedtext" when the value is not a string.\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) {\n var prev = old && old != CodeMirror.Init;\n if (val && !prev) {\n cm.state.markedSelection = [];\n cm.state.markedSelectionStyle = typeof val == "string" ? val : "CodeMirror-selectedtext";\n reset(cm);\n cm.on("cursorActivity", onCursorActivity);\n cm.on("change", onChange);\n } else if (!val && prev) {\n cm.off("cursorActivity", onCursorActivity);\n cm.off("change", onChange);\n clear(cm);\n cm.state.markedSelection = cm.state.markedSelectionStyle = null;\n }\n });\n\n function onCursorActivity(cm) {\n if (cm.state.markedSelection)\n cm.operation(function() { update(cm); });\n }\n\n function onChange(cm) {\n if (cm.state.markedSelection && cm.state.markedSelection.length)\n cm.operation(function() { clear(cm); });\n }\n\n var CHUNK_SIZE = 8;\n var Pos = CodeMirror.Pos;\n var cmp = CodeMirror.cmpPos;\n\n function coverRange(cm, from, to, addAt) {\n if (cmp(from, to) == 0) return;\n var array = cm.state.markedSelection;\n var cls = cm.state.markedSelectionStyle;\n for (var line = from.line;;) {\n var start = line == from.line ? from : Pos(line, 0);\n var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;\n var end = atEnd ? to : Pos(endLine, 0);\n var mark = cm.markText(start, end, {className: cls});\n if (addAt == null) array.push(mark);\n else array.splice(addAt++, 0, mark);\n if (atEnd) break;\n line = endLine;\n }\n }\n\n function clear(cm) {\n var array = cm.state.markedSelection;\n for (var i = 0; i < array.length; ++i) array[i].clear();\n array.length = 0;\n }\n\n function reset(cm) {\n clear(cm);\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++)\n coverRange(cm, ranges[i].from(), ranges[i].to());\n }\n\n function update(cm) {\n if (!cm.somethingSelected()) return clear(cm);\n if (cm.listSelections().length > 1) return reset(cm);\n\n var from = cm.getCursor("start"), to = cm.getCursor("end");\n\n var array = cm.state.markedSelection;\n if (!array.length) return coverRange(cm, from, to);\n\n var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();\n if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE ||\n cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)\n return reset(cm);\n\n while (cmp(from, coverStart.from) > 0) {\n array.shift().clear();\n coverStart = array[0].find();\n }\n if (cmp(from, coverStart.from) < 0) {\n if (coverStart.to.line - from.line < CHUNK_SIZE) {\n array.shift().clear();\n coverRange(cm, from, coverStart.to, 0);\n } else {\n coverRange(cm, from, coverStart.from, 0);\n }\n }\n\n while (cmp(to, coverEnd.to) < 0) {\n array.pop().clear();\n coverEnd = array[array.length - 1].find();\n }\n if (cmp(to, coverEnd.to) > 0) {\n if (to.line - coverEnd.from.line < CHUNK_SIZE) {\n array.pop().clear();\n coverRange(cm, coverEnd.from, to);\n } else {\n coverRange(cm, coverEnd.to, to);\n }\n }\n }\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/addon/selection/mark-selection.js?')},"./node_modules/codemirror/keymap/sublime.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/keymap/sublime.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// A rough approximation of Sublime Text\'s keybindings\n// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../addon/search/searchcursor */ "./node_modules/codemirror/addon/search/searchcursor.js"), __webpack_require__(/*! ../addon/edit/matchbrackets */ "./node_modules/codemirror/addon/edit/matchbrackets.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var cmds = CodeMirror.commands;\n var Pos = CodeMirror.Pos;\n\n // This is not exactly Sublime\'s algorithm. I couldn\'t make heads or tails of that.\n function findPosSubword(doc, start, dir) {\n if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));\n var line = doc.getLine(start.line);\n if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));\n var state = "start", type, startPos = start.ch;\n for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {\n var next = line.charAt(dir < 0 ? pos - 1 : pos);\n var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o";\n if (cat == "w" && next.toUpperCase() == next) cat = "W";\n if (state == "start") {\n if (cat != "o") { state = "in"; type = cat; }\n else startPos = pos + dir\n } else if (state == "in") {\n if (type != cat) {\n if (type == "w" && cat == "W" && dir < 0) pos--;\n if (type == "W" && cat == "w" && dir > 0) { // From uppercase to lowercase\n if (pos == startPos + 1) { type = "w"; continue; }\n else pos--;\n }\n break;\n }\n }\n }\n return Pos(start.line, pos);\n }\n\n function moveSubword(cm, dir) {\n cm.extendSelectionsBy(function(range) {\n if (cm.display.shift || cm.doc.extend || range.empty())\n return findPosSubword(cm.doc, range.head, dir);\n else\n return dir < 0 ? range.from() : range.to();\n });\n }\n\n cmds.goSubwordLeft = function(cm) { moveSubword(cm, -1); };\n cmds.goSubwordRight = function(cm) { moveSubword(cm, 1); };\n\n cmds.scrollLineUp = function(cm) {\n var info = cm.getScrollInfo();\n if (!cm.somethingSelected()) {\n var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local");\n if (cm.getCursor().line >= visibleBottomLine)\n cm.execCommand("goLineUp");\n }\n cm.scrollTo(null, info.top - cm.defaultTextHeight());\n };\n cmds.scrollLineDown = function(cm) {\n var info = cm.getScrollInfo();\n if (!cm.somethingSelected()) {\n var visibleTopLine = cm.lineAtHeight(info.top, "local")+1;\n if (cm.getCursor().line <= visibleTopLine)\n cm.execCommand("goLineDown");\n }\n cm.scrollTo(null, info.top + cm.defaultTextHeight());\n };\n\n cmds.splitSelectionByLine = function(cm) {\n var ranges = cm.listSelections(), lineRanges = [];\n for (var i = 0; i < ranges.length; i++) {\n var from = ranges[i].from(), to = ranges[i].to();\n for (var line = from.line; line <= to.line; ++line)\n if (!(to.line > from.line && line == to.line && to.ch == 0))\n lineRanges.push({anchor: line == from.line ? from : Pos(line, 0),\n head: line == to.line ? to : Pos(line)});\n }\n cm.setSelections(lineRanges, 0);\n };\n\n cmds.singleSelectionTop = function(cm) {\n var range = cm.listSelections()[0];\n cm.setSelection(range.anchor, range.head, {scroll: false});\n };\n\n cmds.selectLine = function(cm) {\n var ranges = cm.listSelections(), extended = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n extended.push({anchor: Pos(range.from().line, 0),\n head: Pos(range.to().line + 1, 0)});\n }\n cm.setSelections(extended);\n };\n\n function insertLine(cm, above) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n cm.operation(function() {\n var len = cm.listSelections().length, newSelection = [], last = -1;\n for (var i = 0; i < len; i++) {\n var head = cm.listSelections()[i].head;\n if (head.line <= last) continue;\n var at = Pos(head.line + (above ? 0 : 1), 0);\n cm.replaceRange("\\n", at, null, "+insertLine");\n cm.indentLine(at.line, null, true);\n newSelection.push({head: at, anchor: at});\n last = head.line + 1;\n }\n cm.setSelections(newSelection);\n });\n cm.execCommand("indentAuto");\n }\n\n cmds.insertLineAfter = function(cm) { return insertLine(cm, false); };\n\n cmds.insertLineBefore = function(cm) { return insertLine(cm, true); };\n\n function wordAt(cm, pos) {\n var start = pos.ch, end = start, line = cm.getLine(pos.line);\n while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start;\n while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end;\n return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)};\n }\n\n cmds.selectNextOccurrence = function(cm) {\n var from = cm.getCursor("from"), to = cm.getCursor("to");\n var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel;\n if (CodeMirror.cmpPos(from, to) == 0) {\n var word = wordAt(cm, from);\n if (!word.word) return;\n cm.setSelection(word.from, word.to);\n fullWord = true;\n } else {\n var text = cm.getRange(from, to);\n var query = fullWord ? new RegExp("\\\\b" + text + "\\\\b") : text;\n var cur = cm.getSearchCursor(query, to);\n var found = cur.findNext();\n if (!found) {\n cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));\n found = cur.findNext();\n }\n if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return\n cm.addSelection(cur.from(), cur.to());\n }\n if (fullWord)\n cm.state.sublimeFindFullWord = cm.doc.sel;\n };\n\n cmds.skipAndSelectNextOccurrence = function(cm) {\n var prevAnchor = cm.getCursor("anchor"), prevHead = cm.getCursor("head");\n cmds.selectNextOccurrence(cm);\n if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) {\n cm.doc.setSelections(cm.doc.listSelections()\n .filter(function (sel) {\n return sel.anchor != prevAnchor || sel.head != prevHead;\n }));\n }\n }\n\n function addCursorToSelection(cm, dir) {\n var ranges = cm.listSelections(), newRanges = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n var newAnchor = cm.findPosV(\n range.anchor, dir, "line", range.anchor.goalColumn);\n var newHead = cm.findPosV(\n range.head, dir, "line", range.head.goalColumn);\n newAnchor.goalColumn = range.anchor.goalColumn != null ?\n range.anchor.goalColumn : cm.cursorCoords(range.anchor, "div").left;\n newHead.goalColumn = range.head.goalColumn != null ?\n range.head.goalColumn : cm.cursorCoords(range.head, "div").left;\n var newRange = {anchor: newAnchor, head: newHead};\n newRanges.push(range);\n newRanges.push(newRange);\n }\n cm.setSelections(newRanges);\n }\n cmds.addCursorToPrevLine = function(cm) { addCursorToSelection(cm, -1); };\n cmds.addCursorToNextLine = function(cm) { addCursorToSelection(cm, 1); };\n\n function isSelectedRange(ranges, from, to) {\n for (var i = 0; i < ranges.length; i++)\n if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 &&\n CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true\n return false\n }\n\n var mirror = "(){}[]";\n function selectBetweenBrackets(cm) {\n var ranges = cm.listSelections(), newRanges = []\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], pos = range.head, opening = cm.scanForBracket(pos, -1);\n if (!opening) return false;\n for (;;) {\n var closing = cm.scanForBracket(pos, 1);\n if (!closing) return false;\n if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) {\n var startPos = Pos(opening.pos.line, opening.pos.ch + 1);\n if (CodeMirror.cmpPos(startPos, range.from()) == 0 &&\n CodeMirror.cmpPos(closing.pos, range.to()) == 0) {\n opening = cm.scanForBracket(opening.pos, -1);\n if (!opening) return false;\n } else {\n newRanges.push({anchor: startPos, head: closing.pos});\n break;\n }\n }\n pos = Pos(closing.pos.line, closing.pos.ch + 1);\n }\n }\n cm.setSelections(newRanges);\n return true;\n }\n\n cmds.selectScope = function(cm) {\n selectBetweenBrackets(cm) || cm.execCommand("selectAll");\n };\n cmds.selectBetweenBrackets = function(cm) {\n if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;\n };\n\n function puncType(type) {\n return !type ? null : /\\bpunctuation\\b/.test(type) ? type : undefined\n }\n\n cmds.goToBracket = function(cm) {\n cm.extendSelectionsBy(function(range) {\n var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head)));\n if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;\n var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1))));\n return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;\n });\n };\n\n cmds.swapLineUp = function(cm) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), linesToMove = [], at = cm.firstLine() - 1, newSels = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], from = range.from().line - 1, to = range.to().line;\n newSels.push({anchor: Pos(range.anchor.line - 1, range.anchor.ch),\n head: Pos(range.head.line - 1, range.head.ch)});\n if (range.to().ch == 0 && !range.empty()) --to;\n if (from > at) linesToMove.push(from, to);\n else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n at = to;\n }\n cm.operation(function() {\n for (var i = 0; i < linesToMove.length; i += 2) {\n var from = linesToMove[i], to = linesToMove[i + 1];\n var line = cm.getLine(from);\n cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");\n if (to > cm.lastLine())\n cm.replaceRange("\\n" + line, Pos(cm.lastLine()), null, "+swapLine");\n else\n cm.replaceRange(line + "\\n", Pos(to, 0), null, "+swapLine");\n }\n cm.setSelections(newSels);\n cm.scrollIntoView();\n });\n };\n\n cmds.swapLineDown = function(cm) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), linesToMove = [], at = cm.lastLine() + 1;\n for (var i = ranges.length - 1; i >= 0; i--) {\n var range = ranges[i], from = range.to().line + 1, to = range.from().line;\n if (range.to().ch == 0 && !range.empty()) from--;\n if (from < at) linesToMove.push(from, to);\n else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n at = to;\n }\n cm.operation(function() {\n for (var i = linesToMove.length - 2; i >= 0; i -= 2) {\n var from = linesToMove[i], to = linesToMove[i + 1];\n var line = cm.getLine(from);\n if (from == cm.lastLine())\n cm.replaceRange("", Pos(from - 1), Pos(from), "+swapLine");\n else\n cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");\n cm.replaceRange(line + "\\n", Pos(to, 0), null, "+swapLine");\n }\n cm.scrollIntoView();\n });\n };\n\n cmds.toggleCommentIndented = function(cm) {\n cm.toggleComment({ indent: true });\n }\n\n cmds.joinLines = function(cm) {\n var ranges = cm.listSelections(), joined = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], from = range.from();\n var start = from.line, end = range.to().line;\n while (i < ranges.length - 1 && ranges[i + 1].from().line == end)\n end = ranges[++i].to().line;\n joined.push({start: start, end: end, anchor: !range.empty() && from});\n }\n cm.operation(function() {\n var offset = 0, ranges = [];\n for (var i = 0; i < joined.length; i++) {\n var obj = joined[i];\n var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), head;\n for (var line = obj.start; line <= obj.end; line++) {\n var actual = line - offset;\n if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1);\n if (actual < cm.lastLine()) {\n cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\\s*/.exec(cm.getLine(actual + 1))[0].length));\n ++offset;\n }\n }\n ranges.push({anchor: anchor || head, head: head});\n }\n cm.setSelections(ranges, 0);\n });\n };\n\n cmds.duplicateLine = function(cm) {\n cm.operation(function() {\n var rangeCount = cm.listSelections().length;\n for (var i = 0; i < rangeCount; i++) {\n var range = cm.listSelections()[i];\n if (range.empty())\n cm.replaceRange(cm.getLine(range.head.line) + "\\n", Pos(range.head.line, 0));\n else\n cm.replaceRange(cm.getRange(range.from(), range.to()), range.from());\n }\n cm.scrollIntoView();\n });\n };\n\n\n function sortLines(cm, caseSensitive, direction) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), toSort = [], selected;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.empty()) continue;\n var from = range.from().line, to = range.to().line;\n while (i < ranges.length - 1 && ranges[i + 1].from().line == to)\n to = ranges[++i].to().line;\n if (!ranges[i].to().ch) to--;\n toSort.push(from, to);\n }\n if (toSort.length) selected = true;\n else toSort.push(cm.firstLine(), cm.lastLine());\n\n cm.operation(function() {\n var ranges = [];\n for (var i = 0; i < toSort.length; i += 2) {\n var from = toSort[i], to = toSort[i + 1];\n var start = Pos(from, 0), end = Pos(to);\n var lines = cm.getRange(start, end, false);\n if (caseSensitive)\n lines.sort(function(a, b) { return a < b ? -direction : a == b ? 0 : direction; });\n else\n lines.sort(function(a, b) {\n var au = a.toUpperCase(), bu = b.toUpperCase();\n if (au != bu) { a = au; b = bu; }\n return a < b ? -direction : a == b ? 0 : direction;\n });\n cm.replaceRange(lines, start, end);\n if (selected) ranges.push({anchor: start, head: Pos(to + 1, 0)});\n }\n if (selected) cm.setSelections(ranges, 0);\n });\n }\n\n cmds.sortLines = function(cm) { sortLines(cm, true, 1); };\n cmds.reverseSortLines = function(cm) { sortLines(cm, true, -1); };\n cmds.sortLinesInsensitive = function(cm) { sortLines(cm, false, 1); };\n cmds.reverseSortLinesInsensitive = function(cm) { sortLines(cm, false, -1); };\n\n cmds.nextBookmark = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) while (marks.length) {\n var current = marks.shift();\n var found = current.find();\n if (found) {\n marks.push(current);\n return cm.setSelection(found.from, found.to);\n }\n }\n };\n\n cmds.prevBookmark = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) while (marks.length) {\n marks.unshift(marks.pop());\n var found = marks[marks.length - 1].find();\n if (!found)\n marks.pop();\n else\n return cm.setSelection(found.from, found.to);\n }\n };\n\n cmds.toggleBookmark = function(cm) {\n var ranges = cm.listSelections();\n var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []);\n for (var i = 0; i < ranges.length; i++) {\n var from = ranges[i].from(), to = ranges[i].to();\n var found = ranges[i].empty() ? cm.findMarksAt(from) : cm.findMarks(from, to);\n for (var j = 0; j < found.length; j++) {\n if (found[j].sublimeBookmark) {\n found[j].clear();\n for (var k = 0; k < marks.length; k++)\n if (marks[k] == found[j])\n marks.splice(k--, 1);\n break;\n }\n }\n if (j == found.length)\n marks.push(cm.markText(from, to, {sublimeBookmark: true, clearWhenEmpty: false}));\n }\n };\n\n cmds.clearBookmarks = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear();\n marks.length = 0;\n };\n\n cmds.selectBookmarks = function(cm) {\n var marks = cm.state.sublimeBookmarks, ranges = [];\n if (marks) for (var i = 0; i < marks.length; i++) {\n var found = marks[i].find();\n if (!found)\n marks.splice(i--, 0);\n else\n ranges.push({anchor: found.from, head: found.to});\n }\n if (ranges.length)\n cm.setSelections(ranges, 0);\n };\n\n function modifyWordOrSelection(cm, mod) {\n cm.operation(function() {\n var ranges = cm.listSelections(), indices = [], replacements = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.empty()) { indices.push(i); replacements.push(""); }\n else replacements.push(mod(cm.getRange(range.from(), range.to())));\n }\n cm.replaceSelections(replacements, "around", "case");\n for (var i = indices.length - 1, at; i >= 0; i--) {\n var range = ranges[indices[i]];\n if (at && CodeMirror.cmpPos(range.head, at) > 0) continue;\n var word = wordAt(cm, range.head);\n at = word.from;\n cm.replaceRange(mod(word.word), word.from, word.to);\n }\n });\n }\n\n cmds.smartBackspace = function(cm) {\n if (cm.somethingSelected()) return CodeMirror.Pass;\n\n cm.operation(function() {\n var cursors = cm.listSelections();\n var indentUnit = cm.getOption("indentUnit");\n\n for (var i = cursors.length - 1; i >= 0; i--) {\n var cursor = cursors[i].head;\n var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor);\n var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize"));\n\n // Delete by one character by default\n var deletePos = cm.findPosH(cursor, -1, "char", false);\n\n if (toStartOfLine && !/\\S/.test(toStartOfLine) && column % indentUnit == 0) {\n var prevIndent = new Pos(cursor.line,\n CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));\n\n // Smart delete only if we found a valid prevIndent location\n if (prevIndent.ch != cursor.ch) deletePos = prevIndent;\n }\n\n cm.replaceRange("", deletePos, cursor, "+delete");\n }\n });\n };\n\n cmds.delLineRight = function(cm) {\n cm.operation(function() {\n var ranges = cm.listSelections();\n for (var i = ranges.length - 1; i >= 0; i--)\n cm.replaceRange("", ranges[i].anchor, Pos(ranges[i].to().line), "+delete");\n cm.scrollIntoView();\n });\n };\n\n cmds.upcaseAtCursor = function(cm) {\n modifyWordOrSelection(cm, function(str) { return str.toUpperCase(); });\n };\n cmds.downcaseAtCursor = function(cm) {\n modifyWordOrSelection(cm, function(str) { return str.toLowerCase(); });\n };\n\n cmds.setSublimeMark = function(cm) {\n if (cm.state.sublimeMark) cm.state.sublimeMark.clear();\n cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n };\n cmds.selectToSublimeMark = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) cm.setSelection(cm.getCursor(), found);\n };\n cmds.deleteToSublimeMark = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) {\n var from = cm.getCursor(), to = found;\n if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; }\n cm.state.sublimeKilled = cm.getRange(from, to);\n cm.replaceRange("", from, to);\n }\n };\n cmds.swapWithSublimeMark = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) {\n cm.state.sublimeMark.clear();\n cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n cm.setCursor(found);\n }\n };\n cmds.sublimeYank = function(cm) {\n if (cm.state.sublimeKilled != null)\n cm.replaceSelection(cm.state.sublimeKilled, null, "paste");\n };\n\n cmds.showInCenter = function(cm) {\n var pos = cm.cursorCoords(null, "local");\n cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);\n };\n\n function getTarget(cm) {\n var from = cm.getCursor("from"), to = cm.getCursor("to");\n if (CodeMirror.cmpPos(from, to) == 0) {\n var word = wordAt(cm, from);\n if (!word.word) return;\n from = word.from;\n to = word.to;\n }\n return {from: from, to: to, query: cm.getRange(from, to), word: word};\n }\n\n function findAndGoTo(cm, forward) {\n var target = getTarget(cm);\n if (!target) return;\n var query = target.query;\n var cur = cm.getSearchCursor(query, forward ? target.to : target.from);\n\n if (forward ? cur.findNext() : cur.findPrevious()) {\n cm.setSelection(cur.from(), cur.to());\n } else {\n cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0)\n : cm.clipPos(Pos(cm.lastLine())));\n if (forward ? cur.findNext() : cur.findPrevious())\n cm.setSelection(cur.from(), cur.to());\n else if (target.word)\n cm.setSelection(target.from, target.to);\n }\n };\n cmds.findUnder = function(cm) { findAndGoTo(cm, true); };\n cmds.findUnderPrevious = function(cm) { findAndGoTo(cm,false); };\n cmds.findAllUnder = function(cm) {\n var target = getTarget(cm);\n if (!target) return;\n var cur = cm.getSearchCursor(target.query);\n var matches = [];\n var primaryIndex = -1;\n while (cur.findNext()) {\n matches.push({anchor: cur.from(), head: cur.to()});\n if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch)\n primaryIndex++;\n }\n cm.setSelections(matches, primaryIndex);\n };\n\n\n var keyMap = CodeMirror.keyMap;\n keyMap.macSublime = {\n "Cmd-Left": "goLineStartSmart",\n "Shift-Tab": "indentLess",\n "Shift-Ctrl-K": "deleteLine",\n "Alt-Q": "wrapLines",\n "Ctrl-Left": "goSubwordLeft",\n "Ctrl-Right": "goSubwordRight",\n "Ctrl-Alt-Up": "scrollLineUp",\n "Ctrl-Alt-Down": "scrollLineDown",\n "Cmd-L": "selectLine",\n "Shift-Cmd-L": "splitSelectionByLine",\n "Esc": "singleSelectionTop",\n "Cmd-Enter": "insertLineAfter",\n "Shift-Cmd-Enter": "insertLineBefore",\n "Cmd-D": "selectNextOccurrence",\n "Shift-Cmd-Space": "selectScope",\n "Shift-Cmd-M": "selectBetweenBrackets",\n "Cmd-M": "goToBracket",\n "Cmd-Ctrl-Up": "swapLineUp",\n "Cmd-Ctrl-Down": "swapLineDown",\n "Cmd-/": "toggleCommentIndented",\n "Cmd-J": "joinLines",\n "Shift-Cmd-D": "duplicateLine",\n "F5": "sortLines",\n "Shift-F5": "reverseSortLines",\n "Cmd-F5": "sortLinesInsensitive",\n "Shift-Cmd-F5": "reverseSortLinesInsensitive",\n "F2": "nextBookmark",\n "Shift-F2": "prevBookmark",\n "Cmd-F2": "toggleBookmark",\n "Shift-Cmd-F2": "clearBookmarks",\n "Alt-F2": "selectBookmarks",\n "Backspace": "smartBackspace",\n "Cmd-K Cmd-D": "skipAndSelectNextOccurrence",\n "Cmd-K Cmd-K": "delLineRight",\n "Cmd-K Cmd-U": "upcaseAtCursor",\n "Cmd-K Cmd-L": "downcaseAtCursor",\n "Cmd-K Cmd-Space": "setSublimeMark",\n "Cmd-K Cmd-A": "selectToSublimeMark",\n "Cmd-K Cmd-W": "deleteToSublimeMark",\n "Cmd-K Cmd-X": "swapWithSublimeMark",\n "Cmd-K Cmd-Y": "sublimeYank",\n "Cmd-K Cmd-C": "showInCenter",\n "Cmd-K Cmd-G": "clearBookmarks",\n "Cmd-K Cmd-Backspace": "delLineLeft",\n "Cmd-K Cmd-1": "foldAll",\n "Cmd-K Cmd-0": "unfoldAll",\n "Cmd-K Cmd-J": "unfoldAll",\n "Ctrl-Shift-Up": "addCursorToPrevLine",\n "Ctrl-Shift-Down": "addCursorToNextLine",\n "Cmd-F3": "findUnder",\n "Shift-Cmd-F3": "findUnderPrevious",\n "Alt-F3": "findAllUnder",\n "Shift-Cmd-[": "fold",\n "Shift-Cmd-]": "unfold",\n "Cmd-I": "findIncremental",\n "Shift-Cmd-I": "findIncrementalReverse",\n "Cmd-H": "replace",\n "F3": "findNext",\n "Shift-F3": "findPrev",\n "fallthrough": "macDefault"\n };\n CodeMirror.normalizeKeyMap(keyMap.macSublime);\n\n keyMap.pcSublime = {\n "Shift-Tab": "indentLess",\n "Shift-Ctrl-K": "deleteLine",\n "Alt-Q": "wrapLines",\n "Ctrl-T": "transposeChars",\n "Alt-Left": "goSubwordLeft",\n "Alt-Right": "goSubwordRight",\n "Ctrl-Up": "scrollLineUp",\n "Ctrl-Down": "scrollLineDown",\n "Ctrl-L": "selectLine",\n "Shift-Ctrl-L": "splitSelectionByLine",\n "Esc": "singleSelectionTop",\n "Ctrl-Enter": "insertLineAfter",\n "Shift-Ctrl-Enter": "insertLineBefore",\n "Ctrl-D": "selectNextOccurrence",\n "Shift-Ctrl-Space": "selectScope",\n "Shift-Ctrl-M": "selectBetweenBrackets",\n "Ctrl-M": "goToBracket",\n "Shift-Ctrl-Up": "swapLineUp",\n "Shift-Ctrl-Down": "swapLineDown",\n "Ctrl-/": "toggleCommentIndented",\n "Ctrl-J": "joinLines",\n "Shift-Ctrl-D": "duplicateLine",\n "F9": "sortLines",\n "Shift-F9": "reverseSortLines",\n "Ctrl-F9": "sortLinesInsensitive",\n "Shift-Ctrl-F9": "reverseSortLinesInsensitive",\n "F2": "nextBookmark",\n "Shift-F2": "prevBookmark",\n "Ctrl-F2": "toggleBookmark",\n "Shift-Ctrl-F2": "clearBookmarks",\n "Alt-F2": "selectBookmarks",\n "Backspace": "smartBackspace",\n "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence",\n "Ctrl-K Ctrl-K": "delLineRight",\n "Ctrl-K Ctrl-U": "upcaseAtCursor",\n "Ctrl-K Ctrl-L": "downcaseAtCursor",\n "Ctrl-K Ctrl-Space": "setSublimeMark",\n "Ctrl-K Ctrl-A": "selectToSublimeMark",\n "Ctrl-K Ctrl-W": "deleteToSublimeMark",\n "Ctrl-K Ctrl-X": "swapWithSublimeMark",\n "Ctrl-K Ctrl-Y": "sublimeYank",\n "Ctrl-K Ctrl-C": "showInCenter",\n "Ctrl-K Ctrl-G": "clearBookmarks",\n "Ctrl-K Ctrl-Backspace": "delLineLeft",\n "Ctrl-K Ctrl-1": "foldAll",\n "Ctrl-K Ctrl-0": "unfoldAll",\n "Ctrl-K Ctrl-J": "unfoldAll",\n "Ctrl-Alt-Up": "addCursorToPrevLine",\n "Ctrl-Alt-Down": "addCursorToNextLine",\n "Ctrl-F3": "findUnder",\n "Shift-Ctrl-F3": "findUnderPrevious",\n "Alt-F3": "findAllUnder",\n "Shift-Ctrl-[": "fold",\n "Shift-Ctrl-]": "unfold",\n "Ctrl-I": "findIncremental",\n "Shift-Ctrl-I": "findIncrementalReverse",\n "Ctrl-H": "replace",\n "F3": "findNext",\n "Shift-F3": "findPrev",\n "fallthrough": "pcDefault"\n };\n CodeMirror.normalizeKeyMap(keyMap.pcSublime);\n\n var mac = keyMap.default == keyMap.macDefault;\n keyMap.sublime = mac ? keyMap.macSublime : keyMap.pcSublime;\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/keymap/sublime.js?')},"./node_modules/codemirror/lib/codemirror.css":
/*!****************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.css ***!
\****************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/lib/codemirror.css?")},"./node_modules/codemirror/lib/codemirror.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// This is CodeMirror (https://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser\'s DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n true ? module.exports = factory() :\n undefined;\n}(this, (function () { \'use strict\';\n\n // Kludges for bugs and behavior differences that can\'t be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\//.test(userAgent);\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = safari && (/Mobile\\/\\w+/.test(userAgent) || navigator.maxTouchPoints > 2);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp("(^|\\\\s)" + cls + "(?:$|\\\\s)\\\\s*") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : "");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute("role", "presentation");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n }; }\n else { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd("character", end);\n r.moveStart("character", start);\n return r\n }; }\n\n function contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n }\n\n function activeElt() {\n // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var activeElement;\n try {\n activeElement = document.activeElement;\n } catch(e) {\n activeElement = document.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n }\n\n function addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }\n }\n function joinClasses(a, b) {\n var as = a.split(" ");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }\n return b\n }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n else if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n }\n\n function copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n }\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf("\\t", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n }\n\n var Delayed = function() {\n this.id = null;\n this.f = null;\n this.time = 0;\n this.handler = bind(this.onTimeout, this);\n };\n Delayed.prototype.onTimeout = function (self) {\n self.id = 0;\n if (self.time <= +new Date) {\n self.f();\n } else {\n setTimeout(self.handler, self.time - +new Date);\n }\n };\n Delayed.prototype.set = function (ms, f) {\n this.f = f;\n var time = +new Date + ms;\n if (!this.id || time < this.time) {\n clearTimeout(this.id);\n this.id = setTimeout(this.handler, ms);\n this.time = time;\n }\n };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n }\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 50;\n\n // Returned or thrown by various protocols to signal \'I\'m not\n // handling this\'.\n var Pass = {toString: function(){return "CodeMirror.Pass"}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf("\\t", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }\n\n var spaceStrs = [""];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + " "); }\n return spaceStrs[n]\n }\n\n function lst(arr) { return arr[arr.length-1] }\n\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n }\n\n function insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n function isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > "\\x80" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n }\n function isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf("\\\\w") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n }\n\n function isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n }\n\n // Returns the value from the range [`from`; `to`] that satisfies\n // `pred` and is closest to `from`. Assumes that at least `to`\n // satisfies `pred`. Supports `from` being greater than `to`.\n function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don\'t know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n }\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, "ltr", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);\n found = true;\n }\n }\n if (!found) { f(from, to, "ltr"); }\n }\n\n var bidiOther = null;\n function getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == "before") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != "before") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return "R" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return "r" }\n else if (0x2000 <= code && code <= 0x200b) { return "w" }\n else if (code == 0x200c) { return "b" }\n else { return "L" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == "ltr" ? "L" : "R";\n\n if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == "m") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }\n else if (type$2 == "," && prev$1 == types[i$3+1] &&\n (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == ",") { types[i$4] = "N"; }\n else if (type$3 == "%") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}\n var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == "L";\n var after = (end$1 < len ? types[end$1] : outerType) == "L";\n var replace$1 = before == after ? (before ? "L" : "R") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn\'t take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0;\n for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n at += isRTL;\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == "ltr") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == "rtl" ? order.reverse() : order\n }\n })();\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var noHandlers = [];\n\n var on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent("on" + type, f);\n } else {\n var map = emitter._handlers || (emitter._handlers = {});\n map[type] = (map[type] || noHandlers).concat(f);\n }\n };\n\n function getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n }\n\n function off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent("on" + type, f);\n } else {\n var map = emitter._handlers, arr = map && map[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n }\n\n function signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == "string")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor\'s prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n function e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n }\n function e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n }\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n }\n function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n function e_target(e) {return e.target || e.srcElement}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n }\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn\'t get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt(\'div\');\n return "draggable" in div || "dragDrop" in div\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt("span", "\\u200b");\n removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt("span", "\\u200b") :\n elt("span", "\\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");\n node.setAttribute("cm-text", "");\n return node\n }\n\n // Feature-detect IE\'s crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode("A\\u062eA"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n }\n\n // See if "".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = "\\n\\nb".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf("\\n", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == "\\r" ? nl - 1 : nl);\n var rt = line.indexOf("\\r");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n var hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n } : function (te) {\n var range;\n try {range = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range || range.parentElement() != te) { return false }\n return range.compareEndPoints("StartToEnd", range) != 0\n };\n\n var hasCopyEvent = (function () {\n var e = elt("div");\n if ("oncopy" in e) { return true }\n e.setAttribute("oncopy", "return;");\n return typeof e.oncopy == "function"\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt("span", "x"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n }\n\n // Known modes, by name and by MIME\n var modes = {}, mimeModes = {};\n\n // Extra arguments are stored as the mode\'s dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }\n\n function defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n }\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n function resolveMode(spec) {\n if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == "string") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == "string" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode("application/xml")\n } else if (typeof spec == "string" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode("application/json")\n }\n if (typeof spec == "string") { return {name: spec} }\n else { return spec || {name: "null"} }\n }\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, "text/plain") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n }\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = {};\n function extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n }\n\n function copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n }\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n }\n\n function startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n }\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n };\n\n StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n StringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n };\n StringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == "string") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n };\n StringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n };\n StringStream.prototype.eatSpace = function () {\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }\n return this.pos > start\n };\n StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n StringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n };\n StringStream.prototype.backUp = function (n) {this.pos -= n;};\n StringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == "string") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n };\n StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n StringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n };\n StringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n };\n StringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n };\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }\n\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n }\n\n // A Pos instance represents a position within the text.\n function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n }\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n function copyPos(x) {return Pos(x.line, x.ch)}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n }\n function clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n }\n\n var SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n };\n\n var Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n };\n\n Context.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n };\n\n Context.prototype.baseToken = function (n) {\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, ""),\n size: this.baseTokens[this.baseTokenPos] - n}\n };\n\n Context.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n };\n\n Context.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n };\n\n Context.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n };\n\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there\'s a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, "overlay " + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + " " : "") + "overlay " + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n }\n\n function getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don\'t save a style array. Used for lines that\n // aren\'t currently visible.\n function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == "") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error("Mode " + mode.name + " failed to advance stream.")\n }\n\n var Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n };\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n }\n\n function extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? "bgClass" : "textClass";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp("(?:^|\\\\s)" + lineClass[2] + "(?:$|\\\\s)")).test(output[prop]))\n { output[prop] += " " + lineClass[2]; }\n } }\n return type\n }\n\n // Run the given mode\'s parser over a line, calling f for each token.\n function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = "m-" + (style ? mName + " " + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n }\n\n function retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n }\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n function seeReadOnlySpans() {\n sawReadOnlySpans = true;\n }\n\n function seeCollapsedSpans() {\n sawCollapsedSpans = true;\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }\n\n // Remove a span from an array, returning undefined if no spans are\n // left (we don\'t store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }\n\n // Add a span to a line.\n function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n }\n function markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that \'stick out\' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn\'t create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n }\n\n // Remove spans that are empty and don\'t have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }\n\n // Used to \'clip\' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n function collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }\n\n function visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }\n\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n }\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n\n Line.prototype.lineNo = function () { return lineNo(this) };\n eventMixin(Line);\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line\'s height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, "cm-$&"))\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a \'line map\', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a \'border\', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);\n var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: cm.getOption("lineWrapping")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))\n { builder.content.className = "cm-tab-wrap-hack"; }\n }\n\n signal(cm, "renderLine", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }\n\n return builder\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt("span", "\\u2022", "cm-invalidchar");\n token.title = "\\\\u" + ch.charCodeAt(0).toString(16);\n token.setAttribute("aria-label", token.title);\n return token\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == "\\t") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));\n txt$1.setAttribute("role", "presentation");\n txt$1.setAttribute("cm-text", "\\t");\n builder.col += tabWidth;\n } else if (m[0] == "\\r" || m[0] == "\\n") {\n txt$1 = content.appendChild(elt("span", m[0] == "\\r" ? "\\u240d" : "\\u2424", "cm-invalidchar"));\n txt$1.setAttribute("cm-text", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute("cm-text", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css || attributes) {\n var fullStyle = style || "";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt("span", [content], fullStyle, css);\n if (attributes) {\n for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class")\n { token.setAttribute(attr, attributes[attr]); } }\n }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n }\n\n // Change some spaces to NBSP to prevent the browser from collapsing\n // trailing spaces at the end of a line when rendering text (issue #1362).\n function splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = "";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = "\\u00a0"; }\n result += ch;\n spaceBefore = ch == " ";\n }\n return result\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, css, attributes) {\n style = style ? style + " cm-force-border" : "cm-force-border";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement("span")); }\n widget.setAttribute("cm-marker", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = "", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = "";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = "";\n }\n if (m.className) { spanStyle += " " + m.className; }\n if (m.css) { css = (css ? css + ";" : "") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = "";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }\n\n var operationGroup = null;\n\n function pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n }\n\n function finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n }\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don\'t want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line\'s\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == "text") { updateLineText(cm, lineView); }\n else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == "class") { updateLineClasses(cm, lineView); }\n else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt("div", null, null, "position: relative");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n }\n\n function updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;\n if (cls) { cls += " CodeMirror-linebackground"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n }\n\n // Redraw the line\'s text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = ""; }\n var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;\n lineView.text.className = textClass || "";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,\n ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));\n gutterWrap.setAttribute("aria-hidden", "true");\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += " " + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt("div", lineNumberFor(cm.options, lineN),\n "CodeMirror-linenumber CodeMirror-gutter-elt",\n ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }\n if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",\n ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }\n } }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n var isWidget = classTest("CodeMirror-linewidget");\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (isWidget.test(node.className)) { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line\'s DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : ""));\n if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, "redraw");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + "px";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + "px";\n }\n node.style.width = width + "px";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = "relative";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }\n }\n }\n\n function widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = "position: relative;";\n if (widget.coverGutter)\n { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }\n if (widget.noHScroll)\n { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }\n removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n }\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n function paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n if (lineView.rest) {\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n }\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that\'s not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || ""), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map.length; i += 3) {\n mStart = map[i];\n mEnd = map[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = "left";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = "right"; }\n }\n if (start != null) {\n node = map[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))\n { collapse = bias; }\n if (bias == "left" && start == 0)\n { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n node = map[(i -= 3) + 2];\n collapse = "left";\n } }\n if (bias == "right" && start == mEnd - mStart)\n { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n node = map[(i += 3) + 2];\n collapse = "right";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n }\n\n function getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == "left") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = "right";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = "right"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == "right" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX() {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }\n return window.pageXOffset || (document.documentElement || document.body).scrollLeft\n }\n function pageScrollY() {\n if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }\n return window.pageYOffset || (document.documentElement || document.body).scrollTop\n }\n\n function widgetTopHeight(lineObj) {\n var ref = visualLine(lineObj);\n var widgets = ref.widgets;\n var height = 0;\n if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above)\n { height += widgetHeight(widgets[i]); } } }\n return height\n }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // "line", "div" (display.lineDiv), "local"./null (editor), "window",\n // or "page".\n function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == "line") { return rect }\n if (!context) { context = "local"; }\n var yOff = heightAtLine(lineObj);\n if (context == "local") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == "page" || context == "window") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == "window" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n }\n\n // Coverts a box from "div" coords to another coordinate system.\n // Context may be "window", "page", "div", or "local"./null.\n function fromCoordSystem(cm, coords, context) {\n if (context == "div") { return coords }\n var left = coords.left, top = coords.top;\n // First move into "page" coordinate system\n if (context == "page") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == "local" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n }\n\n // Returns a box for a given cursor position, which may have an\n // \'other\' property containing the position of the secondary cursor\n // on a bidi boundary.\n // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`\n // and after `char - 1` in writing order of `char - 1`\n // A cursor Pos(line, char, "after") is on the same visual line as `char`\n // and before `char` in writing order of `char`\n // Examples (upper-case letters are RTL, lower-case are LTR):\n // Pos(0, 1, ...)\n // before after\n // ab a|b a|b\n // aB a|B aB|\n // Ab |Ab A|b\n // AB B|A B|A\n // Every position after the last character on a line is considered to stick\n // to the last character on the line.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = "before";\n } else if (ch <= 0) {\n ch = 0;\n sticky = "after";\n }\n if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == "before");\n if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }\n return val\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line\'s\n // vertical range.\n function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = outside; }\n return pos\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local ("div" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n }\n\n function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n }\n\n function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n }\n\n // Returns true if the given side of a box is after the given\n // coordinates, in top-to-bottom, left-to-right order.\n function boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n }\n\n function coordsCharInner(cm, lineObj, lineNo, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn\'t plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part\'s range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight; box.bottom += widgetHeight;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? "after" : "before";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it\'s vertical position to the\n // coordinates\n sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?\n "after" : "before";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)\n }\n\n function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"),\n "line", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn\'t the first part, the part\'s start is also after\n // the coordinates, and the coordinates aren\'t on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"),\n "line", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n }\n\n function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don\'t correspond to the ordering in our `order` array at\n // all, so a binary search doesn\'t work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren\'t on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt("pre", null, "CodeMirror-line-like");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode("x"));\n measureText.appendChild(elt("br"));\n }\n measureText.appendChild(document.createTextNode("x"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt("span", "xxxxxxxxxx");\n var pre = elt("pre", [anchor], "CodeMirror-line-like");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don\'t interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e$1) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn\'t visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n }\n\n // Register a change to a single line. Type must be one of "text",\n // "gutter", "class", "widget"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n }\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n var customCursor = cm.options.$customCursor;\n if (customCursor) { primary = true; }\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range = doc.sel.ranges[i];\n if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }\n var collapsed = range.empty();\n if (customCursor) {\n var head = customCursor(cm, range);\n if (head) { drawSelectionCursor(cm, head, curFragment); }\n } else if (collapsed || cm.options.showCursorWhenSelecting) {\n drawSelectionCursor(cm, range.head, curFragment);\n }\n if (!collapsed)\n { drawSelectionRange(cm, range, selFragment); }\n }\n return result\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt("div", "\\u00a0", "CodeMirror-cursor"));\n cursor.style.left = pos.left + "px";\n cursor.style.top = pos.top + "px";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";\n\n if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n var charPos = charCoords(cm, head, "div", null, null);\n var width = charPos.right - charPos.left;\n cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px";\n }\n\n if (pos.other) {\n // Secondary cursor, shown when on a \'jump\' in bi-directional text\n var otherCursor = output.appendChild(elt("div", "\\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));\n otherCursor.style.display = "";\n otherCursor.style.left = pos.other.left + "px";\n otherCursor.style.top = pos.other.top + "px";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";\n }\n }\n\n function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == "ltr";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\\n height: " + (bottom - top) + "px")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), "div", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == "ltr") == (side == "after") ? "left" : "right";\n var ch = side == "after" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == "ltr";\n var fromPos = coords(from, ltr ? "left" : "right");\n var toPos = coords(to - 1, ltr ? "right" : "left");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, "before");\n botLeft = docLTR ? leftSide : wrapX(to, dir, "after");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, "after");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = "";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () {\n if (!cm.hasFocus()) { onBlur(cm); }\n display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";\n }, cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = "hidden"; }\n }\n\n function ensureFocus(cm) {\n if (!cm.hasFocus()) {\n cm.display.input.focus();\n if (!cm.state.focused) { onFocus(cm); }\n }\n }\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n if (cm.state.focused) { onBlur(cm); }\n } }, 100);\n }\n\n function onFocus(cm, e) {\n if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == "nocursor") { return }\n if (!cm.state.focused) {\n signal(cm, "focus", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, "CodeMirror-focused");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, "blur", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, "CodeMirror-focused");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);\n var oldHeight = display.lineDiv.getBoundingClientRect().top;\n var mustScroll = 0;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], wrapping = cm.options.lineWrapping;\n var height = (void 0), width = 0;\n if (cur.hidden) { continue }\n oldHeight += cur.line.height;\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n // Check that lines don\'t extend past the right of the current\n // editor width\n if (!wrapping && cur.text.firstChild)\n { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n }\n var diff = cur.line.height - height;\n if (diff > .005 || diff < -.005) {\n if (oldHeight < viewTop) { mustScroll -= diff; }\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n if (width > cm.display.sizerWidth) {\n var chWidth = Math.ceil(width / charWidth(cm.display));\n if (chWidth > cm.display.maxLineLength) {\n cm.display.maxLineLength = chWidth;\n cm.display.maxLine = cur.line;\n cm.display.maxLineChanged = true;\n }\n }\n }\n if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt("div", "\\u200b", null, ("position: absolute;\\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may \'drift\' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, "before"), pos and end are unchanged\n end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;\n pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n }\n\n function scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n }\n\n function scrollToRange(cm, range) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range;\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // \'simulates\' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }\n\n function scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n }\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n }\n\n function setScrollTop(cm, val, forceScroll) {\n val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n }\n\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }\n\n var NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");\n var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, "scroll", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }\n });\n on(horiz, "scroll", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }\n };\n\n NativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = "block";\n this.vert.style.bottom = needsH ? sWidth + "px" : "0";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";\n } else {\n this.vert.scrollTop = 0;\n this.vert.style.display = "";\n this.vert.firstChild.style.height = "0";\n }\n\n if (needsH) {\n this.horiz.style.display = "block";\n this.horiz.style.right = needsV ? sWidth + "px" : "0";\n this.horiz.style.left = measure.barLeft + "px";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";\n } else {\n this.horiz.style.display = "";\n this.horiz.firstChild.style.width = "0";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n };\n\n NativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); }\n };\n\n NativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); }\n };\n\n NativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? "12px" : "18px";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n };\n\n NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.pointerEvents = "auto";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it\'s hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt != bar) { bar.style.pointerEvents = "none"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n };\n\n NativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n };\n\n var NullScrollbars = function () {};\n\n NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n NullScrollbars.prototype.setScrollLeft = function () {};\n NullScrollbars.prototype.setScrollTop = function () {};\n NullScrollbars.prototype.clear = function () {};\n\n function updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";\n d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = "block";\n d.scrollbarFiller.style.height = sizes.bottom + "px";\n d.scrollbarFiller.style.width = sizes.right + "px";\n } else { d.scrollbarFiller.style.display = ""; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = "block";\n d.gutterFiller.style.height = sizes.bottom + "px";\n d.gutterFiller.style.width = measure.gutterWidth + "px";\n } else { d.gutterFiller.style.display = ""; }\n }\n\n var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, "mousedown", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute("cm-not-content", "true");\n }, function (pos, axis) {\n if (axis == "horizontal") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won\'t have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: 0, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId, // Unique ID\n markArrays: null // Used by addMarkedSpan\n };\n pushOperation(cm.curOp);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp;\n if (op) { finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n }); }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document\'s width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt();\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, "changes", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], "text"); }\n }); }\n }\n\n // DISPLAY DRAWING\n\n var DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we\'ll need later (but don\'t want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n };\n\n DisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n };\n DisplayUpdate.prototype.finish = function () {\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this.events[i]); }\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + "px";\n display.sizer.style.marginBottom = -display.nativeBarWidth + "px";\n display.sizer.style.borderRightWidth = scrollGap(cm) + "px";\n display.scrollbarsClipped = true;\n }\n }\n\n function selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt();\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = window.getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n }\n\n function restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }\n snapshot.activeElt.focus();\n if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&\n snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var sel = window.getSelection(), range = document.createRange();\n range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + "px";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = "none"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = ""; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n } else if (first) {\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, "update", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = "none"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n }\n\n function updateGutterSpace(display) {\n var width = display.gutters.offsetWidth;\n display.sizer.style.marginLeft = width + "px";\n // Send an event to consumers responding to changes in gutter width.\n signalLater(display, "gutterChanged", display);\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + "px";\n cm.display.heightForcer.style.top = measure.docHeight + "px";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";\n }\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + "px";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + "px"; }\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt("div", [elt("div", last)],\n "CodeMirror-linenumber CodeMirror-gutter-elt"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = "";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + "px";\n updateGutterSpace(cm.display);\n return true\n }\n return false\n }\n\n function getGutters(gutters, lineNumbers) {\n var result = [], sawLineNumbers = false;\n for (var i = 0; i < gutters.length; i++) {\n var name = gutters[i], style = null;\n if (typeof name != "string") { style = name.style; name = name.className; }\n if (name == "CodeMirror-linenumbers") {\n if (!lineNumbers) { continue }\n else { sawLineNumbers = true; }\n }\n result.push({className: name, style: style});\n }\n if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); }\n return result\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function renderGutters(display) {\n var gutters = display.gutters, specs = display.gutterSpecs;\n removeChildren(gutters);\n display.lineGutter = null;\n for (var i = 0; i < specs.length; ++i) {\n var ref = specs[i];\n var className = ref.className;\n var style = ref.style;\n var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));\n if (style) { gElt.style.cssText = style; }\n if (className == "CodeMirror-linenumbers") {\n display.lineGutter = gElt;\n gElt.style.width = (display.lineNumWidth || 1) + "px";\n }\n }\n gutters.style.display = specs.length ? "" : "none";\n updateGutterSpace(display);\n }\n\n function updateGutters(cm) {\n renderGutters(cm.display);\n regChange(cm);\n alignHorizontally(cm);\n }\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input, options) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");\n d.scrollbarFiller.setAttribute("cm-not-content", "true");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");\n d.gutterFiller.setAttribute("cm-not-content", "true");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP("div", null, "CodeMirror-code");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");\n d.cursorDiv = elt("div", null, "CodeMirror-cursors");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt("div", null, "CodeMirror-measure");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt("div", null, "CodeMirror-measure");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, "position: relative; outline: none");\n var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");\n // Moved around its parent to cover visible view.\n d.mover = elt("div", [lines], null, "position: relative");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt("div", [d.mover], "CodeMirror-sizer");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");\n // Will contain the gutters, if any.\n d.gutters = elt("div", null, "CodeMirror-gutters");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");\n d.scroller.setAttribute("tabIndex", "-1");\n // The element in which the editor lives.\n d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");\n\n // This attribute is respected by automatic translation systems such as Google Translate,\n // and may also be respected by tools used by human translators.\n d.wrapper.setAttribute(\'translate\', \'no\');\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n renderGutters(d);\n\n input.init(d);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don\'t have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) { wheelPixelsPerUnit = -.53; }\n else if (gecko) { wheelPixelsPerUnit = 15; }\n else if (chrome) { wheelPixelsPerUnit = -.7; }\n else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n function wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n }\n function wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n }\n\n function onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n var pixelsPerUnit = wheelPixelsPerUnit;\n if (e.deltaMode === 0) {\n dx = e.deltaX;\n dy = e.deltaY;\n pixelsPerUnit = 1;\n }\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there\'s nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It\'ll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && pixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // \'Project\' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && pixelsPerUnit != null) {\n var pixels = dy * pixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20 && e.deltaMode !== 0) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that\'s scrolled into\n // view, that getCursor returns, etc).\n var Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n };\n\n Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n Selection.prototype.equals = function (other) {\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n };\n\n Selection.prototype.deepCopy = function () {\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n };\n\n Selection.prototype.somethingSelected = function () {\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this.ranges[i].empty()) { return true } }\n return false\n };\n\n Selection.prototype.contains = function (pos, end) {\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n };\n\n var Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n };\n\n Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. \'Consumes\' ranges array (modifying\n // it).\n function normalizeSelection(cm, ranges, primIndex) {\n var mayTouch = cm && cm.options.selectionsMayTouch;\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n var diff = cmp(prev.to(), cur.from());\n if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n }\n\n // Compute the position of the end of a change (its \'to\' property\n // refers to the pre-change end).\n function changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n }\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be "start" or "around".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == "around") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n }\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight);\n signalLater(line, "change", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, "change", doc, change);\n }\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) { throw new Error("This document is already in use.") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n cm.options.direction = doc.direction;\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n function setDirectionClass(cm) {\n (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");\n }\n\n function directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n }\n\n function History(prev) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = prev ? prev.undoDepth : Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, or are close together with an origin that\n // allows merging (starting with "+") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == "*")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don\'t want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, "historyAdded"); }\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == "*" ||\n ch == "+" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the \'done\' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don\'t allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change["spans_" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change["spans_" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }\n\n // The \'scroll\' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, "beforeSelectionChange", doc, obj);\n if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor")\n { ensureCursorVisible(doc.cm); }\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = 1;\n doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, "cursorActivity", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n\n // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n // is with selectLeft/Right\n var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft;\n var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight;\n\n if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, "beforeCursorEnter");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? preventCursorRight : preventCursorLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? preventCursorLeft : preventCursorRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n }\n\n function selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n }\n\n // UPDATING\n\n // Allow "beforeChange" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, "beforeChange", doc, obj);\n if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }\n\n if (obj.canceled) {\n if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n return null\n }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n }\n\n // Apply a change to a document, and add it to the document\'s\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document\'s history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won\'t\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, "gutter"); }\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n { doc.cantEdit = false; }\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, "text"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, "change", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n var assign;\n\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == "string") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything \'behind\' it, is discarded. If the change is\n // before the event, the event\'s positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset \'at\'.\n removeInner: function(at, n) {\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this.lines[i];\n this.height -= line.height;\n cleanUpLine(line);\n signalLater(line, "delete");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset \'at\', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n for (var e = at + n; at < e; ++at)\n { if (op(this.lines[at])) { return true } }\n }\n };\n\n function BranchChunk(children) {\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this.height -= oldHeight - child.height;\n if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it\'s never spliced.\n // Instead, small slices are taken. They\'re taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this.children.splice(++i, 0, leaf);\n leaf.parent = this;\n }\n child.lines = child.lines.slice(0, remaining);\n this.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n };\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = function(doc, node, options) {\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n };\n\n LineWidget.prototype.clear = function () {\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, "widget");\n });\n signalLater(cm, "lineWidgetCleared", cm, this, no);\n }\n };\n\n LineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));\n });\n }\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, "widget", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }\n return widget\n }\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n var TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n\n // Clear the marker.\n TextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, "clear")) {\n var found = this.find();\n if (found) { signalLater(this, "clear", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function (side, lineObj) {\n if (side == null && this.type == "bookmark") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n };\n\n // Signals that the marker\'s widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, "markerChanged", cm, this$1);\n });\n };\n\n TextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n };\n\n TextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp\n ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n eventMixin(TextMarker);\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don\'t connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error("Inserting collapsed marker partially overlapping an existing one") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n marker.attributes || marker.title)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, "markerAdded", cm, marker);\n }\n return marker\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = function(markers, primary) {\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this; }\n };\n\n SharedTextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this.markers[i].clear(); }\n signalLater(this, "clear");\n };\n\n SharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n };\n eventMixin(SharedTextMarker);\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n }\n\n var nextDocId = 0;\n var Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == "rtl") ? "rtl" : "ltr";\n this.extend = false;\n\n if (typeof text == "string") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: "setValue", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n if (lineSep === \'\') { return lines.join(\'\') }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == "number") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range = this.sel.primary(), pos;\n if (start == null || start == "head") { pos = range.head; }\n else if (start == "anchor") { pos = range.anchor; }\n else if (start == "end" || start == "to" || start === false) { pos = range.to(); }\n else { pos = range.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this, ranges[i].anchor),\n clipPos(this, ranges[i].head || ranges[i].anchor)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(this.cm, out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || "+input");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {\n var this$1 = this;\n\n this.history = new History(this.history);\n linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);\n },\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, "gutter", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, "gutter", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == "number") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {\n var prop = where == "text" ? "textClass"\n : where == "background" ? "bgClass"\n : where == "gutter" ? "gutterClass" : "wrapClass";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += " " + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {\n var prop = where == "text" ? "textClass"\n : where == "background" ? "bgClass"\n : where == "gutter" ? "gutterClass" : "wrapClass";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, "bookmark")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||\n span.from == null && lineNo != from.line ||\n span.from != null && lineNo == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo;\n });\n return clipPos(this, Pos(lineNo, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n if (other instanceof CodeMirror) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this.linked[i];\n if (link.doc != other) { continue }\n this.linked.splice(i, 1);\n other.unlinkDoc(this);\n detachSharedMarkers(findSharedMarkers(this));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || "\\n" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != "rtl") { dir = "ltr"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Kludge to work around strange IE behavior where it\'ll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var markAsReadAndPasteIfAllFilesAreRead = function () {\n if (++read == n) {\n operation(cm, function () {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(\n text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),\n origin: "paste"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));\n })();\n }\n };\n var readTextFromFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n var reader = new FileReader;\n reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };\n reader.onload = function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n text[i] = content;\n markAsReadAndPasteIfAllFilesAreRead();\n };\n reader.readAsText(file);\n };\n for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }\n } else { // Normal drop\n // Don\'t do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData("Text");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }\n cm.replaceSelection(text$1, "around", "paste");\n cm.display.input.focus();\n }\n }\n catch(e$1){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData("Text", cm.getSelection());\n e.dataTransfer.effectAllowed = "copyMove";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don\'t do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");\n img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won\'t use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName("CodeMirror"), editors = [];\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { editors.push(cm); }\n }\n if (editors.length) { editors[0].operation(function () {\n for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n }); }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, "resize", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, "blur", function () { return forEachCodeMirror(onBlur); });\n }\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n var keyNames = {\n 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",\n 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",\n 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",\n 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",\n 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",\n 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\\\",\n 221: "]", 222: "\'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",\n 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"\n };\n\n // Number keys\n for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n // Alphabetic keys\n for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n // Function keys\n for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }\n\n var keyMap = {};\n\n keyMap.basic = {\n "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",\n "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",\n "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",\n "Tab": "defaultTab", "Shift-Tab": "indentAuto",\n "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",\n "Esc": "singleSelection"\n };\n // Note that the save and find-related commands aren\'t defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",\n "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",\n "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",\n "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",\n "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",\n "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",\n "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",\n "fallthrough": "basic"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",\n "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp",\n "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine",\n "Ctrl-T": "transposeChars", "Ctrl-O": "openLine"\n };\n keyMap.macDefault = {\n "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",\n "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",\n "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",\n "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",\n "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",\n "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",\n "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",\n "fallthrough": ["basic", "emacsy"]\n };\n keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error("Unrecognized modifier name: " + mod) }\n }\n if (alt) { name = "Alt-" + name; }\n if (ctrl) { name = "Ctrl-" + name; }\n if (cmd) { name = "Cmd-" + name; }\n if (shift) { name = "Shift-" + name; }\n return name\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n function normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == "...") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(" "), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(" ");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(" ");\n val = "...";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n }\n\n function lookupKey(key, map, handle, context) {\n map = getKeyMap(map);\n var found = map.call ? map.call(key, context) : map[key];\n if (found === false) { return "nothing" }\n if (found === "...") { return "multi" }\n if (found != null && handle(found)) { return "handled" }\n\n if (map.fallthrough) {\n if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")\n { return lookupKey(key, map.fallthrough, handle, context) }\n for (var i = 0; i < map.fallthrough.length; i++) {\n var result = lookupKey(key, map.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n }\n\n // Modifier key presses don\'t count as \'real\' key presses for the\n // purpose of keymap fallthrough.\n function isModifierKey(value) {\n var name = typeof value == "string" ? value : keyNames[value.keyCode];\n return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"\n }\n\n function addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != "Alt") { name = "Alt-" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; }\n if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }\n return name\n }\n\n // Look up the name of a key as indicated by an event object.\n function keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event["char"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we\'ll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n }\n\n function getKeyMap(val) {\n return typeof val == "string" ? keyMap[val] : val\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }\n ensureCursorVisible(cm);\n });\n }\n\n function moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n }\n\n function moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")\n }\n\n function endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n if (cm.doc.direction == "rtl") { dir = -dir; }\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? "after" : "before";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == "rtl") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")\n }\n\n function moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = "before";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = "after";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == "rtl" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? "before" : "after";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), "before")\n : new Pos(start.line, ch, "after"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n }\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, "div").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, "div");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, "div").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: "+move", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: "+move", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: "+move", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, "div").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, "div").top + 5;\n return cm.coordsChar({left: 0, top: top}, "div")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, "div").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, "div");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, "line"); },\n goLineDown: function (cm) { return cm.moveV(1, "line"); },\n goPageUp: function (cm) { return cm.moveV(-1, "page"); },\n goPageDown: function (cm) { return cm.moveV(1, "page"); },\n goCharLeft: function (cm) { return cm.moveH(-1, "char"); },\n goCharRight: function (cm) { return cm.moveH(1, "char"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, "column"); },\n goColumnRight: function (cm) { return cm.moveH(1, "column"); },\n goWordLeft: function (cm) { return cm.moveH(-1, "word"); },\n goGroupRight: function (cm) { return cm.moveH(1, "group"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },\n goWordRight: function (cm) { return cm.moveH(1, "word"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); },\n delCharAfter: function (cm) { return cm.deleteH(1, "char"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },\n delWordAfter: function (cm) { return cm.deleteH(1, "word"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, "group"); },\n indentAuto: function (cm) { return cm.indentSelection("smart"); },\n indentMore: function (cm) { return cm.indentSelection("add"); },\n indentLess: function (cm) { return cm.indentSelection("subtract"); },\n insertTab: function (cm) { return cm.replaceSelection("\\t"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection("add"); }\n else { cm.execCommand("insertTab"); }\n },\n // Swap the two chars left and right of each selection\'s head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn\'t consider line feeds a character.\n // Doesn\'t scan more than one line above to find a character.\n // Doesn\'t do anything on an empty line.\n // Doesn\'t do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, "+transpose");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, "+transpose");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection("\\n", "start"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n };\n\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n }\n function lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(start.ch, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n }\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == "string") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n }\n\n // Note that, despite the name, this function is also used to check\n // for bound mouse clicks.\n\n var stopSeq = new Delayed;\n\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return "handled" }\n if (/\\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n }\n\n function dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == "multi")\n { cm.state.keySeq = name; }\n if (result == "handled")\n { signalLater(cm, "keyHandled", cm, name, e); }\n\n if (result == "handled" || result == "multi") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including \'Shift-\'). Failing\n // that, see if there is a cursor-motion command (starting with\n // \'go\') bound to the keyname without \'Shift-\'.\n return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, "\'" + ch + "\'", e, function (b) { return doHandleBinding(cm, b, true); })\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection("", null, "cut"); }\n }\n if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)\n { document.execCommand("cut"); }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, "CodeMirror-crosshair");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, "CodeMirror-crosshair");\n off(document, "keyup", up);\n off(document, "mouseover", up);\n }\n }\n on(document, "keyup", up);\n on(document, "mouseover", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == "\\x08") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n }\n\n var DOUBLECLICK_DELAY = 400;\n\n var PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n };\n\n PastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n };\n\n var lastClick, lastDoubleClick;\n function clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return "triple"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return "double"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return "single"\n }\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";\n window.focus();\n\n // #3261: make sure, that we\'re not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { cm.display.input.onContextMenu(e); }\n else { delayBlurEvent(cm); }\n }\n }\n\n function handleMappedButton(cm, button, pos, repeat, event) {\n var name = "Click";\n if (repeat == "double") { name = "Double" + name; }\n else if (repeat == "triple") { name = "Triple" + name; }\n name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == "string") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n }\n\n function configureMouse(cm, repeat, event) {\n var option = cm.getOption("configureMouse");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n }\n\n function leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == "single" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn\'t.\n function leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n if (cm.state.delayingBlurEvent) {\n if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }\n else { delayBlurEvent(cm); }\n }\n off(display.wrapper.ownerDocument, "mouseup", dragEnd);\n off(display.wrapper.ownerDocument, "mousemove", mouseMove);\n off(display.scroller, "dragstart", dragStart);\n off(display.scroller, "drop", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if ((webkit && !safari) || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n on(display.wrapper.ownerDocument, "mouseup", dragEnd);\n on(display.wrapper.ownerDocument, "mousemove", mouseMove);\n on(display.scroller, "dragstart", dragStart);\n on(display.scroller, "drop", dragEnd);\n\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { return display.input.focus(); }, 20);\n // IE\'s approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n }\n\n function rangeForUnit(cm, pos, unit) {\n if (unit == "char") { return new Range(pos, pos) }\n if (unit == "word") { return cm.findWordAt(pos) }\n if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, event, start, behavior) {\n if (ie) { delayBlurEvent(cm); }\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == "rectangle") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }\n else\n { ourRange = range; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: "*mouse"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {\n setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: "*mouse"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == "rectangle") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: "*mouse", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head;\n anchor = minPos(oldRange.from(), range.anchor);\n } else {\n head = range.anchor;\n anchor = maxPos(oldRange.to(), range.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don\'t fire when another extend\n // happened in the meantime (clearTimeout isn\'t reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n // If e is null or undefined we interpret this as someone trying\n // to explicitly cancel the selection rather than the user\n // letting go of the mouse button.\n if (e) {\n e_preventDefault(e);\n display.input.focus();\n }\n off(display.wrapper.ownerDocument, "mousemove", move);\n off(display.wrapper.ownerDocument, "mouseup", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, "mousemove", move);\n on(display.wrapper.ownerDocument, "mouseup", up);\n }\n\n // Used when mouse-selecting to adjust the anchor to the proper side\n // of a bidi jump depending on the visual position of the head.\n function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }\n\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e$1) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.display.gutterSpecs[i];\n signal(cm, type, cm, line, gutter.className, e);\n return e_defaultPrevented(e)\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, "gutterClick", true)\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, "contextmenu")) { return }\n if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, "gutterContextMenu")) { return false }\n return gutterEvent(cm, e, "gutterContextMenu", false)\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, "") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, " cm-s-");\n clearCaches(cm);\n }\n\n var Init = {toString: function(){return "CodeMirror.Init"}};\n\n var defaults = {};\n var optionHandlers = {};\n\n function defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option("value", "", function (cm, val) { return cm.setValue(val); }, true);\n option("mode", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option("indentUnit", 2, loadMode, true);\n option("indentWithTabs", false);\n option("smartIndent", true);\n option("tabSize", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option("lineSeparator", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option("specialChars", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b\\u200e\\u200f\\u2028\\u2029\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test("\\t") ? "" : "|\\t"), "g");\n if (old != Init) { cm.refresh(); }\n });\n option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option("electricChars", true);\n option("inputStyle", mobile ? "contenteditable" : "textarea", function () {\n throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME\n }, true);\n option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n option("rtlMoveVisually", !windows);\n option("wholeLineUpdateBefore", true);\n\n option("theme", "default", function (cm) {\n themeChanged(cm);\n updateGutters(cm);\n }, true);\n option("keyMap", "default", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option("extraKeys", null);\n option("configureMouse", null);\n\n option("lineWrapping", false, wrappingChanged, true);\n option("gutters", [], function (cm, val) {\n cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n updateGutters(cm);\n }, true);\n option("fixedGutter", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";\n cm.refresh();\n }, true);\n option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);\n option("scrollbarStyle", "native", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option("lineNumbers", false, function (cm, val) {\n cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n updateGutters(cm);\n }, true);\n option("firstLineNumber", 1, updateGutters, true);\n option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true);\n option("showCursorWhenSelecting", false, updateSelection, true);\n\n option("resetSelectionOnContextMenu", true);\n option("lineWiseCopyCut", true);\n option("pasteLinesPerSelection", true);\n option("selectionsMayTouch", false);\n\n option("readOnly", false, function (cm, val) {\n if (val == "nocursor") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n\n option("screenReaderLabel", null, function (cm, val) {\n val = (val === \'\') ? null : val;\n cm.display.input.screenReaderLabelChanged(val);\n });\n\n option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option("dragDrop", true, dragDropChanged);\n option("allowDropFileTypes", null);\n\n option("cursorBlinkRate", 530);\n option("cursorScrollMargin", 0);\n option("cursorHeight", 1, updateSelection, true);\n option("singleCursorHeightPerLine", true, updateSelection, true);\n option("workTime", 100);\n option("workDelay", 100);\n option("flattenSpans", true, resetModeState, true);\n option("addModeClass", false, resetModeState, true);\n option("pollInterval", 100);\n option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option("historyEventDelay", 1250);\n option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);\n option("maxHighlightLength", 10000, resetModeState, true);\n option("moveInputWithCursor", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });\n option("autofocus", null);\n option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);\n option("phrases", null);\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, "dragstart", funcs.start);\n toggle(cm.display.scroller, "dragenter", funcs.enter);\n toggle(cm.display.scroller, "dragover", funcs.over);\n toggle(cm.display.scroller, "dragleave", funcs.leave);\n toggle(cm.display.scroller, "drop", funcs.drop);\n }\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, "CodeMirror-wrap");\n cm.display.sizer.style.minWidth = "";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, "CodeMirror-wrap");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n }\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n\n var doc = options.value;\n if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n else if (options.mode) { doc.modeOption = options.mode; }\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input, options);\n display.wrapper.CodeMirror = this;\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += " CodeMirror-wrap"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(function () {\n if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }\n }, 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")\n { display.lineDiv.style.textRendering = "auto"; }\n }\n\n // The default configuration options.\n CodeMirror.defaults = defaults;\n // Functions to run when options are changed.\n CodeMirror.optionHandlers = optionHandlers;\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, "mousedown", operation(cm, onMouseDown));\n // Older IE\'s will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, "dblclick", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can\'t mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });\n on(d.input.getField(), "contextmenu", function (e) {\n if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }\n });\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, "touchstart", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, "touchmove", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, "touchend", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, "page"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, "touchcancel", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, "scroll", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, "scroll", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });\n on(inp, "keydown", operation(cm, onKeyDown));\n on(inp, "keypress", operation(cm, onKeyPress));\n on(inp, "focus", function (e) { return onFocus(cm, e); });\n on(inp, "blur", function (e) { return onBlur(cm, e); });\n }\n\n var initHooks = [];\n CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n // Indent the given line. The how parameter can be "smart",\n // "add"/null, "subtract", or "prev". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = "add"; }\n if (how == "smart") {\n // Fall back to "prev" when the mode doesn\'t have an indentation\n // method.\n if (!doc.mode.indent) { how = "prev"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = "not";\n } else if (how == "smart") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = "prev";\n }\n }\n if (how == "prev") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == "add") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == "subtract") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == "number") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = "", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\\t";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n }\n\n // This will be set to a {lineWise: bool, text: [string]} object, so\n // that, when pasting, we know what kind of selections the copied\n // text was made out of.\n var lastCopied = null;\n\n function setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n }\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var recent = +new Date - 200;\n var paste = origin == "paste" || cm.state.pasteIncoming > recent;\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join("\\n") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput = cm.curOp.updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range = sel.ranges[i$1];\n var from = range.from(), to = range.to();\n if (range.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\\n") == textLines.join("\\n"))\n { from = to = Pos(from.line, 0); }\n }\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, "inputRead", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData("Text");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }\n return true\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an \'electric\' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range = sel.ranges[i];\n if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }\n var mode = cm.getModeAt(range.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range.head.line, "smart");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n { indented = indentLine(cm, range.head.line, "smart"); }\n }\n if (indented) { signalLater(cm, "electricInput", cm, range.head.line); }\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n }\n\n function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n field.setAttribute("autocorrect", autocorrect ? "" : "off");\n field.setAttribute("autocapitalize", autocapitalize ? "" : "off");\n field.setAttribute("spellcheck", !!spellcheck);\n }\n\n function hiddenTextarea() {\n var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");\n var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it\'ll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = "1000px"; }\n else { te.setAttribute("wrap", "off"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = "1px solid black"; }\n disableBrowserMagic(te);\n return div\n }\n\n // The publicly visible API. Note that methodOp(f) means\n // \'wrap f in an operation, performed on its `this` parameter\'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != "mode") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, "optionChange", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map, bottom) {\n this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));\n },\n removeKeyMap: function(map) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map || maps[i].name == map) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error("Overlays may not be stateful.") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == "string" && cur.name == spec) {\n overlays.splice(i, 1);\n this.state.modeGen++;\n regChange(this);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != "string" && typeof dir != "number") {\n if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }\n else { dir = dir ? "add" : "subtract"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (!range.empty()) {\n var from = range.from(), to = range.to();\n var start = Math.max(end, from.line);\n end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this, j, how); }\n var newRanges = this.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range.head.line > end) {\n indentLine(this, range.head.line, how, true);\n end = range.head.line;\n if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf("overlay ") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == "string") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range = this.doc.sel.primary();\n if (start == null) { pos = range.head; }\n else if (typeof start == "object") { pos = clipPos(this.doc, start); }\n else { pos = start ? range.from() : range.to(); }\n return cursorCoords(this, pos, mode || "page")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || "page")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || "page");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == "number") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = "absolute";\n node.setAttribute("cm-ignore-events", "true");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == "over") {\n top = pos.top;\n } else if (vert == "above" || vert == "near") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == \'above\' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + "px";\n node.style.left = node.style.right = "";\n if (horiz == "right") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = "0px";\n } else {\n if (horiz == "left") { left = 0; }\n else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + "px";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range) {\n if (this$1.display.shift || this$1.doc.extend || range.empty())\n { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range.from() : range.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection("", null, "+delete"); }\n else\n { deleteNearSelection(this, function (range) {\n var other = findPosH(doc, range.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this, cur, "div");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range) {\n if (collapse)\n { return dir < 0 ? range.from() : range.to() }\n var headPos = cursorCoords(this$1, range.head, "div");\n if (range.goalColumn != null) { headPos.left = range.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == "page" && range == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, "wordChars");\n if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }\n else\n { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }\n\n signal(this, "overwriteToggle", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt() },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range, margin) {\n if (range == null) {\n range = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range == "number") {\n range = {from: Pos(range, 0), to: null};\n } else if (range.from == null) {\n range = {from: range, to: null};\n }\n if (!range.to) { range.to = range.from; }\n range.margin = margin || 0;\n\n if (range.from.line != null) {\n scrollToRange(this, range);\n } else {\n scrollToCoordsRange(this, range.from, range.to, range.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == "number" || /^\\d+$/.test(String(val)) ? val + "px" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo = this.display.viewFrom;\n this.doc.iter(lineNo, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } }\n ++lineNo;\n });\n this.curOp.forceUpdate = true;\n signal(this, "refresh", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)\n { estimateLineHeights(this); }\n signal(this, "refresh", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n // Cancel the current text selection if any (#5821)\n if (this.state.selectingText) { this.state.selectingText(); }\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, "swapDoc", this, old);\n return old\n }),\n\n phrase: function(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n },\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be "codepoint", "char", "column" (like char, but\n // doesn\'t cross line boundaries), "word" (across next word), or\n // "group" (to the start of next group of word or\n // non-word-non-whitespace chars). The visually param controls\n // whether, in right-to-left text, direction 1 means to move towards\n // the next index in the string, or towards the character to the right\n // of the current position. The resulting position will have a\n // hitSide=true property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n var lineDir = visually && doc.direction == "rtl" ? -dir : dir;\n function findNextLine() {\n var l = pos.line + lineDir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (unit == "codepoint") {\n var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));\n if (isNaN(ch)) {\n next = null;\n } else {\n var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;\n next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);\n }\n } else if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == "char" || unit == "codepoint") {\n moveOnce();\n } else if (unit == "column") {\n moveOnce(true);\n } else if (unit == "word" || unit == "group") {\n var sawType = null, group = unit == "group";\n var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || "\\n";\n var type = isWordChar(cur, helper) ? "w"\n : group && cur == "\\n" ? "n"\n : !group || /\\s/.test(cur) ? null\n : "p";\n if (group && !first && !type) { type = "s"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // "page" or "line". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == "page") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == "line") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n }\n\n // CONTENTEDITABLE INPUT STYLE\n\n var ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n };\n\n ContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n div.contentEditable = true;\n disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n function belongsToInput(e) {\n for (var t = e.target; t; t = t.parentNode) {\n if (t == div) { return true }\n if (/\\bCodeMirror-(?:line)?widget\\b/.test(t.className)) { break }\n }\n return false\n }\n\n on(div, "paste", function (e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn\'t fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, "compositionstart", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, "compositionupdate", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, "compositionend", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, "touchstart", function () { return input.forceCompositionEnd(); });\n\n on(div, "input", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == "cut") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection("", null, "cut");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join("\\n");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData("Text", content);\n if (e.clipboardData.getData("Text") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join("\\n");\n var hadFocus = activeElt();\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, "copy", onCopyCut);\n on(div, "cut", onCopyCut);\n };\n\n ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.div.setAttribute(\'aria-label\', label);\n } else {\n this.div.removeAttribute(\'aria-label\');\n }\n };\n\n ContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = activeElt() == this.div;\n return result\n };\n\n ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n };\n\n ContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n };\n\n ContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n };\n\n ContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n };\n\n ContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n };\n\n ContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n };\n\n ContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n };\n\n ContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != "nocursor") {\n if (!this.selectionInEditor() || activeElt() != this.div)\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n };\n ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n ContentEditableInput.prototype.getField = function () { return this.div };\n\n ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n ContentEditableInput.prototype.receivedFocus = function () {\n var this$1 = this;\n\n var input = this;\n if (this.selectionInEditor())\n { setTimeout(function () { return this$1.pollSelection(); }, 20); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n };\n\n ContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n };\n\n ContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it\'s not editable, hide the virtual keyboard.\n // Because Android doesn\'t allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n };\n\n ContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, "");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, "");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, "+input");\n return true\n }\n };\n\n ContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n };\n ContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n };\n\n ContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n };\n\n ContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = "false";\n };\n\n ContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n };\n\n ContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != "nocursor");\n };\n\n ContentEditableInput.prototype.onContextMenu = function () {};\n ContentEditableInput.prototype.resetPosition = function () {};\n\n ContentEditableInput.prototype.needsContentAttribute = true;\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = "left";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? "right" : "left";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == "right" ? result.end : result.start;\n return result\n }\n\n function isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n }\n\n function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute("cm-text");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute("cm-marker"), range;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range = found[0].find(0)))\n { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }\n return\n }\n if (node.getAttribute("contenteditable") == "false") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, "").replace(/\\u00a0/g, " "));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map.length; j += 3) {\n var curNode = map[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n }\n\n // TEXTAREA INPUT STYLE\n\n var TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = "";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like \'keypress\' or \'input\') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n };\n\n TextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn\'t seem to work in iOS 8 anymore)\n if (ios) { te.style.width = "0px"; }\n\n on(te, "input", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, "paste", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = +new Date;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == "cut") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = "";\n te.value = ranges.text.join("\\n");\n selectInput(te);\n }\n }\n if (e.type == "cut") { cm.state.cutIncoming = +new Date; }\n }\n on(te, "cut", prepareCopyCut);\n on(te, "copy", prepareCopyCut);\n\n on(display.scroller, "paste", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n if (!te.dispatchEvent) {\n cm.state.pasteIncoming = +new Date;\n input.focus();\n return\n }\n\n // Pass the `paste` event to the textarea so it\'s handled by its event listener.\n var event = new Event("paste");\n event.clipboardData = e.clipboardData;\n te.dispatchEvent(event);\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, "selectstart", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, "compositionstart", function () {\n var start = cm.getCursor("from");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})\n };\n });\n on(te, "compositionend", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n };\n\n TextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n };\n\n TextareaInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.textarea.setAttribute(\'aria-label\', label);\n } else {\n this.textarea.removeAttribute(\'aria-label\');\n }\n };\n\n TextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, "div");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n };\n\n TextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + "px";\n this.wrapper.style.left = drawn.teLeft + "px";\n }\n };\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n TextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing) { return }\n var cm = this.cm;\n if (cm.somethingSelected()) {\n this.prevInput = "";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = "";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n };\n\n TextareaInput.prototype.getField = function () { return this.textarea };\n\n TextareaInput.prototype.supportsTouch = function () { return false };\n\n TextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n };\n\n TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n TextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n };\n\n TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n TextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n };\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n TextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n };\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n TextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = "\\u200b"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? "*compose" : null);\n\n // Don\'t leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf("\\n") > -1) { input.value = this$1.prevInput = ""; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),\n {className: "CodeMirror-composing"});\n }\n });\n return true\n };\n\n TextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n };\n\n TextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n };\n\n TextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n if (input.contextMenuPending) { input.contextMenuPending(); }\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and \'resetSelectionOnContextMenu\' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n input.wrapper.style.cssText = "position: static";\n te.style.cssText = "position: absolute; width: 30px; height: 30px;\\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";\n var oldScrollY;\n if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { window.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds "Select all" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }\n input.contextMenuPending = rehide;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there\'s nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = "\\u200b" + (selected ? te.value : "");\n te.value = "\\u21da"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? "" : "\\u200b";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n if (input.contextMenuPending != rehide) { return }\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == "\\u200b") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, "mouseup", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, "mouseup", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n };\n\n TextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == "nocursor";\n this.textarea.readOnly = !!val;\n };\n\n TextareaInput.prototype.setUneditable = function () {};\n\n TextareaInput.prototype.needsContentAttribute = false;\n\n function fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute("autofocus") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, "submit", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = "";\n if (textarea.form) {\n off(textarea.form, "submit", save);\n if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = "none";\n var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n }\n\n function addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n }\n\n // EDITOR CONSTRUCTOR\n\n defineOptions(CodeMirror);\n\n addEditorMethods(CodeMirror);\n\n // Set up methods on CodeMirror\'s prototype to redirect to the editor\'s document.\n var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");\n for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\n eventMixin(Doc);\n CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};\n\n // Extra arguments are stored as the mode\'s dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; }\n defineMode.apply(this, arguments);\n };\n\n CodeMirror.defineMIME = defineMIME;\n\n // Minimal default mode.\n CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n CodeMirror.defineMIME("text/plain", "null");\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function (name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n };\n\n CodeMirror.fromTextArea = fromTextArea;\n\n addLegacyProps(CodeMirror);\n\n CodeMirror.version = "5.65.2";\n\n return CodeMirror;\n\n})));\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/lib/codemirror.js?')},"./node_modules/codemirror/mode/clike/clike.js":
/*!*****************************************************!*\
!*** ./node_modules/codemirror/mode/clike/clike.js ***!
\*****************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nfunction Context(indented, column, type, info, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.info = info;\n this.align = align;\n this.prev = prev;\n}\nfunction pushContext(state, col, type, info) {\n var indent = state.indented;\n if (state.context && state.context.type == "statement" && type != "statement")\n indent = state.context.indented;\n return state.context = new Context(indent, col, type, info, null, state.context);\n}\nfunction popContext(state) {\n var t = state.context.type;\n if (t == ")" || t == "]" || t == "}")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n}\n\nfunction typeBefore(stream, state, pos) {\n if (state.prevToken == "variable" || state.prevToken == "type") return true;\n if (/\\S(?:[^- ]>|[*\\]])\\s*$|\\*$/.test(stream.string.slice(0, pos))) return true;\n if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;\n}\n\nfunction isTopScope(context) {\n for (;;) {\n if (!context || context.type == "top") return true;\n if (context.type == "}" && context.prev.info != "namespace") return false;\n context = context.prev;\n }\n}\n\nCodeMirror.defineMode("clike", function(config, parserConfig) {\n var indentUnit = config.indentUnit,\n statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n dontAlignCalls = parserConfig.dontAlignCalls,\n keywords = parserConfig.keywords || {},\n types = parserConfig.types || {},\n builtin = parserConfig.builtin || {},\n blockKeywords = parserConfig.blockKeywords || {},\n defKeywords = parserConfig.defKeywords || {},\n atoms = parserConfig.atoms || {},\n hooks = parserConfig.hooks || {},\n multiLineStrings = parserConfig.multiLineStrings,\n indentStatements = parserConfig.indentStatements !== false,\n indentSwitch = parserConfig.indentSwitch !== false,\n namespaceSeparator = parserConfig.namespaceSeparator,\n isPunctuationChar = parserConfig.isPunctuationChar || /[\\[\\]{}\\(\\),;\\:\\.]/,\n numberStart = parserConfig.numberStart || /[\\d\\.]/,\n number = parserConfig.number || /^(?:0x[a-f\\d]+|0b[01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)(u|ll?|l|f)?/i,\n isOperatorChar = parserConfig.isOperatorChar || /[+\\-*&%=<>!?|\\/]/,\n isIdentifierChar = parserConfig.isIdentifierChar || /[\\w\\$_\\xa1-\\uffff]/,\n // An optional function that takes a {string} token and returns true if it\n // should be treated as a builtin.\n isReservedIdentifier = parserConfig.isReservedIdentifier || false;\n\n var curPunc, isDefKeyword;\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (hooks[ch]) {\n var result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \'"\' || ch == "\'") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (numberStart.test(ch)) {\n stream.backUp(1)\n if (stream.match(number)) return "number"\n stream.next()\n }\n if (isPunctuationChar.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (ch == "/") {\n if (stream.eat("*")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat("/")) {\n stream.skipToEnd();\n return "comment";\n }\n }\n if (isOperatorChar.test(ch)) {\n while (!stream.match(/^\\/[\\/*]/, false) && stream.eat(isOperatorChar)) {}\n return "operator";\n }\n stream.eatWhile(isIdentifierChar);\n if (namespaceSeparator) while (stream.match(namespaceSeparator))\n stream.eatWhile(isIdentifierChar);\n\n var cur = stream.current();\n if (contains(keywords, cur)) {\n if (contains(blockKeywords, cur)) curPunc = "newstatement";\n if (contains(defKeywords, cur)) isDefKeyword = true;\n return "keyword";\n }\n if (contains(types, cur)) return "type";\n if (contains(builtin, cur)\n || (isReservedIdentifier && isReservedIdentifier(cur))) {\n if (contains(blockKeywords, cur)) curPunc = "newstatement";\n return "builtin";\n }\n if (contains(atoms, cur)) return "atom";\n return "variable";\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) {end = true; break;}\n escaped = !escaped && next == "\\\\";\n }\n if (end || !(escaped || multiLineStrings))\n state.tokenize = null;\n return "string";\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == "/" && maybeEnd) {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == "*");\n }\n return "comment";\n }\n\n function maybeEOL(stream, state) {\n if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))\n state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false),\n indented: 0,\n startOfLine: true,\n prevToken: null\n };\n },\n\n token: function(stream, state) {\n var ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n }\n if (stream.eatSpace()) { maybeEOL(stream, state); return null; }\n curPunc = isDefKeyword = null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style == "comment" || style == "meta") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\\s*(?:\\/\\/.*)?$/, false)))\n while (state.context.type == "statement") popContext(state);\n else if (curPunc == "{") pushContext(state, stream.column(), "}");\n else if (curPunc == "[") pushContext(state, stream.column(), "]");\n else if (curPunc == "(") pushContext(state, stream.column(), ")");\n else if (curPunc == "}") {\n while (ctx.type == "statement") ctx = popContext(state);\n if (ctx.type == "}") ctx = popContext(state);\n while (ctx.type == "statement") ctx = popContext(state);\n }\n else if (curPunc == ctx.type) popContext(state);\n else if (indentStatements &&\n (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") ||\n (ctx.type == "statement" && curPunc == "newstatement"))) {\n pushContext(state, stream.column(), "statement", stream.current());\n }\n\n if (style == "variable" &&\n ((state.prevToken == "def" ||\n (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&\n isTopScope(state.context) && stream.match(/^\\s*\\(/, false)))))\n style = "def";\n\n if (hooks.token) {\n var result = hooks.token(stream, state, style);\n if (result !== undefined) style = result;\n }\n\n if (style == "def" && parserConfig.styleDefs === false) style = "variable";\n\n state.startOfLine = false;\n state.prevToken = isDefKeyword ? "def" : style || curPunc;\n maybeEOL(stream, state);\n return style;\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;\n var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n var closing = firstChar == ctx.type;\n if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;\n if (parserConfig.dontIndentStatements)\n while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))\n ctx = ctx.prev\n if (hooks.indent) {\n var hook = hooks.indent(state, ctx, textAfter, indentUnit);\n if (typeof hook == "number") return hook\n }\n var switchBlock = ctx.prev && ctx.prev.info == "switch";\n if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {\n while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev\n return ctx.indented\n }\n if (ctx.type == "statement")\n return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);\n if (ctx.align && (!dontAlignCalls || ctx.type != ")"))\n return ctx.column + (closing ? 0 : 1);\n if (ctx.type == ")" && !closing)\n return ctx.indented + statementIndentUnit;\n\n return ctx.indented + (closing ? 0 : indentUnit) +\n (!closing && switchBlock && !/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 0);\n },\n\n electricInput: indentSwitch ? /^\\s*(?:case .*?:|default:|\\{\\}?|\\})$/ : /^\\s*[{}]$/,\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n blockCommentContinue: " * ",\n lineComment: "//",\n fold: "brace"\n };\n});\n\n function words(str) {\n var obj = {}, words = str.split(" ");\n for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n function contains(words, word) {\n if (typeof words === "function") {\n return words(word);\n } else {\n return words.propertyIsEnumerable(word);\n }\n }\n var cKeywords = "auto if break case register continue return default do sizeof " +\n "static else struct switch extern typedef union for goto while enum const " +\n "volatile inline restrict asm fortran";\n\n // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20.\n var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " +\n "class compl concept constexpr const_cast decltype delete dynamic_cast " +\n "explicit export final friend import module mutable namespace new noexcept " +\n "not not_eq operator or or_eq override private protected public " +\n "reinterpret_cast requires static_assert static_cast template this " +\n "thread_local throw try typeid typename using virtual xor xor_eq";\n\n var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " +\n "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " +\n "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " +\n "@public @package @private @protected @required @optional @try @catch @finally @import " +\n "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available";\n\n var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " +\n " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " +\n "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " +\n "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"\n\n // Do not use this. Use the cTypes function below. This is global just to avoid\n // excessive calls when cTypes is being called multiple times during a parse.\n var basicCTypes = words("int long char short double float unsigned signed " +\n "void bool");\n\n // Do not use this. Use the objCTypes function below. This is global just to avoid\n // excessive calls when objCTypes is being called multiple times during a parse.\n var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL");\n\n // Returns true if identifier is a "C" type.\n // C type is defined as those that are reserved by the compiler (basicTypes),\n // and those that end in _t (Reserved by POSIX for types)\n // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html\n function cTypes(identifier) {\n return contains(basicCTypes, identifier) || /.+_t$/.test(identifier);\n }\n\n // Returns true if identifier is a "Objective C" type.\n function objCTypes(identifier) {\n return cTypes(identifier) || contains(basicObjCTypes, identifier);\n }\n\n var cBlockKeywords = "case do else for if switch while struct enum union";\n var cDefKeywords = "struct enum union";\n\n function cppHook(stream, state) {\n if (!state.startOfLine) return false\n for (var ch, next = null; ch = stream.peek();) {\n if (ch == "\\\\" && stream.match(/^.$/)) {\n next = cppHook\n break\n } else if (ch == "/" && stream.match(/^\\/[\\/\\*]/, false)) {\n break\n }\n stream.next()\n }\n state.tokenize = next\n return "meta"\n }\n\n function pointerHook(_stream, state) {\n if (state.prevToken == "type") return "type";\n return false;\n }\n\n // For C and C++ (and ObjC): identifiers starting with __\n // or _ followed by a capital letter are reserved for the compiler.\n function cIsReservedIdentifier(token) {\n if (!token || token.length < 2) return false;\n if (token[0] != \'_\') return false;\n return (token[1] == \'_\') || (token[1] !== token[1].toLowerCase());\n }\n\n function cpp14Literal(stream) {\n stream.eatWhile(/[\\w\\.\']/);\n return "number";\n }\n\n function cpp11StringHook(stream, state) {\n stream.backUp(1);\n // Raw strings.\n if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) {\n var match = stream.match(/^"([^\\s\\\\()]{0,16})\\(/);\n if (!match) {\n return false;\n }\n state.cpp11RawStringDelim = match[1];\n state.tokenize = tokenRawString;\n return tokenRawString(stream, state);\n }\n // Unicode strings/chars.\n if (stream.match(/^(?:u8|u|U|L)/)) {\n if (stream.match(/^["\']/, /* eat */ false)) {\n return "string";\n }\n return false;\n }\n // Ignore this hook.\n stream.next();\n return false;\n }\n\n function cppLooksLikeConstructor(word) {\n var lastTwo = /(\\w+)::~?(\\w+)$/.exec(word);\n return lastTwo && lastTwo[1] == lastTwo[2];\n }\n\n // C#-style strings where "" escapes a quote.\n function tokenAtString(stream, state) {\n var next;\n while ((next = stream.next()) != null) {\n if (next == \'"\' && !stream.eat(\'"\')) {\n state.tokenize = null;\n break;\n }\n }\n return "string";\n }\n\n // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where\n // <delim> can be a string up to 16 characters long.\n function tokenRawString(stream, state) {\n // Escape characters that have special regex meanings.\n var delim = state.cpp11RawStringDelim.replace(/[^\\w\\s]/g, \'\\\\$&\');\n var match = stream.match(new RegExp(".*?\\\\)" + delim + \'"\'));\n if (match)\n state.tokenize = null;\n else\n stream.skipToEnd();\n return "string";\n }\n\n function def(mimes, mode) {\n if (typeof mimes == "string") mimes = [mimes];\n var words = [];\n function add(obj) {\n if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))\n words.push(prop);\n }\n add(mode.keywords);\n add(mode.types);\n add(mode.builtin);\n add(mode.atoms);\n if (words.length) {\n mode.helperType = mimes[0];\n CodeMirror.registerHelper("hintWords", mimes[0], words);\n }\n\n for (var i = 0; i < mimes.length; ++i)\n CodeMirror.defineMIME(mimes[i], mode);\n }\n\n def(["text/x-csrc", "text/x-c", "text/x-chdr"], {\n name: "clike",\n keywords: words(cKeywords),\n types: cTypes,\n blockKeywords: words(cBlockKeywords),\n defKeywords: words(cDefKeywords),\n typeFirstDefinitions: true,\n atoms: words("NULL true false"),\n isReservedIdentifier: cIsReservedIdentifier,\n hooks: {\n "#": cppHook,\n "*": pointerHook,\n },\n modeProps: {fold: ["brace", "include"]}\n });\n\n def(["text/x-c++src", "text/x-c++hdr"], {\n name: "clike",\n keywords: words(cKeywords + " " + cppKeywords),\n types: cTypes,\n blockKeywords: words(cBlockKeywords + " class try catch"),\n defKeywords: words(cDefKeywords + " class namespace"),\n typeFirstDefinitions: true,\n atoms: words("true false NULL nullptr"),\n dontIndentStatements: /^template$/,\n isIdentifierChar: /[\\w\\$_~\\xa1-\\uffff]/,\n isReservedIdentifier: cIsReservedIdentifier,\n hooks: {\n "#": cppHook,\n "*": pointerHook,\n "u": cpp11StringHook,\n "U": cpp11StringHook,\n "L": cpp11StringHook,\n "R": cpp11StringHook,\n "0": cpp14Literal,\n "1": cpp14Literal,\n "2": cpp14Literal,\n "3": cpp14Literal,\n "4": cpp14Literal,\n "5": cpp14Literal,\n "6": cpp14Literal,\n "7": cpp14Literal,\n "8": cpp14Literal,\n "9": cpp14Literal,\n token: function(stream, state, style) {\n if (style == "variable" && stream.peek() == "(" &&\n (state.prevToken == ";" || state.prevToken == null ||\n state.prevToken == "}") &&\n cppLooksLikeConstructor(stream.current()))\n return "def";\n }\n },\n namespaceSeparator: "::",\n modeProps: {fold: ["brace", "include"]}\n });\n\n def("text/x-java", {\n name: "clike",\n keywords: words("abstract assert break case catch class const continue default " +\n "do else enum extends final finally for goto if implements import " +\n "instanceof interface native new package private protected public " +\n "return static strictfp super switch synchronized this throw throws transient " +\n "try volatile while @interface"),\n types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " +\n "Integer Long Number Object Short String StringBuffer StringBuilder Void"),\n blockKeywords: words("catch class do else finally for if switch try while"),\n defKeywords: words("class interface enum @interface"),\n typeFirstDefinitions: true,\n atoms: words("true false null"),\n number: /^(?:0x[a-f\\d_]+|0b[01_]+|(?:[\\d_]+\\.?\\d*|\\.\\d+)(?:e[-+]?[\\d_]+)?)(u|ll?|l|f)?/i,\n hooks: {\n "@": function(stream) {\n // Don\'t match the @interface keyword.\n if (stream.match(\'interface\', false)) return false;\n\n stream.eatWhile(/[\\w\\$_]/);\n return "meta";\n },\n \'"\': function(stream, state) {\n if (!stream.match(\'""\\n\')) return false;\n state.tokenize = tokenTripleString;\n return state.tokenize(stream, state);\n }\n },\n modeProps: {fold: ["brace", "import"]}\n });\n\n def("text/x-csharp", {\n name: "clike",\n keywords: words("abstract as async await base break case catch checked class const continue" +\n " default delegate do else enum event explicit extern finally fixed for" +\n " foreach goto if implicit in interface internal is lock namespace new" +\n " operator out override params private protected public readonly ref return sealed" +\n " sizeof stackalloc static struct switch this throw try typeof unchecked" +\n " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +\n " global group into join let orderby partial remove select set value var yield"),\n types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" +\n " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" +\n " UInt64 bool byte char decimal double short int long object" +\n " sbyte float string ushort uint ulong"),\n blockKeywords: words("catch class do else finally for foreach if struct switch try while"),\n defKeywords: words("class interface namespace struct var"),\n typeFirstDefinitions: true,\n atoms: words("true false null"),\n hooks: {\n "@": function(stream, state) {\n if (stream.eat(\'"\')) {\n state.tokenize = tokenAtString;\n return tokenAtString(stream, state);\n }\n stream.eatWhile(/[\\w\\$_]/);\n return "meta";\n }\n }\n });\n\n function tokenTripleString(stream, state) {\n var escaped = false;\n while (!stream.eol()) {\n if (!escaped && stream.match(\'"""\')) {\n state.tokenize = null;\n break;\n }\n escaped = stream.next() == "\\\\" && !escaped;\n }\n return "string";\n }\n\n function tokenNestedComment(depth) {\n return function (stream, state) {\n var ch\n while (ch = stream.next()) {\n if (ch == "*" && stream.eat("/")) {\n if (depth == 1) {\n state.tokenize = null\n break\n } else {\n state.tokenize = tokenNestedComment(depth - 1)\n return state.tokenize(stream, state)\n }\n } else if (ch == "/" && stream.eat("*")) {\n state.tokenize = tokenNestedComment(depth + 1)\n return state.tokenize(stream, state)\n }\n }\n return "comment"\n }\n }\n\n def("text/x-scala", {\n name: "clike",\n keywords: words(\n /* scala */\n "abstract case catch class def do else extends final finally for forSome if " +\n "implicit import lazy match new null object override package private protected return " +\n "sealed super this throw trait try type val var while with yield _ " +\n\n /* package scala */\n "assert assume require print println printf readLine readBoolean readByte readShort " +\n "readChar readInt readLong readFloat readDouble"\n ),\n types: words(\n "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +\n "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " +\n "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +\n "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +\n "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " +\n\n /* package java.lang */\n "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +\n "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +\n "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +\n "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"\n ),\n multiLineStrings: true,\n blockKeywords: words("catch class enum do else finally for forSome if match switch try while"),\n defKeywords: words("class enum def object package trait type val var"),\n atoms: words("true false null"),\n indentStatements: false,\n indentSwitch: false,\n isOperatorChar: /[+\\-*&%=<>!?|\\/#:@]/,\n hooks: {\n "@": function(stream) {\n stream.eatWhile(/[\\w\\$_]/);\n return "meta";\n },\n \'"\': function(stream, state) {\n if (!stream.match(\'""\')) return false;\n state.tokenize = tokenTripleString;\n return state.tokenize(stream, state);\n },\n "\'": function(stream) {\n stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n return "atom";\n },\n "=": function(stream, state) {\n var cx = state.context\n if (cx.type == "}" && cx.align && stream.eat(">")) {\n state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev)\n return "operator"\n } else {\n return false\n }\n },\n\n "/": function(stream, state) {\n if (!stream.eat("*")) return false\n state.tokenize = tokenNestedComment(1)\n return state.tokenize(stream, state)\n }\n },\n modeProps: {closeBrackets: {pairs: \'()[]{}""\', triples: \'"\'}}\n });\n\n function tokenKotlinString(tripleString){\n return function (stream, state) {\n var escaped = false, next, end = false;\n while (!stream.eol()) {\n if (!tripleString && !escaped && stream.match(\'"\') ) {end = true; break;}\n if (tripleString && stream.match(\'"""\')) {end = true; break;}\n next = stream.next();\n if(!escaped && next == "$" && stream.match(\'{\'))\n stream.skipTo("}");\n escaped = !escaped && next == "\\\\" && !tripleString;\n }\n if (end || !tripleString)\n state.tokenize = null;\n return "string";\n }\n }\n\n def("text/x-kotlin", {\n name: "clike",\n keywords: words(\n /*keywords*/\n "package as typealias class interface this super val operator " +\n "var fun for is in This throw return annotation " +\n "break continue object if else while do try when !in !is as? " +\n\n /*soft keywords*/\n "file import where by get set abstract enum open inner override private public internal " +\n "protected catch finally out final vararg reified dynamic companion constructor init " +\n "sealed field property receiver param sparam lateinit data inline noinline tailrec " +\n "external annotation crossinline const operator infix suspend actual expect setparam value"\n ),\n types: words(\n /* package java.lang */\n "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +\n "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +\n "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +\n "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " +\n "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " +\n "LazyThreadSafetyMode LongArray Nothing ShortArray Unit"\n ),\n intendSwitch: false,\n indentStatements: false,\n multiLineStrings: true,\n number: /^(?:0x[a-f\\d_]+|0b[01_]+|(?:[\\d_]+(\\.\\d+)?|\\.\\d+)(?:e[-+]?[\\d_]+)?)(u|ll?|l|f)?/i,\n blockKeywords: words("catch class do else finally for if where try while enum"),\n defKeywords: words("class val var object interface fun"),\n atoms: words("true false null this"),\n hooks: {\n "@": function(stream) {\n stream.eatWhile(/[\\w\\$_]/);\n return "meta";\n },\n \'*\': function(_stream, state) {\n return state.prevToken == \'.\' ? \'variable\' : \'operator\';\n },\n \'"\': function(stream, state) {\n state.tokenize = tokenKotlinString(stream.match(\'""\'));\n return state.tokenize(stream, state);\n },\n "/": function(stream, state) {\n if (!stream.eat("*")) return false;\n state.tokenize = tokenNestedComment(1);\n return state.tokenize(stream, state)\n },\n indent: function(state, ctx, textAfter, indentUnit) {\n var firstChar = textAfter && textAfter.charAt(0);\n if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")\n return state.indented;\n if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") ||\n state.prevToken == "variable" && firstChar == "." ||\n (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".")\n return indentUnit * 2 + ctx.indented;\n if (ctx.align && ctx.type == "}")\n return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit);\n }\n },\n modeProps: {closeBrackets: {triples: \'"\'}}\n });\n\n def(["x-shader/x-vertex", "x-shader/x-fragment"], {\n name: "clike",\n keywords: words("sampler1D sampler2D sampler3D samplerCube " +\n "sampler1DShadow sampler2DShadow " +\n "const attribute uniform varying " +\n "break continue discard return " +\n "for while do if else struct " +\n "in out inout"),\n types: words("float int bool void " +\n "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +\n "mat2 mat3 mat4"),\n blockKeywords: words("for while do if else struct"),\n builtin: words("radians degrees sin cos tan asin acos atan " +\n "pow exp log exp2 sqrt inversesqrt " +\n "abs sign floor ceil fract mod min max clamp mix step smoothstep " +\n "length distance dot cross normalize ftransform faceforward " +\n "reflect refract matrixCompMult " +\n "lessThan lessThanEqual greaterThan greaterThanEqual " +\n "equal notEqual any all not " +\n "texture1D texture1DProj texture1DLod texture1DProjLod " +\n "texture2D texture2DProj texture2DLod texture2DProjLod " +\n "texture3D texture3DProj texture3DLod texture3DProjLod " +\n "textureCube textureCubeLod " +\n "shadow1D shadow2D shadow1DProj shadow2DProj " +\n "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +\n "dFdx dFdy fwidth " +\n "noise1 noise2 noise3 noise4"),\n atoms: words("true false " +\n "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +\n "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +\n "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +\n "gl_FogCoord gl_PointCoord " +\n "gl_Position gl_PointSize gl_ClipVertex " +\n "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +\n "gl_TexCoord gl_FogFragCoord " +\n "gl_FragCoord gl_FrontFacing " +\n "gl_FragData gl_FragDepth " +\n "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +\n "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +\n "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +\n "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +\n "gl_ProjectionMatrixInverseTranspose " +\n "gl_ModelViewProjectionMatrixInverseTranspose " +\n "gl_TextureMatrixInverseTranspose " +\n "gl_NormalScale gl_DepthRange gl_ClipPlane " +\n "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +\n "gl_FrontLightModelProduct gl_BackLightModelProduct " +\n "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +\n "gl_FogParameters " +\n "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +\n "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +\n "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +\n "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +\n "gl_MaxDrawBuffers"),\n indentSwitch: false,\n hooks: {"#": cppHook},\n modeProps: {fold: ["brace", "include"]}\n });\n\n def("text/x-nesc", {\n name: "clike",\n keywords: words(cKeywords + " as atomic async call command component components configuration event generic " +\n "implementation includes interface module new norace nx_struct nx_union post provides " +\n "signal task uses abstract extends"),\n types: cTypes,\n blockKeywords: words(cBlockKeywords),\n atoms: words("null true false"),\n hooks: {"#": cppHook},\n modeProps: {fold: ["brace", "include"]}\n });\n\n def("text/x-objectivec", {\n name: "clike",\n keywords: words(cKeywords + " " + objCKeywords),\n types: objCTypes,\n builtin: words(objCBuiltins),\n blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"),\n defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"),\n dontIndentStatements: /^@.*$/,\n typeFirstDefinitions: true,\n atoms: words("YES NO NULL Nil nil true false nullptr"),\n isReservedIdentifier: cIsReservedIdentifier,\n hooks: {\n "#": cppHook,\n "*": pointerHook,\n },\n modeProps: {fold: ["brace", "include"]}\n });\n\n def("text/x-objectivec++", {\n name: "clike",\n keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords),\n types: objCTypes,\n builtin: words(objCBuiltins),\n blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),\n defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"),\n dontIndentStatements: /^@.*$|^template$/,\n typeFirstDefinitions: true,\n atoms: words("YES NO NULL Nil nil true false nullptr"),\n isReservedIdentifier: cIsReservedIdentifier,\n hooks: {\n "#": cppHook,\n "*": pointerHook,\n "u": cpp11StringHook,\n "U": cpp11StringHook,\n "L": cpp11StringHook,\n "R": cpp11StringHook,\n "0": cpp14Literal,\n "1": cpp14Literal,\n "2": cpp14Literal,\n "3": cpp14Literal,\n "4": cpp14Literal,\n "5": cpp14Literal,\n "6": cpp14Literal,\n "7": cpp14Literal,\n "8": cpp14Literal,\n "9": cpp14Literal,\n token: function(stream, state, style) {\n if (style == "variable" && stream.peek() == "(" &&\n (state.prevToken == ";" || state.prevToken == null ||\n state.prevToken == "}") &&\n cppLooksLikeConstructor(stream.current()))\n return "def";\n }\n },\n namespaceSeparator: "::",\n modeProps: {fold: ["brace", "include"]}\n });\n\n def("text/x-squirrel", {\n name: "clike",\n keywords: words("base break clone continue const default delete enum extends function in class" +\n " foreach local resume return this throw typeof yield constructor instanceof static"),\n types: cTypes,\n blockKeywords: words("case catch class else for foreach if switch try while"),\n defKeywords: words("function local class"),\n typeFirstDefinitions: true,\n atoms: words("true false null"),\n hooks: {"#": cppHook},\n modeProps: {fold: ["brace", "include"]}\n });\n\n // Ceylon Strings need to deal with interpolation\n var stringTokenizer = null;\n function tokenCeylonString(type) {\n return function(stream, state) {\n var escaped = false, next, end = false;\n while (!stream.eol()) {\n if (!escaped && stream.match(\'"\') &&\n (type == "single" || stream.match(\'""\'))) {\n end = true;\n break;\n }\n if (!escaped && stream.match(\'``\')) {\n stringTokenizer = tokenCeylonString(type);\n end = true;\n break;\n }\n next = stream.next();\n escaped = type == "single" && !escaped && next == "\\\\";\n }\n if (end)\n state.tokenize = null;\n return "string";\n }\n }\n\n def("text/x-ceylon", {\n name: "clike",\n keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" +\n " exists extends finally for function given if import in interface is let module new" +\n " nonempty object of out outer package return satisfies super switch then this throw" +\n " try value void while"),\n types: function(word) {\n // In Ceylon all identifiers that start with an uppercase are types\n var first = word.charAt(0);\n return (first === first.toUpperCase() && first !== first.toLowerCase());\n },\n blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"),\n defKeywords: words("class dynamic function interface module object package value"),\n builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" +\n " native optional sealed see serializable shared suppressWarnings tagged throws variable"),\n isPunctuationChar: /[\\[\\]{}\\(\\),;\\:\\.`]/,\n isOperatorChar: /[+\\-*&%=<>!?|^~:\\/]/,\n numberStart: /[\\d#$]/,\n number: /^(?:#[\\da-fA-F_]+|\\$[01_]+|[\\d_]+[kMGTPmunpf]?|[\\d_]+\\.[\\d_]+(?:[eE][-+]?\\d+|[kMGTPmunpf]|)|)/i,\n multiLineStrings: true,\n typeFirstDefinitions: true,\n atoms: words("true false null larger smaller equal empty finished"),\n indentSwitch: false,\n styleDefs: false,\n hooks: {\n "@": function(stream) {\n stream.eatWhile(/[\\w\\$_]/);\n return "meta";\n },\n \'"\': function(stream, state) {\n state.tokenize = tokenCeylonString(stream.match(\'""\') ? "triple" : "single");\n return state.tokenize(stream, state);\n },\n \'`\': function(stream, state) {\n if (!stringTokenizer || !stream.match(\'`\')) return false;\n state.tokenize = stringTokenizer;\n stringTokenizer = null;\n return state.tokenize(stream, state);\n },\n "\'": function(stream) {\n stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n return "atom";\n },\n token: function(_stream, state, style) {\n if ((style == "variable" || style == "type") &&\n state.prevToken == ".") {\n return "variable-2";\n }\n }\n },\n modeProps: {\n fold: ["brace", "import"],\n closeBrackets: {triples: \'"\'}\n }\n });\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/clike/clike.js?')},"./node_modules/codemirror/mode/cmake/cmake.js":
/*!*****************************************************!*\
!*** ./node_modules/codemirror/mode/cmake/cmake.js ***!
\*****************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true)\n mod(__webpack_require__(/*! ../../lib/codemirror */ \"./node_modules/codemirror/lib/codemirror.js\"));\n else {}\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"cmake\", function () {\n var variable_regex = /({)?[a-zA-Z0-9_]+(})?/;\n\n function tokenString(stream, state) {\n var current, prev, found_var = false;\n while (!stream.eol() && (current = stream.next()) != state.pending) {\n if (current === '$' && prev != '\\\\' && state.pending == '\"') {\n found_var = true;\n break;\n }\n prev = current;\n }\n if (found_var) {\n stream.backUp(1);\n }\n if (current == state.pending) {\n state.continueString = false;\n } else {\n state.continueString = true;\n }\n return \"string\";\n }\n\n function tokenize(stream, state) {\n var ch = stream.next();\n\n // Have we found a variable?\n if (ch === '$') {\n if (stream.match(variable_regex)) {\n return 'variable-2';\n }\n return 'variable';\n }\n // Should we still be looking for the end of a string?\n if (state.continueString) {\n // If so, go through the loop again\n stream.backUp(1);\n return tokenString(stream, state);\n }\n // Do we just have a function on our hands?\n // In 'cmake_minimum_required (VERSION 2.8.8)', 'cmake_minimum_required' is matched\n if (stream.match(/(\\s+)?\\w+\\(/) || stream.match(/(\\s+)?\\w+\\ \\(/)) {\n stream.backUp(1);\n return 'def';\n }\n if (ch == \"#\") {\n stream.skipToEnd();\n return \"comment\";\n }\n // Have we found a string?\n if (ch == \"'\" || ch == '\"') {\n // Store the type (single or double)\n state.pending = ch;\n // Perform the looping function to find the end\n return tokenString(stream, state);\n }\n if (ch == '(' || ch == ')') {\n return 'bracket';\n }\n if (ch.match(/[0-9]/)) {\n return 'number';\n }\n stream.eatWhile(/[\\w-]/);\n return null;\n }\n return {\n startState: function () {\n var state = {};\n state.inDefinition = false;\n state.inInclude = false;\n state.continueString = false;\n state.pending = false;\n return state;\n },\n token: function (stream, state) {\n if (stream.eatSpace()) return null;\n return tokenize(stream, state);\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/x-cmake\", \"cmake\");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/cmake/cmake.js?")},"./node_modules/codemirror/mode/coffeescript/coffeescript.js":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/mode/coffeescript/coffeescript.js ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n/**\n * Link to the project\'s GitHub page:\n * https://github.com/pickhardt/coffeescript-codemirror-mode\n */\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("coffeescript", function(conf, parserConf) {\n var ERRORCLASS = "error";\n\n function wordRegexp(words) {\n return new RegExp("^((" + words.join(")|(") + "))\\\\b");\n }\n\n var operators = /^(?:->|=>|\\+[+=]?|-[\\-=]?|\\*[\\*=]?|\\/[\\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\\|=?|\\^=?|\\~|!|\\?|(or|and|\\|\\||&&|\\?)=)/;\n var delimiters = /^(?:[()\\[\\]{},:`=;]|\\.\\.?\\.?)/;\n var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;\n var atProp = /^@[_A-Za-z$][_A-Za-z$0-9]*/;\n\n var wordOperators = wordRegexp(["and", "or", "not",\n "is", "isnt", "in",\n "instanceof", "typeof"]);\n var indentKeywords = ["for", "while", "loop", "if", "unless", "else",\n "switch", "try", "catch", "finally", "class"];\n var commonKeywords = ["break", "by", "continue", "debugger", "delete",\n "do", "in", "of", "new", "return", "then",\n "this", "@", "throw", "when", "until", "extends"];\n\n var keywords = wordRegexp(indentKeywords.concat(commonKeywords));\n\n indentKeywords = wordRegexp(indentKeywords);\n\n\n var stringPrefixes = /^(\'{3}|\\"{3}|[\'\\"])/;\n var regexPrefixes = /^(\\/{3}|\\/)/;\n var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];\n var constants = wordRegexp(commonConstants);\n\n // Tokenizers\n function tokenBase(stream, state) {\n // Handle scope changes\n if (stream.sol()) {\n if (state.scope.align === null) state.scope.align = false;\n var scopeOffset = state.scope.offset;\n if (stream.eatSpace()) {\n var lineOffset = stream.indentation();\n if (lineOffset > scopeOffset && state.scope.type == "coffee") {\n return "indent";\n } else if (lineOffset < scopeOffset) {\n return "dedent";\n }\n return null;\n } else {\n if (scopeOffset > 0) {\n dedent(stream, state);\n }\n }\n }\n if (stream.eatSpace()) {\n return null;\n }\n\n var ch = stream.peek();\n\n // Handle docco title comment (single line)\n if (stream.match("####")) {\n stream.skipToEnd();\n return "comment";\n }\n\n // Handle multi line comments\n if (stream.match("###")) {\n state.tokenize = longComment;\n return state.tokenize(stream, state);\n }\n\n // Single line comment\n if (ch === "#") {\n stream.skipToEnd();\n return "comment";\n }\n\n // Handle number literals\n if (stream.match(/^-?[0-9\\.]/, false)) {\n var floatLiteral = false;\n // Floats\n if (stream.match(/^-?\\d*\\.\\d+(e[\\+\\-]?\\d+)?/i)) {\n floatLiteral = true;\n }\n if (stream.match(/^-?\\d+\\.\\d*/)) {\n floatLiteral = true;\n }\n if (stream.match(/^-?\\.\\d+/)) {\n floatLiteral = true;\n }\n\n if (floatLiteral) {\n // prevent from getting extra . on 1..\n if (stream.peek() == "."){\n stream.backUp(1);\n }\n return "number";\n }\n // Integers\n var intLiteral = false;\n // Hex\n if (stream.match(/^-?0x[0-9a-f]+/i)) {\n intLiteral = true;\n }\n // Decimal\n if (stream.match(/^-?[1-9]\\d*(e[\\+\\-]?\\d+)?/)) {\n intLiteral = true;\n }\n // Zero by itself with no other piece of number.\n if (stream.match(/^-?0(?![\\dx])/i)) {\n intLiteral = true;\n }\n if (intLiteral) {\n return "number";\n }\n }\n\n // Handle strings\n if (stream.match(stringPrefixes)) {\n state.tokenize = tokenFactory(stream.current(), false, "string");\n return state.tokenize(stream, state);\n }\n // Handle regex literals\n if (stream.match(regexPrefixes)) {\n if (stream.current() != "/" || stream.match(/^.*\\//, false)) { // prevent highlight of division\n state.tokenize = tokenFactory(stream.current(), true, "string-2");\n return state.tokenize(stream, state);\n } else {\n stream.backUp(1);\n }\n }\n\n\n\n // Handle operators and delimiters\n if (stream.match(operators) || stream.match(wordOperators)) {\n return "operator";\n }\n if (stream.match(delimiters)) {\n return "punctuation";\n }\n\n if (stream.match(constants)) {\n return "atom";\n }\n\n if (stream.match(atProp) || state.prop && stream.match(identifiers)) {\n return "property";\n }\n\n if (stream.match(keywords)) {\n return "keyword";\n }\n\n if (stream.match(identifiers)) {\n return "variable";\n }\n\n // Handle non-detected items\n stream.next();\n return ERRORCLASS;\n }\n\n function tokenFactory(delimiter, singleline, outclass) {\n return function(stream, state) {\n while (!stream.eol()) {\n stream.eatWhile(/[^\'"\\/\\\\]/);\n if (stream.eat("\\\\")) {\n stream.next();\n if (singleline && stream.eol()) {\n return outclass;\n }\n } else if (stream.match(delimiter)) {\n state.tokenize = tokenBase;\n return outclass;\n } else {\n stream.eat(/[\'"\\/]/);\n }\n }\n if (singleline) {\n if (parserConf.singleLineStringErrors) {\n outclass = ERRORCLASS;\n } else {\n state.tokenize = tokenBase;\n }\n }\n return outclass;\n };\n }\n\n function longComment(stream, state) {\n while (!stream.eol()) {\n stream.eatWhile(/[^#]/);\n if (stream.match("###")) {\n state.tokenize = tokenBase;\n break;\n }\n stream.eatWhile("#");\n }\n return "comment";\n }\n\n function indent(stream, state, type) {\n type = type || "coffee";\n var offset = 0, align = false, alignOffset = null;\n for (var scope = state.scope; scope; scope = scope.prev) {\n if (scope.type === "coffee" || scope.type == "}") {\n offset = scope.offset + conf.indentUnit;\n break;\n }\n }\n if (type !== "coffee") {\n align = null;\n alignOffset = stream.column() + stream.current().length;\n } else if (state.scope.align) {\n state.scope.align = false;\n }\n state.scope = {\n offset: offset,\n type: type,\n prev: state.scope,\n align: align,\n alignOffset: alignOffset\n };\n }\n\n function dedent(stream, state) {\n if (!state.scope.prev) return;\n if (state.scope.type === "coffee") {\n var _indent = stream.indentation();\n var matched = false;\n for (var scope = state.scope; scope; scope = scope.prev) {\n if (_indent === scope.offset) {\n matched = true;\n break;\n }\n }\n if (!matched) {\n return true;\n }\n while (state.scope.prev && state.scope.offset !== _indent) {\n state.scope = state.scope.prev;\n }\n return false;\n } else {\n state.scope = state.scope.prev;\n return false;\n }\n }\n\n function tokenLexer(stream, state) {\n var style = state.tokenize(stream, state);\n var current = stream.current();\n\n // Handle scope changes.\n if (current === "return") {\n state.dedent = true;\n }\n if (((current === "->" || current === "=>") && stream.eol())\n || style === "indent") {\n indent(stream, state);\n }\n var delimiter_index = "[({".indexOf(current);\n if (delimiter_index !== -1) {\n indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));\n }\n if (indentKeywords.exec(current)){\n indent(stream, state);\n }\n if (current == "then"){\n dedent(stream, state);\n }\n\n\n if (style === "dedent") {\n if (dedent(stream, state)) {\n return ERRORCLASS;\n }\n }\n delimiter_index = "])}".indexOf(current);\n if (delimiter_index !== -1) {\n while (state.scope.type == "coffee" && state.scope.prev)\n state.scope = state.scope.prev;\n if (state.scope.type == current)\n state.scope = state.scope.prev;\n }\n if (state.dedent && stream.eol()) {\n if (state.scope.type == "coffee" && state.scope.prev)\n state.scope = state.scope.prev;\n state.dedent = false;\n }\n\n return style;\n }\n\n var external = {\n startState: function(basecolumn) {\n return {\n tokenize: tokenBase,\n scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},\n prop: false,\n dedent: 0\n };\n },\n\n token: function(stream, state) {\n var fillAlign = state.scope.align === null && state.scope;\n if (fillAlign && stream.sol()) fillAlign.align = false;\n\n var style = tokenLexer(stream, state);\n if (style && style != "comment") {\n if (fillAlign) fillAlign.align = true;\n state.prop = style == "punctuation" && stream.current() == "."\n }\n\n return style;\n },\n\n indent: function(state, text) {\n if (state.tokenize != tokenBase) return 0;\n var scope = state.scope;\n var closer = text && "])}".indexOf(text.charAt(0)) > -1;\n if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;\n var closes = closer && scope.type === text.charAt(0);\n if (scope.align)\n return scope.alignOffset - (closes ? 1 : 0);\n else\n return (closes ? scope.prev : scope).offset;\n },\n\n lineComment: "#",\n fold: "indent"\n };\n return external;\n});\n\n// IANA registered media type\n// https://www.iana.org/assignments/media-types/\nCodeMirror.defineMIME("application/vnd.coffeescript", "coffeescript");\n\nCodeMirror.defineMIME("text/x-coffeescript", "coffeescript");\nCodeMirror.defineMIME("text/coffeescript", "coffeescript");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/coffeescript/coffeescript.js?')},"./node_modules/codemirror/mode/css/css.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/css/css.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("css", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n lineComment = parserConfig.lineComment,\n supportsAtComponent = parserConfig.supportsAtComponent === true,\n highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == "@") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret("def", stream.current());\n } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {\n return ret(null, "compare");\n } else if (ch == "\\"" || ch == "\'") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == "#") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret("atom", "hash");\n } else if (ch == "!") {\n stream.match(/^\\s*\\w*/);\n return ret("keyword", "important");\n } else if (/\\d/.test(ch) || ch == "." && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret("number", "unit");\n } else if (ch === "-") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret("number", "unit");\n } else if (stream.match(/^-[\\w\\\\\\-]*/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret("variable-2", "variable-definition");\n return ret("variable-2", "variable");\n } else if (stream.match(/^\\w+-/)) {\n return ret("meta", "meta");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, "select-op");\n } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret("qualifier", "qualifier");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if (stream.match(/^[\\w-.]+(?=\\()/)) {\n if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {\n state.tokenize = tokenParenthesized;\n }\n return ret("variable callee", "variable");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret("property", "word");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == ")") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == "\\\\";\n }\n if (ch == quote || !escaped && quote != ")") state.tokenize = null;\n return ret("string", "string");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be \'(\'\n if (!stream.match(/^\\s*[\\"\\\')]/, false))\n state.tokenize = tokenString(")");\n else\n state.tokenize = null;\n return ret(null, "(");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = "atom";\n else if (colorKeywords.hasOwnProperty(word))\n override = "keyword";\n else\n override = "variable";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == "{") {\n return pushContext(state, stream, "block");\n } else if (type == "}" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/i.test(type)) {\n return pushContext(state, stream, "atComponentBlock");\n } else if (/^@(-moz-)?document$/i.test(type)) {\n return pushContext(state, stream, "documentTypes");\n } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {\n return pushContext(state, stream, "atBlock");\n } else if (/^@(font-face|counter-style)/i.test(type)) {\n state.stateArg = type;\n return "restricted_atBlock_before";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {\n return "keyframes";\n } else if (type && type.charAt(0) == "@") {\n return pushContext(state, stream, "at");\n } else if (type == "hash") {\n override = "builtin";\n } else if (type == "word") {\n override = "tag";\n } else if (type == "variable-definition") {\n return "maybeprop";\n } else if (type == "interpolation") {\n return pushContext(state, stream, "interpolation");\n } else if (type == ":") {\n return "pseudo";\n } else if (allowNested && type == "(") {\n return pushContext(state, stream, "parens");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == "word") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = "property";\n return "maybeprop";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = highlightNonStandardPropertyKeywords ? "string-2" : "property";\n return "maybeprop";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? "property" : "tag";\n return "block";\n } else {\n override += " error";\n return "maybeprop";\n }\n } else if (type == "meta") {\n return "block";\n } else if (!allowNested && (type == "hash" || type == "qualifier")) {\n override = "error";\n return "block";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == ":") return pushContext(state, stream, "prop");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == ";") return popContext(state);\n if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");\n if (type == "}" || type == "{") return popAndPass(type, stream, state);\n if (type == "(") return pushContext(state, stream, "parens");\n\n if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {\n override += " error";\n } else if (type == "word") {\n wordAsValue(stream);\n } else if (type == "interpolation") {\n return pushContext(state, stream, "interpolation");\n }\n return "prop";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == "}") return popContext(state);\n if (type == "word") { override = "property"; return "maybeprop"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == "{" || type == "}") return popAndPass(type, stream, state);\n if (type == ")") return popContext(state);\n if (type == "(") return pushContext(state, stream, "parens");\n if (type == "interpolation") return pushContext(state, stream, "interpolation");\n if (type == "word") wordAsValue(stream);\n return "parens";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == "meta") return "pseudo";\n\n if (type == "word") {\n override = "variable-3";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {\n override = "tag";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == "(") return pushContext(state, stream, "atBlock_parens");\n if (type == "}" || type == ";") return popAndPass(type, stream, state);\n if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");\n\n if (type == "interpolation") return pushContext(state, stream, "interpolation");\n\n if (type == "word") {\n var word = stream.current().toLowerCase();\n if (word == "only" || word == "not" || word == "and" || word == "or")\n override = "keyword";\n else if (mediaTypes.hasOwnProperty(word))\n override = "attribute";\n else if (mediaFeatures.hasOwnProperty(word))\n override = "property";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = "keyword";\n else if (propertyKeywords.hasOwnProperty(word))\n override = "property";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = highlightNonStandardPropertyKeywords ? "string-2" : "property";\n else if (valueKeywords.hasOwnProperty(word))\n override = "atom";\n else if (colorKeywords.hasOwnProperty(word))\n override = "keyword";\n else\n override = "error";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == "}")\n return popAndPass(type, stream, state);\n if (type == "{")\n return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);\n if (type == "word")\n override = "error";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == ")") return popContext(state);\n if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == "{")\n return pushContext(state, stream, "restricted_atBlock");\n if (type == "word" && state.stateArg == "@counter-style") {\n override = "variable";\n return "restricted_atBlock_before";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == "}") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == "word") {\n if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = "error";\n else\n override = "property";\n return "maybeprop";\n }\n return "restricted_atBlock";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == "word") { override = "variable"; return "keyframes"; }\n if (type == "{") return pushContext(state, stream, "top");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == ";") return popContext(state);\n if (type == "{" || type == "}") return popAndPass(type, stream, state);\n if (type == "word") override = "tag";\n else if (type == "hash") override = "builtin";\n return "at";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == "}") return popContext(state);\n if (type == "{" || type == ";") return popAndPass(type, stream, state);\n if (type == "word") override = "variable";\n else if (type != "variable" && type != "(" && type != ")") override = "error";\n return "interpolation";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? "block" : "top",\n stateArg: null,\n context: new Context(inline ? "block" : "top", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == "object") {\n type = style[1];\n style = style[0];\n }\n override = style;\n if (type != "comment")\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;\n if (cx.prev) {\n if (ch == "}" && (cx.type == "block" || cx.type == "top" ||\n cx.type == "interpolation" || cx.type == "restricted_atBlock")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||\n ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n }\n }\n return indent;\n },\n\n electricChars: "}",\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n blockCommentContinue: " * ",\n lineComment: lineComment,\n fold: "brace"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i].toLowerCase()] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n "domain", "regexp", "url", "url-prefix"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n "all", "aural", "braille", "handheld", "print", "projection", "screen",\n "tty", "tv", "embossed"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n "width", "min-width", "max-width", "height", "min-height", "max-height",\n "device-width", "min-device-width", "max-device-width", "device-height",\n "min-device-height", "max-device-height", "aspect-ratio",\n "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",\n "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",\n "max-color", "color-index", "min-color-index", "max-color-index",\n "monochrome", "min-monochrome", "max-monochrome", "resolution",\n "min-resolution", "max-resolution", "scan", "grid", "orientation",\n "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",\n "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",\n "dynamic-range", "video-dynamic-range"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",\n "interlace", "progressive",\n "dark", "light",\n "standard", "high"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n "align-content", "align-items", "align-self", "alignment-adjust",\n "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",\n "animation-direction", "animation-duration", "animation-fill-mode",\n "animation-iteration-count", "animation-name", "animation-play-state",\n "animation-timing-function", "appearance", "azimuth", "backdrop-filter",\n "backface-visibility", "background", "background-attachment",\n "background-blend-mode", "background-clip", "background-color",\n "background-image", "background-origin", "background-position",\n "background-position-x", "background-position-y", "background-repeat",\n "background-size", "baseline-shift", "binding", "bleed", "block-size",\n "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",\n "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",\n "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",\n "border-collapse", "border-color", "border-image", "border-image-outset",\n "border-image-repeat", "border-image-slice", "border-image-source",\n "border-image-width", "border-left", "border-left-color", "border-left-style",\n "border-left-width", "border-radius", "border-right", "border-right-color",\n "border-right-style", "border-right-width", "border-spacing", "border-style",\n "border-top", "border-top-color", "border-top-left-radius",\n "border-top-right-radius", "border-top-style", "border-top-width",\n "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",\n "break-after", "break-before", "break-inside", "caption-side", "caret-color",\n "clear", "clip", "color", "color-profile", "column-count", "column-fill",\n "column-gap", "column-rule", "column-rule-color", "column-rule-style",\n "column-rule-width", "column-span", "column-width", "columns", "contain",\n "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",\n "cue-before", "cursor", "direction", "display", "dominant-baseline",\n "drop-initial-after-adjust", "drop-initial-after-align",\n "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",\n "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",\n "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",\n "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",\n "font", "font-family", "font-feature-settings", "font-kerning",\n "font-language-override", "font-optical-sizing", "font-size",\n "font-size-adjust", "font-stretch", "font-style", "font-synthesis",\n "font-variant", "font-variant-alternates", "font-variant-caps",\n "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",\n "font-variant-position", "font-variation-settings", "font-weight", "gap",\n "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",\n "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",\n "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",\n "grid-template", "grid-template-areas", "grid-template-columns",\n "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",\n "image-orientation", "image-rendering", "image-resolution", "inline-box-align",\n "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",\n "inset-inline-end", "inset-inline-start", "isolation", "justify-content",\n "justify-items", "justify-self", "left", "letter-spacing", "line-break",\n "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",\n "line-stacking-shift", "line-stacking-strategy", "list-style",\n "list-style-image", "list-style-position", "list-style-type", "margin",\n "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",\n "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",\n "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",\n "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",\n "max-block-size", "max-height", "max-inline-size",\n "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",\n "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",\n "nav-up", "object-fit", "object-position", "offset", "offset-anchor",\n "offset-distance", "offset-path", "offset-position", "offset-rotate",\n "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",\n "outline-style", "outline-width", "overflow", "overflow-style",\n "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",\n "padding-left", "padding-right", "padding-top", "page", "page-break-after",\n "page-break-before", "page-break-inside", "page-policy", "pause",\n "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",\n "pitch-range", "place-content", "place-items", "place-self", "play-during",\n "position", "presentation-level", "punctuation-trim", "quotes",\n "region-break-after", "region-break-before", "region-break-inside",\n "region-fragment", "rendering-intent", "resize", "rest", "rest-after",\n "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",\n "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",\n "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",\n "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",\n "scroll-margin-inline", "scroll-margin-inline-end",\n "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",\n "scroll-margin-top", "scroll-padding", "scroll-padding-block",\n "scroll-padding-block-end", "scroll-padding-block-start",\n "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",\n "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",\n "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",\n "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",\n "size", "speak", "speak-as", "speak-header", "speak-numeral",\n "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",\n "table-layout", "target", "target-name", "target-new", "target-position",\n "text-align", "text-align-last", "text-combine-upright", "text-decoration",\n "text-decoration-color", "text-decoration-line", "text-decoration-skip",\n "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",\n "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",\n "text-height", "text-indent", "text-justify", "text-orientation",\n "text-outline", "text-overflow", "text-rendering", "text-shadow",\n "text-size-adjust", "text-space-collapse", "text-transform",\n "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",\n "transform-style", "transition", "transition-delay", "transition-duration",\n "transition-property", "transition-timing-function", "translate",\n "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",\n "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",\n "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",\n "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",\n // SVG-specific\n "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",\n "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",\n "color-interpolation", "color-interpolation-filters",\n "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",\n "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",\n "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",\n "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",\n "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",\n "glyph-orientation-vertical", "text-anchor", "writing-mode",\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",\n "border-block-end-color", "border-block-end-style", "border-block-end-width",\n "border-block-start", "border-block-start-color", "border-block-start-style",\n "border-block-start-width", "border-block-style", "border-block-width",\n "border-inline", "border-inline-color", "border-inline-end",\n "border-inline-end-color", "border-inline-end-style",\n "border-inline-end-width", "border-inline-start", "border-inline-start-color",\n "border-inline-start-style", "border-inline-start-width",\n "border-inline-style", "border-inline-width", "content-visibility", "margin-block",\n "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",\n "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",\n "padding-block-start", "padding-inline", "padding-inline-end",\n "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",\n "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",\n "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",\n "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",\n "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n "font-display", "font-family", "src", "unicode-range", "font-variant",\n "font-feature-settings", "font-stretch", "font-weight", "font-style"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n "additive-symbols", "fallback", "negative", "pad", "prefix", "range",\n "speak-as", "suffix", "symbols", "system"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",\n "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",\n "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",\n "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",\n "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",\n "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",\n "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",\n "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",\n "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",\n "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",\n "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",\n "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",\n "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",\n "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",\n "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",\n "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",\n "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",\n "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",\n "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",\n "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",\n "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",\n "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",\n "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",\n "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",\n "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",\n "whitesmoke", "yellow", "yellowgreen"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n "above", "absolute", "activeborder", "additive", "activecaption", "afar",\n "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",\n "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",\n "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",\n "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",\n "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",\n "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button", "button-bevel",\n "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",\n "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",\n "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",\n "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",\n "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",\n "compact", "condensed", "conic-gradient", "contain", "content", "contents",\n "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",\n "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",\n "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",\n "destination-in", "destination-out", "destination-over", "devanagari", "difference",\n "disc", "discard", "disclosure-closed", "disclosure-open", "document",\n "dot-dash", "dot-dot-dash",\n "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",\n "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",\n "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",\n "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",\n "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",\n "ethiopic-halehame-gez", "ethiopic-halehame-om-et",\n "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",\n "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",\n "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",\n "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",\n "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",\n "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",\n "help", "hidden", "hide", "higher", "highlight", "highlighttext",\n "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",\n "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",\n "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",\n "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",\n "italic", "japanese-formal", "japanese-informal", "justify", "kannada",\n "katakana", "katakana-iroha", "keep-all", "khmer",\n "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",\n "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",\n "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",\n "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",\n "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",\n "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",\n "media-controls-background", "media-current-time-display",\n "media-fullscreen-button", "media-mute-button", "media-play-button",\n "media-return-to-realtime-button", "media-rewind-button",\n "media-seek-back-button", "media-seek-forward-button", "media-slider",\n "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",\n "media-volume-slider-container", "media-volume-sliderthumb", "medium",\n "menu", "menulist", "menulist-button", "menulist-text",\n "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",\n "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",\n "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",\n "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",\n "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",\n "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",\n "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",\n "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",\n "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",\n "progress", "push-button", "radial-gradient", "radio", "read-only",\n "read-write", "read-write-plaintext-only", "rectangle", "region",\n "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",\n "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",\n "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",\n "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",\n "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",\n "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",\n "searchfield-cancel-button", "searchfield-decoration",\n "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",\n "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",\n "simp-chinese-formal", "simp-chinese-informal", "single",\n "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",\n "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",\n "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",\n "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",\n "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",\n "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",\n "table-caption", "table-cell", "table-column", "table-column-group",\n "table-footer-group", "table-header-group", "table-row", "table-row-group",\n "tamil",\n "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",\n "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",\n "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",\n "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",\n "trad-chinese-formal", "trad-chinese-informal", "transform",\n "translate", "translate3d", "translateX", "translateY", "translateZ",\n "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",\n "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",\n "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",\n "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",\n "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",\n "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",\n "xx-large", "xx-small"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper("hintWords", "css", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == "/") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == "*");\n }\n return ["comment", "comment"];\n }\n\n CodeMirror.defineMIME("text/css", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n "/": function(stream, state) {\n if (!stream.eat("*")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: "css"\n });\n\n CodeMirror.defineMIME("text/x-scss", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: "//",\n tokenHooks: {\n "/": function(stream, state) {\n if (stream.eat("/")) {\n stream.skipToEnd();\n return ["comment", "comment"];\n } else if (stream.eat("*")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return ["operator", "operator"];\n }\n },\n ":": function(stream) {\n if (stream.match(/^\\s*\\{/, false))\n return [null, null]\n return false;\n },\n "$": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return ["variable-2", "variable-definition"];\n return ["variable-2", "variable"];\n },\n "#": function(stream) {\n if (!stream.eat("{")) return false;\n return [null, "interpolation"];\n }\n },\n name: "css",\n helperType: "scss"\n });\n\n CodeMirror.defineMIME("text/x-less", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: "//",\n tokenHooks: {\n "/": function(stream, state) {\n if (stream.eat("/")) {\n stream.skipToEnd();\n return ["comment", "comment"];\n } else if (stream.eat("*")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return ["operator", "operator"];\n }\n },\n "@": function(stream) {\n if (stream.eat("{")) return [null, "interpolation"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/i, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ["variable-2", "variable-definition"];\n return ["variable-2", "variable"];\n },\n "&": function() {\n return ["atom", "atom"];\n }\n },\n name: "css",\n helperType: "less"\n });\n\n CodeMirror.defineMIME("text/x-gss", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n "/": function(stream, state) {\n if (!stream.eat("*")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: "css",\n helperType: "gss"\n });\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/css/css.js?')},"./node_modules/codemirror/mode/go/go.js":
/*!***********************************************!*\
!*** ./node_modules/codemirror/mode/go/go.js ***!
\***********************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("go", function(config) {\n var indentUnit = config.indentUnit;\n\n var keywords = {\n "break":true, "case":true, "chan":true, "const":true, "continue":true,\n "default":true, "defer":true, "else":true, "fallthrough":true, "for":true,\n "func":true, "go":true, "goto":true, "if":true, "import":true,\n "interface":true, "map":true, "package":true, "range":true, "return":true,\n "select":true, "struct":true, "switch":true, "type":true, "var":true,\n "bool":true, "byte":true, "complex64":true, "complex128":true,\n "float32":true, "float64":true, "int8":true, "int16":true, "int32":true,\n "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,\n "uint64":true, "int":true, "uint":true, "uintptr":true, "error": true,\n "rune":true\n };\n\n var atoms = {\n "true":true, "false":true, "iota":true, "nil":true, "append":true,\n "cap":true, "close":true, "complex":true, "copy":true, "delete":true, "imag":true,\n "len":true, "make":true, "new":true, "panic":true, "print":true,\n "println":true, "real":true, "recover":true\n };\n\n var isOperatorChar = /[+\\-*&^%:=<>!|\\/]/;\n\n var curPunc;\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == \'"\' || ch == "\'" || ch == "`") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (/[\\d\\.]/.test(ch)) {\n if (ch == ".") {\n stream.match(/^[0-9]+([eE][\\-+]?[0-9]+)?/);\n } else if (ch == "0") {\n stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);\n } else {\n stream.match(/^[0-9]*\\.?[0-9]*([eE][\\-+]?[0-9]+)?/);\n }\n return "number";\n }\n if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (ch == "/") {\n if (stream.eat("*")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat("/")) {\n stream.skipToEnd();\n return "comment";\n }\n }\n if (isOperatorChar.test(ch)) {\n stream.eatWhile(isOperatorChar);\n return "operator";\n }\n stream.eatWhile(/[\\w\\$_\\xa1-\\uffff]/);\n var cur = stream.current();\n if (keywords.propertyIsEnumerable(cur)) {\n if (cur == "case" || cur == "default") curPunc = "case";\n return "keyword";\n }\n if (atoms.propertyIsEnumerable(cur)) return "atom";\n return "variable";\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) {end = true; break;}\n escaped = !escaped && quote != "`" && next == "\\\\";\n }\n if (end || !(escaped || quote == "`"))\n state.tokenize = tokenBase;\n return "string";\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == "/" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == "*");\n }\n return "comment";\n }\n\n function Context(indented, column, type, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.align = align;\n this.prev = prev;\n }\n function pushContext(state, col, type) {\n return state.context = new Context(state.indented, col, type, null, state.context);\n }\n function popContext(state) {\n if (!state.context.prev) return;\n var t = state.context.type;\n if (t == ")" || t == "]" || t == "}")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),\n indented: 0,\n startOfLine: true\n };\n },\n\n token: function(stream, state) {\n var ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n if (ctx.type == "case") ctx.type = "}";\n }\n if (stream.eatSpace()) return null;\n curPunc = null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style == "comment") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == "{") pushContext(state, stream.column(), "}");\n else if (curPunc == "[") pushContext(state, stream.column(), "]");\n else if (curPunc == "(") pushContext(state, stream.column(), ")");\n else if (curPunc == "case") ctx.type = "case";\n else if (curPunc == "}" && ctx.type == "}") popContext(state);\n else if (curPunc == ctx.type) popContext(state);\n state.startOfLine = false;\n return style;\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;\n var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);\n if (ctx.type == "case" && /^(?:case|default)\\b/.test(textAfter)) {\n state.context.type = "}";\n return ctx.indented;\n }\n var closing = firstChar == ctx.type;\n if (ctx.align) return ctx.column + (closing ? 0 : 1);\n else return ctx.indented + (closing ? 0 : indentUnit);\n },\n\n electricChars: "{}):",\n closeBrackets: "()[]{}\'\'\\"\\"``",\n fold: "brace",\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n lineComment: "//"\n };\n});\n\nCodeMirror.defineMIME("text/x-go", "go");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/go/go.js?')},"./node_modules/codemirror/mode/handlebars/handlebars.js":
/*!***************************************************************!*\
!*** ./node_modules/codemirror/mode/handlebars/handlebars.js ***!
\***************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../../addon/mode/simple */ "./node_modules/codemirror/addon/mode/simple.js"), __webpack_require__(/*! ../../addon/mode/multiplex */ "./node_modules/codemirror/addon/mode/multiplex.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineSimpleMode("handlebars-tags", {\n start: [\n { regex: /\\{\\{\\{/, push: "handlebars_raw", token: "tag" },\n { regex: /\\{\\{!--/, push: "dash_comment", token: "comment" },\n { regex: /\\{\\{!/, push: "comment", token: "comment" },\n { regex: /\\{\\{/, push: "handlebars", token: "tag" }\n ],\n handlebars_raw: [\n { regex: /\\}\\}\\}/, pop: true, token: "tag" },\n ],\n handlebars: [\n { regex: /\\}\\}/, pop: true, token: "tag" },\n\n // Double and single quotes\n { regex: /"(?:[^\\\\"]|\\\\.)*"?/, token: "string" },\n { regex: /\'(?:[^\\\\\']|\\\\.)*\'?/, token: "string" },\n\n // Handlebars keywords\n { regex: />|[#\\/]([A-Za-z_]\\w*)/, token: "keyword" },\n { regex: /(?:else|this)\\b/, token: "keyword" },\n\n // Numeral\n { regex: /\\d+/i, token: "number" },\n\n // Atoms like = and .\n { regex: /=|~|@|true|false/, token: "atom" },\n\n // Paths\n { regex: /(?:\\.\\.\\/)*(?:[A-Za-z_][\\w\\.]*)+/, token: "variable-2" }\n ],\n dash_comment: [\n { regex: /--\\}\\}/, pop: true, token: "comment" },\n\n // Commented code\n { regex: /./, token: "comment"}\n ],\n comment: [\n { regex: /\\}\\}/, pop: true, token: "comment" },\n { regex: /./, token: "comment" }\n ],\n meta: {\n blockCommentStart: "{{--",\n blockCommentEnd: "--}}"\n }\n });\n\n CodeMirror.defineMode("handlebars", function(config, parserConfig) {\n var handlebars = CodeMirror.getMode(config, "handlebars-tags");\n if (!parserConfig || !parserConfig.base) return handlebars;\n return CodeMirror.multiplexingMode(\n CodeMirror.getMode(config, parserConfig.base),\n {open: "{{", close: /\\}\\}\\}?/, mode: handlebars, parseDelimiters: true}\n );\n });\n\n CodeMirror.defineMIME("text/x-handlebars-template", "handlebars");\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/handlebars/handlebars.js?')},"./node_modules/codemirror/mode/htmlembedded/htmlembedded.js":
/*!*******************************************************************!*\
!*** ./node_modules/codemirror/mode/htmlembedded/htmlembedded.js ***!
\*******************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../htmlmixed/htmlmixed */ "./node_modules/codemirror/mode/htmlmixed/htmlmixed.js"),\n __webpack_require__(/*! ../../addon/mode/multiplex */ "./node_modules/codemirror/addon/mode/multiplex.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {\n var closeComment = parserConfig.closeComment || "--%>"\n return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), {\n open: parserConfig.openComment || "<%--",\n close: closeComment,\n delimStyle: "comment",\n mode: {token: function(stream) {\n stream.skipTo(closeComment) || stream.skipToEnd()\n return "comment"\n }}\n }, {\n open: parserConfig.open || parserConfig.scriptStartRegex || "<%",\n close: parserConfig.close || parserConfig.scriptEndRegex || "%>",\n mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec)\n });\n }, "htmlmixed");\n\n CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"});\n CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});\n CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"});\n CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"});\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/htmlembedded/htmlembedded.js?')},"./node_modules/codemirror/mode/htmlmixed/htmlmixed.js":
/*!*************************************************************!*\
!*** ./node_modules/codemirror/mode/htmlmixed/htmlmixed.js ***!
\*************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../xml/xml */ "./node_modules/codemirror/mode/xml/xml.js"), __webpack_require__(/*! ../javascript/javascript */ "./node_modules/codemirror/mode/javascript/javascript.js"), __webpack_require__(/*! ../css/css */ "./node_modules/codemirror/mode/css/css.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n var defaultTags = {\n script: [\n ["lang", /(javascript|babel)/i, "javascript"],\n ["type", /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],\n ["type", /./, "text/plain"],\n [null, null, "javascript"]\n ],\n style: [\n ["lang", /^css$/i, "css"],\n ["type", /^(text\\/)?(x-)?(stylesheet|css)$/i, "css"],\n ["type", /./, "text/plain"],\n [null, null, "css"]\n ]\n };\n\n function maybeBackup(stream, pat, style) {\n var cur = stream.current(), close = cur.search(pat);\n if (close > -1) {\n stream.backUp(cur.length - close);\n } else if (cur.match(/<\\/?$/)) {\n stream.backUp(cur.length);\n if (!stream.match(pat, false)) stream.match(cur);\n }\n return style;\n }\n\n var attrRegexpCache = {};\n function getAttrRegexp(attr) {\n var regexp = attrRegexpCache[attr];\n if (regexp) return regexp;\n return attrRegexpCache[attr] = new RegExp("\\\\s+" + attr + "\\\\s*=\\\\s*(\'|\\")?([^\'\\"]+)(\'|\\")?\\\\s*");\n }\n\n function getAttrValue(text, attr) {\n var match = text.match(getAttrRegexp(attr))\n return match ? /^\\s*(.*?)\\s*$/.exec(match[2])[1] : ""\n }\n\n function getTagRegexp(tagName, anchored) {\n return new RegExp((anchored ? "^" : "") + "<\\/\\\\s*" + tagName + "\\\\s*>", "i");\n }\n\n function addTags(from, to) {\n for (var tag in from) {\n var dest = to[tag] || (to[tag] = []);\n var source = from[tag];\n for (var i = source.length - 1; i >= 0; i--)\n dest.unshift(source[i])\n }\n }\n\n function findMatchingMode(tagInfo, tagText) {\n for (var i = 0; i < tagInfo.length; i++) {\n var spec = tagInfo[i];\n if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];\n }\n }\n\n CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, {\n name: "xml",\n htmlMode: true,\n multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,\n allowMissingTagName: parserConfig.allowMissingTagName,\n });\n\n var tags = {};\n var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;\n addTags(defaultTags, tags);\n if (configTags) addTags(configTags, tags);\n if (configScript) for (var i = configScript.length - 1; i >= 0; i--)\n tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])\n\n function html(stream, state) {\n var style = htmlMode.token(stream, state.htmlState), tag = /\\btag\\b/.test(style), tagName\n if (tag && !/[<>\\s\\/]/.test(stream.current()) &&\n (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&\n tags.hasOwnProperty(tagName)) {\n state.inTag = tagName + " "\n } else if (state.inTag && tag && />$/.test(stream.current())) {\n var inTag = /^([\\S]+) (.*)/.exec(state.inTag)\n state.inTag = null\n var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])\n var mode = CodeMirror.getMode(config, modeSpec)\n var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);\n state.token = function (stream, state) {\n if (stream.match(endTagA, false)) {\n state.token = html;\n state.localState = state.localMode = null;\n return null;\n }\n return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));\n };\n state.localMode = mode;\n state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));\n } else if (state.inTag) {\n state.inTag += stream.current()\n if (stream.eol()) state.inTag += " "\n }\n return style;\n };\n\n return {\n startState: function () {\n var state = CodeMirror.startState(htmlMode);\n return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};\n },\n\n copyState: function (state) {\n var local;\n if (state.localState) {\n local = CodeMirror.copyState(state.localMode, state.localState);\n }\n return {token: state.token, inTag: state.inTag,\n localMode: state.localMode, localState: local,\n htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n },\n\n token: function (stream, state) {\n return state.token(stream, state);\n },\n\n indent: function (state, textAfter, line) {\n if (!state.localMode || /^\\s*<\\//.test(textAfter))\n return htmlMode.indent(state.htmlState, textAfter, line);\n else if (state.localMode.indent)\n return state.localMode.indent(state.localState, textAfter, line);\n else\n return CodeMirror.Pass;\n },\n\n innerMode: function (state) {\n return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n }\n };\n }, "xml", "javascript", "css");\n\n CodeMirror.defineMIME("text/html", "htmlmixed");\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/htmlmixed/htmlmixed.js?')},"./node_modules/codemirror/mode/http/http.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/http/http.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("http", function() {\n function failFirstLine(stream, state) {\n stream.skipToEnd();\n state.cur = header;\n return "error";\n }\n\n function start(stream, state) {\n if (stream.match(/^HTTP\\/\\d\\.\\d/)) {\n state.cur = responseStatusCode;\n return "keyword";\n } else if (stream.match(/^[A-Z]+/) && /[ \\t]/.test(stream.peek())) {\n state.cur = requestPath;\n return "keyword";\n } else {\n return failFirstLine(stream, state);\n }\n }\n\n function responseStatusCode(stream, state) {\n var code = stream.match(/^\\d+/);\n if (!code) return failFirstLine(stream, state);\n\n state.cur = responseStatusText;\n var status = Number(code[0]);\n if (status >= 100 && status < 200) {\n return "positive informational";\n } else if (status >= 200 && status < 300) {\n return "positive success";\n } else if (status >= 300 && status < 400) {\n return "positive redirect";\n } else if (status >= 400 && status < 500) {\n return "negative client-error";\n } else if (status >= 500 && status < 600) {\n return "negative server-error";\n } else {\n return "error";\n }\n }\n\n function responseStatusText(stream, state) {\n stream.skipToEnd();\n state.cur = header;\n return null;\n }\n\n function requestPath(stream, state) {\n stream.eatWhile(/\\S/);\n state.cur = requestProtocol;\n return "string-2";\n }\n\n function requestProtocol(stream, state) {\n if (stream.match(/^HTTP\\/\\d\\.\\d$/)) {\n state.cur = header;\n return "keyword";\n } else {\n return failFirstLine(stream, state);\n }\n }\n\n function header(stream) {\n if (stream.sol() && !stream.eat(/[ \\t]/)) {\n if (stream.match(/^.*?:/)) {\n return "atom";\n } else {\n stream.skipToEnd();\n return "error";\n }\n } else {\n stream.skipToEnd();\n return "string";\n }\n }\n\n function body(stream) {\n stream.skipToEnd();\n return null;\n }\n\n return {\n token: function(stream, state) {\n var cur = state.cur;\n if (cur != header && cur != body && stream.eatSpace()) return null;\n return cur(stream, state);\n },\n\n blankLine: function(state) {\n state.cur = body;\n },\n\n startState: function() {\n return {cur: start};\n }\n };\n});\n\nCodeMirror.defineMIME("message/http", "http");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/http/http.js?')},"./node_modules/codemirror/mode/javascript/javascript.js":
/*!***************************************************************!*\
!*** ./node_modules/codemirror/mode/javascript/javascript.js ***!
\***************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("javascript", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n var statementIndent = parserConfig.statementIndent;\n var jsonldMode = parserConfig.jsonld;\n var jsonMode = parserConfig.json || jsonldMode;\n var trackScope = parserConfig.trackScope !== false\n var isTS = parserConfig.typescript;\n var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n // Tokenizer\n\n var keywords = function(){\n function kw(type) {return {type: type, style: "keyword"};}\n var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");\n var operator = kw("operator"), atom = {type: "atom", style: "atom"};\n\n return {\n "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,\n "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,\n "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),\n "function": kw("function"), "catch": kw("catch"),\n "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),\n "in": operator, "typeof": operator, "instanceof": operator,\n "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,\n "this": kw("this"), "class": kw("class"), "super": kw("atom"),\n "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,\n "await": C\n };\n }();\n\n var isOperatorChar = /[+\\-*&%=<>!?|~^@]/;\n var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;\n\n function readRegexp(stream) {\n var escaped = false, next, inSet = false;\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if (next == "/" && !inSet) return;\n if (next == "[") inSet = true;\n else if (inSet && next == "]") inSet = false;\n }\n escaped = !escaped && next == "\\\\";\n }\n }\n\n // Used as scratch variables to communicate multiple values without\n // consing up tons of objects.\n var type, content;\n function ret(tp, style, cont) {\n type = tp; content = cont;\n return style;\n }\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == \'"\' || ch == "\'") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == "." && stream.match(/^\\d[\\d_]*(?:[eE][+\\-]?[\\d_]+)?/)) {\n return ret("number", "number");\n } else if (ch == "." && stream.match("..")) {\n return ret("spread", "meta");\n } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n return ret(ch);\n } else if (ch == "=" && stream.eat(">")) {\n return ret("=>", "operator");\n } else if (ch == "0" && stream.match(/^(?:x[\\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {\n return ret("number", "number");\n } else if (/\\d/.test(ch)) {\n stream.match(/^[\\d_]*(?:n|(?:\\.[\\d_]*)?(?:[eE][+\\-]?[\\d_]+)?)?/);\n return ret("number", "number");\n } else if (ch == "/") {\n if (stream.eat("*")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n } else if (stream.eat("/")) {\n stream.skipToEnd();\n return ret("comment", "comment");\n } else if (expressionAllowed(stream, state, 1)) {\n readRegexp(stream);\n stream.match(/^\\b(([gimyus])(?![gimyus]*\\2))+\\b/);\n return ret("regexp", "string-2");\n } else {\n stream.eat("=");\n return ret("operator", "operator", stream.current());\n }\n } else if (ch == "`") {\n state.tokenize = tokenQuasi;\n return tokenQuasi(stream, state);\n } else if (ch == "#" && stream.peek() == "!") {\n stream.skipToEnd();\n return ret("meta", "meta");\n } else if (ch == "#" && stream.eatWhile(wordRE)) {\n return ret("variable", "property")\n } else if (ch == "<" && stream.match("!--") ||\n (ch == "-" && stream.match("->") && !/\\S/.test(stream.string.slice(0, stream.start)))) {\n stream.skipToEnd()\n return ret("comment", "comment")\n } else if (isOperatorChar.test(ch)) {\n if (ch != ">" || !state.lexical || state.lexical.type != ">") {\n if (stream.eat("=")) {\n if (ch == "!" || ch == "=") stream.eat("=")\n } else if (/[<>*+\\-|&?]/.test(ch)) {\n stream.eat(ch)\n if (ch == ">") stream.eat(ch)\n }\n }\n if (ch == "?" && stream.eat(".")) return ret(".")\n return ret("operator", "operator", stream.current());\n } else if (wordRE.test(ch)) {\n stream.eatWhile(wordRE);\n var word = stream.current()\n if (state.lastType != ".") {\n if (keywords.propertyIsEnumerable(word)) {\n var kw = keywords[word]\n return ret(kw.type, kw.style, word)\n }\n if (word == "async" && stream.match(/^(\\s|\\/\\*([^*]|\\*(?!\\/))*?\\*\\/)*[\\[\\(\\w]/, false))\n return ret("async", "keyword", word)\n }\n return ret("variable", "variable", word)\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next;\n if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){\n state.tokenize = tokenBase;\n return ret("jsonld-keyword", "meta");\n }\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) break;\n escaped = !escaped && next == "\\\\";\n }\n if (!escaped) state.tokenize = tokenBase;\n return ret("string", "string");\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == "/" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == "*");\n }\n return ret("comment", "comment");\n }\n\n function tokenQuasi(stream, state) {\n var escaped = false, next;\n while ((next = stream.next()) != null) {\n if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = !escaped && next == "\\\\";\n }\n return ret("quasi", "string-2", stream.current());\n }\n\n var brackets = "([{}])";\n // This is a crude lookahead trick to try and notice that we\'re\n // parsing the argument patterns for a fat-arrow function before we\n // actually hit the arrow token. It only works if the arrow is on\n // the same line as the arguments and there\'s no strange noise\n // (comments) in between. Fallback is to only notice when we hit the\n // arrow, and not declare the arguments as locals for the arrow\n // body.\n function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf("=>", stream.start);\n if (arrow < 0) return;\n\n if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(stream.string.slice(stream.start, arrow))\n if (m) arrow = m.index\n }\n\n var depth = 0, sawSomething = false;\n for (var pos = arrow - 1; pos >= 0; --pos) {\n var ch = stream.string.charAt(pos);\n var bracket = brackets.indexOf(ch);\n if (bracket >= 0 && bracket < 3) {\n if (!depth) { ++pos; break; }\n if (--depth == 0) { if (ch == "(") sawSomething = true; break; }\n } else if (bracket >= 3 && bracket < 6) {\n ++depth;\n } else if (wordRE.test(ch)) {\n sawSomething = true;\n } else if (/["\'\\/`]/.test(ch)) {\n for (;; --pos) {\n if (pos == 0) return\n var next = stream.string.charAt(pos - 1)\n if (next == ch && stream.string.charAt(pos - 2) != "\\\\") { pos--; break }\n }\n } else if (sawSomething && !depth) {\n ++pos;\n break;\n }\n }\n if (sawSomething && !depth) state.fatArrowAt = pos;\n }\n\n // Parser\n\n var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true,\n "regexp": true, "this": true, "import": true, "jsonld-keyword": true};\n\n function JSLexical(indented, column, type, align, prev, info) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.prev = prev;\n this.info = info;\n if (align != null) this.align = align;\n }\n\n function inScope(state, varname) {\n if (!trackScope) return false\n for (var v = state.localVars; v; v = v.next)\n if (v.name == varname) return true;\n for (var cx = state.context; cx; cx = cx.prev) {\n for (var v = cx.vars; v; v = v.next)\n if (v.name == varname) return true;\n }\n }\n\n function parseJS(state, style, type, content, stream) {\n var cc = state.cc;\n // Communicate our context to the combinators.\n // (Less wasteful than consing up a hundred closures on every call.)\n cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n if (!state.lexical.hasOwnProperty("align"))\n state.lexical.align = true;\n\n while(true) {\n var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n if (combinator(type, content)) {\n while(cc.length && cc[cc.length - 1].lex)\n cc.pop()();\n if (cx.marked) return cx.marked;\n if (type == "variable" && inScope(state, content)) return "variable-2";\n return style;\n }\n }\n }\n\n // Combinator utils\n\n var cx = {state: null, column: null, marked: null, cc: null};\n function pass() {\n for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n }\n function cont() {\n pass.apply(null, arguments);\n return true;\n }\n function inList(name, list) {\n for (var v = list; v; v = v.next) if (v.name == name) return true\n return false;\n }\n function register(varname) {\n var state = cx.state;\n cx.marked = "def";\n if (!trackScope) return\n if (state.context) {\n if (state.lexical.info == "var" && state.context && state.context.block) {\n // FIXME function decls are also not block scoped\n var newContext = registerVarScoped(varname, state.context)\n if (newContext != null) {\n state.context = newContext\n return\n }\n } else if (!inList(varname, state.localVars)) {\n state.localVars = new Var(varname, state.localVars)\n return\n }\n }\n // Fall through means this is global\n if (parserConfig.globalVars && !inList(varname, state.globalVars))\n state.globalVars = new Var(varname, state.globalVars)\n }\n function registerVarScoped(varname, context) {\n if (!context) {\n return null\n } else if (context.block) {\n var inner = registerVarScoped(varname, context.prev)\n if (!inner) return null\n if (inner == context.prev) return context\n return new Context(inner, context.vars, true)\n } else if (inList(varname, context.vars)) {\n return context\n } else {\n return new Context(context.prev, new Var(varname, context.vars), false)\n }\n }\n\n function isModifier(name) {\n return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"\n }\n\n // Combinators\n\n function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }\n function Var(name, next) { this.name = name; this.next = next }\n\n var defaultVars = new Var("this", new Var("arguments", null))\n function pushcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, false)\n cx.state.localVars = defaultVars\n }\n function pushblockcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, true)\n cx.state.localVars = null\n }\n pushcontext.lex = pushblockcontext.lex = true\n function popcontext() {\n cx.state.localVars = cx.state.context.vars\n cx.state.context = cx.state.context.prev\n }\n popcontext.lex = true\n function pushlex(type, info) {\n var result = function() {\n var state = cx.state, indent = state.indented;\n if (state.lexical.type == "stat") indent = state.lexical.indented;\n else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)\n indent = outer.indented;\n state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n };\n result.lex = true;\n return result;\n }\n function poplex() {\n var state = cx.state;\n if (state.lexical.prev) {\n if (state.lexical.type == ")")\n state.indented = state.lexical.indented;\n state.lexical = state.lexical.prev;\n }\n }\n poplex.lex = true;\n\n function expect(wanted) {\n function exp(type) {\n if (type == wanted) return cont();\n else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();\n else return cont(exp);\n };\n return exp;\n }\n\n function statement(type, value) {\n if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);\n if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);\n if (type == "keyword b") return cont(pushlex("form"), statement, poplex);\n if (type == "keyword d") return cx.stream.match(/^\\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);\n if (type == "debugger") return cont(expect(";"));\n if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);\n if (type == ";") return cont();\n if (type == "if") {\n if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n cx.state.cc.pop()();\n return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);\n }\n if (type == "function") return cont(functiondef);\n if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);\n if (type == "class" || (isTS && value == "interface")) {\n cx.marked = "keyword"\n return cont(pushlex("form", type == "class" ? type : value), className, poplex)\n }\n if (type == "variable") {\n if (isTS && value == "declare") {\n cx.marked = "keyword"\n return cont(statement)\n } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\\s*\\w/, false)) {\n cx.marked = "keyword"\n if (value == "enum") return cont(enumdef);\n else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";"));\n else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)\n } else if (isTS && value == "namespace") {\n cx.marked = "keyword"\n return cont(pushlex("form"), expression, statement, poplex)\n } else if (isTS && value == "abstract") {\n cx.marked = "keyword"\n return cont(statement)\n } else {\n return cont(pushlex("stat"), maybelabel);\n }\n }\n if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,\n block, poplex, poplex, popcontext);\n if (type == "case") return cont(expression, expect(":"));\n if (type == "default") return cont(expect(":"));\n if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);\n if (type == "export") return cont(pushlex("stat"), afterExport, poplex);\n if (type == "import") return cont(pushlex("stat"), afterImport, poplex);\n if (type == "async") return cont(statement)\n if (value == "@") return cont(expression, statement)\n return pass(pushlex("stat"), expression, expect(";"), poplex);\n }\n function maybeCatchBinding(type) {\n if (type == "(") return cont(funarg, expect(")"))\n }\n function expression(type, value) {\n return expressionInner(type, value, false);\n }\n function expressionNoComma(type, value) {\n return expressionInner(type, value, true);\n }\n function parenExpr(type) {\n if (type != "(") return pass()\n return cont(pushlex(")"), maybeexpression, expect(")"), poplex)\n }\n function expressionInner(type, value, noComma) {\n if (cx.state.fatArrowAt == cx.stream.start) {\n var body = noComma ? arrowBodyNoComma : arrowBody;\n if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);\n else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);\n }\n\n var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n if (type == "function") return cont(functiondef, maybeop);\n if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }\n if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);\n if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);\n if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);\n if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);\n if (type == "{") return contCommasep(objprop, "}", null, maybeop);\n if (type == "quasi") return pass(quasi, maybeop);\n if (type == "new") return cont(maybeTarget(noComma));\n return cont();\n }\n function maybeexpression(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expression);\n }\n\n function maybeoperatorComma(type, value) {\n if (type == ",") return cont(maybeexpression);\n return maybeoperatorNoComma(type, value, false);\n }\n function maybeoperatorNoComma(type, value, noComma) {\n var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n var expr = noComma == false ? expression : expressionNoComma;\n if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n if (type == "operator") {\n if (/\\+\\+|--/.test(value) || isTS && value == "!") return cont(me);\n if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\\s*\\(/, false))\n return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);\n if (value == "?") return cont(expression, expect(":"), expr);\n return cont(expr);\n }\n if (type == "quasi") { return pass(quasi, me); }\n if (type == ";") return;\n if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);\n if (type == ".") return cont(property, me);\n if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);\n if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }\n if (type == "regexp") {\n cx.state.lastType = cx.marked = "operator"\n cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)\n return cont(expr)\n }\n }\n function quasi(type, value) {\n if (type != "quasi") return pass();\n if (value.slice(value.length - 2) != "${") return cont(quasi);\n return cont(maybeexpression, continueQuasi);\n }\n function continueQuasi(type) {\n if (type == "}") {\n cx.marked = "string-2";\n cx.state.tokenize = tokenQuasi;\n return cont(quasi);\n }\n }\n function arrowBody(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == "{" ? statement : expression);\n }\n function arrowBodyNoComma(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == "{" ? statement : expressionNoComma);\n }\n function maybeTarget(noComma) {\n return function(type) {\n if (type == ".") return cont(noComma ? targetNoComma : target);\n else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)\n else return pass(noComma ? expressionNoComma : expression);\n };\n }\n function target(_, value) {\n if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }\n }\n function targetNoComma(_, value) {\n if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }\n }\n function maybelabel(type) {\n if (type == ":") return cont(poplex, statement);\n return pass(maybeoperatorComma, expect(";"), poplex);\n }\n function property(type) {\n if (type == "variable") {cx.marked = "property"; return cont();}\n }\n function objprop(type, value) {\n if (type == "async") {\n cx.marked = "property";\n return cont(objprop);\n } else if (type == "variable" || cx.style == "keyword") {\n cx.marked = "property";\n if (value == "get" || value == "set") return cont(getterSetter);\n var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params\n if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\\s*:\\s*/, false)))\n cx.state.fatArrowAt = cx.stream.pos + m[0].length\n return cont(afterprop);\n } else if (type == "number" || type == "string") {\n cx.marked = jsonldMode ? "property" : (cx.style + " property");\n return cont(afterprop);\n } else if (type == "jsonld-keyword") {\n return cont(afterprop);\n } else if (isTS && isModifier(value)) {\n cx.marked = "keyword"\n return cont(objprop)\n } else if (type == "[") {\n return cont(expression, maybetype, expect("]"), afterprop);\n } else if (type == "spread") {\n return cont(expressionNoComma, afterprop);\n } else if (value == "*") {\n cx.marked = "keyword";\n return cont(objprop);\n } else if (type == ":") {\n return pass(afterprop)\n }\n }\n function getterSetter(type) {\n if (type != "variable") return pass(afterprop);\n cx.marked = "property";\n return cont(functiondef);\n }\n function afterprop(type) {\n if (type == ":") return cont(expressionNoComma);\n if (type == "(") return pass(functiondef);\n }\n function commasep(what, end, sep) {\n function proceed(type, value) {\n if (sep ? sep.indexOf(type) > -1 : type == ",") {\n var lex = cx.state.lexical;\n if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;\n return cont(function(type, value) {\n if (type == end || value == end) return pass()\n return pass(what)\n }, proceed);\n }\n if (type == end || value == end) return cont();\n if (sep && sep.indexOf(";") > -1) return pass(what)\n return cont(expect(end));\n }\n return function(type, value) {\n if (type == end || value == end) return cont();\n return pass(what, proceed);\n };\n }\n function contCommasep(what, end, info) {\n for (var i = 3; i < arguments.length; i++)\n cx.cc.push(arguments[i]);\n return cont(pushlex(end, info), commasep(what, end), poplex);\n }\n function block(type) {\n if (type == "}") return cont();\n return pass(statement, block);\n }\n function maybetype(type, value) {\n if (isTS) {\n if (type == ":") return cont(typeexpr);\n if (value == "?") return cont(maybetype);\n }\n }\n function maybetypeOrIn(type, value) {\n if (isTS && (type == ":" || value == "in")) return cont(typeexpr)\n }\n function mayberettype(type) {\n if (isTS && type == ":") {\n if (cx.stream.match(/^\\s*\\w+\\s+is\\b/, false)) return cont(expression, isKW, typeexpr)\n else return cont(typeexpr)\n }\n }\n function isKW(_, value) {\n if (value == "is") {\n cx.marked = "keyword"\n return cont()\n }\n }\n function typeexpr(type, value) {\n if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") {\n cx.marked = "keyword"\n return cont(value == "typeof" ? expressionNoComma : typeexpr)\n }\n if (type == "variable" || value == "void") {\n cx.marked = "type"\n return cont(afterType)\n }\n if (value == "|" || value == "&") return cont(typeexpr)\n if (type == "string" || type == "number" || type == "atom") return cont(afterType);\n if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)\n if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType)\n if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType)\n if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)\n if (type == "quasi") { return pass(quasiType, afterType); }\n }\n function maybeReturnType(type) {\n if (type == "=>") return cont(typeexpr)\n }\n function typeprops(type) {\n if (type.match(/[\\}\\)\\]]/)) return cont()\n if (type == "," || type == ";") return cont(typeprops)\n return pass(typeprop, typeprops)\n }\n function typeprop(type, value) {\n if (type == "variable" || cx.style == "keyword") {\n cx.marked = "property"\n return cont(typeprop)\n } else if (value == "?" || type == "number" || type == "string") {\n return cont(typeprop)\n } else if (type == ":") {\n return cont(typeexpr)\n } else if (type == "[") {\n return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop)\n } else if (type == "(") {\n return pass(functiondecl, typeprop)\n } else if (!type.match(/[;\\}\\)\\],]/)) {\n return cont()\n }\n }\n function quasiType(type, value) {\n if (type != "quasi") return pass();\n if (value.slice(value.length - 2) != "${") return cont(quasiType);\n return cont(typeexpr, continueQuasiType);\n }\n function continueQuasiType(type) {\n if (type == "}") {\n cx.marked = "string-2";\n cx.state.tokenize = tokenQuasi;\n return cont(quasiType);\n }\n }\n function typearg(type, value) {\n if (type == "variable" && cx.stream.match(/^\\s*[?:]/, false) || value == "?") return cont(typearg)\n if (type == ":") return cont(typeexpr)\n if (type == "spread") return cont(typearg)\n return pass(typeexpr)\n }\n function afterType(type, value) {\n if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)\n if (value == "|" || type == "." || value == "&") return cont(typeexpr)\n if (type == "[") return cont(typeexpr, expect("]"), afterType)\n if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }\n if (value == "?") return cont(typeexpr, expect(":"), typeexpr)\n }\n function maybeTypeArgs(_, value) {\n if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)\n }\n function typeparam() {\n return pass(typeexpr, maybeTypeDefault)\n }\n function maybeTypeDefault(_, value) {\n if (value == "=") return cont(typeexpr)\n }\n function vardef(_, value) {\n if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}\n return pass(pattern, maybetype, maybeAssign, vardefCont);\n }\n function pattern(type, value) {\n if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }\n if (type == "variable") { register(value); return cont(); }\n if (type == "spread") return cont(pattern);\n if (type == "[") return contCommasep(eltpattern, "]");\n if (type == "{") return contCommasep(proppattern, "}");\n }\n function proppattern(type, value) {\n if (type == "variable" && !cx.stream.match(/^\\s*:/, false)) {\n register(value);\n return cont(maybeAssign);\n }\n if (type == "variable") cx.marked = "property";\n if (type == "spread") return cont(pattern);\n if (type == "}") return pass();\n if (type == "[") return cont(expression, expect(\']\'), expect(\':\'), proppattern);\n return cont(expect(":"), pattern, maybeAssign);\n }\n function eltpattern() {\n return pass(pattern, maybeAssign)\n }\n function maybeAssign(_type, value) {\n if (value == "=") return cont(expressionNoComma);\n }\n function vardefCont(type) {\n if (type == ",") return cont(vardef);\n }\n function maybeelse(type, value) {\n if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);\n }\n function forspec(type, value) {\n if (value == "await") return cont(forspec);\n if (type == "(") return cont(pushlex(")"), forspec1, poplex);\n }\n function forspec1(type) {\n if (type == "var") return cont(vardef, forspec2);\n if (type == "variable") return cont(forspec2);\n return pass(forspec2)\n }\n function forspec2(type, value) {\n if (type == ")") return cont()\n if (type == ";") return cont(forspec2)\n if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) }\n return pass(expression, forspec2)\n }\n function functiondef(type, value) {\n if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}\n if (type == "variable") {register(value); return cont(functiondef);}\n if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);\n if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)\n }\n function functiondecl(type, value) {\n if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);}\n if (type == "variable") {register(value); return cont(functiondecl);}\n if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);\n if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl)\n }\n function typename(type, value) {\n if (type == "keyword" || type == "variable") {\n cx.marked = "type"\n return cont(typename)\n } else if (value == "<") {\n return cont(pushlex(">"), commasep(typeparam, ">"), poplex)\n }\n }\n function funarg(type, value) {\n if (value == "@") cont(expression, funarg)\n if (type == "spread") return cont(funarg);\n if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }\n if (isTS && type == "this") return cont(maybetype, maybeAssign)\n return pass(pattern, maybetype, maybeAssign);\n }\n function classExpression(type, value) {\n // Class expressions may have an optional name.\n if (type == "variable") return className(type, value);\n return classNameAfter(type, value);\n }\n function className(type, value) {\n if (type == "variable") {register(value); return cont(classNameAfter);}\n }\n function classNameAfter(type, value) {\n if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)\n if (value == "extends" || value == "implements" || (isTS && type == ",")) {\n if (value == "implements") cx.marked = "keyword";\n return cont(isTS ? typeexpr : expression, classNameAfter);\n }\n if (type == "{") return cont(pushlex("}"), classBody, poplex);\n }\n function classBody(type, value) {\n if (type == "async" ||\n (type == "variable" &&\n (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&\n cx.stream.match(/^\\s+[\\w$\\xa1-\\uffff]/, false))) {\n cx.marked = "keyword";\n return cont(classBody);\n }\n if (type == "variable" || cx.style == "keyword") {\n cx.marked = "property";\n return cont(classfield, classBody);\n }\n if (type == "number" || type == "string") return cont(classfield, classBody);\n if (type == "[")\n return cont(expression, maybetype, expect("]"), classfield, classBody)\n if (value == "*") {\n cx.marked = "keyword";\n return cont(classBody);\n }\n if (isTS && type == "(") return pass(functiondecl, classBody)\n if (type == ";" || type == ",") return cont(classBody);\n if (type == "}") return cont();\n if (value == "@") return cont(expression, classBody)\n }\n function classfield(type, value) {\n if (value == "!") return cont(classfield)\n if (value == "?") return cont(classfield)\n if (type == ":") return cont(typeexpr, maybeAssign)\n if (value == "=") return cont(expressionNoComma)\n var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"\n return pass(isInterface ? functiondecl : functiondef)\n }\n function afterExport(type, value) {\n if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }\n if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }\n if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));\n return pass(statement);\n }\n function exportField(type, value) {\n if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }\n if (type == "variable") return pass(expressionNoComma, exportField);\n }\n function afterImport(type) {\n if (type == "string") return cont();\n if (type == "(") return pass(expression);\n if (type == ".") return pass(maybeoperatorComma);\n return pass(importSpec, maybeMoreImports, maybeFrom);\n }\n function importSpec(type, value) {\n if (type == "{") return contCommasep(importSpec, "}");\n if (type == "variable") register(value);\n if (value == "*") cx.marked = "keyword";\n return cont(maybeAs);\n }\n function maybeMoreImports(type) {\n if (type == ",") return cont(importSpec, maybeMoreImports)\n }\n function maybeAs(_type, value) {\n if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }\n }\n function maybeFrom(_type, value) {\n if (value == "from") { cx.marked = "keyword"; return cont(expression); }\n }\n function arrayLiteral(type) {\n if (type == "]") return cont();\n return pass(commasep(expressionNoComma, "]"));\n }\n function enumdef() {\n return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)\n }\n function enummember() {\n return pass(pattern, maybeAssign);\n }\n\n function isContinuedStatement(state, textAfter) {\n return state.lastType == "operator" || state.lastType == "," ||\n isOperatorChar.test(textAfter.charAt(0)) ||\n /[,.]/.test(textAfter.charAt(0));\n }\n\n function expressionAllowed(stream, state, backUp) {\n return state.tokenize == tokenBase &&\n /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n (state.lastType == "quasi" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n var state = {\n tokenize: tokenBase,\n lastType: "sof",\n cc: [],\n lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),\n localVars: parserConfig.localVars,\n context: parserConfig.localVars && new Context(null, null, false),\n indented: basecolumn || 0\n };\n if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")\n state.globalVars = parserConfig.globalVars;\n return state;\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (!state.lexical.hasOwnProperty("align"))\n state.lexical.align = false;\n state.indented = stream.indentation();\n findFatArrow(stream, state);\n }\n if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (type == "comment") return style;\n state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;\n return parseJS(state, style, type, content, stream);\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top\n // Kludge to prevent \'maybelse\' from blocking lexical scope pops\n if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n var c = state.cc[i];\n if (c == poplex) lexical = lexical.prev;\n else if (c != maybeelse && c != popcontext) break;\n }\n while ((lexical.type == "stat" || lexical.type == "form") &&\n (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&\n (top == maybeoperatorComma || top == maybeoperatorNoComma) &&\n !/^[,\\.=+\\-*:?[\\(]/.test(textAfter))))\n lexical = lexical.prev;\n if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")\n lexical = lexical.prev;\n var type = lexical.type, closing = firstChar == type;\n\n if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);\n else if (type == "form" && firstChar == "{") return lexical.indented;\n else if (type == "form") return lexical.indented + indentUnit;\n else if (type == "stat")\n return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)\n return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n else return lexical.indented + (closing ? 0 : indentUnit);\n },\n\n electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n blockCommentStart: jsonMode ? null : "/*",\n blockCommentEnd: jsonMode ? null : "*/",\n blockCommentContinue: jsonMode ? null : " * ",\n lineComment: jsonMode ? null : "//",\n fold: "brace",\n closeBrackets: "()[]{}\'\'\\"\\"``",\n\n helperType: jsonMode ? "json" : "javascript",\n jsonldMode: jsonldMode,\n jsonMode: jsonMode,\n\n expressionAllowed: expressionAllowed,\n\n skipExpression: function(state) {\n parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null))\n }\n };\n});\n\nCodeMirror.registerHelper("wordChars", "javascript", /[\\w$]/);\n\nCodeMirror.defineMIME("text/javascript", "javascript");\nCodeMirror.defineMIME("text/ecmascript", "javascript");\nCodeMirror.defineMIME("application/javascript", "javascript");\nCodeMirror.defineMIME("application/x-javascript", "javascript");\nCodeMirror.defineMIME("application/ecmascript", "javascript");\nCodeMirror.defineMIME("application/json", { name: "javascript", json: true });\nCodeMirror.defineMIME("application/x-json", { name: "javascript", json: true });\nCodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true })\nCodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true });\nCodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });\nCodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/javascript/javascript.js?')},"./node_modules/codemirror/mode/lua/lua.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/lua/lua.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak\'s\n// CodeMirror 1 mode.\n// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("lua", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n\n function prefixRE(words) {\n return new RegExp("^(?:" + words.join("|") + ")", "i");\n }\n function wordRE(words) {\n return new RegExp("^(?:" + words.join("|") + ")$", "i");\n }\n var specials = wordRE(parserConfig.specials || []);\n\n // long list of standard functions from lua manual\n var builtins = wordRE([\n "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load",\n "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require",\n "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",\n\n "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",\n\n "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable",\n "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable",\n "debug.setupvalue","debug.traceback",\n\n "close","flush","lines","read","seek","setvbuf","write",\n\n "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin",\n "io.stdout","io.tmpfile","io.type","io.write",\n\n "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg",\n "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max",\n "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh",\n "math.sqrt","math.tan","math.tanh",\n\n "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale",\n "os.time","os.tmpname",\n\n "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload",\n "package.seeall",\n\n "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub",\n "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",\n\n "table.concat","table.insert","table.maxn","table.remove","table.sort"\n ]);\n var keywords = wordRE(["and","break","elseif","false","nil","not","or","return",\n "true","function", "end", "if", "then", "else", "do",\n "while", "repeat", "until", "for", "in", "local" ]);\n\n var indentTokens = wordRE(["function", "if","repeat","do", "\\\\(", "{"]);\n var dedentTokens = wordRE(["end", "until", "\\\\)", "}"]);\n var dedentPartial = prefixRE(["end", "until", "\\\\)", "}", "else", "elseif"]);\n\n function readBracket(stream) {\n var level = 0;\n while (stream.eat("=")) ++level;\n stream.eat("[");\n return level;\n }\n\n function normal(stream, state) {\n var ch = stream.next();\n if (ch == "-" && stream.eat("-")) {\n if (stream.eat("[") && stream.eat("["))\n return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state);\n stream.skipToEnd();\n return "comment";\n }\n if (ch == "\\"" || ch == "\'")\n return (state.cur = string(ch))(stream, state);\n if (ch == "[" && /[\\[=]/.test(stream.peek()))\n return (state.cur = bracketed(readBracket(stream), "string"))(stream, state);\n if (/\\d/.test(ch)) {\n stream.eatWhile(/[\\w.%]/);\n return "number";\n }\n if (/[\\w_]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-_.]/);\n return "variable";\n }\n return null;\n }\n\n function bracketed(level, style) {\n return function(stream, state) {\n var curlev = null, ch;\n while ((ch = stream.next()) != null) {\n if (curlev == null) {if (ch == "]") curlev = 0;}\n else if (ch == "=") ++curlev;\n else if (ch == "]" && curlev == level) { state.cur = normal; break; }\n else curlev = null;\n }\n return style;\n };\n }\n\n function string(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) break;\n escaped = !escaped && ch == "\\\\";\n }\n if (!escaped) state.cur = normal;\n return "string";\n };\n }\n\n return {\n startState: function(basecol) {\n return {basecol: basecol || 0, indentDepth: 0, cur: normal};\n },\n\n token: function(stream, state) {\n if (stream.eatSpace()) return null;\n var style = state.cur(stream, state);\n var word = stream.current();\n if (style == "variable") {\n if (keywords.test(word)) style = "keyword";\n else if (builtins.test(word)) style = "builtin";\n else if (specials.test(word)) style = "variable-2";\n }\n if ((style != "comment") && (style != "string")){\n if (indentTokens.test(word)) ++state.indentDepth;\n else if (dedentTokens.test(word)) --state.indentDepth;\n }\n return style;\n },\n\n indent: function(state, textAfter) {\n var closing = dedentPartial.test(textAfter);\n return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));\n },\n\n electricInput: /^\\s*(?:end|until|else|\\)|\\})$/,\n lineComment: "--",\n blockCommentStart: "--[[",\n blockCommentEnd: "]]"\n };\n});\n\nCodeMirror.defineMIME("text/x-lua", "lua");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/lua/lua.js?')},"./node_modules/codemirror/mode/markdown/markdown.js":
/*!***********************************************************!*\
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
\***********************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../xml/xml */ "./node_modules/codemirror/mode/xml/xml.js"), __webpack_require__(/*! ../meta */ "./node_modules/codemirror/mode/meta.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {\n\n var htmlMode = CodeMirror.getMode(cmCfg, "text/html");\n var htmlModeMissing = htmlMode.name == "null"\n\n function getMode(name) {\n if (CodeMirror.findModeByName) {\n var found = CodeMirror.findModeByName(name);\n if (found) name = found.mime || found.mimes[0];\n }\n var mode = CodeMirror.getMode(cmCfg, name);\n return mode.name == "null" ? null : mode;\n }\n\n // Should characters that affect highlighting be highlighted separate?\n // Does not include characters that will be output (such as `1.` and `-` for lists)\n if (modeCfg.highlightFormatting === undefined)\n modeCfg.highlightFormatting = false;\n\n // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n // Excess `>` will emit `error` token.\n if (modeCfg.maxBlockquoteDepth === undefined)\n modeCfg.maxBlockquoteDepth = 0;\n\n // Turn on task lists? ("- [ ] " and "- [x] ")\n if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n // Turn on strikethrough syntax\n if (modeCfg.strikethrough === undefined)\n modeCfg.strikethrough = false;\n\n if (modeCfg.emoji === undefined)\n modeCfg.emoji = false;\n\n if (modeCfg.fencedCodeBlockHighlighting === undefined)\n modeCfg.fencedCodeBlockHighlighting = true;\n\n if (modeCfg.fencedCodeBlockDefaultMode === undefined)\n modeCfg.fencedCodeBlockDefaultMode = \'text/plain\';\n\n if (modeCfg.xml === undefined)\n modeCfg.xml = true;\n\n // Allow token types to be overridden by user-provided token types.\n if (modeCfg.tokenTypeOverrides === undefined)\n modeCfg.tokenTypeOverrides = {};\n\n var tokenTypes = {\n header: "header",\n code: "comment",\n quote: "quote",\n list1: "variable-2",\n list2: "variable-3",\n list3: "keyword",\n hr: "hr",\n image: "image",\n imageAltText: "image-alt-text",\n imageMarker: "image-marker",\n formatting: "formatting",\n linkInline: "link",\n linkEmail: "link",\n linkText: "link",\n linkHref: "string",\n em: "em",\n strong: "strong",\n strikethrough: "strikethrough",\n emoji: "builtin"\n };\n\n for (var tokenType in tokenTypes) {\n if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n }\n }\n\n var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n , listRE = /^(?:[*\\-+]|^[0-9]+([.)]))\\s+/\n , taskListRE = /^\\[(x| )\\](?=\\s)/i // Must follow listRE\n , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n , setextHeaderRE = /^ {0,3}(?:\\={1,}|-{2,})\\s*$/\n , textRE = /^[^#!\\[\\]*_\\\\<>` "\'(~:]+/\n , fencedCodeRE = /^(~~~+|```+)[ \\t]*([\\w\\/+#-]*)[^\\n`]*$/\n , linkDefRE = /^\\s*\\[[^\\]]+?\\]:.*$/ // naive link-definition\n , punctuation = /[!"#$%&\'()*+,\\-.\\/:;<=>?@\\[\\\\\\]^_`{|}~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E42\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC9\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDF3C-\\uDF3E]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]/\n , expandedTab = " " // CommonMark specifies tab as 4 spaces\n\n function switchInline(stream, state, f) {\n state.f = state.inline = f;\n return f(stream, state);\n }\n\n function switchBlock(stream, state, f) {\n state.f = state.block = f;\n return f(stream, state);\n }\n\n function lineIsEmpty(line) {\n return !line || !/\\S/.test(line.string)\n }\n\n // Blocks\n\n function blankLine(state) {\n // Reset linkTitle state\n state.linkTitle = false;\n state.linkHref = false;\n state.linkText = false;\n // Reset EM state\n state.em = false;\n // Reset STRONG state\n state.strong = false;\n // Reset strikethrough state\n state.strikethrough = false;\n // Reset state.quote\n state.quote = 0;\n // Reset state.indentedCode\n state.indentedCode = false;\n if (state.f == htmlBlock) {\n var exit = htmlModeMissing\n if (!exit) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n exit = inner.mode.name == "xml" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)\n }\n if (exit) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n // Mark this line as blank\n state.prevLine = state.thisLine\n state.thisLine = {stream: null}\n return null;\n }\n\n function blockNormal(stream, state) {\n var firstTokenOnLine = stream.column() === state.indentation;\n var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);\n var prevLineIsIndentedCode = state.indentedCode;\n var prevLineIsHr = state.prevLine.hr;\n var prevLineIsList = state.list !== false;\n var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;\n\n state.indentedCode = false;\n\n var lineIndentation = state.indentation;\n // compute once per line (on first token)\n if (state.indentationDiff === null) {\n state.indentationDiff = state.indentation;\n if (prevLineIsList) {\n state.list = null;\n // While this list item\'s marker\'s indentation is less than the deepest\n // list item\'s content\'s indentation,pop the deepest list item\n // indentation off the stack, and update block indentation state\n while (lineIndentation < state.listStack[state.listStack.length - 1]) {\n state.listStack.pop();\n if (state.listStack.length) {\n state.indentation = state.listStack[state.listStack.length - 1];\n // less than the first list\'s indent -> the line is no longer a list\n } else {\n state.list = false;\n }\n }\n if (state.list !== false) {\n state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]\n }\n }\n }\n\n // not comprehensive (currently only for setext detection purposes)\n var allowsInlineContinuation = (\n !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&\n (!prevLineIsList || !prevLineIsIndentedCode) &&\n !state.prevLine.fencedCodeEnd\n );\n\n var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&\n state.indentation <= maxNonCodeIndentation && stream.match(hrRE);\n\n var match = null;\n if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||\n state.prevLine.header || prevLineLineIsEmpty)) {\n stream.skipToEnd();\n state.indentedCode = true;\n return tokenTypes.code;\n } else if (stream.eatSpace()) {\n return null;\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n state.quote = 0;\n state.header = match[1].length;\n state.thisLine.header = true;\n if (modeCfg.highlightFormatting) state.formatting = "header";\n state.f = state.inline;\n return getType(state);\n } else if (state.indentation <= maxNonCodeIndentation && stream.eat(\'>\')) {\n state.quote = firstTokenOnLine ? 1 : state.quote + 1;\n if (modeCfg.highlightFormatting) state.formatting = "quote";\n stream.eatSpace();\n return getType(state);\n } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {\n var listType = match[1] ? "ol" : "ul";\n\n state.indentation = lineIndentation + stream.current().length;\n state.list = true;\n state.quote = 0;\n\n // Add this list item\'s content\'s indentation to the stack\n state.listStack.push(state.indentation);\n // Reset inline styles which shouldn\'t propagate across list items\n state.em = false;\n state.strong = false;\n state.code = false;\n state.strikethrough = false;\n\n if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n state.taskList = true;\n }\n state.f = state.inline;\n if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];\n return getType(state);\n } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {\n state.quote = 0;\n state.fencedEndRE = new RegExp(match[1] + "+ *$");\n // try switching mode\n state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode );\n if (state.localMode) state.localState = CodeMirror.startState(state.localMode);\n state.f = state.block = local;\n if (modeCfg.highlightFormatting) state.formatting = "code-block";\n state.code = -1\n return getType(state);\n // SETEXT has lowest block-scope precedence after HR, so check it after\n // the others (code, blockquote, list...)\n } else if (\n // if setext set, indicates line after ---/===\n state.setext || (\n // line before ---/===\n (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&\n !state.code && !isHr && !linkDefRE.test(stream.string) &&\n (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))\n )\n ) {\n if ( !state.setext ) {\n state.header = match[0].charAt(0) == \'=\' ? 1 : 2;\n state.setext = state.header;\n } else {\n state.header = state.setext;\n // has no effect on type so we can reset it now\n state.setext = 0;\n stream.skipToEnd();\n if (modeCfg.highlightFormatting) state.formatting = "header";\n }\n state.thisLine.header = true;\n state.f = state.inline;\n return getType(state);\n } else if (isHr) {\n stream.skipToEnd();\n state.hr = true;\n state.thisLine.hr = true;\n return tokenTypes.hr;\n } else if (stream.peek() === \'[\') {\n return switchInline(stream, state, footnoteLink);\n }\n\n return switchInline(stream, state, state.inline);\n }\n\n function htmlBlock(stream, state) {\n var style = htmlMode.token(stream, state.htmlState);\n if (!htmlModeMissing) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n if ((inner.mode.name == "xml" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)) ||\n (state.md_inside && stream.current().indexOf(">") > -1)) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n return style;\n }\n\n function local(stream, state) {\n var currListInd = state.listStack[state.listStack.length - 1] || 0;\n var hasExitedList = state.indentation < currListInd;\n var maxFencedEndInd = currListInd + 3;\n if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {\n if (modeCfg.highlightFormatting) state.formatting = "code-block";\n var returnType;\n if (!hasExitedList) returnType = getType(state)\n state.localMode = state.localState = null;\n state.block = blockNormal;\n state.f = inlineNormal;\n state.fencedEndRE = null;\n state.code = 0\n state.thisLine.fencedCodeEnd = true;\n if (hasExitedList) return switchBlock(stream, state, state.block);\n return returnType;\n } else if (state.localMode) {\n return state.localMode.token(stream, state.localState);\n } else {\n stream.skipToEnd();\n return tokenTypes.code;\n }\n }\n\n // Inline\n function getType(state) {\n var styles = [];\n\n if (state.formatting) {\n styles.push(tokenTypes.formatting);\n\n if (typeof state.formatting === "string") state.formatting = [state.formatting];\n\n for (var i = 0; i < state.formatting.length; i++) {\n styles.push(tokenTypes.formatting + "-" + state.formatting[i]);\n\n if (state.formatting[i] === "header") {\n styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);\n }\n\n // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n // Add `error` instead if the maximum blockquote nesting depth is passed\n if (state.formatting[i] === "quote") {\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);\n } else {\n styles.push("error");\n }\n }\n }\n }\n\n if (state.taskOpen) {\n styles.push("meta");\n return styles.length ? styles.join(\' \') : null;\n }\n if (state.taskClosed) {\n styles.push("property");\n return styles.length ? styles.join(\' \') : null;\n }\n\n if (state.linkHref) {\n styles.push(tokenTypes.linkHref, "url");\n } else { // Only apply inline styles to non-url text\n if (state.strong) { styles.push(tokenTypes.strong); }\n if (state.em) { styles.push(tokenTypes.em); }\n if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n if (state.emoji) { styles.push(tokenTypes.emoji); }\n if (state.linkText) { styles.push(tokenTypes.linkText); }\n if (state.code) { styles.push(tokenTypes.code); }\n if (state.image) { styles.push(tokenTypes.image); }\n if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }\n if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }\n }\n\n if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }\n\n if (state.quote) {\n styles.push(tokenTypes.quote);\n\n // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.quote + "-" + state.quote);\n } else {\n styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);\n }\n }\n\n if (state.list !== false) {\n var listMod = (state.listStack.length - 1) % 3;\n if (!listMod) {\n styles.push(tokenTypes.list1);\n } else if (listMod === 1) {\n styles.push(tokenTypes.list2);\n } else {\n styles.push(tokenTypes.list3);\n }\n }\n\n if (state.trailingSpaceNewLine) {\n styles.push("trailing-space-new-line");\n } else if (state.trailingSpace) {\n styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));\n }\n\n return styles.length ? styles.join(\' \') : null;\n }\n\n function handleText(stream, state) {\n if (stream.match(textRE, true)) {\n return getType(state);\n }\n return undefined;\n }\n\n function inlineNormal(stream, state) {\n var style = state.text(stream, state);\n if (typeof style !== \'undefined\')\n return style;\n\n if (state.list) { // List marker (*, +, -, 1., etc)\n state.list = null;\n return getType(state);\n }\n\n if (state.taskList) {\n var taskOpen = stream.match(taskListRE, true)[1] === " ";\n if (taskOpen) state.taskOpen = true;\n else state.taskClosed = true;\n if (modeCfg.highlightFormatting) state.formatting = "task";\n state.taskList = false;\n return getType(state);\n }\n\n state.taskOpen = false;\n state.taskClosed = false;\n\n if (state.header && stream.match(/^#+$/, true)) {\n if (modeCfg.highlightFormatting) state.formatting = "header";\n return getType(state);\n }\n\n var ch = stream.next();\n\n // Matches link titles present on next line\n if (state.linkTitle) {\n state.linkTitle = false;\n var matchCh = ch;\n if (ch === \'(\') {\n matchCh = \')\';\n }\n matchCh = (matchCh+\'\').replace(/([.?*+^\\[\\]\\\\(){}|-])/g, "\\\\$1");\n var regex = \'^\\\\s*(?:[^\' + matchCh + \'\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)\' + matchCh;\n if (stream.match(new RegExp(regex), true)) {\n return tokenTypes.linkHref;\n }\n }\n\n // If this block is changed, it may need to be updated in GFM mode\n if (ch === \'`\') {\n var previousFormatting = state.formatting;\n if (modeCfg.highlightFormatting) state.formatting = "code";\n stream.eatWhile(\'`\');\n var count = stream.current().length\n if (state.code == 0 && (!state.quote || count == 1)) {\n state.code = count\n return getType(state)\n } else if (count == state.code) { // Must be exact\n var t = getType(state)\n state.code = 0\n return t\n } else {\n state.formatting = previousFormatting\n return getType(state)\n }\n } else if (state.code) {\n return getType(state);\n }\n\n if (ch === \'\\\\\') {\n stream.next();\n if (modeCfg.highlightFormatting) {\n var type = getType(state);\n var formattingEscape = tokenTypes.formatting + "-escape";\n return type ? type + " " + formattingEscape : formattingEscape;\n }\n }\n\n if (ch === \'!\' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n state.imageMarker = true;\n state.image = true;\n if (modeCfg.highlightFormatting) state.formatting = "image";\n return getType(state);\n }\n\n if (ch === \'[\' && state.imageMarker && stream.match(/[^\\]]*\\](\\(.*?\\)| ?\\[.*?\\])/, false)) {\n state.imageMarker = false;\n state.imageAltText = true\n if (modeCfg.highlightFormatting) state.formatting = "image";\n return getType(state);\n }\n\n if (ch === \']\' && state.imageAltText) {\n if (modeCfg.highlightFormatting) state.formatting = "image";\n var type = getType(state);\n state.imageAltText = false;\n state.image = false;\n state.inline = state.f = linkHref;\n return type;\n }\n\n if (ch === \'[\' && !state.image) {\n if (state.linkText && stream.match(/^.*?\\]/)) return getType(state)\n state.linkText = true;\n if (modeCfg.highlightFormatting) state.formatting = "link";\n return getType(state);\n }\n\n if (ch === \']\' && state.linkText) {\n if (modeCfg.highlightFormatting) state.formatting = "link";\n var type = getType(state);\n state.linkText = false;\n state.inline = state.f = stream.match(/\\(.*?\\)| ?\\[.*?\\]/, false) ? linkHref : inlineNormal\n return type;\n }\n\n if (ch === \'<\' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = "link";\n var type = getType(state);\n if (type){\n type += " ";\n } else {\n type = "";\n }\n return type + tokenTypes.linkInline;\n }\n\n if (ch === \'<\' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = "link";\n var type = getType(state);\n if (type){\n type += " ";\n } else {\n type = "";\n }\n return type + tokenTypes.linkEmail;\n }\n\n if (modeCfg.xml && ch === \'<\' && stream.match(/^(!--|\\?|!\\[CDATA\\[|[a-z][a-z0-9-]*(?:\\s+[a-z_:.\\-]+(?:\\s*=\\s*[^>]+)?)*\\s*(?:>|$))/i, false)) {\n var end = stream.string.indexOf(">", stream.pos);\n if (end != -1) {\n var atts = stream.string.substring(stream.start, end);\n if (/markdown\\s*=\\s*(\'|"){0,1}1(\'|"){0,1}/.test(atts)) state.md_inside = true;\n }\n stream.backUp(1);\n state.htmlState = CodeMirror.startState(htmlMode);\n return switchBlock(stream, state, htmlBlock);\n }\n\n if (modeCfg.xml && ch === \'<\' && stream.match(/^\\/\\w*?>/)) {\n state.md_inside = false;\n return "tag";\n } else if (ch === "*" || ch === "_") {\n var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)\n while (len < 3 && stream.eat(ch)) len++\n var after = stream.peek() || " "\n // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis\n var leftFlanking = !/\\s/.test(after) && (!punctuation.test(after) || /\\s/.test(before) || punctuation.test(before))\n var rightFlanking = !/\\s/.test(before) && (!punctuation.test(before) || /\\s/.test(after) || punctuation.test(after))\n var setEm = null, setStrong = null\n if (len % 2) { // Em\n if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))\n setEm = true\n else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))\n setEm = false\n }\n if (len > 1) { // Strong\n if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))\n setStrong = true\n else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))\n setStrong = false\n }\n if (setStrong != null || setEm != null) {\n if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"\n if (setEm === true) state.em = ch\n if (setStrong === true) state.strong = ch\n var t = getType(state)\n if (setEm === false) state.em = false\n if (setStrong === false) state.strong = false\n return t\n }\n } else if (ch === \' \') {\n if (stream.eat(\'*\') || stream.eat(\'_\')) { // Probably surrounded by spaces\n if (stream.peek() === \' \') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(1);\n }\n }\n }\n\n if (modeCfg.strikethrough) {\n if (ch === \'~\' && stream.eatWhile(ch)) {\n if (state.strikethrough) {// Remove strikethrough\n if (modeCfg.highlightFormatting) state.formatting = "strikethrough";\n var t = getType(state);\n state.strikethrough = false;\n return t;\n } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n state.strikethrough = true;\n if (modeCfg.highlightFormatting) state.formatting = "strikethrough";\n return getType(state);\n }\n } else if (ch === \' \') {\n if (stream.match(\'~~\', true)) { // Probably surrounded by space\n if (stream.peek() === \' \') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(2);\n }\n }\n }\n }\n\n if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\\d+][a-z_\\d+-]*|\\-[a-z_\\d+][a-z_\\d+-]*):/)) {\n state.emoji = true;\n if (modeCfg.highlightFormatting) state.formatting = "emoji";\n var retType = getType(state);\n state.emoji = false;\n return retType;\n }\n\n if (ch === \' \') {\n if (stream.match(/^ +$/, false)) {\n state.trailingSpace++;\n } else if (state.trailingSpace) {\n state.trailingSpaceNewLine = true;\n }\n }\n\n return getType(state);\n }\n\n function linkInline(stream, state) {\n var ch = stream.next();\n\n if (ch === ">") {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = "link";\n var type = getType(state);\n if (type){\n type += " ";\n } else {\n type = "";\n }\n return type + tokenTypes.linkInline;\n }\n\n stream.match(/^[^>]+/, true);\n\n return tokenTypes.linkInline;\n }\n\n function linkHref(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n var ch = stream.next();\n if (ch === \'(\' || ch === \'[\') {\n state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");\n if (modeCfg.highlightFormatting) state.formatting = "link-string";\n state.linkHref = true;\n return getType(state);\n }\n return \'error\';\n }\n\n var linkRE = {\n ")": /^(?:[^\\\\\\(\\)]|\\\\.|\\((?:[^\\\\\\(\\)]|\\\\.)*\\))*?(?=\\))/,\n "]": /^(?:[^\\\\\\[\\]]|\\\\.|\\[(?:[^\\\\\\[\\]]|\\\\.)*\\])*?(?=\\])/\n }\n\n function getLinkHrefInside(endChar) {\n return function(stream, state) {\n var ch = stream.next();\n\n if (ch === endChar) {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = "link-string";\n var returnState = getType(state);\n state.linkHref = false;\n return returnState;\n }\n\n stream.match(linkRE[endChar])\n state.linkHref = true;\n return getType(state);\n };\n }\n\n function footnoteLink(stream, state) {\n if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n state.f = footnoteLinkInside;\n stream.next(); // Consume [\n if (modeCfg.highlightFormatting) state.formatting = "link";\n state.linkText = true;\n return getType(state);\n }\n return switchInline(stream, state, inlineNormal);\n }\n\n function footnoteLinkInside(stream, state) {\n if (stream.match(\']:\', true)) {\n state.f = state.inline = footnoteUrl;\n if (modeCfg.highlightFormatting) state.formatting = "link";\n var returnType = getType(state);\n state.linkText = false;\n return returnType;\n }\n\n stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n return tokenTypes.linkText;\n }\n\n function footnoteUrl(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n // Match URL\n stream.match(/^[^\\s]+/, true);\n // Check for link title\n if (stream.peek() === undefined) { // End of line, set flag to check next line\n state.linkTitle = true;\n } else { // More content on line, check if link title\n stream.match(/^(?:\\s+(?:"(?:[^"\\\\]|\\\\.)+"|\'(?:[^\'\\\\]|\\\\.)+\'|\\((?:[^)\\\\]|\\\\.)+\\)))?/, true);\n }\n state.f = state.inline = inlineNormal;\n return tokenTypes.linkHref + " url";\n }\n\n var mode = {\n startState: function() {\n return {\n f: blockNormal,\n\n prevLine: {stream: null},\n thisLine: {stream: null},\n\n block: blockNormal,\n htmlState: null,\n indentation: 0,\n\n inline: inlineNormal,\n text: handleText,\n\n formatting: false,\n linkText: false,\n linkHref: false,\n linkTitle: false,\n code: 0,\n em: false,\n strong: false,\n header: 0,\n setext: 0,\n hr: false,\n taskList: false,\n list: false,\n listStack: [],\n quote: 0,\n trailingSpace: 0,\n trailingSpaceNewLine: false,\n strikethrough: false,\n emoji: false,\n fencedEndRE: null\n };\n },\n\n copyState: function(s) {\n return {\n f: s.f,\n\n prevLine: s.prevLine,\n thisLine: s.thisLine,\n\n block: s.block,\n htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n indentation: s.indentation,\n\n localMode: s.localMode,\n localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n inline: s.inline,\n text: s.text,\n formatting: false,\n linkText: s.linkText,\n linkTitle: s.linkTitle,\n linkHref: s.linkHref,\n code: s.code,\n em: s.em,\n strong: s.strong,\n strikethrough: s.strikethrough,\n emoji: s.emoji,\n header: s.header,\n setext: s.setext,\n hr: s.hr,\n taskList: s.taskList,\n list: s.list,\n listStack: s.listStack.slice(0),\n quote: s.quote,\n indentedCode: s.indentedCode,\n trailingSpace: s.trailingSpace,\n trailingSpaceNewLine: s.trailingSpaceNewLine,\n md_inside: s.md_inside,\n fencedEndRE: s.fencedEndRE\n };\n },\n\n token: function(stream, state) {\n\n // Reset state.formatting\n state.formatting = false;\n\n if (stream != state.thisLine.stream) {\n state.header = 0;\n state.hr = false;\n\n if (stream.match(/^\\s*$/, true)) {\n blankLine(state);\n return null;\n }\n\n state.prevLine = state.thisLine\n state.thisLine = {stream: stream}\n\n // Reset state.taskList\n state.taskList = false;\n\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n\n if (!state.localState) {\n state.f = state.block;\n if (state.f != htmlBlock) {\n var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, expandedTab).length;\n state.indentation = indentation;\n state.indentationDiff = null;\n if (indentation > 0) return null;\n }\n }\n }\n return state.f(stream, state);\n },\n\n innerMode: function(state) {\n if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n if (state.localState) return {state: state.localState, mode: state.localMode};\n return {state: state, mode: mode};\n },\n\n indent: function(state, textAfter, line) {\n if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)\n if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)\n return CodeMirror.Pass\n },\n\n blankLine: blankLine,\n\n getType: getType,\n\n blockCommentStart: "\x3c!--",\n blockCommentEnd: "--\x3e",\n closeBrackets: "()[]{}\'\'\\"\\"``",\n fold: "markdown"\n };\n return mode;\n}, "xml");\n\nCodeMirror.defineMIME("text/markdown", "markdown");\n\nCodeMirror.defineMIME("text/x-markdown", "markdown");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/markdown/markdown.js?')},"./node_modules/codemirror/mode/meta.js":
/*!**********************************************!*\
!*** ./node_modules/codemirror/mode/meta.js ***!
\**********************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.modeInfo = [\n {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},\n {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]},\n {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},\n {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\\.conf$/i},\n {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},\n {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]},\n {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},\n {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"]},\n {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]},\n {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},\n {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},\n {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},\n {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\\.txt$/},\n {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},\n {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},\n {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},\n {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},\n {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},\n {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},\n {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},\n {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},\n {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},\n {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},\n {name: "Django", mime: "text/x-django", mode: "django"},\n {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},\n {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},\n {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},\n {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},\n {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},\n {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},\n {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},\n {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},\n {name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},\n {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},\n {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},\n {name: "Esper", mime: "text/x-esper", mode: "sql"},\n {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},\n {name: "FCL", mime: "text/x-fcl", mode: "fcl"},\n {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},\n {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]},\n {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},\n {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},\n {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},\n {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\\.md$/i},\n {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},\n {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/},\n {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},\n {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},\n {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},\n {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},\n {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},\n {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},\n {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]},\n {name: "HTTP", mime: "message/http", mode: "http"},\n {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},\n {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]},\n {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},\n {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},\n {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],\n mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},\n {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},\n {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},\n {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},\n {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]},\n {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]},\n {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},\n {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},\n {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},\n {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},\n {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},\n {name: "mIRC", mime: "text/mirc", mode: "mirc"},\n {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},\n {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]},\n {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},\n {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},\n {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},\n {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},\n {name: "MySQL", mime: "text/x-mysql", mode: "sql"},\n {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\\.conf$/i},\n {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},\n {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],\n mode: "ntriples", ext: ["nt", "nq"]},\n {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]},\n {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]},\n {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},\n {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},\n {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},\n {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},\n {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},\n {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},\n {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]},\n {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},\n {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},\n {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},\n {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"},\n {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},\n {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},\n {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},\n {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},\n {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},\n {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},\n {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]},\n {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},\n {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},\n {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},\n {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},\n {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},\n {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},\n {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},\n {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},\n {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},\n {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},\n {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},\n {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},\n {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},\n {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},\n {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},\n {name: "Solr", mime: "text/x-solr", mode: "solr"},\n {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]},\n {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},\n {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},\n {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},\n {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},\n {name: "SQLite", mime: "text/x-sqlite", mode: "sql"},\n {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},\n {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]},\n {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},\n {name: "sTeX", mime: "text/x-stex", mode: "stex"},\n {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]},\n {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]},\n {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},\n {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},\n {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},\n {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},\n {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},\n {name: "Tornado", mime: "text/x-tornado", mode: "tornado"},\n {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},\n {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},\n {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},\n {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},\n {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},\n {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]},\n {name: "Twig", mime: "text/x-twig", mode: "twig"},\n {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},\n {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},\n {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},\n {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},\n {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},\n {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},\n {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]},\n {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]},\n {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},\n {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},\n {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},\n {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},\n {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},\n {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},\n {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]},\n {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]},\n ];\n // Ensure all modes have a mime property for backwards compatibility\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mimes) info.mime = info.mimes[0];\n }\n\n CodeMirror.findModeByMIME = function(mime) {\n mime = mime.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mime == mime) return info;\n if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n if (info.mimes[j] == mime) return info;\n }\n if (/\\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml")\n if (/\\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json")\n };\n\n CodeMirror.findModeByExtension = function(ext) {\n ext = ext.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.ext) for (var j = 0; j < info.ext.length; j++)\n if (info.ext[j] == ext) return info;\n }\n };\n\n CodeMirror.findModeByFileName = function(filename) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.file && info.file.test(filename)) return info;\n }\n var dot = filename.lastIndexOf(".");\n var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n if (ext) return CodeMirror.findModeByExtension(ext);\n };\n\n CodeMirror.findModeByName = function(name) {\n name = name.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.name.toLowerCase() == name) return info;\n if (info.alias) for (var j = 0; j < info.alias.length; j++)\n if (info.alias[j].toLowerCase() == name) return info;\n }\n };\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/meta.js?')},"./node_modules/codemirror/mode/php/php.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/php/php.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../htmlmixed/htmlmixed */ "./node_modules/codemirror/mode/htmlmixed/htmlmixed.js"), __webpack_require__(/*! ../clike/clike */ "./node_modules/codemirror/mode/clike/clike.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n function keywords(str) {\n var obj = {}, words = str.split(" ");\n for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n\n // Helper for phpString\n function matchSequence(list, end, escapes) {\n if (list.length == 0) return phpString(end);\n return function (stream, state) {\n var patterns = list[0];\n for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {\n state.tokenize = matchSequence(list.slice(1), end);\n return patterns[i][1];\n }\n state.tokenize = phpString(end, escapes);\n return "string";\n };\n }\n function phpString(closing, escapes) {\n return function(stream, state) { return phpString_(stream, state, closing, escapes); };\n }\n function phpString_(stream, state, closing, escapes) {\n // "Complex" syntax\n if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) {\n state.tokenize = null;\n return "string";\n }\n\n // Simple syntax\n if (escapes !== false && stream.match(/^\\$[a-zA-Z_][a-zA-Z0-9_]*/)) {\n // After the variable name there may appear array or object operator.\n if (stream.match("[", false)) {\n // Match array operator\n state.tokenize = matchSequence([\n [["[", null]],\n [[/\\d[\\w\\.]*/, "number"],\n [/\\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],\n [/[\\w\\$]+/, "variable"]],\n [["]", null]]\n ], closing, escapes);\n }\n if (stream.match(/^->\\w/, false)) {\n // Match object operator\n state.tokenize = matchSequence([\n [["->", null]],\n [[/[\\w]+/, "variable"]]\n ], closing, escapes);\n }\n return "variable-2";\n }\n\n var escaped = false;\n // Normal string\n while (!stream.eol() &&\n (escaped || escapes === false ||\n (!stream.match("{$", false) &&\n !stream.match(/^(\\$[a-zA-Z_][a-zA-Z0-9_]*|\\$\\{)/, false)))) {\n if (!escaped && stream.match(closing)) {\n state.tokenize = null;\n state.tokStack.pop(); state.tokStack.pop();\n break;\n }\n escaped = stream.next() == "\\\\" && !escaped;\n }\n return "string";\n }\n\n var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +\n "do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final " +\n "for foreach function global goto if implements interface instanceof namespace " +\n "new or private protected public static switch throw trait try use var while xor " +\n "die echo empty exit eval include include_once isset list require require_once return " +\n "print unset __halt_compiler self static parent yield insteadof finally readonly match";\n var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";\n var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";\n CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));\n CodeMirror.registerHelper("wordChars", "php", /[\\w$]/);\n\n var phpConfig = {\n name: "clike",\n helperType: "php",\n keywords: keywords(phpKeywords),\n blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),\n defKeywords: keywords("class enum function interface namespace trait"),\n atoms: keywords(phpAtoms),\n builtin: keywords(phpBuiltin),\n multiLineStrings: true,\n hooks: {\n "$": function(stream) {\n stream.eatWhile(/[\\w\\$_]/);\n return "variable-2";\n },\n "<": function(stream, state) {\n var before;\n if (before = stream.match(/^<<\\s*/)) {\n var quoted = stream.eat(/[\'"]/);\n stream.eatWhile(/[\\w\\.]/);\n var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1));\n if (quoted) stream.eat(quoted);\n if (delim) {\n (state.tokStack || (state.tokStack = [])).push(delim, 0);\n state.tokenize = phpString(delim, quoted != "\'");\n return "string";\n }\n }\n return false;\n },\n "#": function(stream) {\n while (!stream.eol() && !stream.match("?>", false)) stream.next();\n return "comment";\n },\n "/": function(stream) {\n if (stream.eat("/")) {\n while (!stream.eol() && !stream.match("?>", false)) stream.next();\n return "comment";\n }\n return false;\n },\n \'"\': function(_stream, state) {\n (state.tokStack || (state.tokStack = [])).push(\'"\', 0);\n state.tokenize = phpString(\'"\');\n return "string";\n },\n "{": function(_stream, state) {\n if (state.tokStack && state.tokStack.length)\n state.tokStack[state.tokStack.length - 1]++;\n return false;\n },\n "}": function(_stream, state) {\n if (state.tokStack && state.tokStack.length > 0 &&\n !--state.tokStack[state.tokStack.length - 1]) {\n state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]);\n }\n return false;\n }\n }\n };\n\n CodeMirror.defineMode("php", function(config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html");\n var phpMode = CodeMirror.getMode(config, phpConfig);\n\n function dispatch(stream, state) {\n var isPHP = state.curMode == phpMode;\n if (stream.sol() && state.pending && state.pending != \'"\' && state.pending != "\'") state.pending = null;\n if (!isPHP) {\n if (stream.match(/^<\\?\\w*/)) {\n state.curMode = phpMode;\n if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", ""))\n state.curState = state.php;\n return "meta";\n }\n if (state.pending == \'"\' || state.pending == "\'") {\n while (!stream.eol() && stream.next() != state.pending) {}\n var style = "string";\n } else if (state.pending && stream.pos < state.pending.end) {\n stream.pos = state.pending.end;\n var style = state.pending.style;\n } else {\n var style = htmlMode.token(stream, state.curState);\n }\n if (state.pending) state.pending = null;\n var cur = stream.current(), openPHP = cur.search(/<\\?/), m;\n if (openPHP != -1) {\n if (style == "string" && (m = cur.match(/[\\\'\\"]$/)) && !/\\?>/.test(cur)) state.pending = m[0];\n else state.pending = {end: stream.pos, style: style};\n stream.backUp(cur.length - openPHP);\n }\n return style;\n } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {\n state.curMode = htmlMode;\n state.curState = state.html;\n if (!state.php.context.prev) state.php = null;\n return "meta";\n } else {\n return phpMode.token(stream, state.curState);\n }\n }\n\n return {\n startState: function() {\n var html = CodeMirror.startState(htmlMode)\n var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null\n return {html: html,\n php: php,\n curMode: parserConfig.startOpen ? phpMode : htmlMode,\n curState: parserConfig.startOpen ? php : html,\n pending: null};\n },\n\n copyState: function(state) {\n var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),\n php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur;\n if (state.curMode == htmlMode) cur = htmlNew;\n else cur = phpNew;\n return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,\n pending: state.pending};\n },\n\n token: dispatch,\n\n indent: function(state, textAfter, line) {\n if ((state.curMode != phpMode && /^\\s*<\\//.test(textAfter)) ||\n (state.curMode == phpMode && /^\\?>/.test(textAfter)))\n return htmlMode.indent(state.html, textAfter, line);\n return state.curMode.indent(state.curState, textAfter, line);\n },\n\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n lineComment: "//",\n\n innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }\n };\n }, "htmlmixed", "clike");\n\n CodeMirror.defineMIME("application/x-httpd-php", "php");\n CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});\n CodeMirror.defineMIME("text/x-php", phpConfig);\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/php/php.js?')},"./node_modules/codemirror/mode/pug/pug.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/pug/pug.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ \"./node_modules/codemirror/lib/codemirror.js\"), __webpack_require__(/*! ../javascript/javascript */ \"./node_modules/codemirror/mode/javascript/javascript.js\"), __webpack_require__(/*! ../css/css */ \"./node_modules/codemirror/mode/css/css.js\"), __webpack_require__(/*! ../htmlmixed/htmlmixed */ \"./node_modules/codemirror/mode/htmlmixed/htmlmixed.js\"));\n else {}\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"pug\", function (config) {\n // token types\n var KEYWORD = 'keyword';\n var DOCTYPE = 'meta';\n var ID = 'builtin';\n var CLASS = 'qualifier';\n\n var ATTRS_NEST = {\n '{': '}',\n '(': ')',\n '[': ']'\n };\n\n var jsMode = CodeMirror.getMode(config, 'javascript');\n\n function State() {\n this.javaScriptLine = false;\n this.javaScriptLineExcludesColon = false;\n\n this.javaScriptArguments = false;\n this.javaScriptArgumentsDepth = 0;\n\n this.isInterpolating = false;\n this.interpolationNesting = 0;\n\n this.jsState = CodeMirror.startState(jsMode);\n\n this.restOfLine = '';\n\n this.isIncludeFiltered = false;\n this.isEach = false;\n\n this.lastTag = '';\n this.scriptType = '';\n\n // Attributes Mode\n this.isAttrs = false;\n this.attrsNest = [];\n this.inAttributeName = true;\n this.attributeIsType = false;\n this.attrValue = '';\n\n // Indented Mode\n this.indentOf = Infinity;\n this.indentToken = '';\n\n this.innerMode = null;\n this.innerState = null;\n\n this.innerModeForLine = false;\n }\n /**\n * Safely copy a state\n *\n * @return {State}\n */\n State.prototype.copy = function () {\n var res = new State();\n res.javaScriptLine = this.javaScriptLine;\n res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon;\n res.javaScriptArguments = this.javaScriptArguments;\n res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth;\n res.isInterpolating = this.isInterpolating;\n res.interpolationNesting = this.interpolationNesting;\n\n res.jsState = CodeMirror.copyState(jsMode, this.jsState);\n\n res.innerMode = this.innerMode;\n if (this.innerMode && this.innerState) {\n res.innerState = CodeMirror.copyState(this.innerMode, this.innerState);\n }\n\n res.restOfLine = this.restOfLine;\n\n res.isIncludeFiltered = this.isIncludeFiltered;\n res.isEach = this.isEach;\n res.lastTag = this.lastTag;\n res.scriptType = this.scriptType;\n res.isAttrs = this.isAttrs;\n res.attrsNest = this.attrsNest.slice();\n res.inAttributeName = this.inAttributeName;\n res.attributeIsType = this.attributeIsType;\n res.attrValue = this.attrValue;\n res.indentOf = this.indentOf;\n res.indentToken = this.indentToken;\n\n res.innerModeForLine = this.innerModeForLine;\n\n return res;\n };\n\n function javaScript(stream, state) {\n if (stream.sol()) {\n // if javaScriptLine was set at end of line, ignore it\n state.javaScriptLine = false;\n state.javaScriptLineExcludesColon = false;\n }\n if (state.javaScriptLine) {\n if (state.javaScriptLineExcludesColon && stream.peek() === ':') {\n state.javaScriptLine = false;\n state.javaScriptLineExcludesColon = false;\n return;\n }\n var tok = jsMode.token(stream, state.jsState);\n if (stream.eol()) state.javaScriptLine = false;\n return tok || true;\n }\n }\n function javaScriptArguments(stream, state) {\n if (state.javaScriptArguments) {\n if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') {\n state.javaScriptArguments = false;\n return;\n }\n if (stream.peek() === '(') {\n state.javaScriptArgumentsDepth++;\n } else if (stream.peek() === ')') {\n state.javaScriptArgumentsDepth--;\n }\n if (state.javaScriptArgumentsDepth === 0) {\n state.javaScriptArguments = false;\n return;\n }\n\n var tok = jsMode.token(stream, state.jsState);\n return tok || true;\n }\n }\n\n function yieldStatement(stream) {\n if (stream.match(/^yield\\b/)) {\n return 'keyword';\n }\n }\n\n function doctype(stream) {\n if (stream.match(/^(?:doctype) *([^\\n]+)?/)) {\n return DOCTYPE;\n }\n }\n\n function interpolation(stream, state) {\n if (stream.match('#{')) {\n state.isInterpolating = true;\n state.interpolationNesting = 0;\n return 'punctuation';\n }\n }\n\n function interpolationContinued(stream, state) {\n if (state.isInterpolating) {\n if (stream.peek() === '}') {\n state.interpolationNesting--;\n if (state.interpolationNesting < 0) {\n stream.next();\n state.isInterpolating = false;\n return 'punctuation';\n }\n } else if (stream.peek() === '{') {\n state.interpolationNesting++;\n }\n return jsMode.token(stream, state.jsState) || true;\n }\n }\n\n function caseStatement(stream, state) {\n if (stream.match(/^case\\b/)) {\n state.javaScriptLine = true;\n return KEYWORD;\n }\n }\n\n function when(stream, state) {\n if (stream.match(/^when\\b/)) {\n state.javaScriptLine = true;\n state.javaScriptLineExcludesColon = true;\n return KEYWORD;\n }\n }\n\n function defaultStatement(stream) {\n if (stream.match(/^default\\b/)) {\n return KEYWORD;\n }\n }\n\n function extendsStatement(stream, state) {\n if (stream.match(/^extends?\\b/)) {\n state.restOfLine = 'string';\n return KEYWORD;\n }\n }\n\n function append(stream, state) {\n if (stream.match(/^append\\b/)) {\n state.restOfLine = 'variable';\n return KEYWORD;\n }\n }\n function prepend(stream, state) {\n if (stream.match(/^prepend\\b/)) {\n state.restOfLine = 'variable';\n return KEYWORD;\n }\n }\n function block(stream, state) {\n if (stream.match(/^block\\b *(?:(prepend|append)\\b)?/)) {\n state.restOfLine = 'variable';\n return KEYWORD;\n }\n }\n\n function include(stream, state) {\n if (stream.match(/^include\\b/)) {\n state.restOfLine = 'string';\n return KEYWORD;\n }\n }\n\n function includeFiltered(stream, state) {\n if (stream.match(/^include:([a-zA-Z0-9\\-]+)/, false) && stream.match('include')) {\n state.isIncludeFiltered = true;\n return KEYWORD;\n }\n }\n\n function includeFilteredContinued(stream, state) {\n if (state.isIncludeFiltered) {\n var tok = filter(stream, state);\n state.isIncludeFiltered = false;\n state.restOfLine = 'string';\n return tok;\n }\n }\n\n function mixin(stream, state) {\n if (stream.match(/^mixin\\b/)) {\n state.javaScriptLine = true;\n return KEYWORD;\n }\n }\n\n function call(stream, state) {\n if (stream.match(/^\\+([-\\w]+)/)) {\n if (!stream.match(/^\\( *[-\\w]+ *=/, false)) {\n state.javaScriptArguments = true;\n state.javaScriptArgumentsDepth = 0;\n }\n return 'variable';\n }\n if (stream.match('+#{', false)) {\n stream.next();\n state.mixinCallAfter = true;\n return interpolation(stream, state);\n }\n }\n function callArguments(stream, state) {\n if (state.mixinCallAfter) {\n state.mixinCallAfter = false;\n if (!stream.match(/^\\( *[-\\w]+ *=/, false)) {\n state.javaScriptArguments = true;\n state.javaScriptArgumentsDepth = 0;\n }\n return true;\n }\n }\n\n function conditional(stream, state) {\n if (stream.match(/^(if|unless|else if|else)\\b/)) {\n state.javaScriptLine = true;\n return KEYWORD;\n }\n }\n\n function each(stream, state) {\n if (stream.match(/^(- *)?(each|for)\\b/)) {\n state.isEach = true;\n return KEYWORD;\n }\n }\n function eachContinued(stream, state) {\n if (state.isEach) {\n if (stream.match(/^ in\\b/)) {\n state.javaScriptLine = true;\n state.isEach = false;\n return KEYWORD;\n } else if (stream.sol() || stream.eol()) {\n state.isEach = false;\n } else if (stream.next()) {\n while (!stream.match(/^ in\\b/, false) && stream.next());\n return 'variable';\n }\n }\n }\n\n function whileStatement(stream, state) {\n if (stream.match(/^while\\b/)) {\n state.javaScriptLine = true;\n return KEYWORD;\n }\n }\n\n function tag(stream, state) {\n var captures;\n if (captures = stream.match(/^(\\w(?:[-:\\w]*\\w)?)\\/?/)) {\n state.lastTag = captures[1].toLowerCase();\n if (state.lastTag === 'script') {\n state.scriptType = 'application/javascript';\n }\n return 'tag';\n }\n }\n\n function filter(stream, state) {\n if (stream.match(/^:([\\w\\-]+)/)) {\n var innerMode;\n if (config && config.innerModes) {\n innerMode = config.innerModes(stream.current().substring(1));\n }\n if (!innerMode) {\n innerMode = stream.current().substring(1);\n }\n if (typeof innerMode === 'string') {\n innerMode = CodeMirror.getMode(config, innerMode);\n }\n setInnerMode(stream, state, innerMode);\n return 'atom';\n }\n }\n\n function code(stream, state) {\n if (stream.match(/^(!?=|-)/)) {\n state.javaScriptLine = true;\n return 'punctuation';\n }\n }\n\n function id(stream) {\n if (stream.match(/^#([\\w-]+)/)) {\n return ID;\n }\n }\n\n function className(stream) {\n if (stream.match(/^\\.([\\w-]+)/)) {\n return CLASS;\n }\n }\n\n function attrs(stream, state) {\n if (stream.peek() == '(') {\n stream.next();\n state.isAttrs = true;\n state.attrsNest = [];\n state.inAttributeName = true;\n state.attrValue = '';\n state.attributeIsType = false;\n return 'punctuation';\n }\n }\n\n function attrsContinued(stream, state) {\n if (state.isAttrs) {\n if (ATTRS_NEST[stream.peek()]) {\n state.attrsNest.push(ATTRS_NEST[stream.peek()]);\n }\n if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) {\n state.attrsNest.pop();\n } else if (stream.eat(')')) {\n state.isAttrs = false;\n return 'punctuation';\n }\n if (state.inAttributeName && stream.match(/^[^=,\\)!]+/)) {\n if (stream.peek() === '=' || stream.peek() === '!') {\n state.inAttributeName = false;\n state.jsState = CodeMirror.startState(jsMode);\n if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') {\n state.attributeIsType = true;\n } else {\n state.attributeIsType = false;\n }\n }\n return 'attribute';\n }\n\n var tok = jsMode.token(stream, state.jsState);\n if (state.attributeIsType && tok === 'string') {\n state.scriptType = stream.current().toString();\n }\n if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) {\n try {\n Function('', 'var x ' + state.attrValue.replace(/,\\s*$/, '').replace(/^!/, ''));\n state.inAttributeName = true;\n state.attrValue = '';\n stream.backUp(stream.current().length);\n return attrsContinued(stream, state);\n } catch (ex) {\n //not the end of an attribute\n }\n }\n state.attrValue += stream.current();\n return tok || true;\n }\n }\n\n function attributesBlock(stream, state) {\n if (stream.match(/^&attributes\\b/)) {\n state.javaScriptArguments = true;\n state.javaScriptArgumentsDepth = 0;\n return 'keyword';\n }\n }\n\n function indent(stream) {\n if (stream.sol() && stream.eatSpace()) {\n return 'indent';\n }\n }\n\n function comment(stream, state) {\n if (stream.match(/^ *\\/\\/(-)?([^\\n]*)/)) {\n state.indentOf = stream.indentation();\n state.indentToken = 'comment';\n return 'comment';\n }\n }\n\n function colon(stream) {\n if (stream.match(/^: */)) {\n return 'colon';\n }\n }\n\n function text(stream, state) {\n if (stream.match(/^(?:\\| ?| )([^\\n]+)/)) {\n return 'string';\n }\n if (stream.match(/^(<[^\\n]*)/, false)) {\n // html string\n setInnerMode(stream, state, 'htmlmixed');\n state.innerModeForLine = true;\n return innerMode(stream, state, true);\n }\n }\n\n function dot(stream, state) {\n if (stream.eat('.')) {\n var innerMode = null;\n if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) {\n innerMode = state.scriptType.toLowerCase().replace(/\"|'/g, '');\n } else if (state.lastTag === 'style') {\n innerMode = 'css';\n }\n setInnerMode(stream, state, innerMode);\n return 'dot';\n }\n }\n\n function fail(stream) {\n stream.next();\n return null;\n }\n\n\n function setInnerMode(stream, state, mode) {\n mode = CodeMirror.mimeModes[mode] || mode;\n mode = config.innerModes ? config.innerModes(mode) || mode : mode;\n mode = CodeMirror.mimeModes[mode] || mode;\n mode = CodeMirror.getMode(config, mode);\n state.indentOf = stream.indentation();\n\n if (mode && mode.name !== 'null') {\n state.innerMode = mode;\n } else {\n state.indentToken = 'string';\n }\n }\n function innerMode(stream, state, force) {\n if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {\n if (state.innerMode) {\n if (!state.innerState) {\n state.innerState = state.innerMode.startState ? CodeMirror.startState(state.innerMode, stream.indentation()) : {};\n }\n return stream.hideFirstChars(state.indentOf + 2, function () {\n return state.innerMode.token(stream, state.innerState) || true;\n });\n } else {\n stream.skipToEnd();\n return state.indentToken;\n }\n } else if (stream.sol()) {\n state.indentOf = Infinity;\n state.indentToken = null;\n state.innerMode = null;\n state.innerState = null;\n }\n }\n function restOfLine(stream, state) {\n if (stream.sol()) {\n // if restOfLine was set at end of line, ignore it\n state.restOfLine = '';\n }\n if (state.restOfLine) {\n stream.skipToEnd();\n var tok = state.restOfLine;\n state.restOfLine = '';\n return tok;\n }\n }\n\n\n function startState() {\n return new State();\n }\n function copyState(state) {\n return state.copy();\n }\n /**\n * Get the next token in the stream\n *\n * @param {Stream} stream\n * @param {State} state\n */\n function nextToken(stream, state) {\n var tok = innerMode(stream, state)\n || restOfLine(stream, state)\n || interpolationContinued(stream, state)\n || includeFilteredContinued(stream, state)\n || eachContinued(stream, state)\n || attrsContinued(stream, state)\n || javaScript(stream, state)\n || javaScriptArguments(stream, state)\n || callArguments(stream, state)\n\n || yieldStatement(stream)\n || doctype(stream)\n || interpolation(stream, state)\n || caseStatement(stream, state)\n || when(stream, state)\n || defaultStatement(stream)\n || extendsStatement(stream, state)\n || append(stream, state)\n || prepend(stream, state)\n || block(stream, state)\n || include(stream, state)\n || includeFiltered(stream, state)\n || mixin(stream, state)\n || call(stream, state)\n || conditional(stream, state)\n || each(stream, state)\n || whileStatement(stream, state)\n || tag(stream, state)\n || filter(stream, state)\n || code(stream, state)\n || id(stream)\n || className(stream)\n || attrs(stream, state)\n || attributesBlock(stream, state)\n || indent(stream)\n || text(stream, state)\n || comment(stream, state)\n || colon(stream)\n || dot(stream, state)\n || fail(stream);\n\n return tok === true ? null : tok;\n }\n return {\n startState: startState,\n copyState: copyState,\n token: nextToken\n };\n}, 'javascript', 'css', 'htmlmixed');\n\nCodeMirror.defineMIME('text/x-pug', 'pug');\nCodeMirror.defineMIME('text/x-jade', 'pug');\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/pug/pug.js?")},"./node_modules/codemirror/mode/python/python.js":
/*!*******************************************************!*\
!*** ./node_modules/codemirror/mode/python/python.js ***!
\*******************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n function wordRegexp(words) {\n return new RegExp("^((" + words.join(")|(") + "))\\\\b");\n }\n\n var wordOperators = wordRegexp(["and", "or", "not", "is"]);\n var commonKeywords = ["as", "assert", "break", "class", "continue",\n "def", "del", "elif", "else", "except", "finally",\n "for", "from", "global", "if", "import",\n "lambda", "pass", "raise", "return",\n "try", "while", "with", "yield", "in"];\n var commonBuiltins = ["abs", "all", "any", "bin", "bool", "bytearray", "callable", "chr",\n "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod",\n "enumerate", "eval", "filter", "float", "format", "frozenset",\n "getattr", "globals", "hasattr", "hash", "help", "hex", "id",\n "input", "int", "isinstance", "issubclass", "iter", "len",\n "list", "locals", "map", "max", "memoryview", "min", "next",\n "object", "oct", "open", "ord", "pow", "property", "range",\n "repr", "reversed", "round", "set", "setattr", "slice",\n "sorted", "staticmethod", "str", "sum", "super", "tuple",\n "type", "vars", "zip", "__import__", "NotImplemented",\n "Ellipsis", "__debug__"];\n CodeMirror.registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins));\n\n function top(state) {\n return state.scopes[state.scopes.length - 1];\n }\n\n CodeMirror.defineMode("python", function(conf, parserConf) {\n var ERRORCLASS = "error";\n\n var delimiters = parserConf.delimiters || parserConf.singleDelimiters || /^[\\(\\)\\[\\]\\{\\}@,:`=;\\.\\\\]/;\n // (Backwards-compatibility with old, cumbersome config system)\n var operators = [parserConf.singleOperators, parserConf.doubleOperators, parserConf.doubleDelimiters, parserConf.tripleDelimiters,\n parserConf.operators || /^([-+*/%\\/&|^]=?|[<>=]+|\\/\\/=?|\\*\\*=?|!=|[~!@]|\\.\\.\\.)/]\n for (var i = 0; i < operators.length; i++) if (!operators[i]) operators.splice(i--, 1)\n\n var hangingIndent = parserConf.hangingIndent || conf.indentUnit;\n\n var myKeywords = commonKeywords, myBuiltins = commonBuiltins;\n if (parserConf.extra_keywords != undefined)\n myKeywords = myKeywords.concat(parserConf.extra_keywords);\n\n if (parserConf.extra_builtins != undefined)\n myBuiltins = myBuiltins.concat(parserConf.extra_builtins);\n\n var py3 = !(parserConf.version && Number(parserConf.version) < 3)\n if (py3) {\n // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator\n var identifiers = parserConf.identifiers|| /^[_A-Za-z\\u00A1-\\uFFFF][_A-Za-z0-9\\u00A1-\\uFFFF]*/;\n myKeywords = myKeywords.concat(["nonlocal", "False", "True", "None", "async", "await"]);\n myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]);\n var stringPrefixes = new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?(\'{3}|\\"{3}|[\'\\"]))", "i");\n } else {\n var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/;\n myKeywords = myKeywords.concat(["exec", "print"]);\n myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile",\n "file", "intern", "long", "raw_input", "reduce", "reload",\n "unichr", "unicode", "xrange", "False", "True", "None"]);\n var stringPrefixes = new RegExp("^(([rubf]|(ur)|(br))?(\'{3}|\\"{3}|[\'\\"]))", "i");\n }\n var keywords = wordRegexp(myKeywords);\n var builtins = wordRegexp(myBuiltins);\n\n // tokenizers\n function tokenBase(stream, state) {\n var sol = stream.sol() && state.lastToken != "\\\\"\n if (sol) state.indent = stream.indentation()\n // Handle scope changes\n if (sol && top(state).type == "py") {\n var scopeOffset = top(state).offset;\n if (stream.eatSpace()) {\n var lineOffset = stream.indentation();\n if (lineOffset > scopeOffset)\n pushPyScope(state);\n else if (lineOffset < scopeOffset && dedent(stream, state) && stream.peek() != "#")\n state.errorToken = true;\n return null;\n } else {\n var style = tokenBaseInner(stream, state);\n if (scopeOffset > 0 && dedent(stream, state))\n style += " " + ERRORCLASS;\n return style;\n }\n }\n return tokenBaseInner(stream, state);\n }\n\n function tokenBaseInner(stream, state, inFormat) {\n if (stream.eatSpace()) return null;\n\n // Handle Comments\n if (!inFormat && stream.match(/^#.*/)) return "comment";\n\n // Handle Number Literals\n if (stream.match(/^[0-9\\.]/, false)) {\n var floatLiteral = false;\n // Floats\n if (stream.match(/^[\\d_]*\\.\\d+(e[\\+\\-]?\\d+)?/i)) { floatLiteral = true; }\n if (stream.match(/^[\\d_]+\\.\\d*/)) { floatLiteral = true; }\n if (stream.match(/^\\.\\d+/)) { floatLiteral = true; }\n if (floatLiteral) {\n // Float literals may be "imaginary"\n stream.eat(/J/i);\n return "number";\n }\n // Integers\n var intLiteral = false;\n // Hex\n if (stream.match(/^0x[0-9a-f_]+/i)) intLiteral = true;\n // Binary\n if (stream.match(/^0b[01_]+/i)) intLiteral = true;\n // Octal\n if (stream.match(/^0o[0-7_]+/i)) intLiteral = true;\n // Decimal\n if (stream.match(/^[1-9][\\d_]*(e[\\+\\-]?[\\d_]+)?/)) {\n // Decimal literals may be "imaginary"\n stream.eat(/J/i);\n // TODO - Can you have imaginary longs?\n intLiteral = true;\n }\n // Zero by itself with no other piece of number.\n if (stream.match(/^0(?![\\dx])/i)) intLiteral = true;\n if (intLiteral) {\n // Integer literals may be "long"\n stream.eat(/L/i);\n return "number";\n }\n }\n\n // Handle Strings\n if (stream.match(stringPrefixes)) {\n var isFmtString = stream.current().toLowerCase().indexOf(\'f\') !== -1;\n if (!isFmtString) {\n state.tokenize = tokenStringFactory(stream.current(), state.tokenize);\n return state.tokenize(stream, state);\n } else {\n state.tokenize = formatStringFactory(stream.current(), state.tokenize);\n return state.tokenize(stream, state);\n }\n }\n\n for (var i = 0; i < operators.length; i++)\n if (stream.match(operators[i])) return "operator"\n\n if (stream.match(delimiters)) return "punctuation";\n\n if (state.lastToken == "." && stream.match(identifiers))\n return "property";\n\n if (stream.match(keywords) || stream.match(wordOperators))\n return "keyword";\n\n if (stream.match(builtins))\n return "builtin";\n\n if (stream.match(/^(self|cls)\\b/))\n return "variable-2";\n\n if (stream.match(identifiers)) {\n if (state.lastToken == "def" || state.lastToken == "class")\n return "def";\n return "variable";\n }\n\n // Handle non-detected items\n stream.next();\n return inFormat ? null :ERRORCLASS;\n }\n\n function formatStringFactory(delimiter, tokenOuter) {\n while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)\n delimiter = delimiter.substr(1);\n\n var singleline = delimiter.length == 1;\n var OUTCLASS = "string";\n\n function tokenNestedExpr(depth) {\n return function(stream, state) {\n var inner = tokenBaseInner(stream, state, true)\n if (inner == "punctuation") {\n if (stream.current() == "{") {\n state.tokenize = tokenNestedExpr(depth + 1)\n } else if (stream.current() == "}") {\n if (depth > 1) state.tokenize = tokenNestedExpr(depth - 1)\n else state.tokenize = tokenString\n }\n }\n return inner\n }\n }\n\n function tokenString(stream, state) {\n while (!stream.eol()) {\n stream.eatWhile(/[^\'"\\{\\}\\\\]/);\n if (stream.eat("\\\\")) {\n stream.next();\n if (singleline && stream.eol())\n return OUTCLASS;\n } else if (stream.match(delimiter)) {\n state.tokenize = tokenOuter;\n return OUTCLASS;\n } else if (stream.match(\'{{\')) {\n // ignore {{ in f-str\n return OUTCLASS;\n } else if (stream.match(\'{\', false)) {\n // switch to nested mode\n state.tokenize = tokenNestedExpr(0)\n if (stream.current()) return OUTCLASS;\n else return state.tokenize(stream, state)\n } else if (stream.match(\'}}\')) {\n return OUTCLASS;\n } else if (stream.match(\'}\')) {\n // single } in f-string is an error\n return ERRORCLASS;\n } else {\n stream.eat(/[\'"]/);\n }\n }\n if (singleline) {\n if (parserConf.singleLineStringErrors)\n return ERRORCLASS;\n else\n state.tokenize = tokenOuter;\n }\n return OUTCLASS;\n }\n tokenString.isString = true;\n return tokenString;\n }\n\n function tokenStringFactory(delimiter, tokenOuter) {\n while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)\n delimiter = delimiter.substr(1);\n\n var singleline = delimiter.length == 1;\n var OUTCLASS = "string";\n\n function tokenString(stream, state) {\n while (!stream.eol()) {\n stream.eatWhile(/[^\'"\\\\]/);\n if (stream.eat("\\\\")) {\n stream.next();\n if (singleline && stream.eol())\n return OUTCLASS;\n } else if (stream.match(delimiter)) {\n state.tokenize = tokenOuter;\n return OUTCLASS;\n } else {\n stream.eat(/[\'"]/);\n }\n }\n if (singleline) {\n if (parserConf.singleLineStringErrors)\n return ERRORCLASS;\n else\n state.tokenize = tokenOuter;\n }\n return OUTCLASS;\n }\n tokenString.isString = true;\n return tokenString;\n }\n\n function pushPyScope(state) {\n while (top(state).type != "py") state.scopes.pop()\n state.scopes.push({offset: top(state).offset + conf.indentUnit,\n type: "py",\n align: null})\n }\n\n function pushBracketScope(stream, state, type) {\n var align = stream.match(/^[\\s\\[\\{\\(]*(?:#|$)/, false) ? null : stream.column() + 1\n state.scopes.push({offset: state.indent + hangingIndent,\n type: type,\n align: align})\n }\n\n function dedent(stream, state) {\n var indented = stream.indentation();\n while (state.scopes.length > 1 && top(state).offset > indented) {\n if (top(state).type != "py") return true;\n state.scopes.pop();\n }\n return top(state).offset != indented;\n }\n\n function tokenLexer(stream, state) {\n if (stream.sol()) {\n state.beginningOfLine = true;\n state.dedent = false;\n }\n\n var style = state.tokenize(stream, state);\n var current = stream.current();\n\n // Handle decorators\n if (state.beginningOfLine && current == "@")\n return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS;\n\n if (/\\S/.test(current)) state.beginningOfLine = false;\n\n if ((style == "variable" || style == "builtin")\n && state.lastToken == "meta")\n style = "meta";\n\n // Handle scope changes.\n if (current == "pass" || current == "return")\n state.dedent = true;\n\n if (current == "lambda") state.lambda = true;\n if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\\s*(?:#|$)/, false))\n pushPyScope(state);\n\n if (current.length == 1 && !/string|comment/.test(style)) {\n var delimiter_index = "[({".indexOf(current);\n if (delimiter_index != -1)\n pushBracketScope(stream, state, "])}".slice(delimiter_index, delimiter_index+1));\n\n delimiter_index = "])}".indexOf(current);\n if (delimiter_index != -1) {\n if (top(state).type == current) state.indent = state.scopes.pop().offset - hangingIndent\n else return ERRORCLASS;\n }\n }\n if (state.dedent && stream.eol() && top(state).type == "py" && state.scopes.length > 1)\n state.scopes.pop();\n\n return style;\n }\n\n var external = {\n startState: function(basecolumn) {\n return {\n tokenize: tokenBase,\n scopes: [{offset: basecolumn || 0, type: "py", align: null}],\n indent: basecolumn || 0,\n lastToken: null,\n lambda: false,\n dedent: 0\n };\n },\n\n token: function(stream, state) {\n var addErr = state.errorToken;\n if (addErr) state.errorToken = false;\n var style = tokenLexer(stream, state);\n\n if (style && style != "comment")\n state.lastToken = (style == "keyword" || style == "punctuation") ? stream.current() : style;\n if (style == "punctuation") style = null;\n\n if (stream.eol() && state.lambda)\n state.lambda = false;\n return addErr ? style + " " + ERRORCLASS : style;\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize != tokenBase)\n return state.tokenize.isString ? CodeMirror.Pass : 0;\n\n var scope = top(state)\n var closing = scope.type == textAfter.charAt(0) ||\n scope.type == "py" && !state.dedent && /^(else:|elif |except |finally:)/.test(textAfter)\n if (scope.align != null)\n return scope.align - (closing ? 1 : 0)\n else\n return scope.offset - (closing ? hangingIndent : 0)\n },\n\n electricInput: /^\\s*([\\}\\]\\)]|else:|elif |except |finally:)$/,\n closeBrackets: {triples: "\'\\""},\n lineComment: "#",\n fold: "indent"\n };\n return external;\n });\n\n CodeMirror.defineMIME("text/x-python", "python");\n\n var words = function(str) { return str.split(" "); };\n\n CodeMirror.defineMIME("text/x-cython", {\n name: "python",\n extra_keywords: words("by cdef cimport cpdef ctypedef enum except "+\n "extern gil include nogil property public "+\n "readonly struct union DEF IF ELIF ELSE")\n });\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/python/python.js?')},"./node_modules/codemirror/mode/ruby/ruby.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/ruby/ruby.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nfunction wordObj(words) {\n var o = {};\n for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;\n return o;\n}\n\nvar keywordList = [\n "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else",\n "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or",\n "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless",\n "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc",\n "caller", "lambda", "proc", "public", "protected", "private", "require", "load",\n "require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__"\n], keywords = wordObj(keywordList);\n\nvar indentWords = wordObj(["def", "class", "case", "for", "while", "until", "module", "then",\n "catch", "loop", "proc", "begin"]);\nvar dedentWords = wordObj(["end", "until"]);\nvar opening = {"[": "]", "{": "}", "(": ")"};\nvar closing = {"]": "[", "}": "{", ")": "("};\n\nCodeMirror.defineMode("ruby", function(config) {\n var curPunc;\n\n function chain(newtok, stream, state) {\n state.tokenize.push(newtok);\n return newtok(stream, state);\n }\n\n function tokenBase(stream, state) {\n if (stream.sol() && stream.match("=begin") && stream.eol()) {\n state.tokenize.push(readBlockComment);\n return "comment";\n }\n if (stream.eatSpace()) return null;\n var ch = stream.next(), m;\n if (ch == "`" || ch == "\'" || ch == \'"\') {\n return chain(readQuoted(ch, "string", ch == \'"\' || ch == "`"), stream, state);\n } else if (ch == "/") {\n if (regexpAhead(stream))\n return chain(readQuoted(ch, "string-2", true), stream, state);\n else\n return "operator";\n } else if (ch == "%") {\n var style = "string", embed = true;\n if (stream.eat("s")) style = "atom";\n else if (stream.eat(/[WQ]/)) style = "string";\n else if (stream.eat(/[r]/)) style = "string-2";\n else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; }\n var delim = stream.eat(/[^\\w\\s=]/);\n if (!delim) return "operator";\n if (opening.propertyIsEnumerable(delim)) delim = opening[delim];\n return chain(readQuoted(delim, style, embed, true), stream, state);\n } else if (ch == "#") {\n stream.skipToEnd();\n return "comment";\n } else if (ch == "<" && (m = stream.match(/^<([-~])[\\`\\"\\\']?([a-zA-Z_?]\\w*)[\\`\\"\\\']?(?:;|$)/))) {\n return chain(readHereDoc(m[2], m[1]), stream, state);\n } else if (ch == "0") {\n if (stream.eat("x")) stream.eatWhile(/[\\da-fA-F]/);\n else if (stream.eat("b")) stream.eatWhile(/[01]/);\n else stream.eatWhile(/[0-7]/);\n return "number";\n } else if (/\\d/.test(ch)) {\n stream.match(/^[\\d_]*(?:\\.[\\d_]+)?(?:[eE][+\\-]?[\\d_]+)?/);\n return "number";\n } else if (ch == "?") {\n while (stream.match(/^\\\\[CM]-/)) {}\n if (stream.eat("\\\\")) stream.eatWhile(/\\w/);\n else stream.next();\n return "string";\n } else if (ch == ":") {\n if (stream.eat("\'")) return chain(readQuoted("\'", "atom", false), stream, state);\n if (stream.eat(\'"\')) return chain(readQuoted(\'"\', "atom", true), stream, state);\n\n // :> :>> :< :<< are valid symbols\n if (stream.eat(/[\\<\\>]/)) {\n stream.eat(/[\\<\\>]/);\n return "atom";\n }\n\n // :+ :- :/ :* :| :& :! are valid symbols\n if (stream.eat(/[\\+\\-\\*\\/\\&\\|\\:\\!]/)) {\n return "atom";\n }\n\n // Symbols can\'t start by a digit\n if (stream.eat(/[a-zA-Z$@_\\xa1-\\uffff]/)) {\n stream.eatWhile(/[\\w$\\xa1-\\uffff]/);\n // Only one ? ! = is allowed and only as the last character\n stream.eat(/[\\?\\!\\=]/);\n return "atom";\n }\n return "operator";\n } else if (ch == "@" && stream.match(/^@?[a-zA-Z_\\xa1-\\uffff]/)) {\n stream.eat("@");\n stream.eatWhile(/[\\w\\xa1-\\uffff]/);\n return "variable-2";\n } else if (ch == "$") {\n if (stream.eat(/[a-zA-Z_]/)) {\n stream.eatWhile(/[\\w]/);\n } else if (stream.eat(/\\d/)) {\n stream.eat(/\\d/);\n } else {\n stream.next(); // Must be a special global like $: or $!\n }\n return "variable-3";\n } else if (/[a-zA-Z_\\xa1-\\uffff]/.test(ch)) {\n stream.eatWhile(/[\\w\\xa1-\\uffff]/);\n stream.eat(/[\\?\\!]/);\n if (stream.eat(":")) return "atom";\n return "ident";\n } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) {\n curPunc = "|";\n return null;\n } else if (/[\\(\\)\\[\\]{}\\\\;]/.test(ch)) {\n curPunc = ch;\n return null;\n } else if (ch == "-" && stream.eat(">")) {\n return "arrow";\n } else if (/[=+\\-\\/*:\\.^%<>~|]/.test(ch)) {\n var more = stream.eatWhile(/[=+\\-\\/*:\\.^%<>~|]/);\n if (ch == "." && !more) curPunc = ".";\n return "operator";\n } else {\n return null;\n }\n }\n\n function regexpAhead(stream) {\n var start = stream.pos, depth = 0, next, found = false, escaped = false\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if ("[{(".indexOf(next) > -1) {\n depth++\n } else if ("]})".indexOf(next) > -1) {\n depth--\n if (depth < 0) break\n } else if (next == "/" && depth == 0) {\n found = true\n break\n }\n escaped = next == "\\\\"\n } else {\n escaped = false\n }\n }\n stream.backUp(stream.pos - start)\n return found\n }\n\n function tokenBaseUntilBrace(depth) {\n if (!depth) depth = 1;\n return function(stream, state) {\n if (stream.peek() == "}") {\n if (depth == 1) {\n state.tokenize.pop();\n return state.tokenize[state.tokenize.length-1](stream, state);\n } else {\n state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth - 1);\n }\n } else if (stream.peek() == "{") {\n state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth + 1);\n }\n return tokenBase(stream, state);\n };\n }\n function tokenBaseOnce() {\n var alreadyCalled = false;\n return function(stream, state) {\n if (alreadyCalled) {\n state.tokenize.pop();\n return state.tokenize[state.tokenize.length-1](stream, state);\n }\n alreadyCalled = true;\n return tokenBase(stream, state);\n };\n }\n function readQuoted(quote, style, embed, unescaped) {\n return function(stream, state) {\n var escaped = false, ch;\n\n if (state.context.type === \'read-quoted-paused\') {\n state.context = state.context.prev;\n stream.eat("}");\n }\n\n while ((ch = stream.next()) != null) {\n if (ch == quote && (unescaped || !escaped)) {\n state.tokenize.pop();\n break;\n }\n if (embed && ch == "#" && !escaped) {\n if (stream.eat("{")) {\n if (quote == "}") {\n state.context = {prev: state.context, type: \'read-quoted-paused\'};\n }\n state.tokenize.push(tokenBaseUntilBrace());\n break;\n } else if (/[@\\$]/.test(stream.peek())) {\n state.tokenize.push(tokenBaseOnce());\n break;\n }\n }\n escaped = !escaped && ch == "\\\\";\n }\n return style;\n };\n }\n function readHereDoc(phrase, mayIndent) {\n return function(stream, state) {\n if (mayIndent) stream.eatSpace()\n if (stream.match(phrase)) state.tokenize.pop();\n else stream.skipToEnd();\n return "string";\n };\n }\n function readBlockComment(stream, state) {\n if (stream.sol() && stream.match("=end") && stream.eol())\n state.tokenize.pop();\n stream.skipToEnd();\n return "comment";\n }\n\n return {\n startState: function() {\n return {tokenize: [tokenBase],\n indented: 0,\n context: {type: "top", indented: -config.indentUnit},\n continuedLine: false,\n lastTok: null,\n varList: false};\n },\n\n token: function(stream, state) {\n curPunc = null;\n if (stream.sol()) state.indented = stream.indentation();\n var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;\n var thisTok = curPunc;\n if (style == "ident") {\n var word = stream.current();\n style = state.lastTok == "." ? "property"\n : keywords.propertyIsEnumerable(stream.current()) ? "keyword"\n : /^[A-Z]/.test(word) ? "tag"\n : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def"\n : "variable";\n if (style == "keyword") {\n thisTok = word;\n if (indentWords.propertyIsEnumerable(word)) kwtype = "indent";\n else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent";\n else if ((word == "if" || word == "unless") && stream.column() == stream.indentation())\n kwtype = "indent";\n else if (word == "do" && state.context.indented < state.indented)\n kwtype = "indent";\n }\n }\n if (curPunc || (style && style != "comment")) state.lastTok = thisTok;\n if (curPunc == "|") state.varList = !state.varList;\n\n if (kwtype == "indent" || /[\\(\\[\\{]/.test(curPunc))\n state.context = {prev: state.context, type: curPunc || style, indented: state.indented};\n else if ((kwtype == "dedent" || /[\\)\\]\\}]/.test(curPunc)) && state.context.prev)\n state.context = state.context.prev;\n\n if (stream.eol())\n state.continuedLine = (curPunc == "\\\\" || style == "operator");\n return style;\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize[state.tokenize.length-1] != tokenBase) return CodeMirror.Pass;\n var firstChar = textAfter && textAfter.charAt(0);\n var ct = state.context;\n var closed = ct.type == closing[firstChar] ||\n ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\\b/.test(textAfter);\n return ct.indented + (closed ? 0 : config.indentUnit) +\n (state.continuedLine ? config.indentUnit : 0);\n },\n\n electricInput: /^\\s*(?:end|rescue|elsif|else|\\})$/,\n lineComment: "#",\n fold: "indent"\n };\n});\n\nCodeMirror.defineMIME("text/x-ruby", "ruby");\n\nCodeMirror.registerHelper("hintWords", "ruby", keywordList);\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/ruby/ruby.js?')},"./node_modules/codemirror/mode/rust/rust.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/rust/rust.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../../addon/mode/simple */ "./node_modules/codemirror/addon/mode/simple.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineSimpleMode("rust",{\n start: [\n // string and byte string\n {regex: /b?"/, token: "string", next: "string"},\n // raw string and raw byte string\n {regex: /b?r"/, token: "string", next: "string_raw"},\n {regex: /b?r#+"/, token: "string", next: "string_raw_hash"},\n // character\n {regex: /\'(?:[^\'\\\\]|\\\\(?:[nrt0\'"]|x[\\da-fA-F]{2}|u\\{[\\da-fA-F]{6}\\}))\'/, token: "string-2"},\n // byte\n {regex: /b\'(?:[^\']|\\\\(?:[\'\\\\nrt0]|x[\\da-fA-F]{2}))\'/, token: "string-2"},\n\n {regex: /(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,\n token: "number"},\n {regex: /(let(?:\\s+mut)?|fn|enum|mod|struct|type|union)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)/, token: ["keyword", null, "def"]},\n {regex: /(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\\b/, token: "keyword"},\n {regex: /\\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\\b/, token: "atom"},\n {regex: /\\b(?:true|false|Some|None|Ok|Err)\\b/, token: "builtin"},\n {regex: /\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,\n token: ["keyword", null ,"def"]},\n {regex: /#!?\\[.*\\]/, token: "meta"},\n {regex: /\\/\\/.*/, token: "comment"},\n {regex: /\\/\\*/, token: "comment", next: "comment"},\n {regex: /[-+\\/*=<>!]+/, token: "operator"},\n {regex: /[a-zA-Z_]\\w*!/,token: "variable-3"},\n {regex: /[a-zA-Z_]\\w*/, token: "variable"},\n {regex: /[\\{\\[\\(]/, indent: true},\n {regex: /[\\}\\]\\)]/, dedent: true}\n ],\n string: [\n {regex: /"/, token: "string", next: "start"},\n {regex: /(?:[^\\\\"]|\\\\(?:.|$))*/, token: "string"}\n ],\n string_raw: [\n {regex: /"/, token: "string", next: "start"},\n {regex: /[^"]*/, token: "string"}\n ],\n string_raw_hash: [\n {regex: /"#+/, token: "string", next: "start"},\n {regex: /(?:[^"]|"(?!#))*/, token: "string"}\n ],\n comment: [\n {regex: /.*?\\*\\//, token: "comment", next: "start"},\n {regex: /.*/, token: "comment"}\n ],\n meta: {\n dontIndentStates: ["comment"],\n electricInput: /^\\s*\\}$/,\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n lineComment: "//",\n fold: "brace"\n }\n});\n\n\nCodeMirror.defineMIME("text/x-rustsrc", "rust");\nCodeMirror.defineMIME("text/rust", "rust");\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/rust/rust.js?')},"./node_modules/codemirror/mode/sass/sass.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/sass/sass.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"), __webpack_require__(/*! ../css/css */ "./node_modules/codemirror/mode/css/css.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("sass", function(config) {\n var cssMode = CodeMirror.mimeModes["text/css"];\n var propertyKeywords = cssMode.propertyKeywords || {},\n colorKeywords = cssMode.colorKeywords || {},\n valueKeywords = cssMode.valueKeywords || {},\n fontProperties = cssMode.fontProperties || {};\n\n function tokenRegexp(words) {\n return new RegExp("^" + words.join("|"));\n }\n\n var keywords = ["true", "false", "null", "auto"];\n var keywordsRegexp = new RegExp("^" + keywords.join("|"));\n\n var operators = ["\\\\(", "\\\\)", "=", ">", "<", "==", ">=", "<=", "\\\\+", "-",\n "\\\\!=", "/", "\\\\*", "%", "and", "or", "not", ";","\\\\{","\\\\}",":"];\n var opRegexp = tokenRegexp(operators);\n\n var pseudoElementsRegexp = /^::?[a-zA-Z_][\\w\\-]*/;\n\n var word;\n\n function isEndLine(stream) {\n return !stream.peek() || stream.match(/\\s+$/, false);\n }\n\n function urlTokens(stream, state) {\n var ch = stream.peek();\n\n if (ch === ")") {\n stream.next();\n state.tokenizer = tokenBase;\n return "operator";\n } else if (ch === "(") {\n stream.next();\n stream.eatSpace();\n\n return "operator";\n } else if (ch === "\'" || ch === \'"\') {\n state.tokenizer = buildStringTokenizer(stream.next());\n return "string";\n } else {\n state.tokenizer = buildStringTokenizer(")", false);\n return "string";\n }\n }\n function comment(indentation, multiLine) {\n return function(stream, state) {\n if (stream.sol() && stream.indentation() <= indentation) {\n state.tokenizer = tokenBase;\n return tokenBase(stream, state);\n }\n\n if (multiLine && stream.skipTo("*/")) {\n stream.next();\n stream.next();\n state.tokenizer = tokenBase;\n } else {\n stream.skipToEnd();\n }\n\n return "comment";\n };\n }\n\n function buildStringTokenizer(quote, greedy) {\n if (greedy == null) { greedy = true; }\n\n function stringTokenizer(stream, state) {\n var nextChar = stream.next();\n var peekChar = stream.peek();\n var previousChar = stream.string.charAt(stream.pos-2);\n\n var endingString = ((nextChar !== "\\\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\\\"));\n\n if (endingString) {\n if (nextChar !== quote && greedy) { stream.next(); }\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n state.tokenizer = tokenBase;\n return "string";\n } else if (nextChar === "#" && peekChar === "{") {\n state.tokenizer = buildInterpolationTokenizer(stringTokenizer);\n stream.next();\n return "operator";\n } else {\n return "string";\n }\n }\n\n return stringTokenizer;\n }\n\n function buildInterpolationTokenizer(currentTokenizer) {\n return function(stream, state) {\n if (stream.peek() === "}") {\n stream.next();\n state.tokenizer = currentTokenizer;\n return "operator";\n } else {\n return tokenBase(stream, state);\n }\n };\n }\n\n function indent(state) {\n if (state.indentCount == 0) {\n state.indentCount++;\n var lastScopeOffset = state.scopes[0].offset;\n var currentOffset = lastScopeOffset + config.indentUnit;\n state.scopes.unshift({ offset:currentOffset });\n }\n }\n\n function dedent(state) {\n if (state.scopes.length == 1) return;\n\n state.scopes.shift();\n }\n\n function tokenBase(stream, state) {\n var ch = stream.peek();\n\n // Comment\n if (stream.match("/*")) {\n state.tokenizer = comment(stream.indentation(), true);\n return state.tokenizer(stream, state);\n }\n if (stream.match("//")) {\n state.tokenizer = comment(stream.indentation(), false);\n return state.tokenizer(stream, state);\n }\n\n // Interpolation\n if (stream.match("#{")) {\n state.tokenizer = buildInterpolationTokenizer(tokenBase);\n return "operator";\n }\n\n // Strings\n if (ch === \'"\' || ch === "\'") {\n stream.next();\n state.tokenizer = buildStringTokenizer(ch);\n return "string";\n }\n\n if(!state.cursorHalf){// state.cursorHalf === 0\n // first half i.e. before : for key-value pairs\n // including selectors\n\n if (ch === "-") {\n if (stream.match(/^-\\w+-/)) {\n return "meta";\n }\n }\n\n if (ch === ".") {\n stream.next();\n if (stream.match(/^[\\w-]+/)) {\n indent(state);\n return "qualifier";\n } else if (stream.peek() === "#") {\n indent(state);\n return "tag";\n }\n }\n\n if (ch === "#") {\n stream.next();\n // ID selectors\n if (stream.match(/^[\\w-]+/)) {\n indent(state);\n return "builtin";\n }\n if (stream.peek() === "#") {\n indent(state);\n return "tag";\n }\n }\n\n // Variables\n if (ch === "$") {\n stream.next();\n stream.eatWhile(/[\\w-]/);\n return "variable-2";\n }\n\n // Numbers\n if (stream.match(/^-?[0-9\\.]+/))\n return "number";\n\n // Units\n if (stream.match(/^(px|em|in)\\b/))\n return "unit";\n\n if (stream.match(keywordsRegexp))\n return "keyword";\n\n if (stream.match(/^url/) && stream.peek() === "(") {\n state.tokenizer = urlTokens;\n return "atom";\n }\n\n if (ch === "=") {\n // Match shortcut mixin definition\n if (stream.match(/^=[\\w-]+/)) {\n indent(state);\n return "meta";\n }\n }\n\n if (ch === "+") {\n // Match shortcut mixin definition\n if (stream.match(/^\\+[\\w-]+/)){\n return "variable-3";\n }\n }\n\n if(ch === "@"){\n if(stream.match(\'@extend\')){\n if(!stream.match(/\\s*[\\w]/))\n dedent(state);\n }\n }\n\n\n // Indent Directives\n if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {\n indent(state);\n return "def";\n }\n\n // Other Directives\n if (ch === "@") {\n stream.next();\n stream.eatWhile(/[\\w-]/);\n return "def";\n }\n\n if (stream.eatWhile(/[\\w-]/)){\n if(stream.match(/ *: *[\\w-\\+\\$#!\\("\']/,false)){\n word = stream.current().toLowerCase();\n var prop = state.prevProp + "-" + word;\n if (propertyKeywords.hasOwnProperty(prop)) {\n return "property";\n } else if (propertyKeywords.hasOwnProperty(word)) {\n state.prevProp = word;\n return "property";\n } else if (fontProperties.hasOwnProperty(word)) {\n return "property";\n }\n return "tag";\n }\n else if(stream.match(/ *:/,false)){\n indent(state);\n state.cursorHalf = 1;\n state.prevProp = stream.current().toLowerCase();\n return "property";\n }\n else if(stream.match(/ *,/,false)){\n return "tag";\n }\n else{\n indent(state);\n return "tag";\n }\n }\n\n if(ch === ":"){\n if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element\n return "variable-3";\n }\n stream.next();\n state.cursorHalf=1;\n return "operator";\n }\n\n } // cursorHalf===0 ends here\n else{\n\n if (ch === "#") {\n stream.next();\n // Hex numbers\n if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "number";\n }\n }\n\n // Numbers\n if (stream.match(/^-?[0-9\\.]+/)){\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "number";\n }\n\n // Units\n if (stream.match(/^(px|em|in)\\b/)){\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "unit";\n }\n\n if (stream.match(keywordsRegexp)){\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "keyword";\n }\n\n if (stream.match(/^url/) && stream.peek() === "(") {\n state.tokenizer = urlTokens;\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "atom";\n }\n\n // Variables\n if (ch === "$") {\n stream.next();\n stream.eatWhile(/[\\w-]/);\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "variable-2";\n }\n\n // bang character for !important, !default, etc.\n if (ch === "!") {\n stream.next();\n state.cursorHalf = 0;\n return stream.match(/^[\\w]+/) ? "keyword": "operator";\n }\n\n if (stream.match(opRegexp)){\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n return "operator";\n }\n\n // attributes\n if (stream.eatWhile(/[\\w-]/)) {\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n }\n word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word)) {\n return "atom";\n } else if (colorKeywords.hasOwnProperty(word)) {\n return "keyword";\n } else if (propertyKeywords.hasOwnProperty(word)) {\n state.prevProp = stream.current().toLowerCase();\n return "property";\n } else {\n return "tag";\n }\n }\n\n //stream.eatSpace();\n if (isEndLine(stream)) {\n state.cursorHalf = 0;\n return null;\n }\n\n } // else ends here\n\n if (stream.match(opRegexp))\n return "operator";\n\n // If we haven\'t returned by now, we move 1 character\n // and return an error\n stream.next();\n return null;\n }\n\n function tokenLexer(stream, state) {\n if (stream.sol()) state.indentCount = 0;\n var style = state.tokenizer(stream, state);\n var current = stream.current();\n\n if (current === "@return" || current === "}"){\n dedent(state);\n }\n\n if (style !== null) {\n var startOfToken = stream.pos - current.length;\n\n var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);\n\n var newScopes = [];\n\n for (var i = 0; i < state.scopes.length; i++) {\n var scope = state.scopes[i];\n\n if (scope.offset <= withCurrentIndent)\n newScopes.push(scope);\n }\n\n state.scopes = newScopes;\n }\n\n\n return style;\n }\n\n return {\n startState: function() {\n return {\n tokenizer: tokenBase,\n scopes: [{offset: 0, type: "sass"}],\n indentCount: 0,\n cursorHalf: 0, // cursor half tells us if cursor lies after (1)\n // or before (0) colon (well... more or less)\n definedVars: [],\n definedMixins: []\n };\n },\n token: function(stream, state) {\n var style = tokenLexer(stream, state);\n\n state.lastToken = { style: style, content: stream.current() };\n\n return style;\n },\n\n indent: function(state) {\n return state.scopes[0].offset;\n },\n\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n lineComment: "//",\n fold: "indent"\n };\n}, "css");\n\nCodeMirror.defineMIME("text/x-sass", "sass");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/sass/sass.js?')},"./node_modules/codemirror/mode/shell/shell.js":
/*!*****************************************************!*\
!*** ./node_modules/codemirror/mode/shell/shell.js ***!
\*****************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode(\'shell\', function() {\n\n var words = {};\n function define(style, dict) {\n for(var i = 0; i < dict.length; i++) {\n words[dict[i]] = style;\n }\n };\n\n var commonAtoms = ["true", "false"];\n var commonKeywords = ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi",\n "fin", "fil", "done", "exit", "set", "unset", "export", "function"];\n var commonCommands = ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear",\n "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall",\n "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "nl", "node", "npm", "ping", "ps", "restart", "rm",\n "rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop",\n "su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write",\n "yes", "zsh"];\n\n CodeMirror.registerHelper("hintWords", "shell", commonAtoms.concat(commonKeywords, commonCommands));\n\n define(\'atom\', commonAtoms);\n define(\'keyword\', commonKeywords);\n define(\'builtin\', commonCommands);\n\n function tokenBase(stream, state) {\n if (stream.eatSpace()) return null;\n\n var sol = stream.sol();\n var ch = stream.next();\n\n if (ch === \'\\\\\') {\n stream.next();\n return null;\n }\n if (ch === \'\\\'\' || ch === \'"\' || ch === \'`\') {\n state.tokens.unshift(tokenString(ch, ch === "`" ? "quote" : "string"));\n return tokenize(stream, state);\n }\n if (ch === \'#\') {\n if (sol && stream.eat(\'!\')) {\n stream.skipToEnd();\n return \'meta\'; // \'comment\'?\n }\n stream.skipToEnd();\n return \'comment\';\n }\n if (ch === \'$\') {\n state.tokens.unshift(tokenDollar);\n return tokenize(stream, state);\n }\n if (ch === \'+\' || ch === \'=\') {\n return \'operator\';\n }\n if (ch === \'-\') {\n stream.eat(\'-\');\n stream.eatWhile(/\\w/);\n return \'attribute\';\n }\n if (ch == "<") {\n if (stream.match("<<")) return "operator"\n var heredoc = stream.match(/^<-?\\s*[\'"]?([^\'"]*)[\'"]?/)\n if (heredoc) {\n state.tokens.unshift(tokenHeredoc(heredoc[1]))\n return \'string-2\'\n }\n }\n if (/\\d/.test(ch)) {\n stream.eatWhile(/\\d/);\n if(stream.eol() || !/\\w/.test(stream.peek())) {\n return \'number\';\n }\n }\n stream.eatWhile(/[\\w-]/);\n var cur = stream.current();\n if (stream.peek() === \'=\' && /\\w+/.test(cur)) return \'def\';\n return words.hasOwnProperty(cur) ? words[cur] : null;\n }\n\n function tokenString(quote, style) {\n var close = quote == "(" ? ")" : quote == "{" ? "}" : quote\n return function(stream, state) {\n var next, escaped = false;\n while ((next = stream.next()) != null) {\n if (next === close && !escaped) {\n state.tokens.shift();\n break;\n } else if (next === \'$\' && !escaped && quote !== "\'" && stream.peek() != close) {\n escaped = true;\n stream.backUp(1);\n state.tokens.unshift(tokenDollar);\n break;\n } else if (!escaped && quote !== close && next === quote) {\n state.tokens.unshift(tokenString(quote, style))\n return tokenize(stream, state)\n } else if (!escaped && /[\'"]/.test(next) && !/[\'"]/.test(quote)) {\n state.tokens.unshift(tokenStringStart(next, "string"));\n stream.backUp(1);\n break;\n }\n escaped = !escaped && next === \'\\\\\';\n }\n return style;\n };\n };\n\n function tokenStringStart(quote, style) {\n return function(stream, state) {\n state.tokens[0] = tokenString(quote, style)\n stream.next()\n return tokenize(stream, state)\n }\n }\n\n var tokenDollar = function(stream, state) {\n if (state.tokens.length > 1) stream.eat(\'$\');\n var ch = stream.next()\n if (/[\'"({]/.test(ch)) {\n state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string");\n return tokenize(stream, state);\n }\n if (!/\\d/.test(ch)) stream.eatWhile(/\\w/);\n state.tokens.shift();\n return \'def\';\n };\n\n function tokenHeredoc(delim) {\n return function(stream, state) {\n if (stream.sol() && stream.string == delim) state.tokens.shift()\n stream.skipToEnd()\n return "string-2"\n }\n }\n\n function tokenize(stream, state) {\n return (state.tokens[0] || tokenBase) (stream, state);\n };\n\n return {\n startState: function() {return {tokens:[]};},\n token: function(stream, state) {\n return tokenize(stream, state);\n },\n closeBrackets: "()[]{}\'\'\\"\\"``",\n lineComment: \'#\',\n fold: "brace"\n };\n});\n\nCodeMirror.defineMIME(\'text/x-sh\', \'shell\');\n// Apache uses a slightly different Media Type for Shell scripts\n// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\nCodeMirror.defineMIME(\'application/x-sh\', \'shell\');\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/shell/shell.js?')},"./node_modules/codemirror/mode/sql/sql.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/sql/sql.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nCodeMirror.defineMode("sql", function(config, parserConfig) {\n var client = parserConfig.client || {},\n atoms = parserConfig.atoms || {"false": true, "true": true, "null": true},\n builtin = parserConfig.builtin || set(defaultBuiltin),\n keywords = parserConfig.keywords || set(sqlKeywords),\n operatorChars = parserConfig.operatorChars || /^[*+\\-%<>!=&|~^\\/]/,\n support = parserConfig.support || {},\n hooks = parserConfig.hooks || {},\n dateSQL = parserConfig.dateSQL || {"date" : true, "time" : true, "timestamp" : true},\n backslashStringEscapes = parserConfig.backslashStringEscapes !== false,\n brackets = parserConfig.brackets || /^[\\{}\\(\\)\\[\\]]/,\n punctuation = parserConfig.punctuation || /^[;.,:]/\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n\n // call hooks from the mime type\n if (hooks[ch]) {\n var result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n\n if (support.hexNumber &&\n ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/))\n || (ch == "x" || ch == "X") && stream.match(/^\'[0-9a-fA-F]+\'/))) {\n // hex\n // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html\n return "number";\n } else if (support.binaryNumber &&\n (((ch == "b" || ch == "B") && stream.match(/^\'[01]+\'/))\n || (ch == "0" && stream.match(/^b[01]+/)))) {\n // bitstring\n // ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html\n return "number";\n } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) {\n // numbers\n // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html\n stream.match(/^[0-9]*(\\.[0-9]+)?([eE][-+]?[0-9]+)?/);\n support.decimallessFloat && stream.match(/^\\.(?!\\.)/);\n return "number";\n } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) {\n // placeholders\n return "variable-3";\n } else if (ch == "\'" || (ch == \'"\' && support.doubleQuote)) {\n // strings\n // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html\n state.tokenize = tokenLiteral(ch);\n return state.tokenize(stream, state);\n } else if ((((support.nCharCast && (ch == "n" || ch == "N"))\n || (support.charsetCast && ch == "_" && stream.match(/[a-z][a-z0-9]*/i)))\n && (stream.peek() == "\'" || stream.peek() == \'"\'))) {\n // charset casting: _utf8\'str\', N\'str\', n\'str\'\n // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html\n return "keyword";\n } else if (support.escapeConstant && (ch == "e" || ch == "E")\n && (stream.peek() == "\'" || (stream.peek() == \'"\' && support.doubleQuote))) {\n // escape constant: E\'str\', e\'str\'\n // ref: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\n state.tokenize = function(stream, state) {\n return (state.tokenize = tokenLiteral(stream.next(), true))(stream, state);\n }\n return "keyword";\n } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) {\n // 1-line comment\n stream.skipToEnd();\n return "comment";\n } else if ((support.commentHash && ch == "#")\n || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) {\n // 1-line comments\n // ref: https://kb.askmonty.org/en/comment-syntax/\n stream.skipToEnd();\n return "comment";\n } else if (ch == "/" && stream.eat("*")) {\n // multi-line comments\n // ref: https://kb.askmonty.org/en/comment-syntax/\n state.tokenize = tokenComment(1);\n return state.tokenize(stream, state);\n } else if (ch == ".") {\n // .1 for 0.1\n if (support.zerolessFloat && stream.match(/^(?:\\d+(?:e[+-]?\\d+)?)/i))\n return "number";\n if (stream.match(/^\\.+/))\n return null\n // .table_name (ODBC)\n // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html\n if (support.ODBCdotTable && stream.match(/^[\\w\\d_$#]+/))\n return "variable-2";\n } else if (operatorChars.test(ch)) {\n // operators\n stream.eatWhile(operatorChars);\n return "operator";\n } else if (brackets.test(ch)) {\n // brackets\n return "bracket";\n } else if (punctuation.test(ch)) {\n // punctuation\n stream.eatWhile(punctuation);\n return "punctuation";\n } else if (ch == \'{\' &&\n (stream.match(/^( )*(d|D|t|T|ts|TS)( )*\'[^\']*\'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) {\n // dates (weird ODBC syntax)\n // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html\n return "number";\n } else {\n stream.eatWhile(/^[_\\w\\d]/);\n var word = stream.current().toLowerCase();\n // dates (standard SQL syntax)\n // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html\n if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+\'[^\']*\'/) || stream.match(/^( )+"[^"]*"/)))\n return "number";\n if (atoms.hasOwnProperty(word)) return "atom";\n if (builtin.hasOwnProperty(word)) return "type";\n if (keywords.hasOwnProperty(word)) return "keyword";\n if (client.hasOwnProperty(word)) return "builtin";\n return null;\n }\n }\n\n // \'string\', with char specified in quote escaped by \'\\\'\n function tokenLiteral(quote, backslashEscapes) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = (backslashStringEscapes || backslashEscapes) && !escaped && ch == "\\\\";\n }\n return "string";\n };\n }\n function tokenComment(depth) {\n return function(stream, state) {\n var m = stream.match(/^.*?(\\/\\*|\\*\\/)/)\n if (!m) stream.skipToEnd()\n else if (m[1] == "/*") state.tokenize = tokenComment(depth + 1)\n else if (depth > 1) state.tokenize = tokenComment(depth - 1)\n else state.tokenize = tokenBase\n return "comment"\n }\n }\n\n function pushContext(stream, state, type) {\n state.context = {\n prev: state.context,\n indent: stream.indentation(),\n col: stream.column(),\n type: type\n };\n }\n\n function popContext(state) {\n state.indent = state.context.indent;\n state.context = state.context.prev;\n }\n\n return {\n startState: function() {\n return {tokenize: tokenBase, context: null};\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (state.context && state.context.align == null)\n state.context.align = false;\n }\n if (state.tokenize == tokenBase && stream.eatSpace()) return null;\n\n var style = state.tokenize(stream, state);\n if (style == "comment") return style;\n\n if (state.context && state.context.align == null)\n state.context.align = true;\n\n var tok = stream.current();\n if (tok == "(")\n pushContext(stream, state, ")");\n else if (tok == "[")\n pushContext(stream, state, "]");\n else if (state.context && state.context.type == tok)\n popContext(state);\n return style;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context;\n if (!cx) return CodeMirror.Pass;\n var closing = textAfter.charAt(0) == cx.type;\n if (cx.align) return cx.col + (closing ? 0 : 1);\n else return cx.indent + (closing ? 0 : config.indentUnit);\n },\n\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--",\n closeBrackets: "()[]{}\'\'\\"\\"``"\n };\n});\n\n // `identifier`\n function hookIdentifier(stream) {\n // MySQL/MariaDB identifiers\n // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == "`" && !stream.eat("`")) return "variable-2";\n }\n stream.backUp(stream.current().length - 1);\n return stream.eatWhile(/\\w/) ? "variable-2" : null;\n }\n\n // "identifier"\n function hookIdentifierDoublequote(stream) {\n // Standard SQL /SQLite identifiers\n // ref: http://web.archive.org/web/20160813185132/http://savage.net.au/SQL/sql-99.bnf.html#delimited%20identifier\n // ref: http://sqlite.org/lang_keywords.html\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == "\\"" && !stream.eat("\\"")) return "variable-2";\n }\n stream.backUp(stream.current().length - 1);\n return stream.eatWhile(/\\w/) ? "variable-2" : null;\n }\n\n // variable token\n function hookVar(stream) {\n // variables\n // @@prefix.varName @varName\n // varName can be quoted with ` or \' or "\n // ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html\n if (stream.eat("@")) {\n stream.match(\'session.\');\n stream.match(\'local.\');\n stream.match(\'global.\');\n }\n\n if (stream.eat("\'")) {\n stream.match(/^.*\'/);\n return "variable-2";\n } else if (stream.eat(\'"\')) {\n stream.match(/^.*"/);\n return "variable-2";\n } else if (stream.eat("`")) {\n stream.match(/^.*`/);\n return "variable-2";\n } else if (stream.match(/^[0-9a-zA-Z$\\.\\_]+/)) {\n return "variable-2";\n }\n return null;\n };\n\n // short client keyword token\n function hookClient(stream) {\n // \\N means NULL\n // ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html\n if (stream.eat("N")) {\n return "atom";\n }\n // \\g, etc\n // ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html\n return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null;\n }\n\n // these keywords are used by all SQL dialects (however, a mode can still overwrite it)\n var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";\n\n // turn a space-separated list into an array\n function set(str) {\n var obj = {}, words = str.split(" ");\n for (var i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n\n var defaultBuiltin = "bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"\n\n // A generic SQL Mode. It\'s not a standard, it just try to support what is generally supported\n CodeMirror.defineMIME("text/x-sql", {\n name: "sql",\n keywords: set(sqlKeywords + "begin"),\n builtin: set(defaultBuiltin),\n atoms: set("false true null unknown"),\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")\n });\n\n CodeMirror.defineMIME("text/x-mssql", {\n name: "sql",\n client: set("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),\n keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),\n builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),\n atoms: set("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),\n operatorChars: /^[*+\\-%<>!=^\\&|\\/]/,\n brackets: /^[\\{}\\(\\)]/,\n punctuation: /^[;.,:/]/,\n backslashStringEscapes: false,\n dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"),\n hooks: {\n "@": hookVar\n }\n });\n\n CodeMirror.defineMIME("text/x-mysql", {\n name: "sql",\n client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),\n keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),\n builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),\n atoms: set("false true null unknown"),\n operatorChars: /^[*+\\-%<>!=&|^]/,\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),\n hooks: {\n "@": hookVar,\n "`": hookIdentifier,\n "\\\\": hookClient\n }\n });\n\n CodeMirror.defineMIME("text/x-mariadb", {\n name: "sql",\n client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),\n keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),\n builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),\n atoms: set("false true null unknown"),\n operatorChars: /^[*+\\-%<>!=&|^]/,\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),\n hooks: {\n "@": hookVar,\n "`": hookIdentifier,\n "\\\\": hookClient\n }\n });\n\n // provided by the phpLiteAdmin project - phpliteadmin.org\n CodeMirror.defineMIME("text/x-sqlite", {\n name: "sql",\n // commands of the official SQLite client, ref: https://www.sqlite.org/cli.html#dotcmd\n client: set("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),\n // ref: http://sqlite.org/lang_keywords.html\n keywords: set(sqlKeywords + "abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),\n // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.\n builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),\n // ref: http://sqlite.org/syntax/literal-value.html\n atoms: set("null current_date current_time current_timestamp"),\n // ref: http://sqlite.org/lang_expr.html#binaryops\n operatorChars: /^[*+\\-%<>!=&|/~]/,\n // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types.\n dateSQL: set("date time timestamp datetime"),\n support: set("decimallessFloat zerolessFloat"),\n identifierQuote: "\\"", //ref: http://sqlite.org/lang_keywords.html\n hooks: {\n // bind-parameters ref:http://sqlite.org/lang_expr.html#varparam\n "@": hookVar,\n ":": hookVar,\n "?": hookVar,\n "$": hookVar,\n // The preferred way to escape Identifiers is using double quotes, ref: http://sqlite.org/lang_keywords.html\n "\\"": hookIdentifierDoublequote,\n // there is also support for backticks, ref: http://sqlite.org/lang_keywords.html\n "`": hookIdentifier\n }\n });\n\n // the query language used by Apache Cassandra is called CQL, but this mime type\n // is called Cassandra to avoid confusion with Contextual Query Language\n CodeMirror.defineMIME("text/x-cassandra", {\n name: "sql",\n client: { },\n keywords: set("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),\n builtin: set("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),\n atoms: set("false true infinity NaN"),\n operatorChars: /^[<>=]/,\n dateSQL: { },\n support: set("commentSlashSlash decimallessFloat"),\n hooks: { }\n });\n\n // this is based on Peter Raganitsch\'s \'plsql\' mode\n CodeMirror.defineMIME("text/x-plsql", {\n name: "sql",\n client: set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),\n keywords: set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),\n builtin: set("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),\n operatorChars: /^[*\\/+\\-%<>!=~]/,\n dateSQL: set("date time timestamp"),\n support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")\n });\n\n // Created to support specific hive keywords\n CodeMirror.defineMIME("text/x-hive", {\n name: "sql",\n keywords: set("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),\n builtin: set("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),\n atoms: set("false true null unknown"),\n operatorChars: /^[*+\\-%<>!=]/,\n dateSQL: set("date timestamp"),\n support: set("ODBCdotTable doubleQuote binaryNumber hexNumber")\n });\n\n CodeMirror.defineMIME("text/x-pgsql", {\n name: "sql",\n client: set("source"),\n // For PostgreSQL - https://www.postgresql.org/docs/11/sql-keywords-appendix.html\n // For pl/pgsql lang - https://github.com/postgres/postgres/blob/REL_11_2/src/pl/plpgsql/src/pl_scanner.c\n keywords: set(sqlKeywords + "a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),\n // https://www.postgresql.org/docs/11/datatype.html\n builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),\n atoms: set("false true null unknown"),\n operatorChars: /^[*\\/+\\-%<>!=&|^\\/#@?~]/,\n backslashStringEscapes: false,\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")\n });\n\n // Google\'s SQL-like query language, GQL\n CodeMirror.defineMIME("text/x-gql", {\n name: "sql",\n keywords: set("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),\n atoms: set("false true"),\n builtin: set("blob datetime first key __key__ string integer double boolean null"),\n operatorChars: /^[*+\\-%<>!=]/\n });\n\n // Greenplum\n CodeMirror.defineMIME("text/x-gpsql", {\n name: "sql",\n client: set("source"),\n //https://github.com/greenplum-db/gpdb/blob/master/src/include/parser/kwlist.h\n keywords: set("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),\n builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),\n atoms: set("false true null unknown"),\n operatorChars: /^[*+\\-%<>!=&|^\\/#@?~]/,\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")\n });\n\n // Spark SQL\n CodeMirror.defineMIME("text/x-sparksql", {\n name: "sql",\n keywords: set("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),\n builtin: set("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),\n atoms: set("false true null"),\n operatorChars: /^[*\\/+\\-%<>!=~&|^]/,\n dateSQL: set("date time timestamp"),\n support: set("ODBCdotTable doubleQuote zerolessFloat")\n });\n\n // Esper\n CodeMirror.defineMIME("text/x-esper", {\n name: "sql",\n client: set("source"),\n // http://www.espertech.com/esper/release-5.5.0/esper-reference/html/appendix_keywords.html\n keywords: set("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),\n builtin: {},\n atoms: set("false true null"),\n operatorChars: /^[*+\\-%<>!=&|^\\/#@?~]/,\n dateSQL: set("time"),\n support: set("decimallessFloat zerolessFloat binaryNumber hexNumber")\n });\n});\n\n/*\n How Properties of Mime Types are used by SQL Mode\n =================================================\n\n keywords:\n A list of keywords you want to be highlighted.\n builtin:\n A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword").\n operatorChars:\n All characters that must be handled as operators.\n client:\n Commands parsed and executed by the client (not the server).\n support:\n A list of supported syntaxes which are not common, but are supported by more than 1 DBMS.\n * ODBCdotTable: .tableName\n * zerolessFloat: .1\n * doubleQuote\n * nCharCast: N\'string\'\n * charsetCast: _utf8\'string\'\n * commentHash: use # char for comments\n * commentSlashSlash: use // for comments\n * commentSpaceRequired: require a space after -- for comments\n atoms:\n Keywords that must be highlighted as atoms,. Some DBMS\'s support more atoms than others:\n UNKNOWN, INFINITY, UNDERFLOW, NaN...\n dateSQL:\n Used for date/time SQL standard syntax, because not all DBMS\'s support same temporal types.\n*/\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/sql/sql.js?')},"./node_modules/codemirror/mode/stylus/stylus.js":
/*!*******************************************************!*\
!*** ./node_modules/codemirror/mode/stylus/stylus.js ***!
\*******************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n// Stylus mode created by Dmitry Kiselyov http://git.io/AaRB\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n "use strict";\n\n CodeMirror.defineMode("stylus", function(config) {\n var indentUnit = config.indentUnit,\n indentUnitString = \'\',\n tagKeywords = keySet(tagKeywords_),\n tagVariablesRegexp = /^(a|b|i|s|col|em)$/i,\n propertyKeywords = keySet(propertyKeywords_),\n nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_),\n valueKeywords = keySet(valueKeywords_),\n colorKeywords = keySet(colorKeywords_),\n documentTypes = keySet(documentTypes_),\n documentTypesRegexp = wordRegexp(documentTypes_),\n mediaFeatures = keySet(mediaFeatures_),\n mediaTypes = keySet(mediaTypes_),\n fontProperties = keySet(fontProperties_),\n operatorsRegexp = /^\\s*([.]{2,3}|&&|\\|\\||\\*\\*|[?!=:]?=|[-+*\\/%<>]=?|\\?:|\\~)/,\n wordOperatorKeywordsRegexp = wordRegexp(wordOperatorKeywords_),\n blockKeywords = keySet(blockKeywords_),\n vendorPrefixesRegexp = new RegExp(/^\\-(moz|ms|o|webkit)-/i),\n commonAtoms = keySet(commonAtoms_),\n firstWordMatch = "",\n states = {},\n ch,\n style,\n type,\n override;\n\n while (indentUnitString.length < indentUnit) indentUnitString += \' \';\n\n /**\n * Tokenizers\n */\n function tokenBase(stream, state) {\n firstWordMatch = stream.string.match(/(^[\\w-]+\\s*=\\s*$)|(^\\s*[\\w-]+\\s*=\\s*[\\w-])|(^\\s*(\\.|#|@|\\$|\\&|\\[|\\d|\\+|::?|\\{|\\>|~|\\/)?\\s*[\\w-]*([a-z0-9-]|\\*|\\/\\*)(\\(|,)?)/);\n state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\\s*/, "") : "";\n state.context.line.indent = stream.indentation();\n ch = stream.peek();\n\n // Line comment\n if (stream.match("//")) {\n stream.skipToEnd();\n return ["comment", "comment"];\n }\n // Block comment\n if (stream.match("/*")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n // String\n if (ch == "\\"" || ch == "\'") {\n stream.next();\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n // Def\n if (ch == "@") {\n stream.next();\n stream.eatWhile(/[\\w\\\\-]/);\n return ["def", stream.current()];\n }\n // ID selector or Hex color\n if (ch == "#") {\n stream.next();\n // Hex color\n if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\\b(?!-)/i)) {\n return ["atom", "atom"];\n }\n // ID selector\n if (stream.match(/^[a-z][\\w-]*/i)) {\n return ["builtin", "hash"];\n }\n }\n // Vendor prefixes\n if (stream.match(vendorPrefixesRegexp)) {\n return ["meta", "vendor-prefixes"];\n }\n // Numbers\n if (stream.match(/^-?[0-9]?\\.?[0-9]/)) {\n stream.eatWhile(/[a-z%]/i);\n return ["number", "unit"];\n }\n // !important|optional\n if (ch == "!") {\n stream.next();\n return [stream.match(/^(important|optional)/i) ? "keyword": "operator", "important"];\n }\n // Class\n if (ch == "." && stream.match(/^\\.[a-z][\\w-]*/i)) {\n return ["qualifier", "qualifier"];\n }\n // url url-prefix domain regexp\n if (stream.match(documentTypesRegexp)) {\n if (stream.peek() == "(") state.tokenize = tokenParenthesized;\n return ["property", "word"];\n }\n // Mixins / Functions\n if (stream.match(/^[a-z][\\w-]*\\(/i)) {\n stream.backUp(1);\n return ["keyword", "mixin"];\n }\n // Block mixins\n if (stream.match(/^(\\+|-)[a-z][\\w-]*\\(/i)) {\n stream.backUp(1);\n return ["keyword", "block-mixin"];\n }\n // Parent Reference BEM naming\n if (stream.string.match(/^\\s*&/) && stream.match(/^[-_]+[a-z][\\w-]*/)) {\n return ["qualifier", "qualifier"];\n }\n // / Root Reference & Parent Reference\n if (stream.match(/^(\\/|&)(-|_|:|\\.|#|[a-z])/)) {\n stream.backUp(1);\n return ["variable-3", "reference"];\n }\n if (stream.match(/^&{1}\\s*$/)) {\n return ["variable-3", "reference"];\n }\n // Word operator\n if (stream.match(wordOperatorKeywordsRegexp)) {\n return ["operator", "operator"];\n }\n // Word\n if (stream.match(/^\\$?[-_]*[a-z0-9]+[\\w-]*/i)) {\n // Variable\n if (stream.match(/^(\\.|\\[)[\\w-\\\'\\"\\]]+/i, false)) {\n if (!wordIsTag(stream.current())) {\n stream.match(\'.\');\n return ["variable-2", "variable-name"];\n }\n }\n return ["variable-2", "word"];\n }\n // Operators\n if (stream.match(operatorsRegexp)) {\n return ["operator", stream.current()];\n }\n // Delimiters\n if (/[:;,{}\\[\\]\\(\\)]/.test(ch)) {\n stream.next();\n return [null, ch];\n }\n // Non-detected items\n stream.next();\n return [null, null];\n }\n\n /**\n * Token comment\n */\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == "/") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == "*");\n }\n return ["comment", "comment"];\n }\n\n /**\n * Token string\n */\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == ")") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == "\\\\";\n }\n if (ch == quote || !escaped && quote != ")") state.tokenize = null;\n return ["string", "string"];\n };\n }\n\n /**\n * Token parenthesized\n */\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be "("\n if (!stream.match(/\\s*[\\"\\\')]/, false))\n state.tokenize = tokenString(")");\n else\n state.tokenize = null;\n return [null, "("];\n }\n\n /**\n * Context management\n */\n function Context(type, indent, prev, line) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n this.line = line || {firstWord: "", indent: 0};\n }\n\n function pushContext(state, stream, type, indent) {\n indent = indent >= 0 ? indent : indentUnit;\n state.context = new Context(type, stream.indentation() + indent, state.context);\n return type;\n }\n\n function popContext(state, currentIndent) {\n var contextIndent = state.context.indent - indentUnit;\n currentIndent = currentIndent || false;\n state.context = state.context.prev;\n if (currentIndent) state.context.indent = contextIndent;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n\n /**\n * Parser\n */\n function wordIsTag(word) {\n return word.toLowerCase() in tagKeywords;\n }\n\n function wordIsProperty(word) {\n word = word.toLowerCase();\n return word in propertyKeywords || word in fontProperties;\n }\n\n function wordIsBlock(word) {\n return word.toLowerCase() in blockKeywords;\n }\n\n function wordIsVendorPrefix(word) {\n return word.toLowerCase().match(vendorPrefixesRegexp);\n }\n\n function wordAsValue(word) {\n var wordLC = word.toLowerCase();\n var override = "variable-2";\n if (wordIsTag(word)) override = "tag";\n else if (wordIsBlock(word)) override = "block-keyword";\n else if (wordIsProperty(word)) override = "property";\n else if (wordLC in valueKeywords || wordLC in commonAtoms) override = "atom";\n else if (wordLC == "return" || wordLC in colorKeywords) override = "keyword";\n\n // Font family\n else if (word.match(/^[A-Z]/)) override = "string";\n return override;\n }\n\n function typeIsBlock(type, stream) {\n return ((endOfLine(stream) && (type == "{" || type == "]" || type == "hash" || type == "qualifier")) || type == "block-mixin");\n }\n\n function typeIsInterpolation(type, stream) {\n return type == "{" && stream.match(/^\\s*\\$?[\\w-]+/i, false);\n }\n\n function typeIsPseudo(type, stream) {\n return type == ":" && stream.match(/^[a-z-]+/, false);\n }\n\n function startOfLine(stream) {\n return stream.sol() || stream.string.match(new RegExp("^\\\\s*" + escapeRegExp(stream.current())));\n }\n\n function endOfLine(stream) {\n return stream.eol() || stream.match(/^\\s*$/, false);\n }\n\n function firstWordOfLine(line) {\n var re = /^\\s*[-_]*[a-z0-9]+[\\w-]*/i;\n var result = typeof line == "string" ? line.match(re) : line.string.match(re);\n return result ? result[0].replace(/^\\s*/, "") : "";\n }\n\n\n /**\n * Block\n */\n states.block = function(type, stream, state) {\n if ((type == "comment" && startOfLine(stream)) ||\n (type == "," && endOfLine(stream)) ||\n type == "mixin") {\n return pushContext(state, stream, "block", 0);\n }\n if (typeIsInterpolation(type, stream)) {\n return pushContext(state, stream, "interpolation");\n }\n if (endOfLine(stream) && type == "]") {\n if (!/^\\s*(\\.|#|:|\\[|\\*|&)/.test(stream.string) && !wordIsTag(firstWordOfLine(stream))) {\n return pushContext(state, stream, "block", 0);\n }\n }\n if (typeIsBlock(type, stream)) {\n return pushContext(state, stream, "block");\n }\n if (type == "}" && endOfLine(stream)) {\n return pushContext(state, stream, "block", 0);\n }\n if (type == "variable-name") {\n if (stream.string.match(/^\\s?\\$[\\w-\\.\\[\\]\\\'\\"]+$/) || wordIsBlock(firstWordOfLine(stream))) {\n return pushContext(state, stream, "variableName");\n }\n else {\n return pushContext(state, stream, "variableName", 0);\n }\n }\n if (type == "=") {\n if (!endOfLine(stream) && !wordIsBlock(firstWordOfLine(stream))) {\n return pushContext(state, stream, "block", 0);\n }\n return pushContext(state, stream, "block");\n }\n if (type == "*") {\n if (endOfLine(stream) || stream.match(/\\s*(,|\\.|#|\\[|:|{)/,false)) {\n override = "tag";\n return pushContext(state, stream, "block");\n }\n }\n if (typeIsPseudo(type, stream)) {\n return pushContext(state, stream, "pseudo");\n }\n if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) {\n return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");\n }\n if (/@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {\n return pushContext(state, stream, "keyframes");\n }\n if (/@extends?/.test(type)) {\n return pushContext(state, stream, "extend", 0);\n }\n if (type && type.charAt(0) == "@") {\n\n // Property Lookup\n if (stream.indentation() > 0 && wordIsProperty(stream.current().slice(1))) {\n override = "variable-2";\n return "block";\n }\n if (/(@import|@require|@charset)/.test(type)) {\n return pushContext(state, stream, "block", 0);\n }\n return pushContext(state, stream, "block");\n }\n if (type == "reference" && endOfLine(stream)) {\n return pushContext(state, stream, "block");\n }\n if (type == "(") {\n return pushContext(state, stream, "parens");\n }\n\n if (type == "vendor-prefixes") {\n return pushContext(state, stream, "vendorPrefixes");\n }\n if (type == "word") {\n var word = stream.current();\n override = wordAsValue(word);\n\n if (override == "property") {\n if (startOfLine(stream)) {\n return pushContext(state, stream, "block", 0);\n } else {\n override = "atom";\n return "block";\n }\n }\n\n if (override == "tag") {\n\n // tag is a css value\n if (/embed|menu|pre|progress|sub|table/.test(word)) {\n if (wordIsProperty(firstWordOfLine(stream))) {\n override = "atom";\n return "block";\n }\n }\n\n // tag is an attribute\n if (stream.string.match(new RegExp("\\\\[\\\\s*" + word + "|" + word +"\\\\s*\\\\]"))) {\n override = "atom";\n return "block";\n }\n\n // tag is a variable\n if (tagVariablesRegexp.test(word)) {\n if ((startOfLine(stream) && stream.string.match(/=/)) ||\n (!startOfLine(stream) &&\n !stream.string.match(/^(\\s*\\.|#|\\&|\\[|\\/|>|\\*)/) &&\n !wordIsTag(firstWordOfLine(stream)))) {\n override = "variable-2";\n if (wordIsBlock(firstWordOfLine(stream))) return "block";\n return pushContext(state, stream, "block", 0);\n }\n }\n\n if (endOfLine(stream)) return pushContext(state, stream, "block");\n }\n if (override == "block-keyword") {\n override = "keyword";\n\n // Postfix conditionals\n if (stream.current(/(if|unless)/) && !startOfLine(stream)) {\n return "block";\n }\n return pushContext(state, stream, "block");\n }\n if (word == "return") return pushContext(state, stream, "block", 0);\n\n // Placeholder selector\n if (override == "variable-2" && stream.string.match(/^\\s?\\$[\\w-\\.\\[\\]\\\'\\"]+$/)) {\n return pushContext(state, stream, "block");\n }\n }\n return state.context.type;\n };\n\n\n /**\n * Parens\n */\n states.parens = function(type, stream, state) {\n if (type == "(") return pushContext(state, stream, "parens");\n if (type == ")") {\n if (state.context.prev.type == "parens") {\n return popContext(state);\n }\n if ((stream.string.match(/^[a-z][\\w-]*\\(/i) && endOfLine(stream)) ||\n wordIsBlock(firstWordOfLine(stream)) ||\n /(\\.|#|:|\\[|\\*|&|>|~|\\+|\\/)/.test(firstWordOfLine(stream)) ||\n (!stream.string.match(/^-?[a-z][\\w-\\.\\[\\]\\\'\\"]*\\s*=/) &&\n wordIsTag(firstWordOfLine(stream)))) {\n return pushContext(state, stream, "block");\n }\n if (stream.string.match(/^[\\$-]?[a-z][\\w-\\.\\[\\]\\\'\\"]*\\s*=/) ||\n stream.string.match(/^\\s*(\\(|\\)|[0-9])/) ||\n stream.string.match(/^\\s+[a-z][\\w-]*\\(/i) ||\n stream.string.match(/^\\s+[\\$-]?[a-z]/i)) {\n return pushContext(state, stream, "block", 0);\n }\n if (endOfLine(stream)) return pushContext(state, stream, "block");\n else return pushContext(state, stream, "block", 0);\n }\n if (type && type.charAt(0) == "@" && wordIsProperty(stream.current().slice(1))) {\n override = "variable-2";\n }\n if (type == "word") {\n var word = stream.current();\n override = wordAsValue(word);\n if (override == "tag" && tagVariablesRegexp.test(word)) {\n override = "variable-2";\n }\n if (override == "property" || word == "to") override = "atom";\n }\n if (type == "variable-name") {\n return pushContext(state, stream, "variableName");\n }\n if (typeIsPseudo(type, stream)) {\n return pushContext(state, stream, "pseudo");\n }\n return state.context.type;\n };\n\n\n /**\n * Vendor prefixes\n */\n states.vendorPrefixes = function(type, stream, state) {\n if (type == "word") {\n override = "property";\n return pushContext(state, stream, "block", 0);\n }\n return popContext(state);\n };\n\n\n /**\n * Pseudo\n */\n states.pseudo = function(type, stream, state) {\n if (!wordIsProperty(firstWordOfLine(stream.string))) {\n stream.match(/^[a-z-]+/);\n override = "variable-3";\n if (endOfLine(stream)) return pushContext(state, stream, "block");\n return popContext(state);\n }\n return popAndPass(type, stream, state);\n };\n\n\n /**\n * atBlock\n */\n states.atBlock = function(type, stream, state) {\n if (type == "(") return pushContext(state, stream, "atBlock_parens");\n if (typeIsBlock(type, stream)) {\n return pushContext(state, stream, "block");\n }\n if (typeIsInterpolation(type, stream)) {\n return pushContext(state, stream, "interpolation");\n }\n if (type == "word") {\n var word = stream.current().toLowerCase();\n if (/^(only|not|and|or)$/.test(word))\n override = "keyword";\n else if (documentTypes.hasOwnProperty(word))\n override = "tag";\n else if (mediaTypes.hasOwnProperty(word))\n override = "attribute";\n else if (mediaFeatures.hasOwnProperty(word))\n override = "property";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = "string-2";\n else override = wordAsValue(stream.current());\n if (override == "tag" && endOfLine(stream)) {\n return pushContext(state, stream, "block");\n }\n }\n if (type == "operator" && /^(not|and|or)$/.test(stream.current())) {\n override = "keyword";\n }\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == "{" || type == "}") return state.context.type;\n if (type == ")") {\n if (endOfLine(stream)) return pushContext(state, stream, "block");\n else return pushContext(state, stream, "atBlock");\n }\n if (type == "word") {\n var word = stream.current().toLowerCase();\n override = wordAsValue(word);\n if (/^(max|min)/.test(word)) override = "property";\n if (override == "tag") {\n tagVariablesRegexp.test(word) ? override = "variable-2" : override = "atom";\n }\n return state.context.type;\n }\n return states.atBlock(type, stream, state);\n };\n\n\n /**\n * Keyframes\n */\n states.keyframes = function(type, stream, state) {\n if (stream.indentation() == "0" && ((type == "}" && startOfLine(stream)) || type == "]" || type == "hash"\n || type == "qualifier" || wordIsTag(stream.current()))) {\n return popAndPass(type, stream, state);\n }\n if (type == "{") return pushContext(state, stream, "keyframes");\n if (type == "}") {\n if (startOfLine(stream)) return popContext(state, true);\n else return pushContext(state, stream, "keyframes");\n }\n if (type == "unit" && /^[0-9]+\\%$/.test(stream.current())) {\n return pushContext(state, stream, "keyframes");\n }\n if (type == "word") {\n override = wordAsValue(stream.current());\n if (override == "block-keyword") {\n override = "keyword";\n return pushContext(state, stream, "keyframes");\n }\n }\n if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) {\n return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");\n }\n if (type == "mixin") {\n return pushContext(state, stream, "block", 0);\n }\n return state.context.type;\n };\n\n\n /**\n * Interpolation\n */\n states.interpolation = function(type, stream, state) {\n if (type == "{") popContext(state) && pushContext(state, stream, "block");\n if (type == "}") {\n if (stream.string.match(/^\\s*(\\.|#|:|\\[|\\*|&|>|~|\\+|\\/)/i) ||\n (stream.string.match(/^\\s*[a-z]/i) && wordIsTag(firstWordOfLine(stream)))) {\n return pushContext(state, stream, "block");\n }\n if (!stream.string.match(/^(\\{|\\s*\\&)/) ||\n stream.match(/\\s*[\\w-]/,false)) {\n return pushContext(state, stream, "block", 0);\n }\n return pushContext(state, stream, "block");\n }\n if (type == "variable-name") {\n return pushContext(state, stream, "variableName", 0);\n }\n if (type == "word") {\n override = wordAsValue(stream.current());\n if (override == "tag") override = "atom";\n }\n return state.context.type;\n };\n\n\n /**\n * Extend/s\n */\n states.extend = function(type, stream, state) {\n if (type == "[" || type == "=") return "extend";\n if (type == "]") return popContext(state);\n if (type == "word") {\n override = wordAsValue(stream.current());\n return "extend";\n }\n return popContext(state);\n };\n\n\n /**\n * Variable name\n */\n states.variableName = function(type, stream, state) {\n if (type == "string" || type == "[" || type == "]" || stream.current().match(/^(\\.|\\$)/)) {\n if (stream.current().match(/^\\.[\\w-]+/i)) override = "variable-2";\n return "variableName";\n }\n return popAndPass(type, stream, state);\n };\n\n\n return {\n startState: function(base) {\n return {\n tokenize: null,\n state: "block",\n context: new Context("block", base || 0, null)\n };\n },\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == "object") {\n type = style[1];\n style = style[0];\n }\n override = style;\n state.state = states[state.state](type, stream, state);\n return override;\n },\n indent: function(state, textAfter, line) {\n\n var cx = state.context,\n ch = textAfter && textAfter.charAt(0),\n indent = cx.indent,\n lineFirstWord = firstWordOfLine(textAfter),\n lineIndent = line.match(/^\\s*/)[0].replace(/\\t/g, indentUnitString).length,\n prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "",\n prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent;\n\n if (cx.prev &&\n (ch == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") ||\n ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||\n ch == "{" && (cx.type == "at"))) {\n indent = cx.indent - indentUnit;\n } else if (!(/(\\})/.test(ch))) {\n if (/@|\\$|\\d/.test(ch) ||\n /^\\{/.test(textAfter) ||\n/^\\s*\\/(\\/|\\*)/.test(textAfter) ||\n /^\\s*\\/\\*/.test(prevLineFirstWord) ||\n /^\\s*[\\w-\\.\\[\\]\\\'\\"]+\\s*(\\?|:|\\+)?=/i.test(textAfter) ||\n/^(\\+|-)?[a-z][\\w-]*\\(/i.test(textAfter) ||\n/^return/.test(textAfter) ||\n wordIsBlock(lineFirstWord)) {\n indent = lineIndent;\n } else if (/(\\.|#|:|\\[|\\*|&|>|~|\\+|\\/)/.test(ch) || wordIsTag(lineFirstWord)) {\n if (/\\,\\s*$/.test(prevLineFirstWord)) {\n indent = prevLineIndent;\n } else if (/^\\s+/.test(line) && (/(\\.|#|:|\\[|\\*|&|>|~|\\+|\\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord))) {\n indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit;\n } else {\n indent = lineIndent;\n }\n } else if (!/,\\s*$/.test(line) && (wordIsVendorPrefix(lineFirstWord) || wordIsProperty(lineFirstWord))) {\n if (wordIsBlock(prevLineFirstWord)) {\n indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit;\n } else if (/^\\{/.test(prevLineFirstWord)) {\n indent = lineIndent <= prevLineIndent ? lineIndent : prevLineIndent + indentUnit;\n } else if (wordIsVendorPrefix(prevLineFirstWord) || wordIsProperty(prevLineFirstWord)) {\n indent = lineIndent >= prevLineIndent ? prevLineIndent : lineIndent;\n } else if (/^(\\.|#|:|\\[|\\*|&|@|\\+|\\-|>|~|\\/)/.test(prevLineFirstWord) ||\n /=\\s*$/.test(prevLineFirstWord) ||\n wordIsTag(prevLineFirstWord) ||\n /^\\$[\\w-\\.\\[\\]\\\'\\"]/.test(prevLineFirstWord)) {\n indent = prevLineIndent + indentUnit;\n } else {\n indent = lineIndent;\n }\n }\n }\n return indent;\n },\n electricChars: "}",\n blockCommentStart: "/*",\n blockCommentEnd: "*/",\n blockCommentContinue: " * ",\n lineComment: "//",\n fold: "indent"\n };\n });\n\n // developer.mozilla.org/en-US/docs/Web/HTML/Element\n var tagKeywords_ = ["a","abbr","address","area","article","aside","audio", "b", "base","bdi", "bdo","bgsound","blockquote","body","br","button","canvas","caption","cite", "code","col","colgroup","data","datalist","dd","del","details","dfn","div", "dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1", "h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe", "img","input","ins","kbd","keygen","label","legend","li","link","main","map", "mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes", "noscript","object","ol","optgroup","option","output","p","param","pre", "progress","q","rp","rt","ruby","s","samp","script","section","select", "small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track", "u","ul","var","video"];\n\n // github.com/codemirror/CodeMirror/blob/master/mode/css/css.js\n // Note, "url-prefix" should precede "url" in order to match correctly in documentTypesRegexp\n var documentTypes_ = ["domain", "regexp", "url-prefix", "url"];\n var mediaTypes_ = ["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"];\n var mediaFeatures_ = ["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"];\n var propertyKeywords_ = ["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"];\n var nonStandardPropertyKeywords_ = ["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"];\n var fontProperties_ = ["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"];\n var colorKeywords_ = ["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"];\n var valueKeywords_ = ["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around", "unset"];\n\n var wordOperatorKeywords_ = ["in","and","or","not","is not","is a","is","isnt","defined","if unless"],\n blockKeywords_ = ["for","if","else","unless", "from", "to"],\n commonAtoms_ = ["null","true","false","href","title","type","not-allowed","readonly","disabled"],\n commonDef_ = ["@font-face", "@keyframes", "@media", "@viewport", "@page", "@host", "@supports", "@block", "@css"];\n\n var hintWords = tagKeywords_.concat(documentTypes_,mediaTypes_,mediaFeatures_,\n propertyKeywords_,nonStandardPropertyKeywords_,\n colorKeywords_,valueKeywords_,fontProperties_,\n wordOperatorKeywords_,blockKeywords_,\n commonAtoms_,commonDef_);\n\n function wordRegexp(words) {\n words = words.sort(function(a,b){return b > a;});\n return new RegExp("^((" + words.join(")|(") + "))\\\\b");\n }\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) keys[array[i]] = true;\n return keys;\n }\n\n function escapeRegExp(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, "\\\\$&");\n }\n\n CodeMirror.registerHelper("hintWords", "stylus", hintWords);\n CodeMirror.defineMIME("text/x-styl", "stylus");\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/stylus/stylus.js?')},"./node_modules/codemirror/mode/vue/vue.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/vue/vue.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function (mod) {\n "use strict";\n if (true) {// CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"),\n __webpack_require__(/*! ../../addon/mode/overlay */ "./node_modules/codemirror/addon/mode/overlay.js"),\n __webpack_require__(/*! ../xml/xml */ "./node_modules/codemirror/mode/xml/xml.js"),\n __webpack_require__(/*! ../javascript/javascript */ "./node_modules/codemirror/mode/javascript/javascript.js"),\n __webpack_require__(/*! ../coffeescript/coffeescript */ "./node_modules/codemirror/mode/coffeescript/coffeescript.js"),\n __webpack_require__(/*! ../css/css */ "./node_modules/codemirror/mode/css/css.js"),\n __webpack_require__(/*! ../sass/sass */ "./node_modules/codemirror/mode/sass/sass.js"),\n __webpack_require__(/*! ../stylus/stylus */ "./node_modules/codemirror/mode/stylus/stylus.js"),\n __webpack_require__(/*! ../pug/pug */ "./node_modules/codemirror/mode/pug/pug.js"),\n __webpack_require__(/*! ../handlebars/handlebars */ "./node_modules/codemirror/mode/handlebars/handlebars.js"));\n } else {}\n})(function (CodeMirror) {\n var tagLanguages = {\n script: [\n ["lang", /coffee(script)?/, "coffeescript"],\n ["type", /^(?:text|application)\\/(?:x-)?coffee(?:script)?$/, "coffeescript"],\n ["lang", /^babel$/, "javascript"],\n ["type", /^text\\/babel$/, "javascript"],\n ["type", /^text\\/ecmascript-\\d+$/, "javascript"]\n ],\n style: [\n ["lang", /^stylus$/i, "stylus"],\n ["lang", /^sass$/i, "sass"],\n ["lang", /^less$/i, "text/x-less"],\n ["lang", /^scss$/i, "text/x-scss"],\n ["type", /^(text\\/)?(x-)?styl(us)?$/i, "stylus"],\n ["type", /^text\\/sass/i, "sass"],\n ["type", /^(text\\/)?(x-)?scss$/i, "text/x-scss"],\n ["type", /^(text\\/)?(x-)?less$/i, "text/x-less"]\n ],\n template: [\n ["lang", /^vue-template$/i, "vue"],\n ["lang", /^pug$/i, "pug"],\n ["lang", /^handlebars$/i, "handlebars"],\n ["type", /^(text\\/)?(x-)?pug$/i, "pug"],\n ["type", /^text\\/x-handlebars-template$/i, "handlebars"],\n [null, null, "vue-template"]\n ]\n };\n\n CodeMirror.defineMode("vue-template", function (config, parserConfig) {\n var mustacheOverlay = {\n token: function (stream) {\n if (stream.match(/^\\{\\{.*?\\}\\}/)) return "meta mustache";\n while (stream.next() && !stream.match("{{", false)) {}\n return null;\n }\n };\n return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay);\n });\n\n CodeMirror.defineMode("vue", function (config) {\n return CodeMirror.getMode(config, {name: "htmlmixed", tags: tagLanguages});\n }, "htmlmixed", "xml", "javascript", "coffeescript", "css", "sass", "stylus", "pug", "handlebars");\n\n CodeMirror.defineMIME("script/x-vue", "vue");\n CodeMirror.defineMIME("text/x-vue", "vue");\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/vue/vue.js?')},"./node_modules/codemirror/mode/xml/xml.js":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
\*************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ "./node_modules/codemirror/lib/codemirror.js"));\n else {}\n})(function(CodeMirror) {\n"use strict";\n\nvar htmlConfig = {\n autoSelfClosers: {\'area\': true, \'base\': true, \'br\': true, \'col\': true, \'command\': true,\n \'embed\': true, \'frame\': true, \'hr\': true, \'img\': true, \'input\': true,\n \'keygen\': true, \'link\': true, \'meta\': true, \'param\': true, \'source\': true,\n \'track\': true, \'wbr\': true, \'menuitem\': true},\n implicitlyClosed: {\'dd\': true, \'li\': true, \'optgroup\': true, \'option\': true, \'p\': true,\n \'rp\': true, \'rt\': true, \'tbody\': true, \'td\': true, \'tfoot\': true,\n \'th\': true, \'tr\': true},\n contextGrabbers: {\n \'dd\': {\'dd\': true, \'dt\': true},\n \'dt\': {\'dd\': true, \'dt\': true},\n \'li\': {\'li\': true},\n \'option\': {\'option\': true, \'optgroup\': true},\n \'optgroup\': {\'optgroup\': true},\n \'p\': {\'address\': true, \'article\': true, \'aside\': true, \'blockquote\': true, \'dir\': true,\n \'div\': true, \'dl\': true, \'fieldset\': true, \'footer\': true, \'form\': true,\n \'h1\': true, \'h2\': true, \'h3\': true, \'h4\': true, \'h5\': true, \'h6\': true,\n \'header\': true, \'hgroup\': true, \'hr\': true, \'menu\': true, \'nav\': true, \'ol\': true,\n \'p\': true, \'pre\': true, \'section\': true, \'table\': true, \'ul\': true},\n \'rp\': {\'rp\': true, \'rt\': true},\n \'rt\': {\'rp\': true, \'rt\': true},\n \'tbody\': {\'tbody\': true, \'tfoot\': true},\n \'td\': {\'td\': true, \'th\': true},\n \'tfoot\': {\'tbody\': true},\n \'th\': {\'td\': true, \'th\': true},\n \'thead\': {\'tbody\': true, \'tfoot\': true},\n \'tr\': {\'tr\': true}\n },\n doNotIndent: {"pre": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode("xml", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == "<") {\n if (stream.eat("!")) {\n if (stream.eat("[")) {\n if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));\n else return null;\n } else if (stream.match("--")) {\n return chain(inBlock("comment", "--\x3e"));\n } else if (stream.match("DOCTYPE", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat("?")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock("meta", "?>");\n return "meta";\n } else {\n type = stream.eat("/") ? "closeTag" : "openTag";\n state.tokenize = inTag;\n return "tag bracket";\n }\n } else if (ch == "&") {\n var ok;\n if (stream.eat("#")) {\n if (stream.eat("x")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(";");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(";");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(";");\n }\n return ok ? "atom" : "error";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == ">" || (ch == "/" && stream.eat(">"))) {\n state.tokenize = inText;\n type = ch == ">" ? "endTag" : "selfcloseTag";\n return "tag bracket";\n } else if (ch == "=") {\n type = "equals";\n return null;\n } else if (ch == "<") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + " tag error" : "tag error";\n } else if (/[\\\'\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\"\\\']*[^\\s\\u00a0=<>\\"\\\'\\/]/);\n return "word";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return "string";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == "<") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == ">") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return "meta";\n };\n }\n\n function lower(tagName) {\n return tagName && tagName.toLowerCase();\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName || "";\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||\n !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == "openTag") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == "closeTag") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == "word") {\n state.tagName = stream.current();\n setStyle = "tag";\n return attrState;\n } else if (config.allowMissingTagName && type == "endTag") {\n setStyle = "tag bracket";\n return attrState(type, stream, state);\n } else {\n setStyle = "error";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == "word") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = "tag";\n return closeState;\n } else {\n setStyle = "tag error";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == "endTag") {\n setStyle = "tag bracket";\n return closeState(type, stream, state);\n } else {\n setStyle = "error";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != "endTag") {\n setStyle = "error";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = "error";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == "word") {\n setStyle = "attribute";\n return attrEqState;\n } else if (type == "endTag" || type == "selfcloseTag") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == "selfcloseTag" ||\n config.autoSelfClosers.hasOwnProperty(lower(tagName))) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = "error";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == "equals") return attrValueState;\n if (!config.allowMissing) setStyle = "error";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == "string") return attrContinuedState;\n if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}\n setStyle = "error";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == "string") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != "comment") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == "error" ? style + " error" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n if (tagAfter && tagAfter[1]) { // Closing tag spotted\n while (context) {\n if (context.tagName == tagAfter[2]) {\n context = context.prev;\n break;\n } else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {\n context = context.prev;\n } else {\n break;\n }\n }\n } else if (tagAfter) { // Opening tag spotted\n while (context) {\n var grabbers = config.contextGrabbers[lower(context.tagName)];\n if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))\n context = context.prev;\n else\n break;\n }\n }\n while (context && context.prev && !context.startOfLine)\n context = context.prev;\n if (context) return context.indent + indentUnit;\n else return state.baseIndent || 0;\n },\n\n electricInput: /<\\/[\\s\\w:]+>$/,\n blockCommentStart: "\x3c!--",\n blockCommentEnd: "--\x3e",\n\n configuration: config.htmlMode ? "html" : "xml",\n helperType: config.htmlMode ? "html" : "xml",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n },\n\n xmlCurrentTag: function(state) {\n return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null\n },\n\n xmlCurrentContext: function(state) {\n var context = []\n for (var cx = state.context; cx; cx = cx.prev)\n context.push(cx.tagName)\n return context.reverse()\n }\n };\n});\n\nCodeMirror.defineMIME("text/xml", "xml");\nCodeMirror.defineMIME("application/xml", "xml");\nif (!CodeMirror.mimeModes.hasOwnProperty("text/html"))\n CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/xml/xml.js?')},"./node_modules/codemirror/mode/yaml/yaml.js":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/yaml/yaml.js ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n if (true) // CommonJS\n mod(__webpack_require__(/*! ../../lib/codemirror */ \"./node_modules/codemirror/lib/codemirror.js\"));\n else {}\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"yaml\", function() {\n\n var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];\n var keywordRegex = new RegExp(\"\\\\b((\"+cons.join(\")|(\")+\"))$\", 'i');\n\n return {\n token: function(stream, state) {\n var ch = stream.peek();\n var esc = state.escaped;\n state.escaped = false;\n /* comments */\n if (ch == \"#\" && (stream.pos == 0 || /\\s/.test(stream.string.charAt(stream.pos - 1)))) {\n stream.skipToEnd();\n return \"comment\";\n }\n\n if (stream.match(/^('([^']|\\\\.)*'?|\"([^\"]|\\\\.)*\"?)/))\n return \"string\";\n\n if (state.literal && stream.indentation() > state.keyCol) {\n stream.skipToEnd(); return \"string\";\n } else if (state.literal) { state.literal = false; }\n if (stream.sol()) {\n state.keyCol = 0;\n state.pair = false;\n state.pairStart = false;\n /* document start */\n if(stream.match('---')) { return \"def\"; }\n /* document end */\n if (stream.match('...')) { return \"def\"; }\n /* array list item */\n if (stream.match(/\\s*-\\s+/)) { return 'meta'; }\n }\n /* inline pairs/lists */\n if (stream.match(/^(\\{|\\}|\\[|\\])/)) {\n if (ch == '{')\n state.inlinePairs++;\n else if (ch == '}')\n state.inlinePairs--;\n else if (ch == '[')\n state.inlineList++;\n else\n state.inlineList--;\n return 'meta';\n }\n\n /* list separator */\n if (state.inlineList > 0 && !esc && ch == ',') {\n stream.next();\n return 'meta';\n }\n /* pairs separator */\n if (state.inlinePairs > 0 && !esc && ch == ',') {\n state.keyCol = 0;\n state.pair = false;\n state.pairStart = false;\n stream.next();\n return 'meta';\n }\n\n /* start of value of a pair */\n if (state.pairStart) {\n /* block literals */\n if (stream.match(/^\\s*(\\||\\>)\\s*/)) { state.literal = true; return 'meta'; };\n /* references */\n if (stream.match(/^\\s*(\\&|\\*)[a-z0-9\\._-]+\\b/i)) { return 'variable-2'; }\n /* numbers */\n if (state.inlinePairs == 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?$/)) { return 'number'; }\n if (state.inlinePairs > 0 && stream.match(/^\\s*-?[0-9\\.\\,]+\\s?(?=(,|}))/)) { return 'number'; }\n /* keywords */\n if (stream.match(keywordRegex)) { return 'keyword'; }\n }\n\n /* pairs (associative arrays) -> key */\n if (!state.pair && stream.match(/^\\s*(?:[,\\[\\]{}&*!|>'\"%@`][^\\s'\":]|[^,\\[\\]{}#&*!|>'\"%@`])[^#]*?(?=\\s*:($|\\s))/)) {\n state.pair = true;\n state.keyCol = stream.indentation();\n return \"atom\";\n }\n if (state.pair && stream.match(/^:\\s*/)) { state.pairStart = true; return 'meta'; }\n\n /* nothing found, continue */\n state.pairStart = false;\n state.escaped = (ch == '\\\\');\n stream.next();\n return null;\n },\n startState: function() {\n return {\n pair: false,\n pairStart: false,\n keyCol: 0,\n inlinePairs: 0,\n inlineList: 0,\n literal: false,\n escaped: false\n };\n },\n lineComment: \"#\",\n fold: \"indent\"\n };\n});\n\nCodeMirror.defineMIME(\"text/x-yaml\", \"yaml\");\nCodeMirror.defineMIME(\"text/yaml\", \"yaml\");\n\n});\n\n\n//# sourceURL=webpack:///./node_modules/codemirror/mode/yaml/yaml.js?")},"./node_modules/codemirror/theme/monokai.css":
/*!***************************************************!*\
!*** ./node_modules/codemirror/theme/monokai.css ***!
\***************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/codemirror/theme/monokai.css?")},"./node_modules/mime/Mime.js":
/*!***********************************!*\
!*** ./node_modules/mime/Mime.js ***!
\***********************************/
/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval("\n\n/**\n * @param typeMap [Object] Map of MIME type -> Array[extensions]\n * @param ...\n */\nfunction Mime() {\n this._types = Object.create(null);\n this._extensions = Object.create(null);\n\n for (let i = 0; i < arguments.length; i++) {\n this.define(arguments[i]);\n }\n\n this.define = this.define.bind(this);\n this.getType = this.getType.bind(this);\n this.getExtension = this.getExtension.bind(this);\n}\n\n/**\n * Define mimetype -> extension mappings. Each key is a mime-type that maps\n * to an array of extensions associated with the type. The first extension is\n * used as the default extension for the type.\n *\n * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});\n *\n * If a type declares an extension that has already been defined, an error will\n * be thrown. To suppress this error and force the extension to be associated\n * with the new type, pass `force`=true. Alternatively, you may prefix the\n * extension with \"*\" to map the type to extension, without mapping the\n * extension to the type.\n *\n * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});\n *\n *\n * @param map (Object) type definitions\n * @param force (Boolean) if true, force overriding of existing definitions\n */\nMime.prototype.define = function(typeMap, force) {\n for (let type in typeMap) {\n let extensions = typeMap[type].map(function(t) {\n return t.toLowerCase();\n });\n type = type.toLowerCase();\n\n for (let i = 0; i < extensions.length; i++) {\n const ext = extensions[i];\n\n // '*' prefix = not the preferred type for this extension. So fixup the\n // extension, and skip it.\n if (ext[0] === '*') {\n continue;\n }\n\n if (!force && (ext in this._types)) {\n throw new Error(\n 'Attempt to change mapping for \"' + ext +\n '\" extension from \"' + this._types[ext] + '\" to \"' + type +\n '\". Pass `force=true` to allow this, otherwise remove \"' + ext +\n '\" from the list of extensions for \"' + type + '\".'\n );\n }\n\n this._types[ext] = type;\n }\n\n // Use first extension as default\n if (force || !this._extensions[type]) {\n const ext = extensions[0];\n this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);\n }\n }\n};\n\n/**\n * Lookup a mime type based on extension\n */\nMime.prototype.getType = function(path) {\n path = String(path);\n let last = path.replace(/^.*[/\\\\]/, '').toLowerCase();\n let ext = last.replace(/^.*\\./, '').toLowerCase();\n\n let hasPath = last.length < path.length;\n let hasDot = ext.length < last.length - 1;\n\n return (hasDot || !hasPath) && this._types[ext] || null;\n};\n\n/**\n * Return file extension associated with a mime type\n */\nMime.prototype.getExtension = function(type) {\n type = /^\\s*([^;\\s]*)/.test(type) && RegExp.$1;\n return type && this._extensions[type.toLowerCase()] || null;\n};\n\nmodule.exports = Mime;\n\n\n//# sourceURL=webpack:///./node_modules/mime/Mime.js?")},"./node_modules/mime/index.js":
/*!************************************!*\
!*** ./node_modules/mime/index.js ***!
\************************************/
/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval('\n\nlet Mime = __webpack_require__(/*! ./Mime */ "./node_modules/mime/Mime.js");\nmodule.exports = new Mime(__webpack_require__(/*! ./types/standard */ "./node_modules/mime/types/standard.js"), __webpack_require__(/*! ./types/other */ "./node_modules/mime/types/other.js"));\n\n\n//# sourceURL=webpack:///./node_modules/mime/index.js?')},"./node_modules/mime/types/other.js":
/*!******************************************!*\
!*** ./node_modules/mime/types/other.js ***!
\******************************************/
/*! no static exports found */function(module,exports){eval('module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};\n\n//# sourceURL=webpack:///./node_modules/mime/types/other.js?')},"./node_modules/mime/types/standard.js":
/*!*********************************************!*\
!*** ./node_modules/mime/types/standard.js ***!
\*********************************************/
/*! no static exports found */function(module,exports){eval('module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};\n\n//# sourceURL=webpack:///./node_modules/mime/types/standard.js?')},"./node_modules/vue-codemirror/dist/vue-codemirror.js":
/*!************************************************************!*\
!*** ./node_modules/vue-codemirror/dist/vue-codemirror.js ***!
\************************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('!function(e,t){ true?module.exports=t(__webpack_require__(/*! codemirror */ "./node_modules/codemirror/lib/codemirror.js")):undefined}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),i=window.CodeMirror||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0}),t.default={name:"codemirror",data:function(){return{content:"",codemirror:null,cminstance:null}},props:{code:String,value:String,marker:Function,unseenLines:Array,name:{type:String,default:"codemirror"},placeholder:{type:String,default:""},merge:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{}}},globalEvents:{type:Array,default:function(){return[]}}},watch:{options:{deep:!0,handler:function(e){for(var t in e)this.cminstance.setOption(t,e[t])}},merge:function(){this.$nextTick(this.switchMerge)},code:function(e){this.handerCodeChange(e)},value:function(e){this.handerCodeChange(e)}},methods:{initialize:function(){var e=this,t=Object.assign({},this.globalOptions,this.options);this.merge?(this.codemirror=i.MergeView(this.$refs.mergeview,t),this.cminstance=this.codemirror.edit):(this.codemirror=i.fromTextArea(this.$refs.textarea,t),this.cminstance=this.codemirror,this.cminstance.setValue(this.code||this.value||this.content)),this.cminstance.on("change",function(t){e.content=t.getValue(),e.$emit&&e.$emit("input",e.content)});var n={};["scroll","changes","beforeChange","cursorActivity","keyHandled","inputRead","electricInput","beforeSelectionChange","viewportChange","swapDoc","gutterClick","gutterContextMenu","focus","blur","refresh","optionChange","scrollCursorIntoView","update"].concat(this.events).concat(this.globalEvents).filter(function(e){return!n[e]&&(n[e]=!0)}).forEach(function(t){e.cminstance.on(t,function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];e.$emit.apply(e,[t].concat(r));var i=t.replace(/([A-Z])/g,"-$1").toLowerCase();i!==t&&e.$emit.apply(e,[i].concat(r))})});this.$emit("ready",this.codemirror),this.unseenLineMarkers(),this.refresh()},refresh:function(){var e=this;this.$nextTick(function(){e.cminstance.refresh()})},destroy:function(){var e=this.cminstance.doc.cm.getWrapperElement();e&&e.remove&&e.remove()},handerCodeChange:function(e){if(e!==this.cminstance.getValue()){var t=this.cminstance.getScrollInfo();this.cminstance.setValue(e),this.content=e,this.cminstance.scrollTo(t.left,t.top)}this.unseenLineMarkers()},unseenLineMarkers:function(){var e=this;void 0!==this.unseenLines&&void 0!==this.marker&&this.unseenLines.forEach(function(t){var n=e.cminstance.lineInfo(t);e.cminstance.setGutterMarker(t,"breakpoints",n.gutterMarkers?null:e.marker())})},switchMerge:function(){var e=this.cminstance.doc.history,t=this.cminstance.doc.cleanGeneration;this.options.value=this.cminstance.getValue(),this.destroy(),this.initialize(),this.cminstance.doc.history=e,this.cminstance.doc.cleanGeneration=t}},mounted:function(){this.initialize()},beforeDestroy:function(){this.destroy()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n.n(r);for(var i in r)["default","default"].indexOf(i)<0&&function(e){n.d(t,e,function(){return r[e]})}(i);var s=n(5),c=n(4),a=c(o.a,s.a,!1,null,null,null);t.default=a.exports},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.codemirror=t.CodeMirror=void 0;var o=n(0),i=r(o),s=n(2),c=r(s),a=window.CodeMirror||i.default,u=function(e,t){t&&(t.options&&(c.default.props.globalOptions.default=function(){return t.options}),t.events&&(c.default.props.globalEvents.default=function(){return t.events})),e.component(c.default.name,c.default)},l={CodeMirror:a,codemirror:c.default,install:u};t.default=l,t.CodeMirror=a,t.codemirror=c.default,t.install=u},function(e,t){e.exports=function(e,t,n,r,o,i){var s,c=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(s=e,c=e.default);var u="function"==typeof c?c.options:c;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId=o);var l;if(i?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=l):r&&(l=r),l){var f=u.functional,d=f?u.render:u.beforeCreate;f?(u._injectStyles=l,u.render=function(e,t){return l.call(t),d(e,t)}):u.beforeCreate=d?[].concat(d,l):[l]}return{esModule:s,exports:c,options:u}}},function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vue-codemirror",class:{merge:e.merge}},[e.merge?n("div",{ref:"mergeview"}):n("textarea",{ref:"textarea",attrs:{name:e.name,placeholder:e.placeholder}})])},o=[],i={render:r,staticRenderFns:o};t.a=i}])});\n\n//# sourceURL=webpack:///./node_modules/vue-codemirror/dist/vue-codemirror.js?')}}]);